Recording calls
VoiceAI Connect can facilitate Session Recording Protocol (SIPREC) for recording the audio of calls with a bot.
Recording is done by the VoiceAI Connect (SBC) functioning as the Session Recording Client (SRC). The Session Recording Server (SRS) can be AudioCodes SmartTAP recording solution or any third-party SRS.
Recording can be started in the following ways:
-
Automatic recording:
-
All bots - calls of all bots will be recorded for the whole duration of the call.
-
Per bot - calls of a specified bot will be recorded for the whole duration of the call.
VoiceAI Connect Enterprise supports automatic recording per bot from Version 2.6 and later.
-
-
Bot-controlled recording: Recording will only be done when the bot sends a specific event. The bot can also stop, pause or resume recording at any time. This is useful if the bot logic should decide whether and when to record the call (e.g., after asking for the user's consent).
VoiceAI Connect Enterprise supports bot-controlled recording from Version 2.2 and later.
The recording session can include an identifier so it can be correlated with the bot conversation. When the recording is started by the bot, the bot can set this identifier.
To enable recording of your bot calls for Live Hub, see Call Recording.htm.
How do I use it?
Configuration
For VoiceAI Connect Enterprise, please contact AudioCodes professional services for configuring the Session Recording Server (SRS).
After configuring it, the following bot administrative parameters should be set:
Automatic recording
For automatic call recording of all bots, please contact AudioCodes professional services.
For configuring automatic call recording per bot, configure the bot administrative parameter autoCallRecording
to true
for the bot whose calls you want automatically recorded.
Bot-controlled recording
The following events are used by the bot for recording at any stage of the call:
-
startCallRecording
: Starts recording. -
stopCallRecording
: Stops recording entirely and closes the connection with the SIP Recording Server (SRS). -
pauseCallRecording
: Pauses recording (nothing is recorded), but the connection to the SRS is maintained. This may be used, for example, when the bot wants to stop recording for a limited time during which the customer says sensitive data. The recording can later be resumed or stopped. -
resumeCallRecording
: Resumes recording after it was paused.
VoiceAI Connect Enterprise supports the pauseCallRecording
and resumeCallRecording
events from Version 2.6 and later.
See Sending activities page for instructions on how to send events using your bot framework.
The callRecordingId
parameter can be used to specify an identifier to the recording session, which is forwarded to the SRS.
Examples:
Start recording example:
{ "type": "event", "name": "startCallRecording", "activityParams": { "callRecordingId": "KUYdgtofIdi76YpkP09J4J-a:1" } }
{ "type": "event", "name": "stopCallRecording" }
Pause recording example:
{ "type": "event", "name": "pauseCallRecording" }
Resume recording example:
{ "type": "event", "name": "resumeCallRecording" }
Start recording example:
{ "type": "event", "name": "startCallRecording", "channelData": { "activityParams": { "callRecordingId": "KUYdgtofIdi76YpkP09J4J-a:1" } } }
{ "type": "event", "name": "stopCallRecording" }
Pause recording example:
{ "type": "event", "name": "pauseCallRecording" }
Resume recording example:
{ "type": "event", "name": "resumeCallRecording" }
Start recording example:
Send the session params with startCallRecording
event (see Sending event to VoiceAI Connect)
[{ "activityParams": { "callRecordingId": "KUYdgtofIdi76YpkP09J4J-a:1" } }
Stop recording example:
Send the empty event named stopCallRecording
(see Sending event to VoiceAI Connect)
Pause recording example:
send the empty event named pauseCallRecording
(see Sending event to VoiceAI Connect)
Resume recording example:
send the empty event named resumeCallRecording
(see Sending event to VoiceAI Connect)
Start recording example:
[Activity "type": "event", "name": "startCallRecording", "channelData": ${json(` { "activityParams": { "callRecordingId": "KUYdgtofIdi76YpkP09J4J-a:1" } } )} }
[Activity "type": "event", "name": "stopCallRecording" ]
Pause recording example:
[Activity "type": "event", "name": "pauseCallRecording" ]
Resume recording example:
[Activity "type": "event", "name": "resumeCallRecording" ]
The following examples should be added to Custom Payload fulfillments.
Start recording example:
{ "activities": [{ "type": "event", "name": "startCallRecording", "activityParams": { "callRecordingId": "KUYdgtofIdi76YpkP09J4J-a:1" } } }
{ "activities": [{ "type": "event", "name": "stopCallRecording" } }
Pause recording example:
{ "activities": [{ "type": "event", "name": "pauseCallRecording" } }
Resume recording example:
{ "activities": [{ "type": "event", "name": "resumeCallRecording" } }
The following examples should be added to Custom Payload responses.
Start recording example:
{ "activities": [{ "type": "event", "name": "startCallRecording", "activityParams": { "callRecordingId": "KUYdgtofIdi76YpkP09J4J-a:1" } } }
{ "activities": [{ "type": "event", "name": "stopCallRecording" } }
Pause recording example:
{ "activities": [{ "type": "event", "name": "pauseCallRecording" } }
Resume recording example:
{ "activities": [{ "type": "event", "name": "resumeCallRecording" } }
Event parameters
The following table lists optional parameters associated with the startCallRecording
event:
See Changing call settings for details on how these parameters can be applied.
Parameter |
Type |
Description |
---|---|---|
String |
Defines the recording session identifier, which is forwarded by the SBC to the SRS. See Recording session identifier below for more details. |
|
String |
Defines the username that is used in the SIP Request-URI and To header of the INVITE request to the SRS. |
Recording session identifier
When the callRecordingId
parameter is used, an <ac:call-recording-id>
element is added to the <session>
element of the SIPREC XML body that is sent to the SRS on the SIP INVITE. This element includes the value specified by the parameter.
The administrator can later retrieve the bot's recordings from the SRS, by using this identifier.
Note: The XML element name ("ac:call-recording-id") can be changed using the SBC's Message Manipulation feature.
Below is an example of an XML body with the <ac:call-recording-id>
element:
<?xml version="1.0" encoding="UTF-8"?> <recording xmlns="urn:ietf:params:xml:ns:recording" xmlns:ac="http://AudioCodes"> <datamode>complete</datamode> <group id="00000000-0000-0072-57a7-310000000072"> <associate-time>2018-01-01T02:22:29</associate-time> </group> <session id="0000-0000-0000-0000-b44497aaf9597f7f"> <group-ref>00000000-0000-0072-57a7-310000000072</group-ref> <associate-time>2018-01-01T02:22:29</associate-time> <ac:call-recording-id>KUYdgtofIdi76YpkP09J4J-a:1</ac:call-recording-id> </session> <participant id="+123456789" session="0000-0000-0000-0000-b44497aaf9597f7f"> ... </participant> ... </recording>