Is it a laravel package you are using or the direct package? Link?
Aug 23, 2022
14
Level 1
Africans Talking SDK php Laravel getDigits($options) ERROR:::: "message": "Array to string conversion",
Am trying to build a call center with Africans Talking SDK php Laravel but am getting but an gettings an errot when it comes to getdigits($options) ERROR:::: "message": "Array to string conversion",
$welcome = 'https://call_center2/welcome_note.mp3';
$categoryselect = 'https:/call_center2/helpcategoryselect.mp3';
$noresponse = 'https://call_center2/noresponse.mp3';
$callbackurl = 'https:/api/call_center/helpcategory/'.$user->id;
$options = [
'numDigits' => 2,
'timeout' => 45,
'finishOnKey' => '#',
'callbackUrl' => $callbackurl ,
];
$voiceActions = $this->voice->messageBuilder();
$xmlresponse = $voiceActions->play($welcome)->play($categoryselect)->getDigits($options)->play($noresponse)->build();
return $xmlresponse;
Level 102
I am also curious why it does not mention that "text" is required
Maybe you need to set it before the digitts?
$voiceActions = $this->voice->messageBuilder();
$xmlresponse = $voiceActions->play($welcome)->play($categoryselect)->say('foobar')->getDigits($options)->play($noresponse)->build();
return $xmlresponse;
or pass it in
$options = [
'text' => 'foobar',
'numDigits' => 2,
'timeout' => 45,
'finishOnKey' => '#',
'callbackUrl' => $callbackurl ,
];
1 like
Please or to participate in this conversation.