API FAQs
Greeting using dynamic text or audio from URL
4 min
what is usual? typically, while configuring your app, you would enter the text or upload the audio that you want your callers to listen to this is static in nature i e , all your callers will hear the same message/audio how to make it dynamic? in exotel, you have an option to make this greeting dynamic i e , you can potentially play a different greeting to different callers in the greeting (or menu) applet, you can specify a url (instead of a static text) in the "read text like a robot" option see below when the text box contains a url, exotel will make an http get request to that url (which is hosted at your server) your server can now return either a text or a url (to an audio file) if it returns a text, the text will be converted to audio using our text to speech (tts) engine and then played out the applets mentioned above are a part of the custom app section also called app builder, to know more about app builder please follow > exotel app builder http request from exotel (to your url) the get request that exotel makes to the url will have the following query parameters parameter name value callsid string; unique identifier of the call from string; the number of the calling party to string; your exotel company number that is being called; this will be from your "company numbers" page dialwhomnumber string; the number that is being called currently (this might be empty also) customfield string; this is set if customfield was provided while initiating an outbound call (not applicable for ib calls) to know more about passing custom fields, while making an outbound call, please follow > apis http response from your web server your web server must set the content type http header to ' text/plain ' and nothing else must support a head request from exotel and return the exact same headers that it would for a get request in case you want to read out a text, the http response body must contain the text to be read out in plain english and nothing else such as this thanks for calling super kart your order has already been shipped it will reach you in 2 to 3 business days in case you want to play an audio the http response body must contain the url of the audio file (one per line) such as this http //example com/first audio wav http //example com/second audio wav the audio files must be in the wav/ mp3, 8khz mono format the bit depth must be 16 bit note all other formats are not supported (like 16kz mono/stereo etc) caching of the audio files exotel caches the audio files that it downloads and plays so that the next time you send the same file, we don't need to download and it will be faster exotel caches the file based on the name of the url so in case you are changing first audio wav, you will need to send in another name the next time (ex http //example com/first audio new\ wav) note if you do not wish to play the dynamic content, you can also play a voice message by adding the context instead of the url please find the link useful on how can i request a voice over and where can i find my voice over recordings?
🤔
Have a question?
Our knowledgeable support team and an awesome community will get you an answer in a flash.
To ask a question or participate in discussions, you'll need to authenticate first.