question

vadim-soluyanov6963 avatar image
vadim-soluyanov6963 asked Tyler Liu commented

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?

call logs
1 |3000

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.
1 |3000

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

vadim-soluyanov6963 avatar image
vadim-soluyanov6963 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 ?




1 |3000

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
1 |3000

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

vadim-soluyanov6963 avatar image
vadim-soluyanov6963 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"
}



1 |3000

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 Tyler Liu commented
Are you sending "true" as string or boolean?
15 comments
1 |3000

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

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 ·
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 ·
Show more comments

Developer sandbox tools

Using the RingCentral Phone for Desktop, you can dial or receive test calls, send and receive test SMS or Fax messages in your sandbox environment.

Download RingCentral Phone for Desktop:

Tip: switch to the "sandbox mode" before logging in the app:

  • On MacOS: press "fn + command + f2" keys
  • On Windows: press "Ctrl + F2" keys