Question

Failure to pause active recording

  • 24 November 2023
  • 1 reply
  • 126 views

I have a webhook that takes in events from /account/~/telephony/sessions. After a call is started, the following events comes in:
{

'uuid': '7797363007370040051',

'event': '/restapi/v1.0/account/2372180004/extension/2372180004/telephony/sessions', 'timestamp': '2023-11-24T21:54:12.910Z',

'subscriptionId': '0cdd42b0-8039-425c-bdc2-be66d53c25c7',

'ownerId': '2372180004',

'body': {

'sequence': 7,

'sessionId': '972044820005',

'telephonySessionId': 's-a0e174f191008z18c03535d88za351b10000',

'serverId': '10.14.23.79.TAM',

'eventTime': '2023-11-24T21:54:12.842Z',

'parties': [

{

'accountId': '2372180004',

'extensionId': '2372180004',

'id': 'p-a0e174f191008z18c03535d88za351b10000-2',

'direction': 'Inbound',

'to': {

'phoneNumber': [NUMBER],

'name': [NAME],

'extensionId': '2372180004'

}, 'from': {

'phoneNumber': [NUMBER],

'name': [NAME]

}, 'recordings': [{

'id': '2410992944005',

'active': True

}], 'status': {

'code': 'Answered',

'rcc': False

},

'park': {},

'missedCall': False,

'standAlone': False,

'muted': False

}],

'origin': {'type': 'Call'}

}}

While the call the still active, I shortly made the request:

curl --request PATCH 
  --url 'https://platform.ringcentral.com/restapi/v1.0/account/~/telephony/sessions/s-a0e174f191008z18c03535d88za351b10000/parties/p-a0e174f191008z18c03535d88za351b10000-2/recordings/2410992944005?brandId=~' 
  --header 'accept: application/json' 
  --header 'authorization: Bearer [MY-BEARER-TOKEN]' 
  --header 'content-type: application/json' 
  --data '{"active":true}'

In which I am getting an Error code 400 response. I need help understanding why I would be getting this error, and what to do to resolve it. I made the same request where active was equal to false.


1 reply

Userlevel 1

First of all, why do you set the extra path to the url?

?brandId=~

Then, you wrote that you want to pause a recording. In the event posted above, the recording is being active.

'recordings': [{
    'id': '2410992944005',
    'active': True
}],

And you tried to set it active, not pausing it?

--data '{"active":true}'

Read this article to learn more.

Reply