Skip to main content

Outgoing Started Event

Our TeleCMI platform will notify the following sample JSON Live Event to your web server POST or GET method URL, when an ougoing call is started.

Sample event response

This is the sample JSON Live Event, where the TeleCMI platform will notify your web server via a POST or GET method URL.

{
call_id: 'e51d5392-d9cf-123b-fe91-3cecefb9bfb6',
leg: 'a',
type: 'event',
user: '202_2222223',
cmiuuid: 'ccd826f9-67a4-4467-acfb-a53093ff5c9d',
direction: 'outbound',
callerid: '442000000000',
app_id: 2223343,
time: 1650635340436,
custom: '{"crm":"true"}',
extra_params: '{"click2call":"true"}',
request_id: 'bvS68LlqtFunYMQO0db6g9klSdfS0UHHDoK9S9Qvaed',
status: 'started',
to: '442000000001',
conversation_uuid: 'ccd826f9-67a4-4467-acfb-a53093ff5c9d'
}

The above sample JSON Live Event 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
call_idstringA unique ID of an outbound call.
legstringDefine the leg of the call either a or b.
typestringType of notification from TeleCMI platform it may be cdr or event.
userstringA unique ID of the user.
cmiuuidstringA unique identifier for this call.
directionstringThe direction of this call is outbound.
calleridstringCaller ID on this call.
app_idnumberYour app id.
timenumberA timestamp indicates the time the call was started.
customstringYour custom parameters.
request_idstringA unique identification of this call was initiated through click2call.
extra_paramsstringYour custom parameters for click2call.
statusstringThe status of this started call.
tostringThe call was made using this number.
conversation_uuidstringA unique identifier for this overall conversation.
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.