Outgoing Answered

Our TeleCMI platform will notify the following sample JSON live event to your web server POST method URL, when an outgoing call is answered.

Implementation

TeleCMI webhooks implementation in different languages.

  • Python
  • Node.js
  • PHP
  • Java
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)

Sample event response

This is the sample JSON live event, where the TeleCMI platform will notify your web server POST method URL.

The Leg A represents the outgoing call of the caller(the person who made a call).

The Leg B represents the outgoing call of the callee(the person who is called by the caller).

  • Leg A
  • Leg B
{
"leg": "a",
"type": "event",
"click_to_call": "true",
"user": "109_1111113",
"cmiuuid": "d965c6e0-5493-44f8-8d7d-b9a8077013a4",
"direction": "outbound",
"callerid": 04471000000,
"app_id": 1111113,
"time": 1571122196059,
"request_id": "s96C6XK1BUHX0oVZfOo5NhoJfZZJd0y1nmrNN6dhdkW"
"status": "answered",
"to": 9100000000,
"conversation_uuid": "d965c6e0-5493-44f8-8d7d-b9a8077013a4"
}

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

The above sample JSON live event consists of several properties. Each property has a description and take a look at it.

Properties

These are the list of properties and its description

PropertyTypeDescription
legstringDefine the leg of the call either a or b
typestringType of notification from TeleCMI platform it may be cdr or event
click_to_callstringThis call is made through click to call api
userstringA unique Id of the user(agent)
cmiuuidstringA unique identifier of this call
directionstringThe direction of this call it may be inbound or outbound
calleridnumberCaller ID of this call
app_idnumberYour app id
timenumberTimestamp of this call
statusstringStatus of this call
tonumberThe number the call was made to
fromnumberThe number the call came from
conversation_uuidstringA unique identifier of this overall conversation