The Record Element
The Record element records a call or conference and posts the URL of the recording to an action URL.
Attributes
| Attribute | Description |
|---|---|
actionstring Callback-retry configurable | A URL to which the parameters are sent. The parameters sent to the action URL are described below. This is a required attribute. Allowed values: A fully qualified URL |
methodstring Callback-retry configurable | The method used to send the result of the recording to the action URL. Allowed values: GET, POST Defaults to POST. |
fileFormatstring | Specifies the file format of the recording. Allowed values: mp3, wav Defaults to mp3. |
redirectboolean | If set to true, the action URL will not be fetched; instead, the XML response will be retrieved and executed after the recording is done. If set to false, the action URL will be fetched and the response will be executed without even retrieving the XML response. Allowed values: true, false Defaults to false. |
timeoutinteger | The maximum time in seconds to record. When this time is reached, the recording ends. The timeout does not set a duration limit on the recording (no time limit is set). For recordings that are ended due to a timeout, the RecordingEndReason parameter sent to the action URL has a value of RecordingTimeout. Allowed values: integer > 0 Defaults to 60. |
maxLengthinteger | The maximum length of the recording in seconds. Once this time is reached, the recording ends. For recordings that end due to the maxLength limit, the RecordingEndReason sent to the action URL has a value of maxLength. Allowed values: integer > 0 Defaults to 60. |
playBeepboolean | If set to true, a beep will be played before the recording begins. Allowed values: true, false Defaults to true. |
finishOnKeystring | When this key is pressed, the recording will stop. For recordings that end due to this attribute, the RecordingEndReason sent to the action URL has a value of FinishedOnKey. Allowed values: Any digit, #, * Defaults to 1234567890*#. |
recordSessionboolean | If set to true, the entire session will be recorded, including multiple plays or speak elements. The recording will end when the call is hung up. For recordings that end due to recordSession being set to true, the RecordingEndReason sent to the action URL has a value of HungUp. Allowed values: true, false Defaults to false. |
startOnDialAnswerboolean | If set to true, the recording will start when the call is answered. This is used for outbound calls, where the record element is embedded in the Dial element. Allowed values: true, false Defaults to false. |
transcriptionTypestring | Specifies the type of transcription service to use. Allowed values: auto, hybrid Defaults to auto. Note: Transcription is available at an additional cost. Please refer to the pricing page for more details.
|
transcriptionUrlstring Callback-retry configurable | A URL to which the transcription is sent. Allowed values: A fully qualified URL |
transcriptionMethodstring Callback-retry configurable | Specifies the HTTP method to use when requesting the transcriptionUrl. Allowed values: GET, POST Defaults to POST. |
callbackUrlstring Callback-retry configurable | A URL to which parameters are sent when the recording ends. This is similar to the action URL, but the recording URL will be ready by the time the callback is made. The parameters sent to the callback URL are the same as those sent to the action URL. Allowed values: A fully qualified URL |
callbackMethodstring Callback-retry configurable | Specifies the HTTP method to use when requesting the callbackUrl. Allowed values: GET, POST Defaults to POST. |
Parameters sent to the action URL
| Parameter | Description |
|---|---|
RecordUrlstring | The URL of the recording file. When you receive this parameter, you may need to wait a few seconds for the file to be ready for download. Alternatively, you can use the callbackUrl attribute to receive a notification once the file is ready. |
RecordingDurationinteger | The duration of the recording in seconds. |
RecordingDurationMsinteger | The duration of the recording in milliseconds. |
RecordingStartMsinteger | The timestamp when the recording started, in milliseconds. |
RecordingEndMsinteger | The timestamp when the recording ended, in milliseconds. |
RecordingIDstring | A unique identifier for the recording. |
RecordingEndReasonstring | The reason the recording ended. Possible values are:
|
Parameters sent to the callback URL
The parameters sent to the callback URL are the same as those sent to the action URL.
Parameters sent to the transcription URL
| Parameter | Description |
|---|---|
transcriptionstring | The text of the transcription. |
transcription_idstring | A unique identifier for the transcription. |
transcription_urlstring | The URL of the transcription file. |
recording_idstring | A unique identifier for the recording. |