Skip to content

Pause, resume or stop a call recording

POST
/v1/Accounts/{auth_id}/Calls/{call_sid}/Recordings/{recording_sid}
curl --request POST \
--url https://api.siprtc.io/v1/Accounts/AC000000000000000000/Calls/0c9b8a7d-6e5f-4a3b-9c1d-2e3f4a5b6c7d/Recordings/7d1c3b5a-9e8f-4a6b-8c2d-1e0f3a4b5c6d \
--header 'Authorization: Basic <credentials>' \
--header 'Content-Type: application/json' \
--data '{ "PauseBehavior": "skip", "Status": "paused" }'

Changes a recording of a live call: Status=paused pauses it (PauseBehavior skip leaves the pause out of the file, silence fills it with silence), Status=in-progress resumes it, and Status=stopped ends it. Parameters may be sent as JSON, as a form, or in the query string when the body is empty; values are matched without regard to case. A .json suffix on the recording SID is ignored. A call that is not live answers 400 with an empty JSON string as the body; a refusal from the media server is passed on with its own status and body.

auth_id
required
string

Your account Auth ID, or the Auth ID of a sub-account you own

Example

AC000000000000000000
call_sid
required
string

Call SID (a UUID) of the live call

Example

0c9b8a7d-6e5f-4a3b-9c1d-2e3f4a5b6c7d
recording_sid
required
string

Recording SID (a UUID)

Example

7d1c3b5a-9e8f-4a6b-8c2d-1e0f3a4b5c6d

The new recording status

object
PauseBehavior

With Status=paused only: skip leaves the paused time out of the file, silence records silence for it. Ignored with any other status.

string
Allowed values: skip silence

Example

skip
Status

Required. paused pauses the recording, in-progress resumes it, stopped ends it.

string
Allowed values: paused in-progress stopped

Example

paused

The recording’s new status, with sid, call_sid, account_sid and api_version

Media type application/json
object
account_sid

Auth ID of the account.

string
api_version

API version, v1.

string
call_sid

SID of the recorded call.

string
sid

Recording SID (a UUID).

string
start_time

Not currently populated.

string
status

On update, the status that was requested (paused, in-progress or stopped); empty when a recording is started.

string
uri

Not currently populated.

string

Example

{
"account_sid": "AC000000000000000000",
"api_version": "v1",
"call_sid": "0c9b8a7d-6e5f-4a3b-9c1d-2e3f4a5b6c7d",
"sid": "7d1c3b5a-9e8f-4a6b-8c2d-1e0f3a4b5c6d",
"start_time": "",
"status": "paused",
"uri": ""
}

Status is missing or invalid (code 20001, "Status is required"), the body could not be read (21210), or the call is not live (body is an empty JSON string)

Media type application/json
object
code

Error code, e.g. 21201 (no To), 21213 (no From), 21205 (no Url), 21211 (invalid To), 21210 (From not verified, or unreadable request), 21219 (To not verified on a trial account), 10001 (account not active), 20001 (invalid parameter), 20009 (no live call to delete). The insufficient-balance error carries 258.

integer
message

Human-readable explanation.

string
more_info

A link for more information: https:// followed by the host the request was sent to, without its api. prefix.

string
status

The HTTP status of the response.

integer

Example

{
"code": 21201,
"message": "No 'To' number is specified",
"more_info": "https://siprtc.io",
"status": 400
}

Authentication failed: missing or invalid credentials (JSON string from the API gateway)

Media type application/json
string

Example generated

example