question

vadim-soluyanov avatar image
vadim-soluyanov asked ·

Call Log. No Recordings parameter

When I receive a
call log, the call record option is not returned, although in the Ringcentral desktop application I press the "Record Call" button and then I see this record and can listen, but through the API, when I receive the array, there is no recordings parameter. How to get a link to record a call via API?
topic-default
1 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Tyler Liu avatar image
Tyler Liu answered ·
Here is sample code for call recording download:  https://github.com/ringcentral/ringcentral-csharp-client/blob/master/RingCentral.Test/BinaryTest.cs#...

In the body of a call log record, there is a recording property where you can fetch information about it especially its ID.
Share
1 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

vadim-soluyanov avatar image
vadim-soluyanov answered ·
In the request, I send the parameters /account/'.$accountId.'/extension/'.$extensionId.'/call-log and get an array in response, but there is no recording property. Do I need to specify some additional parameter in my case to get this property. Maybe something has changed in the API ?




Share
1 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Tyler Liu avatar image
Tyler Liu answered ·
Share
1 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

vadim-soluyanov avatar image
vadim-soluyanov answered ·
This parameter causes an error in my case:

{
  "errorCode" : "InvalidParameter",
  "message" : "Parameter [withRecording] value is invalid",
  "errors" : [ {
    "errorCode" : "CMN-101",
    "message" : "Parameter [withRecording] value is invalid",
    "parameterName" : "withRecording"
  } ],
  "parameterName" : "withRecording"
}



Share
1 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Tyler Liu avatar image
Tyler Liu answered ·
Are you sending "true" as string or boolean?
15 comments Share
1 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Boolean
0 Likes 0 · ·
Could you please post your code ? The part you used to fetch call logs.
0 Likes 0 · ·
$useSessionId = ($callInfo['CALL_TYPE']=='IN') ? $callInfo['IN_SESSION_ID'] : $callInfo['OUT_SESSION_ID'];
            $extensionId = $callInfo['EXTENSION_ID'];
            $params = array(
                'sessionId' => $useSessionId,
                'withRecording' => true,
            );
            $result = $rcApi->getCallLog('~', $extensionId, $params);

and call method

public function getCallLog($accountId, $extensionId, $queryParameters=array(), $headers=array()) {
        $path = '/account/'.$accountId.'/extension/'.$extensionId.'/call-log';
        $group = $this->getRateGroup();
        $this->setRateGroup('HEAVY');
        $result = $this->get($path, $queryParameters, $headers);
        $this->setRateGroup($group);

        return $result;
    }

and reply from RC Rest

mess:
                Method: GET
                Url: /account/~/extension/191668004/call-log
                Query: Array
(
    [sessionId] => 19567570004
    [withRecording] => 1
)

                Body:
                Headers: Array
(
    [Authorization] => Bearer U0pDMTFQMDFQQVMwMHxBQURiLXVmTnllUVc5d0xHQXFxX0htQVNpTndrT1dwbEpGZEV1aE9uRnFLY2MwZVdJd1hBQVF6WVdZT0JNc0diT29ONF9QWWRPMEVYNENYQjd4dmJsWHJoRktleW5VM2RmZ1U4RWFEc3FFZ0lVTV9iZzFOUHQ4eXozNExlYjJuSG01S0J3SGwzUU5rWThxYXlNaGVXOUNYYW5zLTBJX2hkbjB3MG5rU2ozWk9MMHpCeGlDQl9SbTlnU09DcEpIREZyWmZQWVZrVTZydC1tZjFuOTlZeU5hekl8QVlacUJRfFZPdlozSHdTaXpTMk9pYVFzb0l1UkF8QUE
    [Accept] => application/json
)

                Result: {
  "errorCode" : "InvalidParameter",
  "message" : "Parameter [withRecording] value is invalid",
  "errors" : [ {
    "errorCode" : "CMN-101",
    "message" : "Parameter [withRecording] value is invalid",
    "parameterName" : "withRecording"
  } ],
  "parameterName" : "withRecording"
}
                Curl error code: 0



0 Likes 0 · ·
Now I'll try to send as a string


1 Like 1 · ·
And don't forget "view=Detailed"

  https://github.com/ringcentral/ringcentral-csharp-client/blob/master/RingCentral.Test/BinaryTest.cs#...

I believe you can translate the C# code to PHP. I am sure the C# code works.
1 Like 1 · ·
Show more comments

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.