Action: Record

This action records the voice of the caller.

Format

The recording can be saved either directly to a URL of your choice, or stored in the platform locally to allow playback before saving the recording. Set “record” to “local/recording1” if you want to allow playback within the same call. All local recordings are discarded when the call ends.

The timelimit parameter defines the maximum number of seconds of audio to record. Default is 120

The silencedetection parameter toggles silence detection on or off. The recording automatically stops after 3 seconds of silence if silence detection is enabled and when # is pressed if it is disabled.

{
  "record": "https://yourapp.example/elks/recordings",
  "silencedetection": "no", // Optional, default is "yes"
  "next": "https://yourapp.example/elks/calls" // Optional
}

Result

We'll make a call to the record URL at the end of the recording in the following format:

POST https://yourapp.example/elks/recordings
Parameter Type Description
callid string The unique id of the call in our systems.
created string The date and time the recording was completed.
duration integer The length of the recording, in seconds.
wav string A URL that you can fetch the WAV audio file from.
from string The phone number that initiated the call.
to string The phone number of the recipient of the call.

The call will end after the action is completed if the next parameter is omitted. If the next parameter is set we'll make a request to the URL as defined below. You can respond with any valid call action.

POST https://yourapp.example/elks/calls
Parameter Type Description
callid string The unique id of the call in our systems.
result string Either ”success” or ”failed” depending on if the action was successful.

You have 72 hours to fetch any recordings you make.