Legacy Dev Forum Posts

 View Only

Sign Up

How to get the queue (and recording) of an outbound call

  • 1.  How to get the queue (and recording) of an outbound call

    Posted 06-05-2025 18:05

    SPMCSteve | 2019-04-16 21:03:32 UTC | #1

    Currently I am iterating through a list of conversation retrieved via the PostAnalyticsConversationDetailsQuery.

    I am getting outbound (from an outbound campaign) showing up in the results set (which is good), BUT:

    1. There is no participant for the Queue, and no way I know of to identify which outbound campaign/queue this call was part of.
    2. When I GetConversationRecordingmetadata on this conversationID I get an empty result set.

    In the Purecloud UI, I can see both the queue and playback the recording, so what am I missing here??


    tim.smith | 2019-04-16 21:24:44 UTC | #2

    Can you post the full JSON response for this conversation with any PII redacted? You can get this quickly using https://developer.mypurecloud.com/developer-tools/#/analytics-query-builder.


    SPMCSteve | 2019-04-16 21:32:05 UTC | #3

    Okay, so the recording thing seems to be a one off on one weird record that is now NOT showing up in the UI, so I will come back to that later if it is an issue.

    Here is the JSON response. The CampaignID is there in the session information, but not in the participants information like it is for an inbound call, I can work with this, but it would be super handy to be able to handle the two consistently in the codebase.:

    { "conversations": [ { "conversationId": "0b25ad0c-ecd5-4aab-b2c0-3c75930f6a1e", "conversationStart": "2019-04-11T19:46:39.800Z", "conversationEnd": "2019-04-11T19:48:34.927Z", "mediaStatsMinConversationMos": 2.804591655731201, "mediaStatsMinConversationRFactor": 49.02971649169922, "originatingDirection": "inbound", "participants": [ { "participantId": "60cc1931-4d3a-4012-ad3c-013f98f0fe70", "participantName": "Customer", "purpose": "customer", "sessions": [ { "mediaType": "callback", "sessionId": "8a28ca83-0d58-4357-b6e8-979fb98945c7", "direction": "inbound", "outboundCampaignId": "1761b9c6-c830-4db7-aa98-ec72e59e64d9", "outboundContactId": "3", "outboundContactListId": "430358fa-38ea-4de2-b8a1-e76aa1176ec5", "callbackUserName": "Customer", "callbackNumbers": [ "<snip>" ], "scriptId": "97edaa7e-522f-4d38-9fa8-9475ad2a567c", "skipEnabled": true, "timeoutSeconds": 0, "segments": [ { "segmentStart": "2019-04-11T19:46:39.800Z", "segmentEnd": "2019-04-11T19:48:34.927Z", "queueId": "176959f0-97e7-4b96-a51b-48d1c73e96d3", "disconnectType": "peer", "segmentType": "interact", "conference": false } ] }, { "mediaType": "voice", "sessionId": "8ed7ae06-f7d8-4f60-8fd4-65642b0a57f0", "ani": "<snip>", "direction": "outbound", "dnis": "<snip>", "sessionDnis": "<snip>", "outboundCampaignId": "1761b9c6-c830-4db7-aa98-ec72e59e64d9", "outboundContactId": "3", "outboundContactListId": "430358fa-38ea-4de2-b8a1-e76aa1176ec5", "edgeId": "4d5cd4fc-8236-412d-8d0c-0b6e6571451e", "remoteNameDisplayable": "New York City NY", "segments": [ { "segmentStart": "2019-04-11T19:47:30.627Z", "segmentEnd": "2019-04-11T19:47:45.526Z", "queueId": "176959f0-97e7-4b96-a51b-48d1c73e96d3", "segmentType": "dialing", "conference": false }, { "segmentStart": "2019-04-11T19:47:45.526Z", "segmentEnd": "2019-04-11T19:47:54.448Z", "queueId": "176959f0-97e7-4b96-a51b-48d1c73e96d3", "disconnectType": "peer", "segmentType": "interact", "conference": false } ], "metrics": [ { "name": "nOutboundAttempted", "value": 1, "emitDate": "2019-04-11T19:47:30.627Z" } ], "mediaEndpointStats": [ { "codecs": [ "audio/opus" ], "minMos": 3.1692285537719727, "minRFactor": 55.2645149230957, "maxLatencyMs": 21842, "receivedPackets": 1086, "discardedPackets": 7 }, { "codecs": [ "audio/PCMU" ], "minMos": 4.393825531005859, "minRFactor": 92.4269790649414, "maxLatencyMs": 30, "receivedPackets": 1087 } ], "recording": true } ] }, { "participantId": "b1ff21fe-8463-45ba-9776-74ed16d3d08f", "purpose": "acd", "sessions": [ { "mediaType": "callback", "sessionId": "a1b7748b-7dfa-4eab-b936-2a2fd3172376", "direction": "inbound", "outboundCampaignId": "1761b9c6-c830-4db7-aa98-ec72e59e64d9", "outboundContactId": "3", "outboundContactListId": "430358fa-38ea-4de2-b8a1-e76aa1176ec5", "callbackUserName": "Customer", "callbackNumbers": [ "<snip>" ], "scriptId": "97edaa7e-522f-4d38-9fa8-9475ad2a567c", "peerId": "8a28ca83-0d58-4357-b6e8-979fb98945c7", "skipEnabled": true, "timeoutSeconds": 0, "segments": [ { "segmentStart": "2019-04-11T19:46:39.801Z", "segmentEnd": "2019-04-11T19:47:06.129Z", "queueId": "176959f0-97e7-4b96-a51b-48d1c73e96d3", "disconnectType": "transfer", "segmentType": "interact", "conference": false } ], "metrics": [ { "name": "nOffered", "value": 1, "emitDate": "2019-04-11T19:46:39.801Z" }, { "name": "tAcd", "value": 26328, "emitDate": "2019-04-11T19:47:06.129Z" } ] } ] }, { "participantId": "84413a98-afdc-421c-b91d-c94bc1904b4c", "userId": "3c11c3af-b7cb-48c8-8adf-247de65a3953", "purpose": "agent", "sessions": [ { "mediaType": "callback", "sessionId": "400100fc-b57f-43d9-af5f-d30cb00dbfc9", "direction": "inbound", "outboundCampaignId": "1761b9c6-c830-4db7-aa98-ec72e59e64d9", "outboundContactId": "3", "outboundContactListId": "430358fa-38ea-4de2-b8a1-e76aa1176ec5", "callbackUserName": "Customer", "callbackNumbers": [ "<snip>" ], "scriptId": "97edaa7e-522f-4d38-9fa8-9475ad2a567c", "peerId": "8a28ca83-0d58-4357-b6e8-979fb98945c7", "skipEnabled": true, "timeoutSeconds": 0, "segments": [ { "segmentStart": "2019-04-11T19:46:39.918Z", "segmentEnd": "2019-04-11T19:46:42.664Z", "queueId": "176959f0-97e7-4b96-a51b-48d1c73e96d3", "disconnectType": "client", "segmentType": "alert", "conference": false } ], "metrics": [ { "name": "tAlert", "value": 2746, "emitDate": "2019-04-11T19:46:42.664Z" }, { "name": "tNotResponding", "value": 2746, "emitDate": "2019-04-11T19:46:42.664Z" } ] } ] }, { "participantId": "cd5266df-d36d-475c-b721-bcc39c041845", "userId": "f5e8394e-f5b2-4eb0-b01c-38fb72fb4bf0", "purpose": "agent", "sessions": [ { "mediaType": "callback", "sessionId": "12a35e18-ef11-4dbd-ac63-27697f66801e", "direction": "inbound", "outboundCampaignId": "1761b9c6-c830-4db7-aa98-ec72e59e64d9", "outboundContactId": "3", "outboundContactListId": "430358fa-38ea-4de2-b8a1-e76aa1176ec5", "callbackUserName": "Customer", "callbackNumbers": [ "<snip>" ], "scriptId": "97edaa7e-522f-4d38-9fa8-9475ad2a567c", "peerId": "8a28ca83-0d58-4357-b6e8-979fb98945c7", "skipEnabled": true, "timeoutSeconds": 0, "segments": [ { "segmentStart": "2019-04-11T19:47:01.575Z", "segmentEnd": "2019-04-11T19:47:06.130Z", "queueId": "176959f0-97e7-4b96-a51b-48d1c73e96d3", "segmentType": "alert", "conference": false }, { "segmentStart": "2019-04-11T19:47:06.130Z", "segmentEnd": "2019-04-11T19:48:34.916Z", "queueId": "176959f0-97e7-4b96-a51b-48d1c73e96d3", "wrapUpCode": "ININ-WRAP-UP-TIMEOUT", "disconnectType": "client", "segmentType": "interact", "conference": false }, { "segmentStart": "2019-04-11T19:48:24.573Z", "segmentEnd": "2019-04-11T19:48:24.573Z", "queueId": "176959f0-97e7-4b96-a51b-48d1c73e96d3", "wrapUpCode": "ININ-WRAP-UP-TIMEOUT", "disconnectType": "client", "segmentType": "wrapup", "conference": false } ], "metrics": [ { "name": "tAlert", "value": 4555, "emitDate": "2019-04-11T19:47:06.130Z" }, { "name": "tAnswered", "value": 26328, "emitDate": "2019-04-11T19:47:06.130Z" }, { "name": "tHandle", "value": 88786, "emitDate": "2019-04-11T19:48:34.916Z" }, { "name": "tTalk", "value": 88786, "emitDate": "2019-04-11T19:48:34.916Z" }, { "name": "tTalkComplete", "value": 88786, "emitDate": "2019-04-11T19:48:34.916Z" } ] }, { "mediaType": "voice", "sessionId": "4111a003-8591-4e5d-bda2-5494cba6eda8", "ani": "sip:5bd36efd561ae013a34fb3db+goallinesolutions.orgspan.com@localhost", "direction": "outbound", "dnis": "<snip>", "sessionDnis": "<snip>", "outboundCampaignId": "1761b9c6-c830-4db7-aa98-ec72e59e64d9", "outboundContactId": "3", "outboundContactListId": "430358fa-38ea-4de2-b8a1-e76aa1176ec5", "edgeId": "fd37469b-e8e9-4cdc-b553-983f3710cd1e", "peerId": "8ed7ae06-f7d8-4f60-8fd4-65642b0a57f0", "segments": [ { "segmentStart": "2019-04-11T19:47:27.872Z", "segmentEnd": "2019-04-11T19:47:30.560Z", "queueId": "176959f0-97e7-4b96-a51b-48d1c73e96d3", "segmentType": "contacting", "conference": false }, { "segmentStart": "2019-04-11T19:47:30.560Z", "segmentEnd": "2019-04-11T19:47:45.530Z", "queueId": "176959f0-97e7-4b96-a51b-48d1c73e96d3", "segmentType": "dialing", "conference": false }, { "segmentStart": "2019-04-11T19:47:45.530Z", "segmentEnd": "2019-04-11T19:47:54.444Z", "queueId": "176959f0-97e7-4b96-a51b-48d1c73e96d3", "disconnectType": "client", "segmentType": "interact", "conference": false }, { "segmentStart": "2019-04-11T19:48:24.573Z", "segmentEnd": "2019-04-11T19:48:24.573Z", "queueId": "176959f0-97e7-4b96-a51b-48d1c73e96d3", "wrapUpCode": "ININ-WRAP-UP-TIMEOUT", "errorCode": "error.ininedgecontrol.session.inactive", "disconnectType": "client", "segmentType": "wrapup", "conference": false } ], "metrics": [ { "name": "nOutbound", "value": 1, "emitDate": "2019-04-11T19:47:27.872Z" }, { "name": "tContacting", "value": 2688, "emitDate": "2019-04-11T19:47:30.560Z" }, { "name": "nOutboundConnected", "value": 1, "emitDate": "2019-04-11T19:47:45.530Z" }, { "name": "tDialing", "value": 14970, "emitDate": "2019-04-11T19:47:45.530Z" }, { "name": "tTalk", "value": 8914, "emitDate": "2019-04-11T19:47:54.444Z" }, { "name": "tTalkComplete", "value": 8914, "emitDate": "2019-04-11T19:47:54.444Z" }, { "name": "nError", "value": 1, "emitDate": "2019-04-11T19:47:54.447Z" }, { "name": "tHandle", "value": 26572, "emitDate": "2019-04-11T19:48:24.573Z" } ], "mediaEndpointStats": [ { "codecs": [ "audio/opus" ], "minMos": 2.804591655731201, "minRFactor": 49.02971649169922, "maxLatencyMs": 21836, "receivedPackets": 1193, "discardedPackets": 6 }, { "codecs": [ "audio/opus" ], "minMos": 4.864198207855225, "minRFactor": 91.67198181152344, "maxLatencyMs": 30, "receivedPackets": 1086 } ] } ] } ], "divisionIds": [ "7231b021-c9e2-4ecf-a986-666ea3bf942d" ] } ] }


    tim.smith | 2019-04-16 21:40:23 UTC | #4

    If there's no recording for this conversation, so that explains the empty result from GetConversationRecordingmetadata.

    That JSON you provided does have an ACD participant that shows the campaign id and the queue id.

    Do you have what you need now?


    SPMCSteve | 2019-04-16 21:40:24 UTC | #5

    PS: That query builder is awesome and should be linked from every single API document page IMHO. I can NEVER find it when I need it in a pinch.


    SPMCSteve | 2019-04-16 21:43:19 UTC | #6

    Well I can get it out of the session information, so yes I can work with it, but if you look at a similar result for an inbound call flow, you don't need to do to the session level and can get the queue name from ParticipantName where the enum is Acd.

    The inconsistency between the two threw me off.


    tim.smith | 2019-04-16 21:43:21 UTC | #7

    If you lose the link again, it's on the main page on the dev center: https://developer.mypurecloud.com/


    system | 2019-05-17 21:43:21 UTC | #8

    This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.


    This post was migrated from the old Developer Forum.

    ref: 5008