In the 'Dial Whom' section of connect applet, you can configure an incoming call to a group, add static numbers or provide a URL from where you can get a number to be dialed 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.
Unique identifier of the call
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
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.
The status of the call depends on what stage it is at.
Possible values: 'queued', 'ringing', 'in-progress', 'completed', 'busy', 'failed', 'no-answer', 'canceled'
The direction of the call. Possible values: ‘incoming’ or ‘outbound-dial’
Timestamp when the call is created
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.
Timestamp when the call is started
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 a few minutes after the call has been completed to get accurate information
Displays the number of the agent who was dialed to last
In case of an incoming call, it is the number of the caller. In the case of an outgoing call, it is the number of the first leg of the call.
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.
Current server time (format : yyyy-mm-dd hh:mm:ss)
*These parameters will be passed if certain conditions are met as described below:
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 the previous applet itself was “connect”.
Possible values: 'completed', 'busy', 'no-answer', 'failed', 'canceled'
‘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.
If the call was initiated via API, the value that was passed in CustomField in the API call will be set here.
This will be populated if the previous applet was "voicemail". It will contain the URL of the voicemail recording. There could be a 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 the result of the previous connect applet attempt.
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.
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
Note: Please provide numbers in E.164 format.
If the previous attempted number didn’t connect, ‘Fetch Numbers after every call attempt’ comes into 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 dialed 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 dialed 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.
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 a 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
If you have any questions or concerns, please connect with us using the chat widget on your Exotel Dashboard or Whatsapp us on 08088919888