Recording on Gateway
Recording can be enabled on a gateway instead of the XiVO PBX where the users, queues and other objects are configured. This architecture will allow to off-load the recording process to a gateway server. Note that in this architecture not all the recording features are available - see Recording On Gateway Features section.
Important
This page describes the case when recording is activated on the XiVO Gateway. If you want to configure it on the XiVO PBX you MUST follow the Recording guide. Beware that you cannot use both.
Activate Recording on Gateway
To configure recording there are two steps to follow on XiVO Gateway:
Add link towards Recording Server,
and then enable recording via subroutines
1. Add link towards Recording Server
Note
Steps to be done on XiVO Gateway
The first step is to configure the link towards the Recording Server by running the configuration script:
xivocc-recording-config
During the configuration, you will be asked for :
the Recording Server IP (e.g. 192.168.0.2)
the XiVO Gateway name (it must not contain any space or “-” character). If you configure more than one XiVO PBX on the same Recording Server, you must give a different name to each of them.
After having configured the recording, you have to enable via sub-routines. See below.
2. Enable recording
Note
Steps to be done on XiVO Gateway
You must activate the recording by adding subroutines:
Create the subroutines in the file
/etc/asterisk/extensions_extra.d/gateway-recording.conf
:[gateway-recording-outcall] exten = s,1,NoOp(=== Recording calls from Gateway to XiVO PBX ===) same = n,Set(gateway_name=xivogw1) same = n,Set(_recordingid=${gateway_name}-${UNIQUEID}) same = n,Set(XIVO_CALLOPTIONS=${XIVO_CALLOPTIONS}b(gateway-recording-outcall-add-header^s^1)) same = n,Set(MONITOR_EXEC=/usr/bin/xivocc-synchronize-file) same = n,Monitor(,/var/spool/xivocc-recording/audio/${recordingid},m) same = n,Return() [gateway-recording-incall] exten = s,1,NoOp(=== Recording calls from Gateway to Provider ===) same = n,GoSub(xivo-generic-sip-get-header,s,1(X-Xivo-Recordingid,recordingid)) same = n,GotoIf($["${recordingid}" = ""]?norecord:) same = n,Set(MONITOR_EXEC=/usr/bin/xivocc-synchronize-file) same = n,Monitor(,/var/spool/xivocc-recording/audio/${recordingid},m) same = n(norecord),Return() [gateway-recording-outcall-add-header] exten = s,1,NoOp(Adding SIP header on outgoing channel) same = n,GoSub(xivo-generic-sip-add-header,s,1(X-Xivo-Recordingid,${recordingid})) same = n,Return()
Activate subroutines:
Configure the
gateway-recording-outcall
on the Outgoing call rule towards the XiVO PBXConfigure the
gateway-recording-incall
on the Outgoing call rule towards the Provider
Activate Recording on XiVO PBX
Note
Step to be done on the XiVO PBX
On the XiVO PBX you need to use specific subroutines instead of the default ones.
Create the subroutines in the file
/etc/asterisk/extensions_extra.d/xivo-gateway-recording.conf
:; This subroutine is to be used only when recording is set up on gateway [xivocc-incall-recording-viagw] exten = s,1,NoOp(=== Recording incoming calls (XiVO PBX) ===) same = n,GoSub(xivo-generic-sip-get-header,s,1(X-Xivo-Recordingid,XIVO_RECORDINGID)) same = n,Set(DO_RECORD=true) same = n,System(test -f /usr/share/asterisk/agi-bin/xivocc-determinate-record-incall) same = n,GotoIf($["${SYSTEMSTATUS}" = "SUCCESS"]?:noagi) same = n,AGI(xivocc-determinate-record-incall) same = n(noagi),GotoIf($["${DO_RECORD}" = "true"]?:norecord) same = n,CelGenUserEvent(ATTACHED_DATA,recording=${XIVO_RECORDINGID}) same = n(norecord),Return() [xivocc-outcall-recording-viagw] exten = s,1,NoOp(=== Outgoing Call Recording (XiVO PBX) ===) same = n,Set(DO_RECORD=true) same = n,System(test -f /usr/share/asterisk/agi-bin/xivocc-determinate-record-outcall) same = n,GotoIf($["${SYSTEMSTATUS}" = "SUCCESS"]?:noagi) same = n,AGI(xivocc-determinate-record-outcall) same = n(noagi),GotoIf($["${DO_RECORD}" = "true"]?:norecord) same = n,Set(ipbx_name=xivo) same = n,Set(_XIVO_RECORDINGID=${ipbx_name}-${UNIQUEID}) same = n,Set(XIVO_CALLOPTIONS=${XIVO_CALLOPTIONS}b(gateway-recording-outcall-add-header^s^1)) same = n,CelGenUserEvent(ATTACHED_DATA,recording=${XIVO_RECORDINGID}) same = n(norecord),Return() [gateway-recording-outcall-add-header] exten = s,1,NoOp(Adding SIP header on outgoing channel) same = n,GoSub(xivo-generic-sip-add-header,s,1(X-Xivo-Recordingid,${XIVO_RECORDINGID})) same = n,Return()
Activate the subroutines:
Configure the
xivocc-incall-recording-viagw
on the Incoming calls/Queues in your XiVO PBXConfigure the
xivocc-outcall-recording-viagw
on the Outgoing call rule towards the Provider
Recording On Gateway Features
Available Features
When you activate the recording on a XiVO Gateway all features of the recording server are available: