In the 'Dial Whom' section of connect applet, you can configure a group, add static numbers or provide a URL from where you can get a number to be dialled by the way of an HTTP GET request.


The following are the query parameters of the GET request if you choose to return numbers from a URL. Note that only some of this list may be passed to your application - depending on what stage of the flow you have placed the applet.

 

Query Parameters:

 

Parameter Name

Description

CallSid

Unique identifier of the call

CallFrom

In case of an outgoing call, it’ll be set to the number from which the call is made. In case of an incoming call, it’ll be set to the number from which the call is received

CallTo

In case of an outgoing call, it’ll be set to the number being dialed out. In case of an incoming call, it’ll be set to the number where the call landed.

CallStatus

Status of the call depending on what stage it is at.

Possible values: 'queued', 'ringing', 'in-progress', 'completed', 'busy', 'failed', 'no-answer', 'canceled'

Direction

Direction of the call. Possible values: ‘incoming’ or ‘outbound-dial’

Created

Timestamp when the call is created

DialCallDuration

Value in seconds from the time the call is triggered to the second leg of the call till it is over (including conversation time). This value can be set to zero depending on the previous applet and if there’s no second leg in the call flow.

StartTime

Timestamp when the call is started

EndTime

1970-01-01 05:30:00 // Unix time (also known as POSIX time or epoch time)

Note that this would be a constant value and you may instead trigger our Call details API few minutes after the call has been completed to get accurate information

CallType

 

Scenario

Value

IVR only, no connect applet

call-attempt

Call conversation happened

completed

Client hung up during connect applet

client-hangup

Connect applet, no agent picked up

incomplete

Went to voicemail applet

voicemail

 

DialWhomNumber

Displays the number of the agent who was dialed to last

From

In case of an incoming call, it is the number of the caller. In case of an outgoing call, it is the number of first leg of the call.

To

 In case of an incoming call, it is the ExoPhone on which the call landed. In case of an outgoing call, it is the number on which the call was made to.

CurrentTime

Current server time (format : yyyy-mm-dd hh:mm:ss)


*These parameters will be passed if certain conditions are met as described below:

Parameter Name                

Description

DialCallStatus

This will denote what happened with the second leg of the call for subsequent requests to your connect application URL (in case of multiple attempts) or if previous applet itself was “connect”  .

This is to provide you information about the call status of previous attempt particularly in case your application URL returns comma separated numbers (N1, N2 … )


Possible values: 'completed', 'busy', 'no-answer', 'failed', 'canceled'

digits

‘digits’ will be passed if there was a 'Gather' or ‘IVR’ applet before this applet and will be equal to the input digits that were entered. NOTE: This parameter comes with a double quote (") before and after the number. You'll have to trim() this parameter for double quotes (") to get the actual digits.

CustomField

If the call was initiated via API, the value that was passed in CustomField in the API call will be set here.

RecordingUrl

This will be populated if previous applet was "voicemail". It will contain the URL of the voicemail recording. There could be delay before the recording can be accessed depending on the length of the recording file.


NOTE: Some of these parameters like digits will only be passed in the first request of ‘Dial Whom’ and subsequent requests (if any) will contain result of previous connect applet attempt.


Deprecated parameters:

The following parameters have been deprecated and are no longer supported.  Some of these values might be passed inadvertently and applications should not rely on them anymore.


RecordingAvailableBy

ForwardedFrom

ProcessStatus

tenant_id

flow_id

numbers


Expected Response:


Your application URL response must:

  • have only the phone number in the response body and nothing else.

  • have comma-separated numbers, in case you wish to provide multiple numbers.

  • content-type to be set as ‘text/plain’ with HTTP code set as 200

For example:
+919900XXXXXX
+919900XXXXXX,+919800XXXXXX

Note: Please provide numbers in E.164 format.

If the previous attempted number didn’t connect, ‘Fetch Numbers after every call attempt’ comes in play. This option will be checked by default as shown above and your application URL will be requested subsequently after an attempt for giving the flexibility of dynamically controlling the number(s) to be dialled out . You can return the same set of numbers as well, and Exotel will attempt each unique number. Once, all the returned number(s) have been attempted at least once (in case no one picks up), it’ll transition to the next applet. You can also choose to uncheck this option. In this case, your application URL can be configured to return number(s) to be dialled in a single request and Exotel will attempt all the numbers provided one by one until someone picks up or all attempts are exhausted. We recommend you to use this method unless you have a use-case to dynamically return numbers based on each call attempt.

Fallback URL

This parameter is optional and is valid if you configure the connect applet to return numbers using your application endpoint (set under Primary URL).

Scenarios when we will request your Fallback URL to return numbers:

  • If your primary URL responds with non-200 HTTP code (like 4XX, 5XX)

  • If your primary URL is not reachable and times out (doesn’t respond within 10 seconds)

 

Scenarios where Fallback URL will NOT be triggered:

  • If your application URL responds with HTTP code 200 but doesn’t return any numbers

  • If your application URL responds with HTTP code 200 but returns invalid numbers or values