Hi Budd,
Well I can’t use the GUID received from the call record since that is only posted after the call is finished (so this is not the ‘Call’ API but the ‘Call Record’ API).
This is what I get from the subscription:
{
"publicationId": "53e94c08-74fc-45d6-974a-3026a0a5bb9b",
"topic": "platform-api-media",
"method": "PUT",
"subject": "/2017-09-01/endpoints/200/calls/350",
"content": {
"_links": {
"self": "/2017-09-01/endpoints/200/calls/350"
},
"from": "201",
"fromName": "",
"to": "200",
"toName": "",
"state": "ringing",
"cause": "newCall",
"direction": "inbound",
"extraPbxData": {
"alertingDevice": "200",
"calledDevice": "200",
"callTrackingID": "1618933141#42",
"eventType": "deliveredEvent"
},
"createdOn": "2021-04-20T15:39:01.286Z",
"callId": "endpoints/200/calls/350",
"endpointId": "200",
"accountId": "{{accountGuid}}",
"siteId": "{{siteGuid}}",
"timestamp": 1618933141287,
"isCtiEvent": true,
"principalId": "{{principalId}}",
"callLegOwner": "{{principalId}}"
},
"publisher": {
"accountId": "{{accountGuid}}",
"principalId": "platform-api-mediaservice-eu-west-1-913011122217-eu"
},
"subscription": {
"subscriptionId": "{{subscriptionGuid}}"
},
"notification": {
"createdOn": "2021-04-20T15:39:01.362Z",
"correlationId": "e5285ae5-47d4-4043-b921-108bc85c72ce"
}
}
When I receive the Call Record after the call is finished, the callId there doesn’t match any guid from the above JSON.
Almost the same information is given from the GET request on the Call API.
{
"count": 2,
"_links": {
"self": "/2017-09-01/calls"
},
"_embedded": {
"items": [
{
"callId": "endpoints/200/calls/335",
"accountId": "{{accountGuid}}",
"siteId": "{{siteGuid}}",
"direction": "inbound",
"from": "201",
"to": "200",
"state": "ringing",
"cause": "newCall",
"createdOn": "2021-04-20T13:14:40.731Z",
"extraPbxData": "{\"alertingDevice\":\"200\",\"calledDevice\":\"200\",\"callTrackingID\":\"1618924480#33\",\"eventType\":\"deliveredEvent\"}",
"connectedParty": {},
"_links": {
"self": "/2017-09-01/calls/endpoints/200/calls/335"
}
},
{
"callId": "endpoints/201/calls/335",
"accountId": "{{accountGuid}}",
"siteId": "{{siteGuid}}",
"direction": "outbound",
"from": "201",
"to": "200",
"state": "connected",
"cause": "newCall",
"createdOn": "2021-04-20T13:14:40.864Z",
"extraPbxData": "{\"alertingDevice\":\"200\",\"calledDevice\":\"200\",\"callTrackingID\":\"1618924480#33\",\"eventType\":\"deliveredEvent\"}",
"connectedParty": {},
"_links": {
"self": "/2017-09-01/calls/endpoints/201/calls/335"
}
}
]
}
}
Notice the self link here suggests to use the callId property as the actual callId in the URI (which obviously isn’t a GUID)