Call Handle Callback

This method allows you to set up your handleURL and to forward all incoming calls to your VN to this URL.

Your handleURL will be configured in sub account level as a part of the provisioning process.

Request

When receiving an incoming call to your virtual number Wavecell platform will POST a JSON object to your URL.

The JSON object will contain the following values:

Name Type Description
sessionId String Unique id represents a call within one or more hops [UUID]
callId String Id unique to a one hop in a call [UUID]
eventType String Event type represents the life cycle status of the call. CALL_RECEIVED or DTMF_RECEIVED
sourceMsisdn String Number of the calling party in E.164 format i.e the number making the call
targetMsisdn String Number of the called party in E.164 format i.e the number being call, usually the Virtual Number
direction Number 0 for Inbound call, 1 for Outbound call
referenceId String Your reference provided when configuring the Virtual Number
timestamp Timestamp Time stamp of the call event
status nString call status, CONNECTED / NOT_CONNECTED
status nString call status, CONNECTED / NOT_CONNECTED
duration Number Call duration in seconds
dtmf Number Applies only if dtmf is being sent
sipStatus Number Sip status code defined in RFC 3261

Example of a JSON object sent to your handleURL:

{
"callId": "a1d6a5e3-efec-11e9-b999-7d370b5f90d1", 
"sessionId": "a1d6a5e2-efec-11e9-b999-efc71013a78f", 
"eventType": "CALL_RECEIVED",
"direction": 0,
"timestamp": "2019-10-16T08:12:01Z", 
"sourceMsisdn": "6512345678", 
"targetMsisdn": "6587654321", 
"status": "NOT_CONNECTED", 
"duration": 0,
"dtmf": 787
}

Responses

Your API should respond with the relevant function required to complete the call flow. You need to provide 200 OK status with a “commands” JSON Array body.

The list of available commands which should be used to respond to requests made to your handleURL, can be found here.