question

Dan English avatar image
Dan English asked ·

Inbound presence event: does it include the external number called?

I'm listening for the following inbound call event:

/restapi/v1.0/account/~/extension/~/presence?detailedTelephonyState=true

Is there a way to know which external number was dialed? We need to know for routing/marketing purposes.

presenceevents
1 |1500 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.

Phong Vu avatar image
Phong Vu answered ·

The presence?detailedTelephonyState=true provides limited info about a call. I recommend you to use the "/telephony/sessions" event notification to get more details of a call. If you do need the presence info via presence notification. Put these in the filter array

[
"/restapi/v1.0/account/~/extension/~/presence",
"/restapi/v1.0/account/~/extension/~/telephony/sessions"
]

Check out this blog for more info about the telephony session event notification

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

Dan English avatar image
Dan English answered ·

Thank you.

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

Dan English avatar image
Dan English answered ·

Using the telephony sessions event, I still don't see the number dialed. In this test, I dialed +16167470088 but it doesn't show anywhere.


{
"uuid": "4052838342559586889",
"event": "/restapi/v1.0/account/244756004/extension/244756004/telephony/sessions",
"timestamp": "2020-10-02T20:33:30.604Z",
"subscriptionId": "89a75930-fba3-421a-b0f0-113b12b1b687",
"ownerId": "244756004",
"body": {
"sequence": 6,
"sessionId": "10761928005",
"telephonySessionId": "s-a2df515e3cdf49079cff06828c81f73a",
"serverId": "10.29.20.82.TAM",
"eventTime": "2020-10-02T20:33:30.449Z",
"parties": [
{
"accountId": "244756004",
"extensionId": "244756004",
"id": "p-a2df515e3cdf49079cff06828c81f73a-3",
"direction": "Inbound",
"to": {
"phoneNumber": "101",
"name": "Dan English",
"extensionId": "244756004"
},
"from": {
"phoneNumber": "+19492016584"
},
"status": {
"code": "Setup",
"rcc": false
},
"park": {},
"missedCall": false,
"standAlone": false,
"muted": false
}
],
"origin": {
"type": "Call"
}
}
}


4 comments
1 |1500 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.

How do make the call? Did you set the caller id? Which number is the "from" "+19492016584". Where is this number coming from?

0 Likes 0 ·

That is my personal cel number, used for testing.

0 Likes 0 ·

Oh, so you want to see the "to" number. That's your main company number. Can you dial the digital line number (424) xxx-8002

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