SIPREC Configuration
SIPREC recording of PSTN calls on Cisco CUBE or Cisco CME
This recording method is suitable for the following scenarios:
Cisco CUBE as “Session Border Controller”, to grant SIP-based PSTN access to your PBX (Cisco UCM or any other IP-PBX). See below:

Cisco CME, with carrier’s SIP trunk toward PSTN. See below:

Both Cisco CUBE or Cisco CME should include NN x trunk licenses "CUBE-T-STD" to trigger SIPREC recording, where NN is the total number of concurrent calls to be recorded (calculation must include conversations on hold, on phone lines enabled to Imagicle Call Recording).
Configurations on Cisco Gateway (CUBE or CCME appliance)
In this scenario, two media class with relevant media profile should be defined, respectively for inbound and outbound PSTN calls recording using SIPREC:
Inbound PSTN calls:
media profile recorder 101
description MEDIA PROFILE TO IMAGICLE RECORDER - INBOUND CALLS
media-type audio
media-recording 9001
!
media class 101
recorder profile 101 siprec
Outbound PSTN calls:
media profile recorder 100
description MEDIA PROFILE TO IMAGICLE RECORDER - OUTBOUND CALLS
media-type audio
media-recording 9000
!
media class 100
recorder profile 100 siprec
Then you need to amend existing dial-peers to route inbound and outbound calls, by respectively adding above defined SIPREC media-class. See below sample:
dial-peer voice 7100 voip
description INCOMING CALLS FROM PSTN
|
|
|
media-class 101
codec g711alaw
dtmf-relay cisco-rtp
no vad
!
dial-peer voice 7000 voip
description OUTGOING CALLS TO CARRIER SIP TRUNK
|
|
|
media-class 100
codec g711alaw
dtmf-relay cisco-rtp
no vad
!
The following dial-peer voip must be created from scratch, to record incoming PSTN calls, including a specific voice class sip-profile to customize SIP INVITE “From” header:
voice class sip-profiles 101
request INVITE sip-header From modify "<sip:(.*)>(.+)" "<sip:\1;x-incoming;x-anchor-index=1>\2"
!
dial-peer voice 9001 voip
description Imagicle SIPREC Server (incoming calls recording)
destination-pattern 9001
session protocol sipv2
session target ipv4:<IAS_IP>:5070 <-- Imagicle Recorder’s IP
voice-class sip profiles 101
session transport tcp
voice-class sip options-keepalive up-interval 10 down-interval 10 retry 3
codec g711ulaw
dtmf-relay rtp-nte
no vad
!
The following dial-peer voip must be created from scratch, to record outgoing PSTN calls, including a specific voice class sip-profile to customize SIP INVITE “From” header:
voice class sip-profiles 100
request INVITE sip-header From modify "<sip:(.*)>(.+)" "<sip:\1;x-outgoing;x-anchor-index=1>\2"
!
dial-peer voice 9000 voip
description Imagicle SIPREC Server (recording outgoing calls)
destination-pattern 9000
session protocol sipv2
session target ipv4:<IAS_IP>:5070 <-- Imagicle Recorder’s IP
voice-class sip profiles 100
session transport tcp
voice-class sip options-keepalive up-interval 10 down-interval 10 retry 3
dtmf-relay rtp-nte
codec g711ulaw
no vad
!
Other supported SIPREC recording scenarios
SIPREC recording with analog/TDM trunks to PSTN
Imagicle Call Recording allows to leverage SIPREC technology to record calls routed to analog or TDM-based PSTN trunks. In this case, while the call is not fully SIP-to-SIP, it is required to add "Hairpin" dial-peers to engage a SIP-to-SIP call leg and trigger SIPREC recording streams. See below sample scenario including Cisco CME:

SIPREC to record internal calls between analog phones
Internal calls involving analog phones can be recorded too, again involving "Hairpin" dial-peers to loopback analog calls through a Cisco CUBE. See below a sample scenario including IP-PBX and a dedicated CUBE for recording purposes:

Configure Live Keep recording trigger
SIPREC supports both always-on and Live Keep recording methods. If the latter is in use, please remember to configure the CUCM Phone Service to trigger the recording, as explained here.
Configuration on Imagicle side
In order to enable SIPREC recording, it is required to properly license the UC Suite by channels or users. Moreover, the following settings should be applied from Imagicle UC Suite web portal for Administrators:
Users’ management:
Please add a user for each internal extension number you need to enable for SIPREC recording.
Users’ permission: each recording-enabled user should have at least the permission level "(2) Record Only"
Call Recording Global parameters:
Internal or external data Storage, with retention policies
Email notifications, if required