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
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
Direction 'incoming', 'outbound-dial'
DialCallDuration The duration of the call (when the call was connected to an agent)
StartTime
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)
CallType
Scenario Earlier From Mar 18th 2013
IVR only, no connect applet
call
call-attempt
Call conversation happened
call
completed
Client hung up during connect applet
client-hangup
client-hangup
Connect applet, no agent picked up
incomplete
incomplete
Went to voicemail applet
voicemail
voicemail
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. 
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.


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 




Need a techie for this integration?
 Check our Phone a Friend App