When you receive an incoming call, you can setup your flow such that you can send a dynamic reply to the caller.
To do this, use the "Sms" applet in your incoming Call app (aka flow). In the text box, you can enter a URL (instead of static text). When there is a URL, Exotel will make a HTTP GET request to this URL. The URL can return text to send as an SMS reply.
Note: In case you are using a prebuilt app like MissCall app or the Oak tree App, you can just enter your URL in the SMS textbox provided
Before the GET request, Exotel will make a HTTP HEAD request to make sure that the URL is indeed returning the correct 'ContentType' as mandated below.
The GET request that Exotel makes to the URL will have the following query parameters:
|CallSid||string, unique identifier of the call|
|From||string, the number of the caller|
|To||string, your Exotel company number to which the call came|
|digits||string, If there was a Gather or a Menu applet before this "Sms" applet, this is the DTMF input that was gathered|
If you want to send an SMS reply to the caller, the HTTP response MUST
- the HTTP response must have 'ContentType' header set to 'text/plain'.
- the HTTP body must have the reply to send
For example, if you've configured http://example.com/exotel.php
we will make a HTTP GET request to
Sample php script which sends dynamic reply
$dynamicReply = "Hello";
// Insert your logic here to use $_REQUEST to construct the dynamic response