question

megan-molumby6628 avatar image
megan-molumby6628 asked ·

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. 

General Topic
1 |1000 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 ·
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 |1000 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.

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 ·
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 |1000 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.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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