Search This Blog

Tuesday, February 10, 2015

The voice gateway analog design

Today I had to install the awaited voice gateway and switches for a customer.  I had planned on the design and deployment for a few weeks because it wasn't a huge project.  New building, moving from one location to another.

Originally, their 911 gateway / FXO Pots inbound line was going to be moved once they had made the final switch but they wanted to install a temporary or maybe permanent voice gateway to cover the building now instead of later.  For those of you new to the voice realm, this is one of the basic things you need to know how to handle.  DSPs, FXS configuration and FXO configuration.

There isn't much to the process, as setting up the voice gateway for analog dialing in and outbound is easy.  In this environment we are using MGCP as the protocol that lets the CUCM do all the heavy lifting.  However, you need to be able to configure the voice gateway in sudo H.323 mode in the event the WAN fails and MGCP dumps (SRST Mode).

SRST is basically a survival mode the router/gateway goes into until the WAN is back up.  It can perform basic call routing via dial-peers, even SRSV for voice mail if you have the CUE module installed.  In addition, ephones will automatically populate assuming your configuration is correct.  Of course, you could also use SIP SRST, which in my opinion, is better but that is just personal preference.

Anyways, DSP resources, what are they?  Every voice gateway has something (or should have something) called a PVDM-2(or 3) chip installed.  They look like RAM but perform a totally different function.  DSPs are in charge of transcoding voice, media termination for on hold, etc., as well as letting your analog lines work and convert them from analog to digital and then back.  With this being said, you need to ensure that you have your voice card setup for DSP resources so it can function properly.  It is also worth noting that without DSPs, you can't even set a T1/E1 up on a router should you want a voice PRI.

I guess I need to provide a short config to clear things up a little...  Keep in mind that this is purely a lab configuration and serves the needs of what I try to test and do on a daily basis here at home.  I will try to outline a few key areas that you need to understand with analog telephony, please see the areas highlighted in red!

version 15.1
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname AUSTIN-HQ-CUBE
!
boot-start-marker
boot-end-marker
!
!
enable password **************************
!
no aaa new-model
!
clock timezone Central -6 0
network-clock-participate wic 0
network-clock-select 1 T1 0/0/0
!
dot11 syslog
ip source-route
!
!
ip cef
!
ip dhcp excluded-address 1.0.0.1 1.0.0.5
ip dhcp excluded-address 2.0.0.1 2.0.0.5
ip dhcp excluded-address 192.168.1.0 192.168.1.105
!
ip dhcp pool DATA
 network 1.0.0.0 255.255.255.0
 default-router 1.0.0.1
!
ip dhcp pool VOICE
 network 192.168.1.0 255.255.255.0
 option 150 ip 192.168.1.102
 option 66 ip 192.168.1.102
 default-router 192.168.1.100
!
!
no ipv6 cef
!
multilink bundle-name authenticated
!
!
!
!
isdn switch-type primary-qsig
!
!
!
voice service voip
 no ip address trusted authenticate
 allow-connections h323 to h323
 allow-connections h323 to sip
 allow-connections sip to h323
 allow-connections sip to sip
 sip
  early-offer forced
!
voice class codec 1
 codec preference 1 g711ulaw
 codec preference 2 g729br8
!
!
!
!
voice translation-rule 1
 rule 1 /^512200\(2...$\)/ /\1/
!
!
voice translation-profile 10TO4DIGITIN
 translate called 1
!
!
voice-card 0
 dsp services dspfarm   <---- This essentially allows your voice card to use dsp services
!
crypto pki token default removal timeout 0
!
!
!
!
license udi pid CISCO2811 sn FTX1217A3TM
!
redundancy
!
!
controller T1 0/0/0
 pri-group timeslots 1-3,24
 description T1 LINK TO DALLAS CUBE  <--- Here, without PVDM modules, we couldn't even accomplish setting up any timeslots since DSPs are required to even get this far!
!
!
class-map match-all DATA
 match protocol http
class-map match-all VOICE
 description MATCH EF VOICE
 match protocol rtp
 match  dscp ef
!
!
policy-map DATAPM
 class DATA
  bandwidth percent 20
  shape peak 512000
  police cir 512000
   conform-action transmit
   violate-action drop
policy-map VOICEPM
 class VOICE
  priority percent 30
!
!
!
!
!
!
!
!
!
interface FastEthernet0/0
 ip address 172.168.1.1 255.255.255.252
 duplex auto
 speed auto
!
interface FastEthernet0/1
 no ip address
 duplex auto
 speed auto
!
interface FastEthernet0/1.100
 description DATA VLAN FORAUSTIN HQ CUBE NET
 encapsulation dot1Q 100
 ip address 1.0.0.1 255.255.255.0
!
interface FastEthernet0/1.192
 description VOICE VLAN
 encapsulation dot1Q 192
 ip address 192.168.1.100 255.255.255.0
!
interface Serial0/0/0:23
 ip address 172.16.0.1 255.255.255.252
 encapsulation hdlc
 isdn switch-type primary-qsig
 isdn timer T310 120000
 isdn protocol-emulate network
 isdn incoming-voice voice
 no cdp enable
!
ip forward-protocol nd
no ip http server
no ip http secure-server
!
!
ip route 0.0.0.0 0.0.0.0 192.168.1.1
!
!
!
!
!
!
!
control-plane
!
!
voice-port 0/0/0:23
!
voice-port 0/1/0
!
voice-port 0/1/1
!
voice-port 0/1/2
!
voice-port 0/1/3  <- FXS setup, station-id is just a number to call this FXS on, it's optional!
 description TEST FXS PORT NOT FOR PRIMARY LAB!
 station-id number 5122002999
 caller-id enable
!
voice-port 0/2/0
!
voice-port 0/2/1
!
!
!
mgcp profile default
!
sccp local FastEthernet0/1.192 <-- this entire section registers to CUCM so it can use DSPs
sccp ccm 192.168.1.102 identifier 1 priority 1 version 7.0
sccp
!
sccp ccm group 1
 description CONFERNENCE DSP PROFILE ASSOCIATION
 associate ccm 1 priority 1
 associate profile 1 register CONFERENCE
 associate profile 2 register XCODER
!
dspfarm profile 2 transcode
 description TRANSCODING DSP FARM
 codec g729abr8
 codec g729ar8
 codec g711alaw
 codec g711ulaw
 codec g722-64
 maximum sessions 4
 associate application SCCP
!
dspfarm profile 1 conference
 description CONFERENCE DSP FARM
 codec g729br8
 codec g729r8
 codec g729abr8
 codec g729ar8
 codec g711alaw
 codec g711ulaw
 maximum sessions 2
 associate application SCCP
!
dial-peer voice 3000 voip
 destination-pattern 214300...
 session protocol sipv2
 session target ipv4:172.168.1.2
 voice-class codec 1
!
dial-peer voice 1 voip
 translation-profile incoming 10TO4DIGITIN
 session protocol sipv2
 incoming called-number .T
 voice-class codec 1
!
dial-peer voice 2 voip
 destination-pattern 2...
 session protocol sipv2
 session target ipv4:192.168.1.102
 voice-class codec 1
!
!
gateway
 timer receive-rtp 600
!
!
!
gatekeeper
 shutdown
!
!
!
line con 0
 exec-timeout 0 0
 logging synchronous
line aux 0
line vty 0 4
 exec-timeout 0 0
 password mushroom15
 logging synchronous
 login
 transport input telnet ssh
 transport output telnet ssh
!
scheduler allocate 20000 1000
ntp master 4
end





Now the one thing missing here is a pots dial-peer.  Normally, if you had an an analog port either FXS/FXO you would set them up so they could receive and send calls depending on the port type and requirements.  In this case, all I wanted was to be able to make test calls out an FXS port to make sure I didn't hose it all up :).  

As far as the SCCP and transcoding / conference configuration goes, that is an entirely different conversation for another blog.  I promise to get to it sometime soon.  I haven't posted this week at all due to work becoming more and more busy.  It's funding season for schools and that means projects for me.  As always, I type this on the fly and make very few revisions.  If I mislead you or typed in error please let me know!  

No comments:

Post a Comment