question

megan-molumby6628 avatar image
megan-molumby6628 asked Phong Vu commented

Is there any special setup that needs to occur in order for me to leverage the caller id when a call is routed through a Contact Center?

Is there any special setup that needs to occur in order for me to leverage the caller id when a call is routed through a Contact Center? I currently have my application functioning properly in production when a user receives a direct call. However, it is not functioning properly when they receive a call from the call center. I'm trying to trouble shoot to figure out if there is some setting in the call center needs to change or is there an additional call to the API that needs to occur in order to receive a call and query the caller id?


Additionally, when a call is coming from the call center will it lose the originating caller name and caller id?



Background: Application monitors presence, then if incoming call is answered, queries the caller id and name and uses this to lookup patient information.


caller idcontact center
1 |3000

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 Phong Vu commented
Hi Megan,

Is the contact center number under the same account as the agent number who receives the forwarded call? If so, you can use the presence event filter ( var filter = '/restapi/v1.0/account/~/presence?detailedTelephonyState=true') notification at the account level to get notifications for all extensions under that account. Then you can detect the original call to extract the caller id, number, name etc. and match with the forwarded call using the  telephonySessionId as they are identical in both original call and the forwarded call.

Let me know if this is the case and if you need further help.

+ Phong
2 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.

megan-molumby6628 avatar image megan-molumby6628 commented ·
Thank you for the speedy reply. I was using that filter but at the extension level, so I will need to update that. However, when you say to use the telephonySessionId to detect the original call, where am I looking to compare the incoming call telephonySessionId with? Would I be looking in all activeCallRequests to find a sessionId that matches?


Previous implementation: 

After confirming that the presenceStatus  is busy. 

 ExtensionActiveCallsResponse activeCallRequest = await rc.Restapi().Account().Extension().ActiveCalls().List(new ActiveCallInfo { direction = "Inbound"});

  CallLogRecord activeLog = activeCallRequest.records[0];

String sIncomingName = activeLog.from.name;



0 Likes 0 ·
Phong Vu avatar image Phong Vu ♦♦ commented ·
Hi Megan, here is the details example for reading the notification content and do the match:

I made a call from an outside number 6505130820 to 438 880-3110, accepted the call and made a blind transfer to the direct number of extension 102. This would be similar to a customer calls the operator and the operator forward the call to an agent, right?

 

Status: RINGING

{"body": {"dndStatus": "TakeAllCalls", "presenceStatus": "Available", "sequence": 254, "userStatus": "Available", "totalActiveCalls": 1, "telephonyStatus": "Ringing", "extensionId": 178009004, "activeCalls": [{"toName": "Paco Vu", "direction": "Inbound", "from": "+16505130820","telephonySessionId": "Y3MxNjk2Nzc5MDUzOTY4NDc0NjJAMTAuMjkuMjAuODE", "telephonyStatus": "Ringing","to": "+14388003110", "sessionId": "7658902005", "partyId": "cs169677905396847462-2", "startTime": "2019-02-19T19:42:24.284Z", "id": "Y3MxNjk2Nzc5MDUzOTY4NDc0NjJAMTAuMjkuMjAuODE"}]}, "uuid": "8292419559027824508", "timestamp": "2019-02-19T19:42:24.441Z", "ownerId": "186478004", "subscriptionId": "ef915f47-8549-4193-9794-1d4cc99232ad", "event": "/restapi/v1.0/account/178009004/extension/178009004/presence?detailedTelephonyState=true"}

=========

Status: CALLCONNECTED

{"body": {"dndStatus": "TakeAllCalls", "presenceStatus": "Busy", "sequence": 255, "userStatus": "Available", "totalActiveCalls": 1, "telephonyStatus": "CallConnected", "extensionId": 178009004, "activeCalls": [{"toName": "Paco Vu", "direction": "Inbound", "from": "+16505130820","telephonySessionId": "Y3MxNjk2Nzc5MDUzOTY4NDc0NjJAMTAuMjkuMjAuODE", "telephonyStatus": "CallConnected", "to": "+14388003110", "sessionId": "7658902005", "partyId": "cs169677905396847462-2", "startTime": "2019-02-19T19:42:24.284Z", "id": "2cbe1095f09a4f89bdba82ccaeed1c09"}]}, "uuid": "6032327285439928409", "timestamp": "2019-02-19T19:42:30.075Z", "ownerId": "186478004", "subscriptionId": "ef915f47-8549-4193-9794-1d4cc99232ad", "event": "/restapi/v1.0/account/178009004/extension/178009004/presence?detailedTelephonyState=true"}

=========

AFTER A BLIND TRANSFER

{"body": {"dndStatus": "TakeAllCalls", "presenceStatus": "Available", "sequence": 256, "userStatus": "Available", "totalActiveCalls": 1, "telephonyStatus": "NoCall", "extensionId": 178009004, "activeCalls": [{"toName": "Paco Vu", "direction": "Inbound", "from": "+16505130820","telephonySessionId": "Y3MxNjk2Nzc5MDUzOTY4NDc0NjJAMTAuMjkuMjAuODE", "telephonyStatus": "NoCall", "terminationType": "final", "to": "+14388003110", "sessionId": "7658902005", "partyId": "cs169677905396847462-2", "startTime": "2019-02-19T19:42:24.284Z", "id": "2cbe1095f09a4f89bdba82ccaeed1c09"}]}, "uuid": "447187755439227532", "timestamp": "2019-02-19T19:42:41.440Z", "ownerId": "186478004", "subscriptionId": "ef915f47-8549-4193-9794-1d4cc99232ad", "event": "/restapi/v1.0/account/178009004/extension/178009004/presence?detailedTelephonyState=true"}

=========

Status: CALL TRANSFER RINGING

{"body": {"dndStatus": "TakeAllCalls", "presenceStatus": "Available", "pickUpCallsOnHold": false, "sequence": 309, "userStatus": "Available", "allowSeeMyPresence": true, "totalActiveCalls": 1, "telephonyStatus": "Ringing", "extensionId": 186478004, "activeCalls": [{"toName": "Ryan Vu", "direction": "Inbound", "from": "+16505130820""telephonySessionId": "Y3MxNjk2Nzc5MDUzOTY4NDc0NjJAMTAuMjkuMjAuODE", "telephonyStatus": "Ringing", "to": "+12264550145", "sessionId": "7658902005", "partyId": "cs169677905396847462-3", "startTime": "2019-02-19T19:42:45.937Z", "id": "Y3MxNjk2Nzc5MDUzOTY4NDc0NjJAMTAuMjkuMjAuODE"}], "message": "Available till 5:00pm", "ringOnMonitoredCall": false}, "uuid": "2133142964761057729", "timestamp": "2019-02-19T19:42:46.076Z", "ownerId": "186478004", "subscriptionId": "ef915f47-8549-4193-9794-1d4cc99232ad", "event": "/restapi/v1.0/account/178009004/extension/186478004/presence?detailedTelephonyState=true"}

=========

Status: CALL TRANSFER CONNECTED

{"body": {"dndStatus": "TakeAllCalls", "presenceStatus": "Available", "pickUpCallsOnHold": false, "sequence": 310, "userStatus": "Available", "allowSeeMyPresence": true, "totalActiveCalls": 1, "telephonyStatus": "NoCall", "extensionId": 186478004, "activeCalls": [{"toName": "Ryan Vu", "direction": "Inbound", "from": "+16505130820", "telephonySessionId": "Y3MxNjk2Nzc5MDUzOTY4NDc0NjJAMTAuMjkuMjAuODE", "telephonyStatus": "NoCall", "terminationType": "final", "to": "+12264550145", "sessionId": "7658902005", "partyId": "cs169677905396847462-3", "startTime": "2019-02-19T19:42:45.937Z", "id": "Y3MxNjk2Nzc5MDUzOTY4NDc0NjJAMTAuMjkuMjAuODE"}], "message": "Available till 5:00pm", "ringOnMonitoredCall": false}, "uuid": "701989383190482650", "timestamp": "2019-02-19T19:42:51.045Z", "ownerId": "186478004", "subscriptionId": "ef915f47-8549-4193-9794-1d4cc99232ad", "event": "/restapi/v1.0/account/178009004/extension/186478004/presence?detailedTelephonyState=true"}

=========

 

I made another call from an outside number 6505130820 to 858 247-2815, accepted the call and made a blind transfer to the direct number of extension 102 

{"body": {"dndStatus": "TakeAllCalls", "presenceStatus": "Available", "sequence": 257, "userStatus": "Available", "totalActiveCalls": 1, "telephonyStatus": "Ringing", "extensionId": 178009004, "activeCalls": [{"toName": "Paco Vu", "direction": "Inbound", "from": "+16505130820","telephonySessionId": "Y3MxNjk2Nzc5MDYyNDUyNDg5ODNAMTAuMjkuMjAuODI", "telephonyStatus": "Ringing","to": "+18582472815", "sessionId": "7658820005", "partyId": "cs169677906245248983-2", "startTime": "2019-02-19T19:47:43.169Z", "id": "Y3MxNjk2Nzc5MDYyNDUyNDg5ODNAMTAuMjkuMjAuODI"}]}, "uuid": "2570275313390210028", "timestamp": "2019-02-19T19:47:43.365Z", "ownerId": "186478004", "subscriptionId": "ef915f47-8549-4193-9794-1d4cc99232ad", "event": "/restapi/v1.0/account/178009004/extension/178009004/presence?detailedTelephonyState=true"}

=========

{"body": {"dndStatus": "TakeAllCalls", "presenceStatus": "Busy", "sequence": 258, "userStatus": "Available", "totalActiveCalls": 1, "telephonyStatus": "CallConnected", "extensionId": 178009004, "activeCalls": [{"toName": "Paco Vu", "direction": "Inbound", "from": "+16505130820","telephonySessionId": "Y3MxNjk2Nzc5MDYyNDUyNDg5ODNAMTAuMjkuMjAuODI", "telephonyStatus": "CallConnected", "to": "+18582472815", "sessionId": "7658820005", "partyId": "cs169677906245248983-2", "startTime": "2019-02-19T19:47:43.169Z", "id": "2d400037386d408fb519dfb5f4364a69"}]}, "uuid": "6850705828026243565", "timestamp": "2019-02-19T19:47:46.914Z", "ownerId": "186478004", "subscriptionId": "ef915f47-8549-4193-9794-1d4cc99232ad", "event": "/restapi/v1.0/account/178009004/extension/178009004/presence?detailedTelephonyState=true"}

=========

{"body": {"dndStatus": "TakeAllCalls", "presenceStatus": "Available", "sequence": 259, "userStatus": "Available", "totalActiveCalls": 1, "telephonyStatus": "NoCall", "extensionId": 178009004, "activeCalls": [{"toName": "Paco Vu", "direction": "Inbound", "from": "+16505130820","telephonySessionId": "Y3MxNjk2Nzc5MDYyNDUyNDg5ODNAMTAuMjkuMjAuODI", "telephonyStatus": "NoCall", "terminationType": "final", "to": "+18582472815", "sessionId": "7658820005", "partyId": "cs169677906245248983-2", "startTime": "2019-02-19T19:47:43.169Z", "id": "2d400037386d408fb519dfb5f4364a69"}]}, "uuid": "3470239025938188973", "timestamp": "2019-02-19T19:47:58.826Z", "ownerId": "186478004", "subscriptionId": "ef915f47-8549-4193-9794-1d4cc99232ad", "event": "/restapi/v1.0/account/178009004/extension/178009004/presence?detailedTelephonyState=true"}

=========

{"body": {"dndStatus": "TakeAllCalls", "presenceStatus": "Available", "pickUpCallsOnHold": false, "sequence": 311, "userStatus": "Available", "allowSeeMyPresence": true, "totalActiveCalls": 1, "telephonyStatus": "Ringing", "extensionId": 186478004, "activeCalls": [{"toName": "Ryan Vu", "direction": "Inbound", "from": "+16505130820""telephonySessionId": "Y3MxNjk2Nzc5MDYyNDUyNDg5ODNAMTAuMjkuMjAuODI", "telephonyStatus": "Ringing", "to": "+12264550145", "sessionId": "7658820005", "partyId": "cs169677906245248983-3", "startTime": "2019-02-19T19:48:03.296Z", "id": "Y3MxNjk2Nzc5MDYyNDUyNDg5ODNAMTAuMjkuMjAuODI"}], "message": "Available till 5:00pm", "ringOnMonitoredCall": false}, "uuid": "2138724931777154281", "timestamp": "2019-02-19T19:48:03.458Z", "ownerId": "186478004", "subscriptionId": "ef915f47-8549-4193-9794-1d4cc99232ad", "event": "/restapi/v1.0/account/178009004/extension/186478004/presence?detailedTelephonyState=true"}

=========

{"body": {"dndStatus": "TakeAllCalls", "presenceStatus": "Available", "pickUpCallsOnHold": false, "sequence": 312, "userStatus": "Available", "allowSeeMyPresence": true, "totalActiveCalls": 1, "telephonyStatus": "NoCall", "extensionId": 186478004, "activeCalls": [{"toName": "Ryan Vu", "direction": "Inbound", "from": "+16505130820""telephonySessionId": "Y3MxNjk2Nzc5MDYyNDUyNDg5ODNAMTAuMjkuMjAuODI", "telephonyStatus": "NoCall", "terminationType": "final", "to": "+12264550145", "sessionId": "7658820005", "partyId": "cs169677906245248983-3", "startTime": "2019-02-19T19:48:03.296Z", "id": "Y3MxNjk2Nzc5MDYyNDUyNDg5ODNAMTAuMjkuMjAuODI"}], "message": "Available till 5:00pm", "ringOnMonitoredCall": false}, "uuid": "5807041707901158201", "timestamp": "2019-02-19T19:48:07.702Z", "ownerId": "186478004", "subscriptionId": "ef915f47-8549-4193-9794-1d4cc99232ad", "event": "/restapi/v1.0/account/178009004/extension/186478004/presence?detailedTelephonyState=true"}

=========

As you can see, the key parameter to match these notifications is the telephoneSessionId, it is the same for all call state before and after the call transfer. You can use it to identify a call and get the to number from the first call and map to the from number of the transferred call to identify which service the customer dialed.   

Hope this helps!
+ Phong
0 Likes 0 ·
Adithya PK avatar image
Adithya PK answered

Even the sessionId is same in case of blind transfer. Is there a way to link calls in case of warm transfer?

1 |3000

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

James Arvidson avatar image
James Arvidson answered Phong Vu commented

Sounds like you have several things going on. I'm not 100% clear on the details so forgive me if I misunderstand.

  1. You lose caller ID of the original caller when it goes through the Contact Center. Correct. when you "forward" the call to another system (from MVP to Contact Center or Contact Center to MVP/other system) the new Caller ID is going to be the originating number on that last leg or hop. Depending on the exact sequence there are ways to override or pass the original Caller ID through to the next system. Just depends on which one is on either end of the hop.
  2. The integration is something different. The Caller ID situation above still applies. BUt there is a different way to approach this that may better solve your problem and prevent other challeneges in the future. I am not sure if the call is in MVP or Contact Center but the concept would still potentially apply. You describe the functionality as Background: Application monitors presence, then if incoming call is answered, queries the caller id and name and uses this to lookup patient information. You should not need to monitor presence since the system already does. A more streamlined approach may be to look up that ANI to find the patient match prior to answering the call and then deliver the link to the patient record on your system on answer. You can even use some of the patient info in call routing logic to deliver the caller to the best place as well as simplify some of the challenges you describe.

Just an idea if I am understanding you correctly. But either of these may require reaching out to your Account Manager and potentially Professional Services Hours to help. It will be worth it as they may aleady have done the exact thing you're trying to accomplish before and can have a solution in a fraction of the time.


1 comment
1 |3000

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 ♦♦ commented ·

The question was asked in 2019!

0 Likes 0 ·

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