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_callbackURL. Can be:in-progress,completedandabsentand the default iscompleted. Separate multiple event values with a space. -
The URL we should call using the
recording_status_callback_methodon 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:GETorPOSTand the default isPOST.Values are
GETorPOST. -
Whether to trim any leading and trailing silence in the recording. Can be:
trim-silenceordo-not-trimand the default isdo-not-trim.trim-silencetrims the silence from the beginning and end of the recording anddo-not-trimdoes not. -
The number of channels used in the recording. Can be:
monoordualand the default ismono.monorecords all parties of the call into one channel.dualrecords each party of a 2-party call into separate channels. -
The audio track to record for the call. Can be:
inbound,outboundorboth. The default isboth.inboundrecords the audio that is received by Twilio.outboundrecords the audio that is generated from Twilio.bothrecords 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
}