×
POST

https://<your_api_key>:<your_api_token><subdomain>/v1/Accounts/<your_sid>/Calls/connect

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

Parameter
Name
Value
Description
* From
formData

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
formData

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

* CallerId
formData

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

* CallType
formData

String; trans – for Transactional Calls

* TimeLimit
formData

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

* TimeOut
formData

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

* WaitUrl
formData

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
formData

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
formData

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

* CustomField
formData

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

* StatusCallback
formData

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]
formData

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]
formData

Same as StatusCallbackEvents

* StatusCallbackContentType
formData

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

Response Content Type
POST

https://<your_api_key>:<your_api_token><subdomain>/v1/Accounts/<your_sid>/Calls/connect

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

Parameter
Name
Value
Description
* From
formData

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
formData

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

* CallerId
formData

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

* CallType
formData

String; trans – for Transactional Calls

* TimeLimit
formData

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

* TimeOut
formData

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

* WaitUrl
formData

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
formData

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
formData

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

* CustomField
formData

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

* StatusCallback
formData

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]
formData

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]
formData

Same as StatusCallbackEvents

* StatusCallbackContentType
formData

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

Response Content Type
Share