Skip to main content

Incoming Answered Webhooks

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

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.

Sample CDR response

This is the sample JSON call detail record(CDR), where the TeleCMI platform will notify your web server POST method URL.

{ 
"appid": 1111113,
"type": "cdr",
"direction": "inbound",
"cmiuuid": "dbff2a12-5ea0-4303-908d-72a2e216e74a",
"user": "103_1111113",
"status": "answered",
"to": 9100000000,
"from": 9200000000,
"time": 1570114729565,
"answeredsec": 117,
"team": "Support_1111113",
"record": "true",
"filename": "15700950846189478332012_1111113.mp3"
}

The above sample JSON call detail record(CDR) 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
app_idnumberYour app id
typestringType of notification from TeleCMI platform it may be cdr or event
directionstringThe direction of this call it may be inbound or outbound
cmiuuidstringA unique identifier of this call
userstringA unique Id of the user(agent)
statusstringStatus of this call
tonumberThe number of user(agent) received the call
fromnumberThe number of the call came from
timenumberTimestamp of this call
answeredsecnumberThe duration of call answered in seconds
teamstringName of the team where the call was answered
recordstringCall recording is enabled
filenamestringThe file name of the recorded conversation