Create a recording for the call
A Recording resource represents the recording associated with a voice call, conference, or SIP Trunk.
Create a recording for the call
Path parameters
-
The SID of the Account that will create the resource.
Minimum length is
34
, maximum length is34
. Format should match the following pattern:^AC[0-9a-fA-F]{32}$
. -
The SID of the Call to associate the resource with.
Minimum length is
34
, maximum length is34
. Format should match the following pattern:^CA[0-9a-fA-F]{32}$
.
Body
-
The recording status events on which we should call the
recording_status_callback
URL. Can be:in-progress
,completed
andabsent
and the default iscompleted
. Separate multiple event values with a space. -
The URL we should call using the
recording_status_callback_method
on each recording event specified inrecording_status_callback_event
. For more information, see RecordingStatusCallback parameters. -
The HTTP method we should use to call
recording_status_callback
. Can be:GET
orPOST
and the default isPOST
.Values are
GET
orPOST
. -
Whether to trim any leading and trailing silence in the recording. Can be:
trim-silence
ordo-not-trim
and the default isdo-not-trim
.trim-silence
trims the silence from the beginning and end of the recording anddo-not-trim
does not. -
The number of channels used in the recording. Can be:
mono
ordual
and the default ismono
.mono
records all parties of the call into one channel.dual
records each party of a 2-party call into separate channels. -
The audio track to record for the call. Can be:
inbound
,outbound
orboth
. The default isboth
.inbound
records the audio that is received by Twilio.outbound
records the audio that is generated from Twilio.both
records the audio that is received and generated by Twilio.
curl \
--request POST 'https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Recordings.json' \
--user "username:password" \
--header "Content-Type: application/x-www-form-urlencoded" \
--data 'Trim=do-not-trim&PlayBeep=true&Transcribe=true&RecordingTrack=both&RecordingChannels=dual&RecordingStatusCallback=https%3A%2F%2Fexample.com&TranscriptionConfiguration=JVaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&RecordingStatusCallbackEvent=in-progress+completed+failed&RecordingStatusCallbackMethod=GET'
{"Trim"=>"do-not-trim", "PlayBeep"=>true, "Transcribe"=>true, "RecordingTrack"=>"both", "RecordingChannels"=>"dual", "RecordingStatusCallback"=>"https://example.com", "TranscriptionConfiguration"=>"JVaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "RecordingStatusCallbackEvent"=>["in-progress completed failed"], "RecordingStatusCallbackMethod"=>"GET"}
{"Trim"=>"do-not-trim", "PlayBeep"=>true, "Transcribe"=>true, "RecordingTrack"=>"both", "RecordingChannels"=>"dual", "RecordingStatusCallback"=>"https://example.com", "TranscriptionConfiguration"=>"JVaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "RecordingStatusCallbackEvent"=>["in-progress completed failed"], "RecordingStatusCallbackMethod"=>"GET"}
{
"sid": "REaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Recordings/REaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json",
"price": null,
"track": "both",
"source": "StartCallRecordingAPI",
"status": "in-progress",
"call_sid": "CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"channels": 2,
"duration": null,
"error_code": null,
"price_unit": null,
"start_time": "Fri, 14 Oct 2016 21:56:34 +0000",
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"api_version": "2010-04-01",
"date_created": "Fri, 14 Oct 2016 21:56:34 +0000",
"date_updated": "Fri, 14 Oct 2016 21:56:34 +0000",
"conference_sid": null,
"encryption_details": null
}
{
"sid": "REaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Recordings/REaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json",
"price": null,
"track": "both",
"source": "StartCallRecordingAPI",
"status": "in-progress",
"call_sid": "CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"channels": 2,
"duration": null,
"error_code": null,
"price_unit": null,
"start_time": "Fri, 14 Oct 2016 21:56:34 +0000",
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"api_version": "2010-04-01",
"date_created": "Fri, 14 Oct 2016 21:56:34 +0000",
"date_updated": "Fri, 14 Oct 2016 21:56:34 +0000",
"conference_sid": null,
"encryption_details": null
}