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. If you expect high call volumes, make sure your server is capable of handling the increased load.
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
}
We are working on a TTS feature, let us know if you're interested in trying it out.
Tell us about your use case at support@46elks.com.
POST https://yourapp.example/elks/calls
Parameter | Description |
---|---|
callid | The unique id of the call in our systems. |
result | Either ”ok” or ”failed”, depending on if playback was successful. |