Record
The <Record> verb records the caller's voice and, once recording ends, sends the result to your action URL.
Attributes
| Name | Type | Default | Description |
|---|---|---|---|
action | string (uri) | — | URL to send the recording result to. When absent, execution continues with the next verb in the document once recording ends. |
method | string | POST | HTTP method used to request action. One of GET or POST. |
timeout | integer | 5 | Seconds of silence that automatically end the recording. Set to 0 to disable the silence timeout. |
finishOnKey | string | # | DTMF key that ends the recording when pressed. A single character: any digit, *, or #. Set to an empty string to disable ending on any key. |
maxLength | integer | 3600 | Maximum recording duration, in seconds. |
playBeep | boolean | true | Whether to play a beep tone before recording starts. |
recordingStatusCallback | string (uri) | — | URL to notify when the recording finishes. PressOne requests this URL once, for the completed event only: it does not send an in-progress event. |
recordingStatusCallbackMethod | string | POST | HTTP method used to request recordingStatusCallback. One of GET or POST. |
Warning: Recording URLs returned in
RecordingUrlare publicly readable: anyone who has the URL can play or download the recording, with no authentication required. Treat recording URLs as sensitive data, and avoid exposing them in client-side code or logs you do not control.
Nesting
<Record> is a self-closing element with no text content and no nested verbs.
Action parameters
| Name | Type | Description |
|---|---|---|
RecordingSid | string | Unique identifier for the recording. |
RecordingUrl | string (uri) | Public URL of the recorded audio file. |
RecordingDuration | integer | Duration of the recording, in seconds. |
recordingStatusCallback parameters
When recordingStatusCallback is set, PressOne posts the following parameters to it once the recording completes:
| Name | Type | Description |
|---|---|---|
AccountSid | string | Your account SID. |
CallSid | string | The unique identifier of the call. |
RecordingSid | string | Unique identifier for the recording. |
RecordingUrl | string (uri) | Public URL of the recorded audio file. |
RecordingStatus | string | Always completed. |
RecordingDuration | integer | Duration of the recording, in seconds. |
RecordingChannels | integer | Always 1. |
RecordingSource | string | Always RecordVerb. |
Examples
A voicemail prompt that records a message and requests action when done:
Code
The /voicemail-complete handler, complete and runnable:
A silent log recording of the whole call, using recordingStatusCallback instead of action:
Code
The /recording-status receiver, complete and runnable: