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
Body
-
RecordingChannels string
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. -
RecordingStatusCallback string(uri)
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. -
RecordingStatusCallbackEvent array[string]
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. -
RecordingStatusCallbackMethod string(http-method)
The HTTP method we should use to call
recording_status_callback
. Can be:GET
orPOST
and the default isPOST
.Values are
HEAD
,GET
,POST
,PATCH
,PUT
, orDELETE
. -
RecordingTrack string
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. -
Trim string
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.
curl \
-X POST https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Recordings.json \
--user "username:password" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d 'RecordingChannels=string&RecordingStatusCallback=https%3A%2F%2Fexample.com&RecordingStatusCallbackEvent=string&RecordingStatusCallbackMethod=HEAD&RecordingTrack=string&Trim=string'
{
"RecordingChannels": "string",
"RecordingStatusCallback": "https://example.com",
"RecordingStatusCallbackEvent": [
"string"
],
"RecordingStatusCallbackMethod": "HEAD",
"RecordingTrack": "string",
"Trim": "string"
}
{
"RecordingChannels": "string",
"RecordingStatusCallback": "https://example.com",
"RecordingStatusCallbackEvent": [
"string"
],
"RecordingStatusCallbackMethod": "HEAD",
"RecordingTrack": "string",
"Trim": "string"
}
{
"account_sid": "string",
"api_version": "string",
"call_sid": "string",
"channels": 42,
"conference_sid": "string",
"date_created": "string",
"date_updated": "string",
"duration": "string",
"error_code": 42,
"price": 42.0,
"price_unit": "string",
"sid": "string",
"source": "DialVerb",
"start_time": "string",
"status": "in-progress",
"track": "string",
"uri": "https://example.com"
}
{
"account_sid": "string",
"api_version": "string",
"call_sid": "string",
"channels": 42,
"conference_sid": "string",
"date_created": "string",
"date_updated": "string",
"duration": "string",
"error_code": 42,
"price": 42.0,
"price_unit": "string",
"sid": "string",
"source": "DialVerb",
"start_time": "string",
"status": "in-progress",
"track": "string",
"uri": "https://example.com"
}