<Recording> instruction starts a non-blocking call recording when nested inside <Start>. After recording starts, Telnyx immediately continues executing the next TeXML instruction. The recording stops when the call ends or when it is stopped with the Stop Recording command.
Attributes
| ATTRIBUTE | DESCRIPTION | OPTIONS | DEFAULT |
|---|---|---|---|
recordingStatusCallback | Optional URL that tells Telnyx where to make its GET or POST request when recording status events occur. Relative URLs are resolved against the current TeXML document URL. | - | |
recordingStatusCallbackMethod | HTTP request type used for recordingStatusCallback. | GET, POST | POST |
recordingStatusCallbackEvent | The recording events for which Telnyx should send a webhook to the recordingStatusCallback URL. Multiple events are separated by a space. | in-progress, completed, absent | completed |
channels | Specifies whether the final audio file should be recorded as one channel or two channels. Use mono or single for a single-channel recording. | mono, single, dual | dual |
track | Specifies which track should be recorded. | inbound, outbound, both | both |
trim | Removes silence from the beginning and end of the recording when set to trim-silence. | trim-silence | - |
format | The format of the recording file. | mp3, wav | mp3 |
Examples
Start a recording and continue immediately to the next TeXML instruction:Expected callbacks
IfrecordingStatusCallback is set, recording status callbacks are sent for the events listed in recordingStatusCallbackEvent:
| Event | Callback Reference |
|---|---|
in-progress | Recording In Progress |
completed | Recording Completed |
absent | Recording failed or was not created |
recordingStatusCallbackEvent is not provided, Telnyx sends the completed callback by default.