This is an old revision of the document!
Cisco CUBE
How to Use the SIP Normalization Features of Unified CM and 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@”
Bind to in / out dial-peers
SIP Profile CUBE Example
CUBE - Call Forking
CUBE - SRTP-RTP
SIP out Video Capabilities using a SIP profile on a CUBE
! 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(.*)" "" !
Transcoding on CUBE
Very Different to above
https://www.cisco.com/c/en/us/support/docs/voice-unified-communications/unified-border-element/115018-configure-cube-lti.html
Handy Commands
dial-peer sort ! Sort Dialer Peers in Ascending Order dial-peer sort descending ! Sort Dialer Peers in Descending Order
UCCE Dialer with CUBE
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
!
dspfarm profile 3 transcode universal codec g729abr8 codec g729ar8 codec g711alaw codec g711ulaw codec g729br8 call-progress-analysis maximum sessions 360 associate application CUBE
SIP dial-peer and SIP Options
Options Keepalives
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
Destination Server Groups
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
e164-pattern-map
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
SIP Out-of-dialog OPTIONS Ping for Group of SIP Servers
!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
Remove Video using SIP profile
! voice translation-rule 10 ! voice translation-rule 11 rule 1 /^9\(.*\)/ /0\1/ ! voice translation-profile SIP-voice translate calling 10 translate called 11 ! 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(.*)" "" ! dial-peer voice 201 voip description eircom SIP translation-profile outgoing SIP-voice preference 1 destination-pattern .T session protocol sipv2 session target ipv4:159.134.113.212 voice-class codec 1 offer-all voice-class sip profiles 1 dtmf-relay rtp-nte no vad ! dial-peer voice 202 voip description eircom SIP translation-profile outgoing SIP-voice preference 2 destination-pattern .T session protocol sipv2 session target ipv4:159.134.113.84 voice-class codec 1 offer-all voice-class sip profiles 1 dtmf-relay rtp-nte no vad !
TLS Links
e164 Matching
Closest match is not quite obvious. This is what I have found from testing.
- use $ to terminate the numbers
- a exact match for a number of a range of numbers using brackets [0-5] are treated equally and match before the wild card dot “.”
So in summary
The following config does NOT match against the dial-peer with the closest match. i.e. if I dial “+35315552491” it uses e164 map 1000 and not 1001.
! voice class e164-pattern-map 1000 description ### Match UCCE numbers ### e164 +3531555249[0-4] ! voice class e164-pattern-map 1001 description ### Match UCCE Test A side number ### e164 +35315552491 !
The closing match does also not work with below (adding the $).
! voice class e164-pattern-map 1000 description ### Match UCCE numbers ### e164 +3531555249[0-4]$ ! voice class e164-pattern-map 1001 description ### Match UCCE Test A side number ### e164 +35315552491$ !
However this DOES work - i.e. match e164 1001 when you dial the +35315552491 i.e. using the wildcard “.” and not the range [0-4]
! voice class e164-pattern-map 1000 description ### Match UCCE numbers ### e164 +3531555249.$ ! voice class e164-pattern-map 1001 description ### Match UCCE Test A side number ### e164 +35315552491$ !
And this would also work
! voice class e164-pattern-map 1000 description ### Match UCCE numbers ### e164 +3531555249.$ ! voice class e164-pattern-map 1001 description ### Match UCCE Test A side number ### e164 +3531555249[0-4]$ !
i.e. if you dial a number in the range “+3531555249[0-4]” it will match 1001 over 1000.
But don't mix exact numbers and range numbers as I believe the first one found will be matched. Mix Exact names, and ranges numbers versus numbers with the dot wildcard.