DLR push- API format/schema
Version | Date | Comment |
---|---|---|
Current Version (v. 2) | Oct 18, 2023 10:30 | Junaid Nazir |
v. 1 | Oct 17, 2023 11:38 | Junaid Nazir |
Document owner | @Junaid Nazir |
---|---|
Document reviewer | @Kaushal Puri @Sabarinath Sunil @Abhishek Srivastava |
Document Status | draft / in review / approved |
Payload Details and Format
The endpoint will be provided with the call details in following format. Few fields will only be added if corresponding data is available. For example,
Format
{
"body": {
"phonon-uuid": "6629a6f5-af55-41e8-a8a4-9b7b73fcf5c4",
"callDetails": [
{
"cdrId": "81e35a21-7b55-4142-9493-9613c02f0cae##pbx-9",
"startTime": "2022-11-29T23:49:00.08+05:30",
"connectTime": "2022-11-29T23:49:13.901+05:30",
"endTime": "2022-11-29T23:51:19.131+05:30",
"calleeNumber": "916262772728",
"didNumber": "912243692987",
"hangupCause": "16",
"duration": "125230",
"dtmfPressesd": [
{
"key": "6",
"eventTime": "2022-11-29T23:49:19.912+05:30",
"label": ""
}
],
"incoming": false,
"calleeType": "VISITOR",
"remoteHangup": true,
"is_ringing": "true",
"ringingStartTime": "2023-04-21T16:17:36.014+05:30",
"foreignCallIds": [
]
},
{
"cdrId": "c9d4bd2d-c3f7-4aa2-b236-cd06581b4c14##pbx-9",
"startTime": "2022-11-29T23:49:21.414+05:30",
"endTime": "2022-11-29T23:49:56.012+05:30",
"calleeNumber": "916262772728",
"didNumber": "+912243692987",
"hangupCause": "5",
"duration": "0",
"dtmfPressesd": [
],
"incoming": false,
"calleeType": "HARD_PHONE",
"remoteHangup": true,
"foreignCallIds": [
]
}
],
"smsDetails": [
{
"id": "7aab92c3-65cf-4213-bc85-fde81c5580a9",
"text": "Welcome to Phonon. Test Verified SMS $flow.key.response_status\t\n$flow.key.response_status_code\t\n$flow.key.response_duration\t\n$flow.key.response_raw\t\n$flow.key.response_error.Phonon.Phonon",
"to": "918238217798",
"from": "Phonon",
"sendTime": "2022-11-29T23:51:19.024+05:30",
"deliveryStatus": "SENT_TO_QUEUE"
}
],
"emailDetails": [
{
"id": "95c54b25-a9a0-4b10-9de1-6fd9358becd6",
"subject": "This is the Email Subject",
"content": "<span>This is the Email Body</span>",
"from": "abhinandan@phonon.io",
"size": 0.04,
"addresses": [
{
"id": "customer@phonon.io",
"type": "TO",
"deliveryStatus": "SENT_TO_QUEUE"
}
],
"sendTime": "2022-11-29T23:51:18.937+05:30"
},
{
...
}
],
"keys": [
{
"name": "$flow.key.CampaignName",
"value": "bkt_x_ack"
},
{
...
}
],
"recordingUrls": [
{
"recordedFileName": "call_1896_20201_+912243692987_+916262772728_916262772728_6629a6f5-af55-41e8-a8a4-9b7b73fcf5c4_29112022234900_29112022235119.mp3",
"recordedFilePublicPath": "https://central-recording.s3.ap-south-1.amazonaws.com/callrecords/1896/2022/NOVEMBER/call_1896_20201_%2B912243692987_%2B916262772728_916262772728_6629a6f5-af55-41e8-a8a4-9b7b73fcf5c4_29112022234900_29112022235119.mp3?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20221129T182121Z&X-Amz-SignedHeaders=host&X-Amz-Expires=604800&X-Amz-Credential=AKIAJAVTO5KTOHGAIHWA%2F20221129%2Fap-south-1%2Fs3%2Faws4_request&X-Amz-Signature=2aee86cb3782b4f9e39797743c18238c344cf0570c24d68616a7d649a401f46b"
},
{
...
}
]
}
}
Explanation
Phonon UUID - Uniquely references this record
Array of each call leg. Optional. please note that this parameter will not be included if no calls are sent
Unique CDR ID of each leg
Start time of the call leg
Connect time, in ISO8601 Format
End time of the call leg
A Party number
Telephony number on which or from which the call was connected with the user
Hangup cause - 16 means connected call. 5 means busy, etc.
Duration of the call leg in milliseconds
Array of each DTMF pressed along with timestamp
Inbound - True, Outbound - False
VISITOR - Customer leg, AGENT - agent leg
Call was disconnected by this callee or the other end.
is_ringing will be accurately work with BSNL Mobile DIDs.
Hangup Cause 5 Busy - Agent disconnected the incoming call
This was an outbound call
Agent was logged in using mobile phone
Call was disconnected by system
SMS Details, please note that this parameter will not be included if no SMSs are sent in the "Start" flow
Reference ID of the SMS
SMS Text
Sent To
Sender ID
Sent Time
Current Delievery Status
SMS Details, please note that this parameter will not be included if no SMSs are sent in the "Start" flow
Reference ID of the Email
Subject
Body
From
Size in kilobyte
Array of each reciepient of the email
TO/CC/BCC
Keys - Array of each Flow Variable
Name of the flow variable
Value at the end of the flow
Recording URLs
Name
Public Link - valid for 7 days. Cannot be increased.
Please note that parameters are only populated if associated data is available. So if no calls are triggered (for any reason) callDetails
will not populate. Please ensure all parameters are set as optional on your receiving API.
Related content
This document has been developed by Phonon.io for the sole and exclusive use of the customer / prospective customer with whom this document is being shared. Further, this document has been provided by Phonon.io to the recipient in good faith and based on request from the recipient for the same. This document is a confidential document and contains confidential product technology, workflow and commercial details that are for the sole usage of the intended recipients of this document. Recipients are advised not to share this document with any third party that is not the intended recipient of this document and neither to bring this document in full or parts into the public domain. Any unauthorized access may be brought to Phonon.io’s notice immediately. Phonon.io is free to take any legal action it deems necessary against any person or entity that violates this confidentiality agreement. Phonon.io is bound and governed by the rules of the state of Gujarat in India. In case you are not in agreement with the terms set in this clause or are not an intended recipient of this document, please destroy the document and intimate us of the same at info@phonon.io.