################################################################################
#  IMPORTANT:  If behind Cisco PIX firewall, must have sip fixup enabled on firewall else
#  Sip debug output symptom will show following:
#
#  \"SIP/2.0 400 Bad Request - \'Invalid IP Address\'
#  \"Invalid URL in incoming INVITE\"
#
#  If using Cisco ASA firewall, remove \"inspect sip\" from \"class inspection_default\" else
#  Symptom will be one-way audio to mobile (cellular) phones only... 

#
###############################################################################
boot-start-marker
boot system flash c2800nm-adventerprisek9-mz.124-24.T1.bin
boot-end-marker
!

clock timezone PST -8
clock summer-time PDT recurring
!         

!
ip domain name doda.us
ip host cme.doda.us 192.168.0.38
ip name-server 208.67.222.222 4.2.2.3
no ipv6 cef
ntp master
ntp server 0.north-america.pool.ntp.org prefer
ntp server 1.north-america.pool.ntp.org
ntp server 2.north-america.pool.ntp.org
ntp server 3.north-america.pool.ntp.org


!
voice service voip 
 no notify redirect ip2ip
 allow-connections sip to h323
 allow-connections sip to sip
 no supplementary-service sip moved-temporarily
 no supplementary-service sip refer
 fax protocol cisco 
 sip
  header-passing 
  registrar server expires max 120 min 60
  no update-callerid
  no call service stop
!
voice class codec 1
 codec preference 1 g711ulaw
!
!
voice translation-rule 1
 rule 1 /13104697570\\(\\)/ /5000\\1/
!
voice translation-rule 2
 rule 1 /.*\\(....\\)$/ /\\1/
!
voice translation-rule 4
 rule 1 /.*\\(\\)/ /3104697570\\1/
!
voice translation-rule 5
 rule 1 /.*\\(..........\\)/ /1\\1/
!
voice translation-rule 6
 rule 1 /.*\\(\\)/ /13104697570\\1/
!
!         
voice translation-profile CLID_INTL
 translate calling 6
!
voice translation-profile FROM_CALLWITHUS
 translate called 1
!
voice translation-profile TO_CALLWITHUS
 translate calling 4
 translate called 5
!
voice translation-profile TO_CUE_VM
 translate called 2
 translate redirect-called 2
!
!
voice-card 0
!
!
username admin privilege 15 password *****
username xadmin privilege 15 password *****
username perryb privilege 15 password *****
!
interface FastEthernet0/0
 ip address 192.168.0.38 255.255.255.0
 duplex auto
 speed auto
!
interface Service-Engine0/0
 ip unnumbered FastEthernet0/0
 service-module ip address 192.168.0.22 255.255.255.0
 service-module ip default-gateway 192.168.0.38
!         
ip route 0.0.0.0 0.0.0.0 192.168.0.1
ip route 192.168.0.22 255.255.255.255 Service-Engine0/0
ip http server
ip http authentication local
no ip http secure-server
ip http path flash:
!
!
tftp-server flash:RingList.xml
tftp-server flash:DistinctiveRingList.xml
tftp-server flash:klaxons.raw
tftp-server flash:flintphone.raw
tftp-server flash:Vibe.raw
tftp-server flash:P00308000500.bin
tftp-server flash:P00308000500.loads
tftp-server flash:P00308000500.sb2
tftp-server flash:P00308000500.sbn
!
voice-port 0/1/0
!
voice-port 0/1/1
!
!         
mgcp fax t38 ecm
mgcp behavior g729-variants static-pt
!
!
!
dial-peer voice 4697500 voip
 translation-profile outgoing TO_CUE_VM
 destination-pattern 8500
 b2bua
 voice-class sip outbound-proxy ipv4:192.168.0.22 
 session protocol sipv2
 session target ipv4:192.168.0.22
 session transport udp
 codec g711ulaw
 ip qos dscp cs5 media
 ip qos dscp cs4 signaling
 no vad
!
dial-peer voice 2 voip
 translation-profile outgoing TO_CALLWITHUS
 destination-pattern [2-9]..[2-9]......$
 voice-class sip dtmf-relay force rtp-nte
 session protocol sipv2
 session target sip-server
 dtmf-relay rtp-nte
 codec g711ulaw
 ip qos dscp cs5 media
 ip qos dscp cs4 signaling
 no vad
!
dial-peer voice 3 voip
 translation-profile outgoing CLID_INTL
 destination-pattern 011T
 voice-class sip dtmf-relay force rtp-nte
 session protocol sipv2
 session target dns:sip.callwithus.com
 dtmf-relay rtp-nte
 codec g711ulaw
 ip qos dscp cs5 media
 ip qos dscp cs4 signaling
 no vad
!
dial-peer voice 1 voip
 description **Incoming Call from SIP Trunk**
 translation-profile incoming FROM_CALLWITHUS
 voice-class sip dtmf-relay force rtp-nte
 incoming called-number 13104697570
 dtmf-relay rtp-nte
 codec g711ulaw
 ip qos dscp cs5 media
 ip qos dscp cs4 signaling
 no vad
!
!
sip-ua 
 authentication username 093364893 password *****
 no remote-party-id
 retry invite 2
 retry register 10
 timers connect 100
 registrar dns:sip.callwithus.com expires 120
 sip-server dns:sip.callwithus.com
 host-registrar
!
!
!
telephony-service
 max-ephones 8
 max-dn 32
 ip source-address 192.168.0.38 port 2000
 url services http://192.168.0.22/voiceview/common/login.do 
 url authentication http://192.168.0.38/CCMCIP/authenticate.asp  
 time-zone 5
 time-format 24
 voicemail 8500
 max-conferences 8 gain -6
 call-forward pattern .T
 moh music-on-hold.au
 web admin system name admin secret *****
 dn-webedit 
 time-webedit 
 transfer-system full-consult
 transfer-pattern .T
 create cnf-files version-stamp 7960 Jul 05 2009 13:58:28
!
!
ephone-dn  1
 number 093364893
!
!
ephone-dn  3  dual-line
 number 5000
 description 3104697570
 call-forward busy 5123640051
 call-forward noan 5123640051 timeout 10
!
!
ephone-dn  4
 number 5002 no-reg primary
 call-forward busy 8500
 call-forward noan 8500 timeout 10
!
!
ephone-dn  15
 number 3598.... no-reg primary
 mwi on
!
!
ephone-dn  16
 number 3599.... no-reg primary
 mwi off
!
!
ephone  1
 device-security-mode none
 mac-address 0016.46CB.4788
 username \"leia\" password 12345
 button  1:4
!
!
!
ephone  4
 device-security-mode none
 mac-address 0016.468A.E4EC
 username \"perry\" password 12345
 button  1:3
!
!
!
line con 0
 exec-timeout 0 0
line aux 0
line 194
 no activation-character
 no exec
 transport preferred none
 transport input all
 transport output pad telnet rlogin lapb-ta mop udptn v120
line vty 0 4
 password *****
 login local
!
scheduler allocate 20000 1000
end