record_call
record_call
Start recording the call in the background. The conversation continues while recording is active.
Raises ValueError if format is not "wav" or "mp3", or if direction
is not "speak", "listen", or "both".
For continuous call recording, omit initial_timeout and end_silence_timeout.
Those parameters are for voicemail-style recordings that automatically stop on
silence. Use stop_record_call() to end continuous recordings.
Parameters
control_id
Identifier for this recording. Pass the same ID to stop_record_call() to
stop this specific recording.
stereo
Record in stereo (True) or mono (False).
format
Recording file format.
"wav"— uncompressed WAV audio"mp3"— compressed MP3 audio
direction
Audio direction to record.
"speak"— what the agent says"listen"— what the caller says"both"— both sides of the conversation
terminators
DTMF digits that stop recording when pressed (e.g., "#").
beep
Play a beep tone before recording starts.
input_sensitivity
Input sensitivity level for the recording.
initial_timeout
Seconds to wait for speech to begin before auto-stopping. Used for voicemail-style recordings.
end_silence_timeout
Seconds of silence after speech to wait before auto-stopping. Used for voicemail-style recordings.
max_length
Maximum recording duration in seconds.
status_url
URL to receive recording status webhook events.
Returns
FunctionResult — self, for chaining.