Voice IVR Call Handle

When an incoming call is placed to the Virtual Number, allocated to your sub-account, a call flow is initiated. For each call flow event, a Call Handle will be sent to the endpoint that has been configured for your Virtual Number.

Sample Call Handle:

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

To start your call flow you need to reply to the call handle with a HTTP 200 response code including a Call Action in the HTTP response body. The supported Call Actions are:

  • PlayTTS - Generates and plays a TTS to the calling user.
  • PlayFile - Plays a pre-recorded message to the calling user.
  • MakeCall - Initiates an outgoing call to the desired destination. Once answered, the calling user and the second user (outgoing call destination) will be connected to the same call flow.
  • Hangup - Terminates the ongoing call.