This API will connect two numbers. It connects From Number first. Once the person at the From end picks up the phone, it will connect to the number provided as To. You can choose which number should be connected first by adding that number in the From field. An HTTP POST request is made to

* From

String; The phone number that will be called first. Preferably in E.164 format. If not set, our system will try to match it with a country and make a call. If landline number, prefix it with STD code; Ex: 080XXXX2400

* To

String; Your customer’s phone number. If landline number, prefix it with STD code; Ex: 080XXXX2400

* CallerId

String; This is your ExoPhone/Exotel Virtual Number (pick one from here)

* CallType

String; trans – for Transactional Calls

* TimeLimit

Integer; The time limit (in seconds) that you want this call to last. The call will be cut after this time

* TimeOut

Integer; The time (in seconds) to ring the called parties (both first and second call leg)

* WaitUrl

String; Play this audio to the caller. When the first leg (From) has to wait for the other leg (To) to pick up the call, the audio file specified in this parameter will be played.

Please refer this article to understand the format specifications of the audio file to be played (wav is only supported).

* Record

Boolean; Record the conversation of your call. The RecordingUrl will be sent to the StatusCallback URL if this is set to ‘true’ and the call conversation happens. Can be:

* RecordingChannels

String; Number of audio channels to be present in the final recording. This parameter works if Record is set to ‘true’.

* CustomField

Any application specific value like order id that will be passed back as a parameter in StatusCallback (only via ‘terminal’ StatusCallbackEvent)

* StatusCallback

String; An HTTP POST request will be made to this URL depending on what events are subscribed using ‘StatusCallbackEvents’. Refer here for complete list of parameters which will be sent to your endpoint.

* StatusCallbackEvents[0]

Array; Call events for which we will send details to the URL as set in ‘StatusCallback’ parameter. Can be:

terminal – This event will be triggered once the call is over.
If no event is specified, we will send the default parameters as specified here. Currently, only ‘terminal’ event is supported but more events could be added in future.

* StatusCallbackEvents[1]

Same as StatusCallbackEvents

* StatusCallbackContentType

String; The HTTP header ‘Content-Type’ using which the StatusCallback webhook will be triggered to your URL. Can be:

Response Content Type