Skip to main content

Incoming Waiting Leg A

Our TeleCMI platform will notify the following sample JSON Live Event to your web server POST or GET method URL, when an incoming call hit on your virtual number or toll-free number.

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.

{
type: 'event',
direction: 'inbound',
conversation_uuid: '5202a928-07c3-4d32-a1a4-d304c9275971',
cmiuuid: '5202a928-07c3-4d32-a1a4-d304c9275971',
from: '440000000000',
app_id: 2222223,
time: 1634724624830,
to: '440000000001',
custom: '{"crm": "true"}',
status: 'waiting'
}

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
typestringType of notification from TeleCMI platform it may be cdr or event.
directionstringThe direction of this call is inbound.
conversation_uuidstringA unique identifier for this overall conversation.
cmiuuidstringA unique identifier for this call.
fromstringThe call was made from this number.
app_idnumberYour app id.
timenumberA timestamp indicates the time the call was initiated.
tostringYour DID number, of this call.
customstringYour custom parameters.
statusstringThe status of this waiting call.

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.