{% method %}
The Record verb allows call recording. A call recording event containing the recording URL is generated after the recording is stopped.
- If the
<Record>
verb is within a<Transfer>
verb, it is used to record both the caller and called party audio. The recording will stop only when one of the party disconnects. - If the
<Record>
verb is outside a verb, only the called party audio is recorded. This is similar to situations where voicemail is recorded.maxDuration
can be specified to stop recording after a specified period. Additionally, the caller can press aterminatingDigit
to stop the recording. The recording will be in a single channel per file (mono recording).
ATTRIBUTE | DESCRIPTION |
---|---|
requestUrl |
(optional) Absolute URL to send event |
requestUrlTimeout |
(optional) The time in milliseconds to wait for requestUrl response. |
fileFormat |
(optional) The format that the recording will be saved - mp3 or wav . 👉 Default is wav 👈 |
transcribe |
(optional) A boolean value to indicate that recording must be transcribed. wav . mp3 file format is not supported. 👉 Default is false 👈 |
transcribeCallbackUrl |
Absolute URL to send transcribed event.true . |
multiChannel |
(optional) Record the caller and called party voices on 2 separate channels in the same file. Values could be true or false . When false , both voices are recorded on the same channel. This is ignored if the <Record> verb is outside a <Transfer> verb. I.e. If recording voicemail, it is recorded in the only channel in the file. 👉 Default is false 👈 |
maxDuration |
(optional) Number of seconds to record the caller’s voice. Default 60. This is ignored if the <Record> verb is inside a <Transfer> verb. 👉 Max= 3600 seconds 👈 |
silenceTimeout |
(optional) Number of seconds of silence detected before ending the recording. Default is 3 seconds. 👉Max is 60 seconds. 👈 |
silenceThreshold |
(optional) This setting controls when the silence timeout is effective. Set this number higher in noisy environments to detect voice and “silence”. If this is set too low, the ambient noise will be considered as activity and not considered silence. 👉 Default is 100. 👈 |
terminatingDigits |
(optional) Digit that the caller presses to indicate that the recording can be stopped. It can be any one of 0-9*# . 👉 Default none.👈 <Record> verb is inside a <Transfer> verb. |
Transcription will not work with mp3 file format.
Callbacks | Can reply with more BXML |
---|---|
Recording | No |
Transcription | No |
{% common %}
This shows how to use Bandwidth XML record a phone call.
<?xml version="1.0" encoding="UTF-8"?>
<Response>
<SpeakSentence voice="paul" gender="male" locale="en_US">Recording your call after the beep</SpeakSentence>
<PlayAudio>https://audio.url/voicemailBeep.mp3</PlayAudio>
<Record requestUrl="https://record.url.server/recordVoicemail" transcribe="true" transcribeCallbackUrl="https://transcribe.url/result"/ >
</Response>
{% endmethod %}