Using the Passthru applet you can get Exotel to talk to your Application URL and pass on details about the incoming call as and when it happens. Your application can now process this information 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 pass-through 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.
Right now, 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.
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.
|CallSid||string; unique identifier of the call|
|From||Number of the caller / number at the end of the first leg of the call|
|To||Your company number into which the call came|
|DialCallDuration||The duration of the call (when the call was connected to an agent)|
|StartTime||Time in format YYYY-MM-DD HH:mm:ss; Date and time when the call request was initiated to the operator|
|CurrentTime|| Current server time (format : yyyy-mm-dd hh:mm:ss)|
|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 ~10-15 mins. after the call has been completed, to get the accurate information
|digits||If there was a 'Gather' applet before this pass-through applet, the numbers that were gathered. 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.|
Also, you will only get this parameter when used after an IVR or Gather applet.
|RecordingUrl||A RecordingUrl will only be available if the passthru applet is after a CONNECT/VOICEMAIL/GREETING applet. |
There will also be a delay before the recording can be accessed. This delay can be anywhere between 5 - 20 mins.
|CustomField||If the call was initiated via API , the value that was passed in CustomField in the API call|
|DialWhomNumber||Shows the number of the agent who was dialed to last|
Async Passthru : In case the passthru needs to be async, i.e. the response doesn't matter in how the call logic flows, there is an option in the applet called "Make Passthru Async" that can be checked. Upon checking this option, the flow continues as normal without waiting for the response code.
- Forwarded From