Skip to main content

Outgoing Missed CDR

To receive the outgoing missed cdr, you must complete the webhooks setup. After completing the webhooks setup, our TeleCMI platform will notify your web server POST or GET method URL with JSON call detail record(CDR) when an outgoing call missed.

Sample CDR response

This is the sample JSON Call Detail Record(CDR) where the TeleCMI platform will notify your web server POST or GET method URL.

{
virtual_number: '440000000000',
call_id: 'c4504776-d91e-123b-29a7-56000429abc3',
custom: '{"crm":"true"}',
leg: 'a',
type: 'cdr',
appid: 2222223,
to: 442000000000,
cmiuuid: '15b58236-734f-4000-a5e8-78284068f5c7',
status: 'missed',
user: '202_2222223',
time: 1650628175336,
direction: 'outbound',
hangup_reason: 'recv_cancel',
request_id: 'D8qpRb27mpXEYgEdAMY6arnQ2ONAB04Y86QrfKbOWZQ',
extra_params: '{"click2call":"true"}'
}

The above sample JSON Call Detail Record(CDR) consists of several properties. Each property has a description, so take a look at it.

Properties

This is the list of properties and their descriptions.

PropertyTypeDescription
virtual_numberstringThe caller ID of the outbound call.
call_idstringA unique ID of an outbound call.
customstringYour custom parameters.
legstringDefine the leg of the call either a or b.
typestringType of notification from TeleCMI platform it may be cdr or event.
appidnumberYour app id.
tonumberThe call was made using this number.
cmiuuidstringA unique identifier for this call.
statusstringThe status of this missed call.
userstringA unique ID of the user.
timenumberA timestamp indicates the time the call was missed.
directionstringThe direction of this call is outbound.
hangup_reasonstring
  • sent_bye = The call ended by the user.
  • recv_bye = The call ended by the caller.
  • recv_cancel = The call ended due to user unanswer.
  • sent_reject = The call rejected by the user.
request_idstringA unique identification of this call was initiated through click2call.
extra_paramsstringYour custom parameters for click2call.
Note
The request_id and extra_params will be sent, when the outbound call is initiated through click2call.

Implementation

TeleCMI webhooks implementation in different languages.

from flask import Flask,request
app = Flask(__name__)


# Receive webhooks from TeleCMI platform when call receive or make
@app.route("/webhook/cdr",methods=['POST'])
def hello():
# Received JSON CDR from TeleCMI Platform
cdr = request.get_json()
print(cdr)

return "got it"



if __name__ == "__main__":
app.run(debug=True, port=5000)

To know more about testing webhooks for local development purposes, go to examples.