Example Cisco CUBE Configuration

There are numerous ways to configure digit manipulation on dial peers and CUCM to perform the actions shown below. Please note, your unique environment may require a different configuration.

A helpful reference for dial peers can be found at Cisco's site Cisco IOS and IOS XE Call Routing.


!
interface GigabitEthernet0/0/0
 description ** Internet Facing Leg / External IP: 207.230.32.10 **
 ip address 10.1.13.4 255.255.255.0
!
interface GigabitEthernet0/0/2
 description ** Voice Vlan Facing Leg **
 ip address 172.16.0.4 255.255.255.0
!
voice service voip
 mode border-element 
 allow-connections sip to sip
 sip
  min-se 180
  header-passing
  error-passthru
  asserted-id pai
  asymmetric payload full
  no update-callerid
  early-offer forced
  midcall-signaling passthru
  privacy-policy passthru
  pass-thru headers unsupp
! Passing unsupported headers is only required for HELD
! See the HELD documentation for alternate options
  sip-profiles 1
!
voice class sip-profiles 1
 request ANY sip-header From modify "10.1.13.4" "207.230.32.10" 
 request ANY sip-header Via modify "10.1.13.4" "207.230.32.10" 
 request ANY sip-header Remote-Party-ID modify "10.1.13.4" "207.230.32.10"
 request ANY sip-header Contact modify "10.1.13.4" "207.230.32.10"
 response ANY sip-header Contact modify "10.1.13.4" "207.230.32.10"
 response ANY sip-header Remote-Party-ID modify "10.1.13.4" "207.230.32.10"
 request ANY sdp-header Audio-Connection-Info modify "10.1.13.4" "207.230.32.10"
 request ANY sdp-header Connection-Info modify "10.1.13.4" "207.230.32.10"
 request ANY sdp-header Session-Owner modify "10.1.13.4" "207.230.32.10"
 response ANY sdp-header Session-Owner modify "10.1.13.4" "207.230.32.10"
 response ANY sdp-header Connection-Info modify "10.1.13.4" "207.230.32.10"
 response ANY sdp-header Audio-Connection-Info modify "10.1.13.4" "207.230.32.10"
 request ANY sdp-header Audio-Attribute modify "a=inactive" "a=sendrecv" 
 request ANY sdp-header Audio-Attribute modify "a=sendonly" "a=sendrecv" 
 request ANY sdp-header Audio-Attribute modify "a=recvonly" "a=sendrecv" 
!
!
ip route 0.0.0.0 0.0.0.0 10.1.13.1 name Default_Route
ip route 172.16.0.0 255.240.0.0 172.16.0.1 name Route_Inside
!
! Incoming dial-peer legs from CUCM
! First for Production 911
! Second for Testing with the 933 test number
!
dial-peer voice 100 voip
 description Incoming call from CUCM – 911 Emergency Calls
 session protocol sipv2
 incoming called-number 911
 session transport tcp
 voice-class sip bind control source-interface GigabitEthernet0/0/2
 voice-class sip bind media source-interface GigabitEthernet0/0/2
 voice-class sip audio forced
 dtmf-relay rtp-nte
 codec g711ulaw
 no vad
!
dial-peer voice 101 voip
 description Incoming call from CUCM – 933 Test Number
 session protocol sipv2
 incoming called-number 933
 session transport tcp
 voice-class sip bind control source-interface GigabitEthernet0/0/2
 voice-class sip bind media source-interface GigabitEthernet0/0/2
 voice-class sip audio forced
 dtmf-relay rtp-nte
 codec g711ulaw
 no vad
! Outgoing dial peers for 911
! First to the primary 9Line Gateway
! Second to the secondary 9Line Gateway
!
dial-peer voice 1911 voip
 description Outgoing call to 9Line - Primary
 destination-pattern 911
 session protocol sipv2
 session target ipv4:primary.9line.sbc.cluster
 session transport tcp
 voice-class sip bind control source-interface GigabitEthernet0/0/0
 voice-class sip bind media source-interface GigabitEthernet0/0/0
 voice-class sip audio forced 
 dtmf-relay rtp-nte
 codec g711ulaw
 no vad
!
dial-peer voice 2911 voip
 description Outgoing call to 9Line – Secondary
 preference 1
 destination-pattern 911
 session protocol sipv2
 session target ipv4:secondary.9line.sbc.cluster
 session transport tcp
 voice-class sip bind control source-interface GigabitEthernet0/0/0
 voice-class sip bind media source-interface GigabitEthernet0/0/0
 voice-class sip audio forced
 dtmf-relay rtp-nte
 codec g711ulaw
 no vad
!
 
! Outgoing dial peers for 933 test numbers
! First to the primary 9Line Gateway
! Second to the secondary 9Line Gateway
!
dial-peer voice 1933 voip
 description Outgoing call to 9Line - Primary
 destination-pattern 933
 session protocol sipv2
 session target ipv4:primary.9line.sbc.cluster
 session transport tcp
 voice-class sip bind control source-interface GigabitEthernet0/0/0
 voice-class sip bind media source-interface GigabitEthernet0/0/0
 voice-class sip audio forced
 dtmf-relay rtp-nte
 codec g711ulaw
 no vad
!
dial-peer voice 2933 voip
 description Outgoing call to 9Line – Secondary
 preference 1
 destination-pattern 933
 session protocol sipv2
 session target ipv4:secondary.9line.sbc.cluster
 session transport tcp
 voice-class sip bind control source-interface GigabitEthernet0/0/0
 voice-class sip bind media source-interface GigabitEthernet0/0/0
 voice-class sip audio forced
 dtmf-relay rtp-nte
 codec g711ulaw
 no vad
!
! This portion of the configuration accommodates PSAP callback calls.
!
! Define the signaling IPs for 9Line.
! This allows us to match incoming SIP legs
! by host instead of called number.
!
voice class uri 9LINE911 sip
host ipv4:primary.9line.sbc.cluster
host ipv4:secondary.9line.sbc.cluster
!
voice translation-rule 100
rule 1 /\(.+\)/ /AAA\1/
!
voice translation-rule 200
rule 1 /^AAA\(.+\)/ /\1/
!
voice translation-profile 911-Callback-FROM-9LINE
translate called 100
!
voice translation-profile 911-Callback-TO-CUCM
translate called 200
!
!
! PSAP Callback Calls
! Incoming leg to CUCM
! NOTE: If using a 1-legged CUBE configuration, be sure to add the following to
! an existing or new sip profile [request ANY sip-header SIP-Req-URI modify "EXTERNAL_IP" "INTERNAL_IP"] 
! and apply it inbound [voice-class sip profiles XXX inbound] on the incoming callback dial-peer.
! If you do not add this configuration, callback calls will fail due to the IP address 
! in the INVITE still containing the NAT'd public IP address rather than the 
! internal IP address of the bound interface on the dial-peer.
! 
!
dial-peer voice 3911 voip
description Incoming call from 9Line - PSAP Callback
translation-profile incoming 911-Callback-FROM-9LINE
session protocol sipv2
incoming uri via 9LINE911
session transport tcp
voice-class sip bind control source-interface GigabitEthernet0/0/0
voice-class sip bind media source-interface GigabitEthernet0/0/0
dtmf-relay rtp-nte
codec g711ulaw
no vad
!
! PSAP Callback Calls
! Outgoing leg to CUCM
!
dial-peer voice 4911 voip
description Outgoing call to CUCM - PSAP Callback
translation-profile outgoing 911-Callback-TO-CUCM
destination-pattern AAAT
session protocol sipv2
session target ipv4:<<YOUR CUCM IP ADDRESS>>
session transport tcp
voice-class sip bind control source-interface GigabitEthernet0/0/2
voice-class sip bind media source-interface GigabitEthernet0/0/2
dtmf-relay rtp-nte
codec g711ulaw
no vad
!