Recording calls
This guide covers capturing audio from a call with the <Record> verb, receiving the result on your server, and fetching recordings after the fact over the REST API.
Record a voicemail message
The most common recording pattern prompts the caller, then records a message with <Record>. When the caller stops speaking, presses #, or the recording reaches its maximum length, PressOne requests the action URL with the recording result.
RecordingSid, RecordingUrl, and RecordingDuration are the parameters PressOne posts to action. See Record for the complete attribute reference, including timeout, finishOnKey, and maxLength.
Get notified when a recording finishes
Some recordings are not tied to a single action (for example, logging an entire call for quality purposes rather than collecting a message). Set recordingStatusCallback instead of (or alongside) action to have PressOne notify a separate URL once the recording finishes:
Code
PressOne requests recordingStatusCallback once, for the completed event only: there is no separate in-progress notification. The request carries these parameters:
| Parameter | Description |
|---|---|
AccountSid | Your account SID. |
CallSid | The unique identifier of the call. |
RecordingSid | Unique identifier for the recording. |
RecordingUrl | Public URL of the recorded audio file. |
RecordingStatus | Always completed. |
RecordingDuration | Duration of the recording, in seconds. |
RecordingChannels | Always 1. |
RecordingSource | Always RecordVerb. |
The receiver only needs to acknowledge the request. It does not control the call, since <Record> has already released it to the next verb:
Recording URLs are public
RecordingUrl, delivered on both action and recordingStatusCallback, is publicly readable: anyone who has the URL can play or download the recording, with no authentication required. Treat it as sensitive data:
- Store it server-side rather than passing it directly to a browser or mobile client.
- Avoid writing it to logs your support team or third-party tools can read.
- If a caller-facing product needs to play a recording back, proxy the audio through an endpoint your own server authenticates, instead of forwarding the raw
RecordingUrl.
Fetch recordings over REST
Once you have a CallSid, you can also retrieve recordings after the fact instead of relying on action or recordingStatusCallback alone.
List every recording for a call
This list is not paginated, and each entry is metadata only: it does not include RecordingUrl. Capture that value from action or recordingStatusCallback when you need to play or download the audio itself:
Code
Fetch a single recording
A completed recording returns its duration and format:
Code
If you fetch a recording before it finishes, duration and format are not yet known. The API omits both fields from the response entirely rather than returning them as null:
Code
A missing RecordingSid returns 404 instead of a partial resource.
Next steps
- Record: the complete
<Record>attribute reference. - Forwarding calls: combine
<Dial>with a voicemail fallback when the dialed party does not answer. - Webhooks: standard parameters and signature verification for every request PressOne sends your server.
- API reference: complete REST endpoint documentation.