Skip to main content

Create a Recording

Use this endpoint for the Recordings method to initiate a Recording for a Call. You can use this endpoint to start recording a Call that is already in progress. If you want to record the entire Call, you can specify recording params during creation of the Call.

Parameters

ParameterDescription
RecordingChannels OptionalThe number of channels in the recording. Can be mono (both legs of call recorded under one channel into one recording file) or dual (each leg of call recorded in separate channels into one recording file).
RecordingStatusCallback OptionalThe URL to request to when recording is available.
RecordingStatusCallbackEvent OptionalThe different recording statuses. Possible values are completed, in-progress, and absent. To specify multiple events, separate with a space. Defaults to completed.
RecordingStatusCallbackMethod OptionalWhether the request to RecordingStatusCallback URL is a GET or a POST. Default is POST.
RecordingTrack OptionalSpecifies whether to record the inbound audio to SignalWire from the called party or the outbound audio from SignalWire to the called party or both the inbound and outbound audio. Defaults to both.
Trim OptionalWhether leading and trailing silence is trimmed from a recording. Possible values are trim-silence and do-not-trim. Default is do-not-trim.

Request

curl https://example.signalwire.com/api/laml/2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Recordings.json \
-X POST \
-u "YourProjectID:YourAuthToken" \
--data-urlencode "RecordingChannels=dual" \
--data-urlencode "RecordingStatusCallbackEvent=completed,in-progress" \
--data-urlencode "RecordingStatusCallback=http://your-application.com/callback" \
--data-urlencode "Trim=do-not-trim" \
--data-urlencode "RecordingTrack=both"