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.

 Parameter Name Value
CallSidstring; unique identifier of the call
FromNumber of the caller / number at the end of the first leg of the call
ToYour company number into which the call came
Direction'incoming', 'outbound-dial'
DialCallDurationThe duration of the call (when the call was connected to an agent)
StartTimeTime 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
ScenarioEarlierFrom Mar 18th 2013
IVR only, no connect applet
Call conversation happened
Client hung up during connect applet
Connect applet, no agent picked up
Went to voicemail applet
digitsIf 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.
RecordingUrlA 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.
 CustomFieldIf 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.

Deprecated Fields
The following parameters have been deprecated and are no longer supported.  Some of these values might have been passed inadvertently in the past and applications should not rely on them anymore.
  1. Created                      
  2. RecordingAvailableBy  
  3. ForwardedFrom           
  4. flow_id                      
  5. tenant_id 
  6. numbers
  7. CallFrom 
  8. CallTo
  9. DialCallStatus
  10. Forwarded From 
  11. ProcessStatus