Using the Passthru applet in the call flow you can get Exotel to talk to your Application URL and pass on details about the call as and when it happens. Your application can now process this information and decide which path (success/failure) the flow should take next. This applet helps to dynamically control the flow as well as store the call details in your CRM system or other applications.
The Passthru applet passes the call details to the URL configured. It makes a GET request to the URL with the call details as URL-encoded HTTP query parameters.
Passthru can used in 2 modes (by toggling the checkbox to 'Make Passthru Async'):
Sync: Exotel will immediately pass the call details synchronously during the call flow execution. In this case, it is possible only to make a binary decision with Passthru. For example, You can return back a "200 OK" for choice A and "302 Found" for Choice B. Read more about HTTP response codes here. Please note, the person on call will have to wait for next action to be executed until your URL responds back.
Async: Exotel will asynchronously pass the call details without interrupting the call flow execution. Use this option if you don’t want to dynamically change flow execution i.e. select next applet based on Passthru response. This will ensure the person on call doesn’t wait for the time period it takes for Passthru to be executed i.e. your URL to respond back.
The following are the query parameters of the GET request. Note that only some of this list may be passed to your application - depending on what stage of the flow you have placed the pass-through 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.
Status of the call depending on what stage it is at.
Possible values: 'queued', 'ringing', 'in-progress', 'completed', 'busy', 'failed', 'no-answer', 'canceled'
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 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 case of an outgoing call, it is the number of 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 if previous applet was “connect”.
Possible values: 'completed', 'busy', 'no-answer', 'failed', 'canceled'
An array which will denote detailed information about each leg attempt if the previous applet was “connect”.
‘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 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.
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.