Callcentric VoIP with Cisco Unified Border Element (CUBE)

Callcentric-Cube

 

Callcentric.com offers cheap ITSP services – unfortunately they don’t list Cisco endpoints (other than ATA) as a supported user agent. Lucky for you (and Me) Its entirely possible to use Callcentric.com with a Cisco Cube router in conjuncture with CUCM. Its also possible to use the service with CME (although whats the fun in that) 🙂 You’ll find multiple examples of CME connectivity online (but no CUBE templates – so here we go). For those unfamilier with CUBE (Cisco Unified Border Element) – its essentially a sip termination/proxy configuraiton of IOS running on Cisco routers. I have a 2811 in my lab running 151-4.M7, tied into CUCM 8.6. My lab is designed as such Callcentrics –> Firewall –> 2811 with Cube –> CUCM. Communication between Callcentric and the 2811 is SIP, and from the router to CUCM is also SIP. Firewall is 192.168.1.1, 2811 CUBE router is 192.168.1.203. CUCM is 192.168.1.200. Also – Your Cisco CUBE router needs to be able to resolve DNS addresses as callcentric uses SRV entries for server resolution. I’m sending outbound calls from CUCM to the CUBE with a 9 prefix and stripping it off at the cube. Callcentric requires 11 digit dialing. Inbound calls are sent to CUCM as 11 digit. You can strip them at CUCM a number of ways to match your dial plan.

Callcentric has a few unique elements which makes it a chalenge to use with Cisco CUBE.  The first is that callcentric sends invites to your username instead of to a DID on your account. So all inbound calls (regardless of who the call is for) will come in to 1777XXXXXXX. If you want to send all inbound calls to a single phone or call handler this might be acceptable. However if you want to route on the actual called DID you’ll need to manipule the SIP invite using SIP Profiles. Additionally on outbound calls callcentric uses Remote-Header-ID for outbound caller ID preference. You’ll also need an outbound SIP Profile to make this change. And finally Callcentric will not complete calls with ‘required’ timer specified. We’ll need to strip that out too. The general principle to remember is that CUBE can modify SIP headers as they exist a dial-peer. So if you have a SIP to h323 config you wont be able to manipulate the header – SIP-to-SIP is prefered and best practice.

To begin with you’ll want to sign up for service with Callcentric – this is easy and straight forward. Callcentric allows you to sign up for sending or receiving calls – however you intend on using the service. You’ll need a receive product to receive calls and a make calls product for outgoing calls. I sugest going with the FREE DID option as you’ll get up to 2 free DID’s from the NY area code – which alllows free inbound calling. Outgoing can be done via the Pay Per Call (.01 cent per min). Its a great setup for a lab environment. Once you sign up you’ll notice that Callcentric assigns you a 1777XXXXXXX number. This is your username – more to come on that next. You’ll also see any did’d listed in your products page. Callcentric uses SIP Registration so you do not need to open or allow any firewall holes to your CUBE router.

! First setup your Voice Service, The Trust list should include your local subnet (where your CUCM is located) and the Callcentric server subnet.
!
Voice service voip
ip address trusted list
ipv4 192.168.1.0 255.255.255.0
! my local subnet
ipv4 204.11.192.0 255.255.255.0 ! callcentrics servers
ipv4 66.193.176.35 ! callcentric servers
allow-connections h323 to h323
allow-connections h323 to sip
allow-connections sip to h323
allow-connections sip to sip

! The sip section below includes global SIP elements. You’ll need to bind media/signalling to your interface/loopback. Registrar is configured as per Callcentric. Sip-Profile 1 is a global modification to SIP headers as they pass through your CUBE router.
sip
bind control source-interface FastEthernet0/0
bind media source-interface FastEthernet0/0
registrar server expires max 36000 min 600
early-offer forced
sip-profiles 1

! Callcentric supports G729 and G711, I prefer G729 as it goes across the WAN, you could use either

voice class codec 1
codec preference 1 g729r8
codec preference 2 g711ulaw
codec preference 3 g711alaw

! This is the global sip profile – it removes the required timer element from the SIP Header. Callcentric will not connect a call if its in the header. Calls will ring but you cant complete the call.

voice class sip-profiles 1
response 200 sip-header Require remove

! The sip profile 2 allows for DID routing. Callcentric sends the SIP Invite to your username instead of the intended DID on your account. This copies the DID from the To: field to the Invite as it passes through the CUBE. This allows you to correctly route calls into CUCM based on DID.

voice class sip-profiles 2
request INVITE peer-header sip TO copy "sip:(.*)@" u01
request INVITE sip-header SIP-Req-URI modify ".*@(.*)" "INVITE sip:\u01@\1"

! The sip profile 3 allows for outbound caller ID specification. This allows you specify a DID on your account for outgoing caller ID. For example if you put a DID in the calling number mask on a DN this permits it to correctly show up when it exists the callcentric network. Note that you’ll need to substitue the IP of your CUBE router in for 192.168.1.203.

voice class sip-profiles 3
request INVITE peer-header sip FROM copy "sip:(.*)@" u02
request INVITE sip-header Remote-Party-ID modify "<sip:(.*)@(.*)>" "<sip:\u02@192.168.1.203>"

! Copy lists are used to copy elements from one header to another.

voice class sip-copylist 1
sip-header TO

!Copy lists are used to copy elements from one header to another.

voice class sip-copylist 2
sip-header FROM

! This rule matches any outbound calls – and changes the calling party to your username, if you dont do this callcentric will not permit the call.

voice translation-rule 1
rule 1 /.*/ /17772253754/

! This rule strips the 9 for outbound calls

voice translation-rule 2
rule 1 /^\(9\)\(.*\)$/ /\2/

!
!
voice translation-profile Outgoing
translate calling 1

!
voice translation-profile STRIP9
translate calling 1
translate called 2

!
dial-peer voice 99 voip ! Inbound Dial-Peer from Call Centric
description incoming SIP Trunk
session protocol sipv2
session target sip-server
incoming called-number 1777XXXXXXX
! Replace with your Callcentric Username
voice-class codec 1
voice-class sip copy-list 1
dtmf-relay rtp-nte
no vad

!
dial-peer voice 1 voip ! Outbound Dial-Peer from CUBE to CUCM
description to/from cucm publisher
destination-pattern 1777XXXXXXX
! Replace with your Callcentric Username
session protocol sipv2
session target ipv4:192.168.1.200
voice-class codec 1
voice-class sip profiles 2
dtmf-relay rtp-nte
no vad

!
dial-peer voice 2 voip ! Inbound Dial-Peer from CUCM
description from cucm publisher
translation-profile incoming STRIP9
session protocol sipv2
session target sip-server
incoming called-number 91[2-9]..[2-9]......
voice-class codec 1
voice-class sip copy-list 2
dtmf-relay rtp-nte

!
dial-peer voice 100 voip ! Outbound Dial-Peer from CUCM to Callcentric.com
description outgoing SIP Trunk
translation-profile outgoing Outgoing
destination-pattern 1[2-9]..[2-9]......
session protocol sipv2
session target dns:callcentric.com
voice-class codec 1
voice-class sip profiles 3
dtmf-relay rtp-nte
no vad

!
!
sip-ua
credentials username 1777XXXXXXX password 7 047919561B29495C48 realm callcentric.com
! Replace with your Callcentric Username, Include the callcentric password here.
authentication username 1777XXXXXXX password 7 106C1B49111F17195C5C realm callcentric.com ! Replace with your Callcentric Username, Include the callcentric password here.
retry invite 4
retry response 3
retry bye 2
retry register 5
timers connect 100
mwi-server dns:callcentric.com expires 3600 port 5060 transport udp
registrar dns:callcentric.com expires 3600
sip-server dns:callcentric.com:5060
host-registrar