The Record element

    You can use the Record element to record a call and return the URL of the recording file.

    Attributes

    action stringCallback-retry configurable

    Submit the result of the record to this URL. See the table “Parameters sent to the action URL” below for more information.

    Allowed values: a fully qualified URL

    method string

    Method used to send HTTP request to the action URL.

    Allowed values: GET, POST
    Defaults to POST.

    fileFormat string

    The format of the recording.

    Allowed values: mp3, wav
    Defaults to mp3.

    redirect boolean

    If false, don’t redirect to the action URL, only request the URL and continue to the next element.

    Allowed values: true, false
    Defaults to true.

    timeout integer

    Seconds of silence before considering the recording complete. Only used when recordSession and startOnDialAnswer are false.

    Allowed values: positive integer
    Defaults to 15.

    maxLength integer

    Maximum number of seconds to record.

    Allowed values: integer greater than 1
    Defaults to 60.

    playBeep boolean

    Plays a beep before recording. Only used when recordSession and startOnDialAnswer are false.

    Allowed values: true, false
    Defaults to true.

    finishOnKey string

    Stop recording when this key is pressed. Only used when recordSession and startOnDialAnswer are false.

    Allowed values: any digit, #, *
    Defaults to #

    recordSession boolean

    Record current call session in background. No beep will be played.

    Allowed values: true, false
    Defaults to false.

    startOnDialAnswer boolean

    Record call when called party answers in a Dial. No beep will be played.

    Allowed values: true, false
    Defaults to false.

    transcriptionType string

    auto: Transcription is completely automated; turnaround time is about 30 minutes.

    Transcriptions charge details are available on our pricing page.

    Note:

    The transcription service is available only in English, and limited to calls with a duration greater than 500 milliseconds and less than four hours with a recording file size smaller than 2GB.

    transcriptionUrl stringCallback-retry configurable

    The URL where the transcription is to be sent from Plivo. See the table “Parameters sent to the transcription URL” below for more information.

    Allowed values: a fully qualified URL
    No default value.

    Note:

    The transcription information will be sent to this URL via an HTTP POST callback.

    callbackUrl stringCallback-retry configurable

    If set, this URL is fired in the background when the recorded file is ready to be used. See the table “Parameters sent to the callback URL” below for more information.

    Allowed values: a fully qualified URL

    callbackMethod string

    The HTTP method used to notify the callbackUrl.

    Allowed values: GET, POST
    Defaults to POST.

    Notes:

    • If recordSession is set to true, recording will start in the background and will continue until the call is hung up or maxLength is reached.

    • If startOnDialAnswer is set to true, Plivo will record the complete conversation between both parties during the next Dial and will end when the Dial is done or maxLength is reached. This may not be legal in some countries.

    • timeout, finishOnKey, and playBeep attributes have no effect when recordSession or startOnDialAnswer is set to true.

    • The default recording time is 60 seconds if maxLength is not set.

     

    Parameters sent to the answer URL

    RecordUrl

    Complete path to the recorded file URL.

    Digits

    If set, the digits pressed to stop the recording.

    RecordingDuration

    Duration of recording in seconds.

    RecordingDurationMs

    Duration of recording in milliseconds.

    RecordingStartMs

    When the recording started (epoch time UTC) in milliseconds.

    RecordingEndMs

    When the recording ended (epoch time UTC) in milliseconds.

    RecordingID

    Recording ID of the file.

    Notes:

    • If startOnDialAnswer is set to true, an initial request is made to the action URL as soon as the recording has started. Because of this, RecordingDuration, RecordingDurationMs, RecordingStartMs, and RecordingEndMs will all be -1. No other request will be made to the action URL once the recording is completed.

    • If startOnDialAnswer or recordSession is set to false, a request is made to the action URL only when the recording is completed. This request will contain the actual values of recording.

    Parameters sent to the callback URL

    RecordUrl

    Complete path to the recorded file URL.

    RecordingDuration

    Duration of recording in seconds.

    RecordingDurationMs

    Duration of recording in milliseconds.

    RecordingStartMs

    When the recording started (epoch time UTC) in milliseconds.

    RecordingEndMs

    When the recording ended (epoch time UTC) in milliseconds.

    RecordingID

    Recording ID of the file.

    Parameters sent to the transcription URL

    transcription_charge

    The credit deducted for the transcription.

    transcription

    Transcribed text of the recording.

    duration

    Duration in seconds of the recording.

    call_uuid

    Call UUID of the call that was transcribed.

    transcription_rate

    Rate of the transcription per minute.

    recording_id

    Recording ID of the recording that was transcribed.

    errorCan be Recording duration too long for transcription or Recording file size too large for transcription. Empty if transcription is successful.
    Note: .mp3 files are smaller in size than .wav files. Consider changing the recording file format to mp3 if you see this error.