Call Manager Express to 3rd Party SIP Provider Sample Configuration

This took me about 8-12 hours to figure out (considering I don’t really have voip experience), but I recently canceled one of my consulting contracts where I was using EasyVPN client on my home 2811 and terminated into one of my consulting client’s Cisco VPNc3000 concentrator for Call Manager 4.3 communication for my IP phones at home. Yes I was getting free phone service! Bad news, I was constantly on-call :(  

So since I am not consulting there anymore, I wasn’t able to get IP phone service anymore. My connection to their Cisco Call Manager box was about to be terminated… what do I do now I ask myself. I still want to use Cisco VoIP at home because I had a nice intercom and paging system so I didn’t have to scream for my girlfriend across the house to bring my food over to the office.  So I did some research and seen some things about low cost or even free SIP service.  I ended up going with a SIP provider from “voipvoip.com” because they were offering $6.95/month BYOD (bring your own device) which I had my trusty Cisco 2811 that included unlimited incoming minutes and 1.9 cents/minute outbound.  The KEY part I wanted was having simultaneous channels inbound and outbound so I can have conference bridges with my Cisco MeetingPlace Express server I will be setting up later.  I was allowed up to 2 channels incoming and 4 channels outgoing. Cool right?  So its a typical pay-as-you-go plan… I will start off with this and see how my monthly bills are later. 

Heres the problem…. as I was browsing the company support pages, I noticed there weren’t any configuration guides for CISCO. There was stuff for Asterisk, TrixBox, 3CX, and a few others such as SIP phones, etc.   Then I thought, no problem… I will google this and find some sample configurations to a 3rd party SIP proxy server with some sample dial-peer templates and Im good to go.   A few hours later, I discovered that (1) this sample config does not exist or (2) it is really difficult to find perhaps because not many people do this? or (3) I just really stink in googling.  I like to think it is #1 and #2.   

So here is my sample configuration that I have implemented to help those that are looking for or wanting a similar setup with Call Manager Express.
I am running CME 7.1 and am in process of setting up my Cisco Unity Express NM (NM-CUE) module with a Cisco MeetingPlace Express server. I will definitely write about that as I configure those in the weeks ahead.

SIP VoIP Network

SIP VoIP Network

Current configuration : 15683 bytes
!
! Last configuration change at 17:27:51 PDT Sun Mar 22 2009
! NVRAM config last updated at 17:27:52 PDT Sun Mar 22 2009
!
version 12.4
service nagle
service tcp-keepalives-in
service tcp-keepalives-out
service timestamps debug datetime localtime show-timezone
service timestamps log datetime localtime show-timezone
service password-encryption
service linenumber
!
hostname CME-2811-ROUTER
!
boot-start-marker
boot-end-marker
!
logging message-counter syslog
logging buffered 32768
enable secret 5
!
no aaa new-model
clock timezone PDT -7
!
dot11 syslog
no ip source-route
!
!
ip cef
no ip dhcp use vrf connected
ip dhcp excluded-address 192.168.11.1 192.168.11.64
ip dhcp excluded-address 192.168.11.240 192.168.11.255
ip dhcp excluded-address 192.168.10.1 192.168.10.64
ip dhcp excluded-address 192.168.10.240 192.168.10.255
!
ip dhcp pool WIRELESS-DHCP
import all
network 192.168.11.0 255.255.255.0
update dns both
default-router 192.168.11.1
dns-server 68.238.64.12 68.238.128.12
option 150 ip 10.1.231.1
!
ip dhcp pool INTERNAL-DHCP
import all
network 192.168.10.0 255.255.255.0
update dns both
default-router 192.168.10.1
option 150 ip 10.1.231.1
dns-server 68.238.64.12 68.238.128.12
!
!
ip domain name siriuspackets.com
ip name-server 4.2.2.4
ip name-server 68.238.64.12
ip multicast-routing
ip multicast multipath
no ipv6 cef
ntp source FastEthernet0/1
ntp update-calendar
ntp server ntp-01.caltech.edu
ntp server time7.apple.com
!
multilink bundle-name authenticated
!
!
!
!
!
!
!
voice service voip
allow-connections h323 to h323
allow-connections h323 to sip
allow-connections sip to h323
allow-connections sip to sip
no supplementary-service sip moved-temporarily
no supplementary-service sip refer
fax protocol t38 ls-redundancy 0 hs-redundancy 0 fallback cisco
!
!
!
voice class codec 1
codec preference 1 g711ulaw
codec preference 2 g729r8
codec preference 3 g711alaw
codec preference 4 g729br8
!
!
!
!
!
!
!
!
!
!
!
!
!
voice hunt-group 1 parallel
final 6000
list 801,802,803,804,805,806,807,808
timeout 20
pilot 800
!
!
!
voice translation-rule 1
rule 1 /^911$/ /911/
rule 2 /^9(.*)/ /1/
!
voice translation-rule 2
rule 1 /^.*/ /5551234567/
!
!
voice translation-profile PSTN-FORWARDING
translate redirect-target 3
translate redirect-called 3
!
voice translation-profile PSTN-OUTGOING
translate calling 2
translate called 1
translate redirect-target 3
translate redirect-called 3
!
!
voice-card 0
!
!
!
!
!
archive
log config
hidekeys
!
!
crypto ipsec transform-set TS-IPSEC-SET esp-aes esp-sha-hmac
!
!
!
!
ip telnet source-interface FastEthernet0/1
ip ftp source-interface FastEthernet0/1
ip tftp source-interface FastEthernet0/1
ip ssh version 2
!
class-map match-any CM-CRITICAL-APPS
match access-group 2000
class-map match-any CM-VOICE-CONTROL
match dscp cs3
match dscp cs5
match ip dscp af31
match ip dscp af32
class-map match-any CM-CRITICAL-DATA1
match dscp af42
match protocol ipsec
class-map match-any CM-CRITICAL-DATA2
match dscp af43
class-map match-any CM-NETWORK-MGMT
match protocol icmp
match protocol telnet
class-map match-any CM-VOICE
match dscp ef
match ip dscp cs5
match ip dscp ef
!
!
policy-map PM-WAN-EDGE-OUT
class CM-VOICE
priority percent 30
class CM-VOICE-CONTROL
bandwidth percent 10
class CM-CRITICAL-DATA1
bandwidth percent 20
random-detect dscp-based
class CM-CRITICAL-DATA2
bandwidth percent 36
random-detect dscp-based
class class-default
fair-queue
random-detect
policy-map PM-LAN-EDGE-IN
class CM-NETWORK-MGMT
set dscp af42
class CM-CRITICAL-APPS
set dscp af43
class CM-VOICE
class CM-VOICE-CONTROL
class class-default
set dscp default
!
!
translation-rule 3
Rule 1 ^91……. 1
Rule 2 9…… 1626
Rule 3 6000 6265551212
!
!
!
!
!
interface Loopback0
ip address 10.1.231.1 255.255.255.255
ip pim sparse-mode
!
interface FastEthernet0/0
ip address 192.168.10.1 255.255.255.0
ip flow ingress
ip pim sparse-mode
ip nat inside
ip virtual-reassembly
load-interval 30
duplex auto
speed auto
service-policy input PM-LAN-EDGE-IN
!
interface FastEthernet0/0.10
encapsulation dot1Q 10
ip address 192.168.11.1 255.255.255.0
ip flow ingress
ip pim sparse-mode
ip nat inside
ip virtual-reassembly
!
interface FastEthernet0/1
bandwidth 25000
ip address dhcp
no ip proxy-arp
ip nbar protocol-discovery
ip pim sparse-mode
ip nat outside
ip virtual-reassembly
ip igmp query-interval 5
load-interval 30
duplex auto
speed auto
max-reserved-bandwidth 100
service-policy output PM-WAN-EDGE-OUT
!
router rip
version 2
passive-interface FastEthernet0/0
passive-interface FastEthernet0/0.10
network 192.168.1.0
network 192.168.10.0
network 192.168.11.0
maximum-paths 16
no auto-summary
!
ip default-gateway 192.168.1.1
ip forward-protocol nd
ip http server
ip http access-class 10
no ip http secure-server
ip http path flash:/gui
!
!
no ip pim dm-fallback
ip pim send-rp-announce Loopback0 scope 16
ip pim send-rp-discovery Loopback0 scope 16
ip nat inside source list INTERNAL-NET interface FastEthernet0/1 overload
!
!
ip access-list extended INTERNAL-NET
permit ip 192.168.10.0 0.0.0.255 any
permit ip 192.168.11.0 0.0.0.255 any
!
access-list 2000 remark //PERMIT-QOS-CRITICAL-APPS//
access-list 2000 permit tcp any any eq 3389
access-list 2000 permit tcp any any eq telnet
access-list 2000 permit tcp any any eq 22
access-list 2500 permit ip 192.168.10.0 0.0.0.255 10.0.0.0 0.255.255.255
access-list 2500 permit ip 192.168.10.0 0.0.0.255 192.168.254.0 0.0.0.255
access-list 2500 permit ip 192.168.10.0 0.0.0.255 192.168.255.0 0.0.0.255
access-list 2500 permit ip 192.168.10.0 0.0.0.255 172.16.0.0 0.0.255.255
access-list 2500 permit ip 192.168.10.0 0.0.0.255 172.200.0.0 0.0.255.255
access-list 2500 permit ip 192.168.10.0 0.0.0.255 224.0.0.0 15.255.255.255
access-list 2500 permit ip 192.168.11.0 0.0.0.255 10.0.0.0 0.255.255.255
access-list 2500 permit ip 192.168.11.0 0.0.0.255 224.0.0.0 15.255.255.255
!
!
!
!
!
tftp-server flash:apps75.8-4-1-23.sbn
tftp-server flash:cnu75.8-4-1-23.sbn
tftp-server flash:cvm75sccp.8-4-1-23.sbn
tftp-server flash:dsp75.8-4-1-23.sbn
tftp-server flash:jar75sccp.8-4-1-23.sbn
tftp-server flash:SCCP75.8-4-2S.loads
tftp-server flash:term61.default.loads
tftp-server flash:WLAN-1.2.1.SBN
tftp-server flash:TNUX-1.2.1.SBN
tftp-server flash:TNUXR-1.2.1.SBN
tftp-server flash:APPS-1.2.1.SBN
tftp-server flash:GUI-1.2.1.SBN
tftp-server flash:SYS-1.2.1.SBN
tftp-server flash:term75.default.loads
tftp-server flash:CP7921G-1.2.1.LOADS
tftp-server flash:Desktops/320×212x12/List.xml
tftp-server flash:Desktops/320×212x12/CampusNight.png
tftp-server flash:Desktops/320×212x12/CiscoFountain.png
tftp-server flash:Desktops/320×212x12/MorroRock.png
tftp-server flash:Desktops/320×212x12/NantucketFlowers.png
tftp-server flash:Desktops/320×212x12/TN-CampusNight.png
tftp-server flash:Desktops/320×212x12/TN-CiscoFountain.png
tftp-server flash:Desktops/320×212x12/TN-Fountain.png
tftp-server flash:Desktops/320×212x12/TN-MorroRock.png
tftp-server flash:Desktops/320×212x12/TN-NantucketFlowers.png
tftp-server flash:Desktops/320×212x12/Fountain.png
tftp-server flash:Desktops/320×212x12/CiscoLogo.png
tftp-server flash:Desktops/320×212x12/TN-CiscoLogo.png
tftp-server flash:Desktops/320×216x16/List.xml
tftp-server flash:Desktops/320×212x16/List.xml
tftp-server flash:gui/admin_user.html
tftp-server flash:gui/admin_user.js
tftp-server flash:gui/CiscoLogo.gif
tftp-server flash:gui/Delete.gif
tftp-server flash:gui/dom.js
tftp-server flash:gui/downarrow.gif
tftp-server flash:gui/ephone_admin.html
tftp-server flash:gui/logohome.gif
tftp-server flash:gui/normal_user.html
tftp-server flash:gui/normal_user.js
tftp-server flash:gui/Plus.gif
tftp-server flash:gui/sxiconad.gif
tftp-server flash:gui/Tab.gif
tftp-server flash:gui/telephony_service.html
tftp-server flash:gui/uparrow.gif
tftp-server flash:gui/xml-test.html
tftp-server flash:gui/xml.template
tftp-server flash:apps37sccp.1-2-1-0.bin
tftp-server flash:APPSH-1.3.1.SBN
tftp-server flash:GUIH-1.3.1.SBN
tftp-server flash:CP7925G-1.3.1.LOADS
tftp-server flash:SYSH-1.3.1.SBN
tftp-server flash:TNUXH-1.3.1.SBN
tftp-server flash:WLANH-1.3.1.SBN
tftp-server flash:Analog1.raw
tftp-server flash:Analog2.raw
tftp-server flash:AreYouThere.raw
tftp-server flash:AreYouThereF.raw
tftp-server flash:Bass.raw
tftp-server flash:CallBack.raw
tftp-server flash:Chime.raw
tftp-server flash:Classic1.raw
tftp-server flash:Classic2.raw
tftp-server flash:ClockShop.raw
tftp-server flash:DistinctiveRingList.xml
tftp-server flash:Drums1.raw
tftp-server flash:Drums2.raw
tftp-server flash:FilmScore.raw
tftp-server flash:HarpSynth.raw
tftp-server flash:Jamaica.raw
tftp-server flash:KotoEffect.raw
tftp-server flash:MusicBox.raw
tftp-server flash:Piano1.raw
tftp-server flash:Piano2.raw
tftp-server flash:Pop.raw
tftp-server flash:Pulse1.raw
tftp-server flash:Ring1.raw
tftp-server flash:Ring2.raw
tftp-server flash:Ring3.raw
tftp-server flash:Ring4.raw
tftp-server flash:Ring5.raw
tftp-server flash:Ring6.raw
tftp-server flash:Ring7.raw
tftp-server flash:RingList.xml
tftp-server flash:Sax1.raw
tftp-server flash:Sax2.raw
tftp-server flash:Vibe.raw
!
control-plane
!
!
!
!
mgcp fax t38 ecm
!
!
!
dial-peer voice 4 voip
description ==INTERNATIONAL CALL TO SIP TRUNK==
translation-profile outgoing PSTN-CALLFORWARDING
destination-pattern 9011T
voice-class codec 1
voice-class sip dtmf-relay force rtp-nte
session protocol sipv2
session target sip-server
dtmf-relay rtp-nte
no vad
!
dial-peer voice 5 voip
description ==STAR CODE TO SIP TRUNK==
translation-profile outgoing PSTN-CALLFORWARDING
destination-pattern *..
voice-class codec 1
voice-class sip dtmf-relay force rtp-nte
session protocol sipv2
session target sip-server
dtmf-relay rtp-nte
no vad
!
dial-peer voice 1 voip
description ==OUTGOING CALL TO SIP TRUNK==
translation-profile outgoing PSTN-OUTGOING
destination-pattern 9[0-1][2-9]..[2-9]……
translate-outgoing called 3
voice-class codec 1
voice-class sip dtmf-relay force rtp-nte
session protocol sipv2
session target sip-server
dtmf-relay rtp-nte
ip qos dscp cs5 media
ip qos dscp cs5 signaling
no vad
!
dial-peer voice 2 voip
description ==OUTGOING CALL TO SIP TRUNK=
translation-profile outgoing PSTN-OUTGOING
destination-pattern 9[2-9]..[2-9]……
voice-class codec 1
voice-class sip dtmf-relay force rtp-nte
session protocol sipv2
session target sip-server
dtmf-relay rtp-nte
no vad
!
!
num-exp 5551234567 800
sip-ua
! — for authenticating to the SIP server to do initial registration –!
credentials username 5551234567 password 7
realm sip3.voipvoip.com
! — for SIP proxy authentication while making outbound calls –!
authentication username 5551234567 password 7
realm sip3.voipvoip.com
! — optional: to hard code your caller-id when you call outbound –!
calling-info sip-to-pstn number set 5551234567
! — optional: to hard code caller-id received from incoming calls –!
calling-info pstn-to-sip from number set 5551234567
no remote-party-id
retry invite 2
retry register 10
timers connect 100
! — specifying sip registration server here –!
registrar dns:sip3.voipvoip.com expires 3600
! — specifying the actual SIP server you are registering to for calls –!
sip-server dns:sip3.voipvoip.com
notify telephone-event max-duration 500
host-registrar
presence enable
!
!
!
telephony-service
max-ephones 12
max-dn 32
ip source-address 10.1.231.1 port 2000
auto assign 1 to 12
calling-number initiator
timeouts interdigit 5
timeouts ringing 120
load 7921 CP7921G-1.2.1
load 7960-7940 term75.default
time-zone 5
dialplan-pattern 1 62655512.. extension-length 2 no-reg
voicemail 6000
max-conferences 8 gain -6
call-forward system redirecting-expanded
moh music-on-hold.au
multicast moh 239.100.100.5 port 2010
web admin system name admin password <web passwd>
dn-webedit
time-webedit
transfer-system full-consult dss
secondary-dialtone 9
create cnf-files version-stamp 7960 Mar 22 2009 13:17:17
!
!
ephone-template 1
! — option to interrupt someone while they are on a call –!
softkeys remote-in-use CBarge Newcall
softkeys hold Resume Newcall Join
! — digital display buttons on your IP phone — !
softkeys connected TrnsfVM Park Confrn Endcall Trnsfer Hold
max-calls-per-button 3
busy-trigger-per-button 2
!
!
ephone-dn 1
number 801 no-reg primary
allow watch
call-forward busy 6000
call-forward noan 6000 timeout 18
!
!
ephone-dn 2
number 802 no-reg primary
allow watch
call-forward busy 6000
call-forward noan 6000 timeout 18
!
!
ephone-dn 3
number 803 no-reg primary
allow watch
call-forward busy 6000
call-forward noan 6000 timeout 18
!
!
ephone-dn 4
number 804 no-reg primary
allow watch
call-forward busy 6000
call-forward noan 6000 timeout 18
!
!
ephone-dn 5
number 805 no-reg primary
allow watch
call-forward busy 6000
call-forward noan 6000 timeout 18
!
!
ephone-dn 6
number 806 no-reg primary
allow watch
call-forward busy 6000
call-forward noan 6000 timeout 18
!
!
ephone-dn 7
number 807 no-reg primary
allow watch
call-forward busy 6000
call-forward noan 6000 timeout 18
!
!
ephone-dn 8
number 808 no-reg primary
call-forward busy 6000
call-forward noan 6000 timeout 18
!
!
ephone-dn 30
number 889 no-reg primary
park-slot timeout 10 limit 5 recall
!
!
ephone-dn 31
number 800 no-reg primary
label 800
name PRIMARY HUNT
call-forward busy 6000
call-forward noan 6000 timeout 18
!
!
ephone-dn 32
number 888 no-reg primary
paging ip 239.255.255.6 port 2009
!
!
ephone 1
device-security-mode none
mac-address 000D.ED6C.43B7
ephone-template 1
paging-dn 32
codec g729r8
type 7960
button 1:1 2:31
!
!
!
ephone 2
device-security-mode none
mac-address 0021.553E.0D65
ephone-template 1
max-calls-per-button 4
paging-dn 32
type 7921
button 1:2 2:31
!
!
!
ephone 3
device-security-mode none
mac-address 0013.C428.640F
ephone-template 1
paging-dn 32
type 7960
button 1:3 2:31
!
!
!
ephone 4
device-security-mode none
mac-address 0021.553E.043E
ephone-template 1
max-calls-per-button 4
paging-dn 32
type 7921
button 1:4 2:31
!
!
!
ephone 5
device-security-mode none
mac-address 0014.F276.4428
ephone-template 1
paging-dn 32
type 7960
button 1:5 2:31
!
!
!
ephone 6
device-security-mode none
mac-address 0013.C427.F8FC
ephone-template 1
paging-dn 32
type 7960
button 1:6 2:31
!
!
!
ephone 7
device-security-mode none
mac-address 0013.C427.F5E0
ephone-template 1
paging-dn 32
type 7960
button 1:7 2:31
!
!
!
ephone 8
device-security-mode none
!
!
!
ephone 9
no phone-ui speeddial-fastdial
no phone-ui snr
no multicast-moh
device-security-mode none
!
!
!
ephone 10
no phone-ui speeddial-fastdial
no phone-ui snr
no multicast-moh
device-security-mode none
!
!
!
ephone 11
no phone-ui speeddial-fastdial
no phone-ui snr
no multicast-moh
device-security-mode none
!
!
!
ephone 12
no phone-ui speeddial-fastdial
no phone-ui snr
no multicast-moh
device-security-mode none
!
!
alias exec siib show ip interface brief
!
line con 0
exec-timeout 120 0
logging synchronous
line aux 0
line vty 0 4
exec-timeout 120 0
password 7 <password here>
logging synchronous
login
!
scheduler allocate 20000 1000
process cpu threshold type total rising 90 interval 10 falling 50 interval 10
end

So I will finish up by explaining what this does. If you call the PSTN incoming phone number (555)123-4567, “num-exp” will convert to digits 800. Then I have a parallel hunt-group configured where 800 will ring all my extensions 801,802,803, etc.  If no one answers in the hunt-group… go to voicemail at ext: 6000.

For outbound, I have “dial-peer voice 1 voip” and “dial-peer voice 2 voip”, this will match #1 when I dial 9,16505551212, I created the #2 for people who come to my house and need to use the phone just in case they forget to push 1+ before area code + phone number. In CA, we have to dial +1+area code+7-digit number at all times now.   So it matches dial-peer voice 1 voip map when I call 9,16505551212 right and then my call gets sent out to the SIP trunk right? Wrong… I need to strip the “9″ digit out of the string otherwise it will be included in my called number. So for that I have “translation-outgoing called 3″ in there to strip out the 9.  I am still working on E911 and stuff so that doesn’t work yet. But what I can do is make outbound calls and send my SIP provider the correct numbers so my call completes successfully!

What I have discovered was that there were 2 different types of translation-rules.
#1 Command: voice translation-rule <#>     is different from
#2 Command: translation-rule <#> 

What #1 does is translate your called/calling number when you are going voip-to-analog. #2 translates your voip-to-voip called/calling string!
So you will see in the configuration “translation-profile outgoing PSTN-OUTGOING” which doesn’t really do anything in my situation because I don’t have any analog/digital cards in my router such as an FXO or PRI. But I kept the config line in there some day I decide to get a backup analog line.

There are still some rules and destination-patterns I need to tweak so I will be updating this later. But overall, this configuration works. I am able to make outbound US calls, receive incoming calls… page all the house phones when I dial 888, park my calls at ext: 889, and have voicemail at ext: 6000.

One Response to “Call Manager Express to 3rd Party SIP Provider Sample Configuration”

  1. Very Nice! I wondered what the gifference was between those translation rules.

    I look forward to your future posts.

Leave a Reply