question

hambrise-alan5624 avatar image
hambrise-alan5624 asked hambrise-luke-alan-j5494 answered

I have created subscription using webhook and i am getting response. i need call record Id in the response.

I have created subscription using webhook and i am getting response as below. i need to fetch call record for this Event how can i do? please help to get it resolved.

{


"uuid": "1343368781877007566-7030373935822630719",

"event": "/restapi/v1.0/account/129965004/extension/129965004/presence?detailedTelephonyState=true",

"timestamp": "2017-05-22T12:18:50.808Z",

"subscriptionId": "83efa9c0-710a-4b06-a9fd-949834c7f713",

"body": {


"extensionId": 139055004,

"telephonyStatus": "CallConnected",

"activeCalls": [

{


"id": "PDhBLpqFMHGWlHSsd5foXioTWJVzGT3e",

"direction": "Outbound",

"from": "+16603314970",

"to": "+19158701061",

"telephonyStatus": "CallConnected",

"sessionId": "19345726003"

}

],

"sequence": 542039,

"presenceStatus": "Busy",

"userStatus": "Available",

"dndStatus": "TakeAllCalls",

"allowSeeMyPresence": true,

"ringOnMonitoredCall": false,

"pickUpCallsOnHold": false

}

}

webhooks
1 |3000

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

ak avatar image
ak answered
You could use  Call-Log API filtered by ' sessionId' to match the Presence events ( Push notifications ) when you receive using webhooks.

For ex: 

You could use the sessionID from the webhook push notifications above ( 19345726003 ) to make an API call to Call - Log endpoint as below:

Request

GET /restapi/v1.0/account/~/extension/~/call-log?sessionId=19345726003

Note: (  ~ ) tilde refers to the extension assigned to the account logged-in within the current session

If you would like to receive the account level call logs kindly use:
/restapi/v1.0/account/~/call-log?sessionId=19345726003

1 |3000

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

hambrise-luke-alan-j5494 avatar image
hambrise-luke-alan-j5494 answered
SessionID is ok, but for every notification type i am getting same session ID. what shall i do.
1 |3000

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

ak avatar image
ak answered
The sessionID remains same across the three events if it is for a specific call, for ex:

1.) Ringing
2.) Call Connected
3.) No Call 

For all the three notifications on a single call, you would receive the same sessionID for the push notifications.

May I know what is it that you are trying to achieve?


1 |3000

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

hambrise-luke-alan-j5494 avatar image
hambrise-luke-alan-j5494 answered
 I though session Id will be same for all calls. thank you i got it.
1 |3000

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

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