Closed ashishoxo closed 3 years ago
@ashishoxo The issue here seems to be with the variable names declared in your code snippet. Plivo follows the camelCase naming convention for PHP. The ultimate code snippet is as follows: `<?php /**
try {
$response = $client->calls->startRecording(
'144481c2-09b3-4b82-b12a-ab3af5f68501',
["callbackUrl" => "
The answe provided by @huzaif-plivo is not correct.
If we change to use camel case it will not throw exception. But the callback is not triggered.
The main issue here is it is not properly handled in code level.
The response when we use callback_url is as
{"api_id":"xxx","message":"async api spawned"}
If we look into the phpdoc or api docs https://www.plivo.com/docs/voice/api/call/record-calls#start-recording-a-call there is no mention of camelCase .
Hi,
I am using this SDK in my project. When I am using the startRecording method as shown below.
$response = $client->calls->startRecording( $request->call_uuid,[ "callback_url" => "<SOME CALLBACK URL>", "callback_method" => "POST", ] );
Then I got an error. (Undefined index: url {"userId":2,"exception":"[object] (ErrorException(code: 0): Undefined index: url at vendor/plivo/plivo-php/src/Plivo/Resources/Call/CallInterface.php:463)
Please fix this issue in this SDK or let me know the better way to handle this.
Thanks