Cisco CUBE

Example

Match the “1200@” in Diversion Header and capture the extension:

“sip:(1…)@”

Replace the match with “8145551200@” using the captured digits (\1):

“sip:814555\1@”

Complete SIP profile rule:

request INVITE sip-header Diversion modify “sip:(1…)@” “sip:814555\1@”
!
voice class sip-profiles 1
request INVITE sdp-header Video-Attribute remove
request INVITE sdp-header Video-Media modify "m=video(.*)" ""
request INVITE sdp-header Video-Bandwidth-Info remove
request INVITE sdp-header Video-Connection-Info remove
request REINVITE sdp-header Video-Attribute remove
request REINVITE sdp-header Video-Connection-Info remove
request REINVITE sdp-header Video-Bandwidth-Info remove
request REINVITE sdp-header Video-Media modify "m=video(.*)" ""
request UPDATE sdp-header Video-Attribute remove
request UPDATE sdp-header Video-Connection-Info remove
request UPDATE sdp-header Video-Bandwidth-Info remove
request UPDATE sdp-header Video-Media modify "m=video(.*)" ""
!
dial-peer sort ! Sort Dialer Peers in Ascending Order
dial-peer sort descending ! Sort Dialer Peers in Descending Order

Unlike the UCCE documentation if G729 transcoding is not needed, leave out Univeral and just have g711alaw / ulaw and CPA setup as per below.

dspfarm profile 4 transcode 
     codec g711ulaw
     codec g711alaw
     maximum sessions 250
     call-progress-analysis
     associate application CUBE
     !

Cisco UCCE Reference

dspfarm profile 3 transcode universal
codec g729abr8
codec g729ar8
codec g711alaw
codec g711ulaw
codec g729br8
call-progress-analysis
maximum sessions 360
associate application CUBE
voice options sip-options-keepalives 1
 transport udp

dial-peer voice xxx voip
 destination-pattern xxxx
 session protocol sipv2
 session target ipv4:123.123.123.123
 voice-class sip options-keepalives profile 1
voice class server-group 1
 hunt-scheme {preference | round-robin}
 ipv4 1.1.1.1 preference 5
 ipv4 2.2.2.2

dial-peer voice 100 voip
 destination-pattern 1234
 session protocol sipv2
 codec g711ulaw
 dtmf-relay rtp-nte
 session server-group 1
voice class e164-pattern-map 300
 e164 919200200.
 e164 510100100.
 e164 408100100.

dial-peer voice 1 voip
 description Inbound DP Via Calling
 incoming **calling** e164-pattern-map 300
 codec g729r8

voice class e164-pattern-map 400
 url flash:e164-pattern-map.cfg

dial-peer voice 2 voip
 description Outbound DP Via Called
 destination e164-pattern-map 400

! example of e164-pattern-map.cfg

9192002010
5101001010
1231231231

Reference

!Configuring the Server Group
Device(config)# voice class server-group 151
Device(config-class)# ipv4 10.1.1.1 preference 1
Device(config-class)# ipv4 10.1.1.2 preference 2
Device(config-class)# ipv4 10.1.1.3 preference 3
Device(config-class)# hunt-scheme round-robin
Device(config-class)# description It has 3 entries

!Configuring an E164 pattern map class
Device(config)# voice class e164-pattern-map 3000
Device(config-class)# e164 300
!Configuring an outbound SIP dial peer.
Device(config)# dial-peer voice 181 voip
!Associate a destination pattern map
Device(config-dial-peer)# destination e164-pattern-map 3000
Device(config-dial-peer)# session protocol sipv2
!Associate a server group with the dial peer
Device(config-dial-peer)# session server-group 151
!Associate the dial peer with a keepalive profile group
Device(config-dial-peer)# voice-class sip options-keepalive profile 171
Device(config-dial-peer)# end

!Verifying the Keepalive group configurations
Device# show voice class sip-options-keepalive 171
voice class sip-profiles 1
 request REINVITE sip-header Diversion remove
 request INVITE sip-header Diversion remove
 request INVITE sdp-header Video-Attribute remove
 request INVITE sdp-header Video-Media modify "m=video(.*)" ""
 request INVITE sdp-header Video-Bandwidth-Info remove
 request INVITE sdp-header Video-Connection-Info remove
 request REINVITE sdp-header Video-Attribute remove
 request REINVITE sdp-header Video-Connection-Info remove
 request REINVITE sdp-header Video-Bandwidth-Info remove
 request REINVITE sdp-header Video-Media modify "m=video(.*)" ""
 request UPDATE sdp-header Video-Attribute remove
 request UPDATE sdp-header Video-Connection-Info remove
 request UPDATE sdp-header Video-Bandwidth-Info remove
 request UPDATE sdp-header Video-Media modify "m=video(.*)" ""