Skip to main content

Has anyone figured out a solution to this issue?

https://community.ringcentral.com/questions/202/how-to-detect-the-redundantinbound-leg-of-a-ringou.html

Repeated below:

How to detect the redundant/inbound leg of a RingOut?

Is there anyone who is aware of the way to detect the redundant/inbound leg of a ringout?

The use case is that: the client app makes a ringout. Then in the presence event we receive TWO legs of the ringout (one inbound and one outbound). From the app and customers' perspective, we wouldn't want to show the inbound leg as customers just made a outbound call, nor are they expected to know how ringout works. Customers make a ringout, then the app shows an outbound call. The logic should be as simple as that.

When you make a Ring-Out call from a direct number, there will be no extra "active" call in the event notification. My guess is that you make a Ring-Out call using a main company number and an extension number. Can you share the entire presence notification with both Inbound and Outbound active calls. Remember to fake the real numbers when you share the data in public community.


inbound

Inbound

[
{
"uri": "https://platform.ringcentral.com/restapi/v1.0/account/1825400000/extension/424100000/call-log/DVOvPyVXO4bkTUA?view=Detailed",
"id": "DVOvPyVXO4bkTUA",
"sessionId": "161112248034",
"startTime": "2022-03-29T19:26:18.276Z",
"duration": 10,
"type": "Voice",
"internalType": "LocalNumber",
"direction": "Inbound",
"action": "Phone Call",
"result": "Rejected",
"to": {
"name": "Ext 41384",
"phoneNumber": "+11112223333",
"extensionId": "424198035"
},
"from": {
"name": "Test",
"phoneNumber": "+11112224444",
"location": "New York City, NY"
},
"extension": {
"uri": "https://platform.ringcentral.com/restapi/v1.0/account/1825400000/extension/424198035",
"id": 424198035
},
"telephonySessionId": "s-a7180dc170a3cz17fd7249657z59acbb0000",
"transport": "PSTN",
"lastModifiedTime": "2022-03-29T19:26:38.125Z",
"billing": {
"costIncluded": 0,
"costPurchased": 0
},
"legs": [
{
"startTime": "2022-03-29T19:26:18.276Z",
"duration": 10,
"type": "Voice",
"internalType": "LocalNumber",
"direction": "Inbound",
"action": "Phone Call",
"result": "Rejected",
"to": {
"name": "Ext 41384",
"phoneNumber": "+11112223333",
"extensionId": "424198035"
},
"from": {
"name": "Test",
"phoneNumber": "+11112224444",
"location": "New York City, NY"
},
"extension": {
"uri": "https://platform.ringcentral.com/restapi/v1.0/account/1825400000/extension/424198035",
"id": 424198035
},
"telephonySessionId": "s-a7180dc170a3cz17fd7249657z59acbb0000",
"transport": "PSTN",
"legType": "Accept",
"master": true
},
{
"startTime": "2022-03-29T19:26:19.253Z",
"duration": 4,
"type": "Voice",
"internalType": "Sip",
"direction": "Outbound",
"action": "VoIP Call",
"result": "Stopped",
"to": {
"phoneNumber": "+11112223333",
"extensionNumber": "726",
"location": "Layhill, MD"
},
"from": {
"name": "Ext 41384",
"phoneNumber": "+11112224444",
"extensionId": "424198035"
},
"extension": {
"uri": "https://platform.ringcentral.com/restapi/v1.0/account/1825400000/extension/424198035",
"id": 424198035
},
"telephonySessionId": "s-a7180dc170a3cz17fd7249657z59acbb0000",
"transport": "VoIP",
"legType": "PstnToSip"
}
]
}

OutBound

{
"uri": "https://platform.ringcentral.com/restapi/v1.0/account/182000000/extension/424198035/call-log/DVOvPF7MSsvQTUA?view=Detailed",
"id": "DVOvPF7MSsvQTUA",
"sessionId": "161112246034",
"startTime": "2022-03-29T19:26:13.570Z",
"duration": 14,
"type": "Voice",
"internalType": "LongDistance",
"direction": "Outbound",
"action": "RingOut PC",
"result": "Call connected",
"to": {
"phoneNumber": "+11112223333",
"extensionNumber": "726",
"location": "Layhill, MD"
},
"from": {
"name": "Ext 41384",
"phoneNumber": "+11112224444",
"extensionId": "424198035"
},
"extension": {
"uri": "https://platform.ringcentral.com/restapi/v1.0/account/18200000/extension/424198035",
"id": 424198035
},
"telephonySessionId": "s-a7180bf18adefz17fd7249622z59900e0000",
"transport": "PSTN",
"lastModifiedTime": "2022-03-29T19:26:46.135Z",
"billing": {
"costIncluded": 0,
"costPurchased": 0
},
"legs": [
{
"startTime": "2022-03-29T19:26:13.570Z",
"duration": 14,
"type": "Voice",
"internalType": "LongDistance",
"direction": "Outbound",
"action": "RingOut PC",
"result": "Call connected",
"to": {
"phoneNumber": "+11112223333",
"extensionNumber": "726",
"location": "Layhill, MD"
},
"from": {
"name": "Ext 41384",
"phoneNumber": "+11112224444",
"extensionId": "424198035"
},
"extension": {
"uri": "https://platform.ringcentral.com/restapi/v1.0/account/1825400000/extension/424198035",
"id": 424198035
},
"telephonySessionId": "s-a7180bf18adefz17fd7249622z59900e0000",
"transport": "PSTN",
"billing": {
"costIncluded": 0,
"costPurchased": 0
},
"legType": "RingOutClientToSubscriber",
"master": true
}
]
}

Reply