<Record>
Record the caller (voicemail).
Records the caller, typically for voicemail. A beep plays first (unless playBeep=“false”); recording stops on any finishOnKey key, on timeout seconds of silence, or at maxLength seconds. When the recording is complete SIPRTC requests action (or, if action is omitted, the call’s current document URL again) and runs the TinyML it returns, so put the rest of the flow in that response rather than after <Record>. The account’s recording policy can refuse a voicemail recording: the verb is then skipped and recordingStatusCallback receives RecordingStatus absent with an ErrorCode. Answers the call first if it is not answered yet.
Example
Section titled “Example”<Response> <Say>Please leave a message after the beep.</Say> <Record action="https://example.com/voicemail-done" maxLength="120" timeout="5" finishOnKey="#" recordingStatusCallback="https://example.com/recording-status"/></Response>Attributes
Section titled “Attributes”| Attribute | Values | Default | Description |
|---|---|---|---|
action |
An absolute http:// or https:// URL | — | URL requested when the recording is complete; its TinyML continues the call. Defaults to the current document URL. |
method |
GET, POST |
POST |
HTTP method for action. |
timeout |
integer ≥ 0 | 5 |
Seconds of silence that end the recording; 0 turns silence detection off. |
finishOnKey |
string, matching [0-9*#]* |
1234567890*# |
Keys that end the recording; any one of them stops it. |
maxLength |
positive integer, ≤ 3600 | 3600 |
Maximum length in seconds; values of 3600 or more are ignored (the maximum is 3600). |
playBeep |
string | true |
false (any case) records without a beep; any other value keeps the beep. |
recordingStatusCallback |
An absolute http:// or https:// URL | — | URL notified as the recording’s status changes. |
recordingStatusCallbackMethod |
GET, POST |
POST |
HTTP method for recordingStatusCallback. |
recordingStatusCallbackEvent |
A space- or comma-separated list of event names | completed |
Which recording events to send: in-progress, completed (a completed recording with no audio is reported as absent), absent. |
trim |
string | — | Accepted and ignored. Accepted; currently has no effect on <Record>. |
transcribe |
string | — | Accepted and ignored. Accepted; recordings are not transcribed by this attribute. |
transcribeCallback |
string | — | Accepted and ignored. Accepted; currently has no effect. |
storageUrl |
string | — | Accepted and ignored. Accepted; currently has no effect. |
storageUrlMethod |
string | — | Accepted and ignored. Accepted; currently has no effect. |
Callback parameters
Section titled “Callback parameters”Sent to action recordingStatusCallback:
| Parameter | Description |
|---|---|
RecordingSid |
Unique id of the recording. |
RecordingUrl |
Where the recording can be fetched (MP3). |
RecordingStatus |
in-progress, completed, or absent (no audio, or refused by the recording policy). |
RecordingDuration |
Length in seconds. |
RecordingStartTime |
When recording started. |
Timestamp |
Time of the event. |
CallSid |
The call recorded. |
AccountSid |
The account. |
Sent to recordingStatusCallback:
| Parameter | Description |
|---|---|
ErrorCode |
Set when the recording policy refused the recording: 64001 blocked by policy, 64004 policy unavailable, 64005 voicemail blocked. |
- action also receives the standard call parameters.