TEMPLATE TITLE:
Gateway Configuration Template for SIP_HQ1_GWY at IP Address 1.1.1.2

Follow the procedures and steps in the "Configuring Conference Bridges, PSTN, Dial Peers and SRST" process for the details on how to use this template with your voice gateway

NOTES:
1. Each section starts with the title followed by a colon
2. Edit the information in the square brackets before copying each section into your router

Conference Bridge:

voice-card [voice interface slot]
 dspfarm
 dsp services dspfarm

dspfarm profile 1 conference
 description HQ1 Conference Bridges
 codec g711ulaw
 codec g711alaw
 codec g729ar8
 codec g729abr8
 codec g729r8
 codec g729br8
 codec g722-64
 codec ilbc
 maximum sessions 5
 associate application SCCP
 no shutdown

ccm-manager sccp local [interface type][number]

sccp local [interface type][number]
 sccp ccm [ip address of CUCM10] identifier 1 priority 1 version 7.0
 sccp
!
sccp ccm group 1
 bind interface [interface type][number]
 associate ccm 1 priority 1
 associate profile 1 register CFB1HQ1
 switchback method graceful
 switchback interval 60

PSTN Interface:

card type [T1 or E1] [card slot number] [WIC slot number]

isdn switch-type [isdn switch type]

voice service voip
 sip
  bind control source-interface [interface type][number]
  bind media source-interface [interface type][number]

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

network-clock-participate [SLOT or WIC] [slot number]

controller[T1 or E1] [slot number]/[sub-slot number]/[port number]
 Description PSTN PRI
 cablelength short 110
 pri-group timeslots [list of time slots]
 no shutdown

interface Serial [interface number]/[sub-unit number]/[unitnumber]:[ds0-group number]
 no ip address
 encapsulation [encapsulation type]
 isdn switch-type [isdn switch type]
 isdn incoming-voice voice
 no cdp enable
 no shutdown

Dial Peers - VoIP:

dial-peer voice 100 voip
 description SIP TRUNK to CUCM10
 preference 1
 destination-pattern [10 digit pattern from carrier]
 voice-class codec 1
 session protocol sipv2
 session target ipv4:[ip address of CUCM10]
 incoming called-number .

Dial Peers - POTS:

dial-peer voice 1911 pots
 description EMERGENCY
 preference 1
 destination-pattern 911
 port [interface number]/[sub-unit number]/[unit number]:[ds0-group number]
 forward-digits 3
!
dial-peer voice 19911 pots
 description EMERGENCY WITH LEADING 9
 preference 1
 destination-pattern 9911
 port [interface number]/[sub-unit number]/[unit number]:[ds0-group number]
 forward-digits 3

!
! Option 1 with US 7-digit dial plan
!
dial-peer voice 17 pots
 description LOCAL 7 DIGIT
 preference 1
 destination-pattern 9[2-9]......
 port [interface number]/[sub-unit number]/[unit number]:[ds0-group number]
 forward-digits 7
!
dial-peer voice 111 pots
 description LONG DISTANCE 11 DIGIT
 preference 1
 destination-pattern 91[2-9]..[2-9]......
 port [interface number]/[sub-unit number]/[unit number]:[ds0-group number]
 forward-digits 11
!
dial-peervoice 19011 pots
 description INTERNATIONAL VARIABLE LENGTH
 preference 1
 destination-pattern 9011T
 incoming called-number .
 direct-inward-dial
 port [interface number]/[sub-unit number]/[unit number]:[ds0-group number]
 prefix 011

SRST for SCCP:

!
! Option 2 without Site Codes
!
call-manager-fallback
 ip source-address {SIP GATEWAY IP ADDRESS} port 2000
 max-ephones [maximum phones]
 max-dn [maximum directory numbers]
 secondary-dialtone 9
 transfer-system full-consult
 max-conferences 8 gain -6
 dialplan-pattern 1 [10 digit pattern from carrier] extension-length 4 extension-pattern ....

SRST for SIP:

voice service voip
 allow-connections sip to sip
 sip
  registrar server expires max 600 min 60

!
! Option 2 without Site Codes
!
voice register global
 system message "SIP SRST Service"
 max-dn [maximum directory numbers]
 max-pool [maximum pools]
 dialplan-pattern 1 [10 digit pattern from carrier] extension-length 4 extension-pattern ....
!
voice register pool  1
 id network 1.1.1.1 mask 255.240.0.0
 dtmf-relayrtp-nte sip-notify
 codec g711ulaw
!
sip-ua
 registrar ipv4:[ip address of CUCM10] expires 3600

OPTIONAL - IOS DHCP Pool:

ip dhcp pool voice
 option 150 ip [ip address of CUCM-TFTP1] [ip address of CUCM-TFTP2]
!
ip dhcp pool wireless-voice
 option 150 ip [ip address of CUCM-TFTP1] [ip address of CUCM-TFTP2]

OPTIONAL - Block Voice on WAN:

ip access-list extended ACL-VOIP-CONTROL
 deny tcp any any eq 5060
 deny udp any any eq 5060
 deny tcp any any eq 5061
 deny udp any any eq 5061
 deny tcp any any eq 2000
 deny tcp any any eq 2443
 deny udp any any range 16384 32767
 permit ip any any

interface [interface type][number]
 ip access-group ACL-VOIP-CONTROL in

