Play an audio file or predefined sound. Could be either a URL on your server or a sound resource provided by 46elks. URLs are fetched using HTTP GET and are always cached, so for unique resources be sure to provide unique URLs.
If a digit is pressed during “play” or if the audio playback has been completed, the call continues at “next”. You can force the full audio file to be played by setting the option “skippable” to false.
Audio files are specified by URL. Supported file formats are WAV, MP3 and OGG Vorbis.
{
"play": "https://yourapp.example/message.mp3",
"skippable": false, // Optional
"next": "https://yourapp.example/elks/calls" // Optional
}
DTMF tones (dial tones) are triggered by setting the play
parameter to ”sound/dtmf/<digit sequence>”. If you need to add some
pause between DTMF tones you can use the lowercase letter ”p” to denote
short 50ms pauses or the capital letter ”P” for longer 500ms pauses.
{
"play": "sound/dtmf/0P1P9205253183",
"skippable": false, // Optional
"next": "https://yourapp.example/elks/calls" // Optional
}
You can also trigger a simple ”beep” with ”sound/beep”.
{
"play": "sound/beep",
"next": "https://yourapp.example/elks/calls" // Optional
}
Our Text to Speech function allows you to convert text into spoken audio for your automation needs.
It’s designed to be simple to use and is currently in beta. Let us know if you have any feedback on it.
Limitations: Right now only available in English and best used with less than 180 characters.
{
"play": "en_US/Hello, how are you?",
"next": "https://yourapp.example/elks/calls" // Optional
}
POST https://yourapp.example/elks/calls
Parameter | Description |
---|---|
callid | The unique id of the call in our systems. |
result | Either ”success” or ”failed”, depending on if playback was successful. |