Setting up a VoIP GW

Notes for CVoice exam. Got a lot of this from CVoice 8.0 - Implementing Cisco Unified Communications Voice over IP and QoS v8.0 by Andrew Froehlich

Table of Contents

Setting up Analog Voice ports

Practice configs

FXS (basic)

voice-port 0/0/0
    signal loopstart (or groundstart or E&M)
    cptone <2DigitCountryCode> (set's call progress tones)
    ring cadence pattern08 (or 'ring cadence define pulse interval)
    ring frequency 50 (or 25 (Hz))
    station_id number 3333 (caller ID)
    station_id name Joe Smith (caller ID)
    connection plar 4564 (auto ring-down to 4564)
    impedance 600c (ohms) (or 600r (real), or 900c (complex), etc..)
    input gain 2 (db) (scale back volume inbound)
    output attenuation -1 (db) (scale back volume outbound)
    echo-cancel coverage 32
    !shut/no shut if you change signal type

FXO (basic)

voice-port 0/0/0
    signal groundstart (or loopstart or E&M)
    dial-type dtmf (or pulse)
    connection plar opx 4564 (auto ring-down on off hook to 4564 - don't forget dial-peers to handle)
        without the opx you could get stutter ring down
        without the plar you would need to plan on 2-stage dialing or autoattendant plar
    ring number <1-10> (number of rings before answering call (not nec with plar above))
    !shut/no shut if you change signal type

FXS/DID w/ FXO outbound and related dial-peers

voice-port 0/0/0
    description FXS/DID
    signal loopstart
    signal did wink-start (or immediate-start, wink-start, delay-start)
    !shut/no shut if you change signal type

dial-peer voice 12 pots
    description inbound dialpeer
    direct-inward-dial (alternate is plar or 2-stage dialing on FXO)
    incoming called-number ....
    port 0/0/0

dial-peer voice 13 pots
    description outbound to phone for 3445 to port 0/0/1
    destination-pattern 3445
    port 0/0/1
voice-port 1/0/0
    description fxo port for outbound dialing
    signal groundstart
    !shut/no shut if you change signal type

dial-peer voice 9 pots
    description outbound to fxo port
    destination-pattern 9[2-8]..........
    forward-digits 10
    port 1/0/0

FXO CAMA with related dial-peers

voice-port 1/0/1
    description CAMA 911 port to PSAP
    signal cama KP-0-NPA-NXX-XXXX-ST (Type 2 CAMA Signaling)
                KP-0-NXX-XXXX-ST     (Type 1 CAMA Signaling)
                KP-2-ST              (Type 3 CAMA Signaling)
                                     (Type 5 CAMA Signaling)
                KP-NPD-NXX-XXXX-ST   (Type 4 CAMA Signaling)
                      (may have to shut/no shut bounce port for CAMA signal config)
    ani mapping 0 555 (for NPD, must config digit (here it's 0) for area code (here it's 555))
    !shut/no shut if you change signal type

dial-peer voice 911 pots
    destination-pattern 911
    forward-digits all
    port 1/0/1

dial-peer voice 9911 pots
    destination-pattern 9911
    forward-digits 3
    port 1/0/1


voice-port 0/0/0
    type 2 (or 1 or 3 or...See below for types)
    operation two-wire (or four-wire)
    signal immediate-start (or wink-start, or delay-dial)
    !shut/no shut if you change signal type

Debugging Analog ports

term mon
debug voice ccapi inout
debug voip vtsp tone !was debug vtsp tone
debug vpm signal

gateway1#sh voice port sum
                                                                          IN        OUT
PORT            CH       SIG-TYPE           ADMIN        OPER             STATUS    STATUS        EC
=============== ==       ============       =====        ====             ========  ========      ==
0/3/0           --       fxo-ls             up           dorm             idle      on-hook       y 
0/3/1           --       fxo-ls             up           dorm             idle      on-hook       y

you can look at port status and see if .ADMIN. state is .up. and .OPER. state is .dorm. and .OUT STATUS.
is on-hook.  This is a normal condition of the port.

If OPER state shows .UP. then that means port is detecting off-hook/seizure or is stuck in disconnect mode.

test voice port x/x/x  si-reg-read 29 1
you will normally get either a 0X00 or 0XNN (where NN is some number other than zero).
value of 0x00 indicates there is no voltage being seen on the line/voice port. 
You need the term mon to see the output of this command.

test voice port 0/3/0 si-reg-read 29 1
Apr 16 13:50:39.285: 
Values read from SiLabs Codec connected to DSP 0, channel 0:
Register 29 = 0x00

simulating a call....................................

csim start <dn>
gateway1# csim start 916175551212
csim: called number = 916175551212, loop count = 1 ping count = 0
                                                                                csim err csimDisconnected recvd DISC cid(80) 
Apr 16 13:51:02.462: htsp_timer_stop3 htsp_setup_req
Apr 16 13:51:02.466: htsp_process_event: [0/3/0, FXOLS_ONHOOK, E_HTSP_SETUP_REQ]fxols_onhook_setup
Apr 16 13:51:02.466: [0/3/0] set signal state = 0xC timestamp = 0
Apr 16 13:51:02.466: htsp_timer - 1300 msec
Apr 16 13:51:02.722: htsp_process_event: [0/3/0, FXOLS_WAIT_DIAL_TONE, E_DSP_SIG_1100]fxols_power_denial_detected
Apr 16 13:51:02.722: htsp_timer2 - 1000 msec
Apr 16 13:51:02.722: htsp_timer_stop 
csim: loop = 1, failed = 1  
csim: call attempted = 1, setup failed = 1, tone failed = 0

Apr 16 13:51:03.722: htsp_process_event: [0/3/0, FXOLS_WAIT_DIAL_TONE, E_HTSP_EVENT_TIMER2]fxols_power_den_disc
Apr 16 13:51:03.722: htsp_timer_stop 
Apr 16 13:51:03.722: htsp_timer_stop2 
Apr 16 13:51:03.722: [0/3/0] set signal state = 0x4 timestamp = 0
Apr 16 13:51:03.722: htsp_process_event: [0/3/0, FXOLS_ONHOOK, E_HTSP_RELEASE_REQ]fxols_onhook_release

sh call hist voice command will show a call attempt on that port.

Analog circuit cheatsheet

analog cheatsheet

Setting up digital ports

Practice configs

T1 (basic)

controller T1 2/1
    framing esf (or sf)
    linecode b8zs (or ami)
    clock source line (or internal)
    ds-group 0 timeslots 1-12 e&m-wink-start (or e&m-immediate-start, or fxs-loop-start, etc...)

T1 channel cross-connect to FXS port

controller T1 2/1
    framing esf (or sf)
    linecode b8zs (or ami)
    clock source line (or internal)
    ds-group 1 timeslots 13 fxo-loop-start

voice-port 2/1:1
    signal loopstart
voice-port 0/0/0
    description fax
    signal loopstart
connect fax1 voice-port 0/0/0 t1 2/1:1  (cross connect ds-group 1 to fxs port on 0/0/0)

dial-peer 211
    incoming called number .
    port 2/1:1
dial-peer 3000
    destination-pattern 5554443000
    port 0/0/0

show connection all (verify list of connections, mappings, current state)


isdn switch-type primary-dms100 (or primary-5ess, or primary-qsig, etc...)
controller T1 2/1
    framing esf (or sf)
    linecode b8zs (or ami)
    clock source line (or internal)
    pri-group timeslots 1-24 (could be fractional (e.g. between 1 to 5-15)

interface serial 2/1:23
    isdn incoming-voice voice (set it to be processed by DSPs)

dial-peer voice 9 pots
    destination-pattern 9[2-8].........
    forward-digits 10
    port 2/1:23

show voice port summary (show status on all voice ports)

PRI - additional sample

network-clock-participate wic  4
network-clock-select 1 T1 0/3/0

card type t1 0 3

controller T1 0/3/0
 cablelength long 0db
 pri-group timeslots 1-24

interface Serial0/3/0:23
    no ip address
    encapsulation hdlc
    isdn switch-type primary-ni
    isdn incoming-voice voice
    isdn supp-service name calling
    ! send an alerting message before the connect message
    isdn send-alerting
    no cdp enable
    no shutdown
voice-port 0/3/0:23
    echo-cancel coverage 64
    no shutdown

additional port configs

Practice configs

echo cancellation

voice-port 1/1:0
 echo-cancel enable (usually enabled by default)
 echo-cancel coverage 32 (ms, usually 64 by default)

VAD and comfort noise

voice vad-time 750 (ms - how long to wait before vad kicks in - 250ms in default)

dial-peer voice 100 voip
 no vad (default enabled on dial-peers, but not on POTS interfaces)

voice port 1/0
 vad (default not enabled on POTS interfaces)
 comfort-noise (turn on white noise locally during VAD)

Dial Peers

Practice configs

Inbound dial peer

dial-peer voice 1 voip
    incoming called-number .
    dtmf-relay h245-alphanumeric
    codec g711ulaw

Inbound Dial Peer rules

  1. DNIS - incoming called-number
  2. ANI - answer-address
  3. DNIS again - destination-pattern
  4. Inbound port - port
  5. Default Dial Peer 0 - matches if nothing else matches

Outbound POTS Dial Peers

dial-peer voice 6001 pots
    destination-pattern 6001
    port 0/0/0

Outbound VoIP Dial Peer

dial-peer voice 6002 voip
    destination-pattern 6002
    session target ipv4:<ip addr> (could be ipv6: or dns:)

Outbound Dial Peer rules

  1. DNIS - destination-pattern

Sample Destination strings

dial-peer voice 6003 voip
    destination-pattern 6... (6 followed by 3 digits)
    destination-pattern 6[3-5][3,5][3-5,7] (6, 2nd dig 3-5, 3rd dig 3 or 5, 4th dig 3-5 or 7)
    destination-pattern 65(12)?  (65 or 6512 will match)
    destination-pattern 65(12)%  (65 or 6512 or 651212 or 65121212 or ... up to 32 digits)
    destination-pattern 65(12)+  (6512 or 651212 or 65121212 or ... up to 32 digits)
    destination-pattern 9T  (any dial pattern beginning with 9, up to 32 digits)
    session target ipv4:<ip addr> (could be ipv6: or dns:)

Digit Manipulation (in dial-peer)

digit-strip, forward-digits, prefix may not work in voip dial peer
for voip dial peer you may have to use translation pattern
dial-peer voice 6004 pots
 destination-pattern 6...
  (default strips named digits in pots)
  no digit-strip
  forward-digits 4
  prefix 9,5554444 (comma pauses...)
 port 0/0/0:23

Number Substitution

num-exp 2... 4000 (change 2000-2999 to 4000 - direct it out 0/0/2 below)
dial-peer voice 4000 pots
  destination-pattern 4000
  port 0/0/2

Translation Rules

Create rule

voice translation-rule 1
  rule 1 /3456/ /4444/ (replace 3456 with 4444)
  rule 2 /^\(...\)555\(....\)/ /\1444\2/  (replace nxx of 555 match with 444) 
  rule 3 /^$/ /3000/  (replace anything (including NULL) with 3000)

test voice translation-rule 1 6665553333
^ start of string
$ end of string
/ start or end of matching or replacement
\ next char is special
[list] list of chars
[^list] (not) list of chars
. single char
* last reg exp 0+ times
+ last reg exp 1+ times
? last reg exp 0-1 time
() group digits
& all matched digits are to be added in replacement string

apply translation rules in profiles

voice translation-profile testtrunks-out
  translate called 1 (this could be calling or redirected-called)

dial-peer voice 101 pots
  destination pattern 5....
  port 0/0/0:23
  translation-profile outgoing testtrunks-out

voice-port 1/0:1
  translation-profile incoming testtrunk-in

Debug dial-peers, translations, and profiles

show dial-peer voice summary
show dial-peer voice <#>
show dialplan number 53322 (or any other number you want to test - show all settings that dialpeer will kick out)
debug voip dialpeer
debug voice translation

Caller ID

dial-peer voice 101 pots
 clid network-number 5554441212 second-number strip

Destination pattern wildcard chars

. single digit 0-9 or *
[] consecutive range [2-6]
non-consecutive range [2,4,6]
combination [2,4-6]
(match specific pattern)
? preceding digit occurred 0 or 1 time
% preceding digit occurfed 0 or more times
+ preceding digit occurred 1 or more times
T wait a period of time to collect digits 0-9 or *. 15 seconds is default. # will end collection

Test Dialpeer, number manipulation creation

Practice configs


Practice configs
voice-card 1
 codec complexity high (or medium - C549 choices)
voice-card 1
 codec complexity flex (or high, medium, or secure - C5510/PVDM2 and PVDM3 choices)
show voice dsp (shows summary status of dsps installed


SCCP controlling the DSPs

Practice Config
voice-card 1
    dsp services dspfarm

dspfarm profile 10 transcode
    codec g711ulaw
    codec g729ar8
    codec g729abr8
    codec g729r8
    maximum sessions 5
    associate application SCCP
    no shutdown

dspfarm profile 15 mtp (e.g. conferencing
    codec g711ulaw
    maximum sessions hardware 2
    maximum sessions software 2 (e.g. use cpu)
    associate application SCCP
    no shutdown

sccp ccm identifier 1 priority 1 version 7.0+
    (priority - more than one can have diff priorities, version is CUCM version)
sccp local FastEthernet 3/0 (port that will communicate with CUCM?)

sccp ccm group 1
    bind interface FastEthernet 3/0 (?)
    associate ccm 1 priority 1
    associate profile 15 (dspfarm profile above)
    register TheDSPFARM1 (needs to match up on CUCM config)

CUCM - Media Resources/Conference Bridge menu

show voice port [<port num> | summary] (show details of analog voice port)
show controller [t1 | e1] (controller configuration)
show voice dsp (current dsp usage status)
test voice port [detector | inject-tone | loopback | relay | switch] 
                (test phys level pots port)
csim start <DN> (initiate outbound call, test dial-peers, translation rules, etc.)
debug dialpeer (review dialpeer matching in real time)

H.323 GW

Practice Config
H.323 is default protocol on Cisco GWs
voice service voip
  (shutdown [forced]) (shutdown service, forced means even if there are calls up)
    call start slow (this is global, default is fast)
    session transport udp (default is tcp, not recommended to modify)
    session transport tcp calls-per-connection 20 (1-9999, default is 15)
    h225 timeout tcp call-idle value 5 (how long till tear down on idle call)
                                       (0-1440 seconds, default is 10)

voice class h323 15 (set up a special class)
  call start slow (slow start vs. fast start (default in later Cisco GWs))
  h225 timeout tcp establish 3 (amount of time to hear response from remote gw - default is 15 seconds - use to speed up failover to backup gw)
  h225 timeout tcp setup 3 (amount of time to hear response (to H.225 setup msg) from remote gw - default is 15 seconds - use to speed up failover to backup gw)
voice class codec 20
  codec preference 1 g711ulaw bytes 160
  codec preference 2 g711ulaw bytes 240
  codec preference 3 g729br8
dial-peer voice 15 voip
  voice-class h323 15 (use the elements in this voice class)
dial-peer voice 30
  ! remember initiating router will request perticular codec
  ! don't forget dial-peer 0 for inbound (all codecs supported)
  voice-class codec 30 (can be used with H.323 MGCP, or SIP)

interface loopback0
  ip address
  h323-gateway voip bind srcaddr (any outbound h.323 will use this address)

Dial-peer for H.323

dial-peer voice 3000 voip
  destination pattern 3...
  session target ipv4:

show and debug commands (H.323)

show gateway (what state and version is H.323 in)
show h323 gateway h225 (show how many setup , alert, Progress, etc commands were sent received, and failed)
clear h323 gateway h225 (clear the counters for the show command)


Practice Config
voice service voip
    session transport udp (or tcp)
    bind control source-interface Loopback 0 (source-interface interface-id)
    bind media source-interface Loopback 0
    early-offer forced (force early offer every time, needs SW or HW MTP)
    url sips (configure sip secure at global level)
  srtp (configure secure rtp at global level)
  srtp fallback (configure fallback to rtp if srtp not supported)
  CallerID - all can be in dial peer
  signaling forward unconditional (forward display name with caller ID from PRI to terminating gw)
                                  (make sure d-chan (23) interface has isdn supp-service name calling on it)
  clid substitute name (clid number for name if none present)
  no shutdown

  authentication username <username> password <password> (digest auth)
  registrar <name> expires <secs> (enable sip gw to reg e.164 nums on ext phones)
  sip-server {dns:<hostname> | ipv4:<ipaddr>:[<portnum>]}
    (with above you can specify session target sip-server in dial peer as opposed to interface addresses)
  timers trying 1000 (wait for INVITE response for 1000ms)
  timers connect 1000 (wait for ACK response for 1000ms)
  timers expires 1000 (INVITE is valid for 1000ms)
  retry {invite <number> | response <number> | bye <number> | cancel <number>}
  bind all source-interface fa0/1 (can be control, media, or all - everything use this interface/ip addr)

Dial-Peers for SIP

dial-peer voice 40 voip
  session protocol sipv2
  destination pattern 3...
  session target sip-server (defined in sip-ua section above)
  voice-class sip url sips (configure sip secure for this dial peer - takes precedence over global)

dial-peer voice 90 voip
  destination-pattern 9T
  session target ipv4:<ipaddr>
  session protocol sipv2
  dtmf-relay {rtp-nte [digit-drop] | sip-notify} (out of band dtmf - good for low bw codecs)
  clid strip pi-restrict (strip clid if it's designated as private on ISDN)

timers and retries

    timers ?
    more important 
Range Default
trying time to wait for invite response 100-1000ms 500ms
connect time to wait for ACK response 100-1000ms 500ms
disconnect time to wait for BYE response 60000-300000ms 180000ms
expires Time that an INVITE is valid 100-1000ms 500ms
buffer-invite Time to buffer the INVITE while waiting for display info connect Time to wait for confirmation a session connected connection Connection related timers disconnect Time to wait for confirmation a session disconnected expires Time to wait for the expiration of an INVITE request hold Time to wait during hold before disconnecting info Time to wait before INFO retransmission keepalive Options keepalive related timers notify Time to wait before NOTIFY retransmission options Time to wait before OPTIONS retransmissions prack Time to wait before starting PRACK retransmission refer Time to wait before REFER retransmission register Time to wait before REGISTER retransmission rel1xx Time to wait before starting reliable 1xx retransmission trying Time to wait for provisional response to INVITE update Time to wait before starting UPDATE retransmission retry ? more important
INVITE max # of invite msg retries 6
RESPONSE max # of response msg retries 6
BYE max # of bye retries 10
CANCEL max # of cancel retries 10
bye BYE retry value cancel CANCEL retry value info INFO retry value invite INVITE retry value keepalive KEEPALIVE retry value notify NOTIFY retry value options OPTIONS retry value prack PRACK retry value refer REFER retry value register REGISTER retry value rel1xx Reliable 1xx response retry value response Response Methods retry value subscribe SUBSCRIBE retry value update UPDATE retry value

Sample SIP GW cfg

voice service voip
    bind control source-interface Loopback0
    bind media source-interface Loopback0
    registrar server expires max 600 min 60
dial-peer voice 1 voip
    description test01 DID
    preference 1
    destination-pattern +180055512..
    progress_ind setup enable 3
    modem passthrough nse codec g711ulaw
    voice-class codec 1
    session protocol sipv2
    session target ipv4:
    incoming called-number .
    dtmf-relay rtp-nte
    no vad
dial-peer voice 2 voip
    description Test02 DID
    preference 2
    destination-pattern +180055512..
    progress_ind setup enable 3
    modem passthrough nse codec g711ulaw
    voice-class codec 1
    session protocol sipv2
    session target ipv4:
    dtmf-relay rtp-nte
    no vad
    retry invite 2
    retry response 2
    retry bye 2
    retry cancel 2

show and debug commands (SIP)

show sip service
show sip-ua status (options, proxy, redirect, sdp settings)
show sip-ua register status
show sip-ua timers (default sip timers)
show sip-ua retry (default sip retries)
show sip-ua connections
show sip-ua calls (SIP info on calls that are up)
show sip-ua calls brief (lists all the call legs that are up)
show call active voice summary
show sip-ua statistics (SIP successes and failure counters)


Practice Config
mgcp package-capability ?
  as-package      Select the Announcement Server Package
  atm-package     Select the ATM Package
  dtmf-package    Select the DTMF Package
  fm-package      Select the FM Package
  fxr-package     Select the FXR Package
  gm-package      Select the Generic Media Package
  hs-package      Select the Handset Package
  it-package      Select the IT Package
  line-package    Select the Line Package
  mdr-package     Select the MDR Package
  mf-package      Select the MF Package
  pre-package     Select the PRE Package
  res-package     Select the RES Package
  rtp-package     Select the RTP Package
  script-package  Select the Script Package
  srtp-package    Select the SRTP Package
  sst-package     Select the SST Package
  trunk-package   Select the Trunk Package

Residential GW

ccm-manager mgcp
mgcp call-agent service-type mgcp
mgcp call-agent 2427 service-type mgcp version 0.1
mgcp package-capability line-package (default package for residential gws - clid, hook flash, reorder tones...)
mgcp package-capability dtmf-package (dtmf tones)
mgcp package-capability gm-package (generate media events, signal generic events such as congestion, fax tones, ringback)
mgcp package-capability rtp-package (generage rtp event msgs such as continuity tones, tests, jitter buffer mod, RTP/RTCP timeouts

Trunking GW

ccm-manager mgcp
mgcp call-agent service-type mgcp
mgcp call-agent 2427 service-type mgcp version 0.1
mgcp package-capability trunk-package 
mgcp package-capability dtmf-package 
mgcp package-capability gm-package 
mgcp package-capability rtp-package

controller t1 1/0/1
    ds0-group 0 timeslots 1-24 type none service mgcp
    pri-group timeslots 1-24 service mgcp

show and debug commands (MGCP)

show mgcp profile (basic config settings)
show mgcp (status, timers, packages, codecs)
show mgcp statistics (how many of each command successful and failed)
show ccm-manager (make sure you're registered to CUCM)

Notes not necessarily in exams

Debugging RTP

debug voip rtp sess name
show voip rtp connections

Debugging fax

debug fax relay t30

QoS configuration

class-map match-any media
  match ip dscp ef
class-map match-any control
  match ip dscp cs3
  match ip dscp af31
class-map match-any qos-gateway-critical-traffic
  match ip dscp cs6
policy-map voip
  class media
    bandwidth percent 50
  class control
    bandwidth percent 5
  class qos-gateway-critical-traffic
    bandwidth percent 5
  class class-default

dial-peer voice 29 voip
destination-pattern [2-9].........
  preference 1
  session protocol sipv2
  session target ipv4:<ipaddr>
  voice-class codec 1
  dtmf-relay rtp-nte sip-notify
  ip qos dscp cs3 signaling
  ip qos dscp ef media
  voice-class sip options-keepalive
  no vad

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

Studying for IIUC 640-460

Configuring Voice VLAN

conf t
    vlan 20
        name Data
    vlan 30
        name Voice

    int fa0/2 (or interface range fa0/5 - 12)
        switchport mode access
        switchport access vlan 20
        switchport voice vlan 30

show vlan brief
Test yourself

Studying for CVoice

Traditional Telephony

IPT Unified Communications Model/Tiers

Endpoints, applications, call processing agents, network infrastructure


Wired IP Phones

small business
SPA 300 phones
SPA 500 phones
- support SPCP (Smart Phone Control Protocol)- Cisc Proprietary
- work with UC500 series platform
- also suport SIP (e.g. offered by a ITSP (Internet Telephony Service Provider))

9900 series
8900 series
7900 series
6900 series
3900 series - basic needs, public access areas


7921G and 7925G


IP Communicator (Windows)
Personal Communidcator - integrates voice voicemail, im, other features - WIndows and Mac
Mobile Communicator - software package (integrates UC environment) on iPhone, Blackberry

Video Phones/Tablets

7985G - hi res camera, color LCD
9951 - ehternet or wifi, touchscreen, hi res camera
Video Advantage - application on Windows

Analog to IP adapter

ATA 180 - 2 port adapters
VG200 series adapters - VG224, 248 2, 4 - scheduled to replace


Unity/Unity ConnectoinCisco Converenc Connection suite
billing applications

Call Processing Agents

Call Manager/Unified Communications Manager
UC Manager Business Edition - limit500 endpoints on eadchch appliance, no hgh availabilty/redundancy, integrated voicemail (unity connection)
UC Manager Express - runs on Cisco routers - geared to business with up to 250 endpoints

Network Infrastructure

Voice Gateways

use H.323, SIP, MGCP, or SCCP
older slightly newer newer
2900 ISR3900 ISR
max SRST calls2501500
max SIP sessions6002500
max dig voice galls400660
max FXO ports4060
max BRI ports2438


100 ASR
9000 ASR

UC Deployment models

Analog and Digital ports

Analog Signaling

Address Signaling

Informational Signaling

Call Progress tones

Dial tone, Busy, Number not in service, Call waiting, ring-back, re-order, congestion, receiver off-hook

Supervisory Signalling




ESignaling output
MSignaling output
SGSignaling ground
SB-48 volt signal battery
TAudio input
RAudio output
T1Secondary Audio input
R1Secondary Audio output
Wiring Types
Type Wires Comments
I 1 E, 2nd M, remaining 2 pairs audio
PBX side - indicate off hook by connecting M to battery
line side - indicate off hook by connecting E to ground
most common in North America
II 1 E, 2nd M, 3rd signal ground, 4th signal battery
PBX side - indicate off hook by connecting M to SB (signal battery)
Line side - indicate off hook by connecting E to SG (signal ground)
used in sensitive environments - produces little interference
III 4 wires for signaling
idle - E open, M connect to SG
PBX off hook - move M from SG to SB
line side off hook - ground E
not commonly used
IV uses 4 wires for signaling
idle - E and M open
PBX off-hook, move M from SG to SB
line side off-hook, move E to SG (grounded on PBX side)
V similar to Type I.
2 wires (E & M)
idle - both E&M are open.
PBX off-hook - ground M
line side - off hook - ground E
most common outside of North America
SSDC5 Similar to type V, but backwards
- if line breaks, interface defaults to off-hook (busy)
often found in England
E&M Line Seizure types
  • Immediate start - Go off hook, wait 150ms, send digits
  • Wink start - Go off hook, waith for 140-200ms off-hook-to-on-hook transition (wink), send digits
  • Delay-dial - Go off hook, make sure far side is on hook, send digits
  • Analog to digital conversion

    4 steps

    companding - originally increase signal-to-noise ration (SNR) in analog systems. In digital, reduces total # of bits required for encode and transport - compounding analog to digital - expanding on the other end digital to analog - u-law (North America, Japan), a-law (everywhere else) figured you could get to 8 bits per sample - defined in G.711.

    Digital ports


    Voice Transmission Protocols



    Types of packets include: RTCP meant to collect packet count, loss, delay for single RTP stream, and jitter


    Compressed RTP - shrinks IP/UDP/RTP header (20/8/12) to 2-5 bytes. Table match on both ends of a low speed link (e.g. T1 or less)

    Secure RTP

    RFC 3711 If configured, sRTP and sRTCP replace RTP and RTCP. cRTP could still be used.

    Signaling Protocols


    H.323 Cheat Sheet
    Based on Q.931. Easily integrated with PSTN networks.
    H.225 Call Setup Call Setup teardown, reformat Q931 to interoperate with H.225 msgs
    H.225 Call Routing Registration Administration Status (RAS)
    H.235 Security
    H.245 Logical transport channel.  Capabilities exchange between endpoints
    H.450 Supplementary svcs - call divert, call hold, call park/pickup, call waitin



    session initiation protocol
    TCP/UDP 5060
    SIP Cheat Sheet


    Media Gateway Control Protocol
    TCP or UDP 2427, cleartext
    every msg must be ack'ed to ensure receipt MGCP has 2 roles of responsibility MGCP enspoints has 2 segments: consider programming MGCP call back to use H.323 in event of failure


    Skinny Client Control Protocol
    endpoint to call agent protocl, also DSPs, VG2xx, FXO/FXS ports, etc.

    Protocol comparison

    H.323 ITU-T P2P Distributed
    SIP IETF P2P Distributed
    MGCP IETF Client-Server Centralized
    SCCP Cisco Client-Server Centralized

    Fax Protocols

    Dial Plans

    Voice Call Types

    Numbering Plans

    should be organized for:

    International Num Plan - E.164

    number includes: Max # of dialed digits for international call must be <= 15 digits including country code.

    North America Numbering Plan (NANP)

    1. Area Code - 3 digits - [2-9][0-8][0-9]
    2. CO code - 3 digits - [2-9][0-9][0-9]
    3. Subscriber code - 4 digits [0-9][0-9][0-9][0-9]
    No CO code can be X11 (e.g. [2-9]11).
    011 International Access
    211 Community government informatoin
    311 City government informatoinIETF
    411 Directory assistance
    511 Traffic and road conditions
    611 Telephone repair service
    711 Hearing-disabled relay service
    811 Underground pipe safety service
    911 Emergency services

    Private Numbering plan


    VoIP Design

    GW DSP Functions

    Voice Quality



    Cisco says 25ms or longer is a distraction/noticeable echo
    voice-port 1/1:0
     echo-cancel enable (usually enabled by default)
     echo-cancel coverage 32 (ms, usually 64 by default)

    Background Noise

    estimated 35% of noise in call is background and useless. Implementing VAD can cut traffic by 1/3 but introduce clipping when voice starts up aground and should have comfort-noise enabled...

    VAD usually enabled on dial-peers but not on POTS interfaces.

    VAD and comfort noise usually configured on POTS ports because natively performed by VoIP phones.

    Network Delay


    Variation in time between recept of each voice packet.
    Recommended to keep jitter to 30ms or less.

    Packet Loss

    No loss is recommended, but max should be 1%.
    Many codecs have packet loss concealment (PLC) methods.
    QoS and correct CODECs for you environment can solve packet loss.


    CODECs in VoIPTechBook.php.

    CODEC Complexity

    PVDM2 available on all new Cisco VG routers, PVDM3 only on 2900 and 3900
    Low Complexity
    PVDM Type Low Complexity Call Medium Complexity Calls High Complexity Calls
    PVDM (older C549) 8 4 4
    PVDM2-8 (C5510) 8
    4 4
    PVDM2-16 16 8 6
    PVDM2-32 32 16 12
    PVDM2-48 48 24 18
    PVDM2-64 64 32 24

    PVDM Type Low Complexity Call Medium Complexity Calls High Complexity Calls
    PVDM3-16 16 12 10
    PVDM3-32 32 21 14
    PVDM3-64 64 42 28
    PVDM3-128 128 96 60
    PVDM3-192 192 138 88
    PVDM3-256 256 192 120
    Cisco DSP Calculator

    Measuring CODEC Clarity

    Measure Voice Quality

    Calculating Bandwidth

    Measuring Bandwidth

    GW Protocols


    Slow start

    1. Call Setup
    2. Call proceeding
    3. Alerting
    4. Connect
    5. H.245 negotiation

    Fast Start

    H.245 starts in call setup phase.
    Needs H.323 v2 or higher.
    Fast start default in newer Cisco GWs.
    1. Call Setup (with H.245)
    2. Call proceeding
    3. Alerting
    4. Connect

    Early Media

    utilizes fast start
    allows gateways to open media transport prior to H.224 negotiation and thus prior to call being accepted between parties.
    Can be used to stream announcements or MOH.
    Can happen after Call proceeding stage...


    SIP Cheatsheet
    responsible for determining:

    Early Offer

    Sends SDP in Invite.


    PSTN backhauled to call agent.
    SDP for session init betweeen endpoints.
    Command Meaning
    AUEP Audit endpoint
    AUCX Audit (endpoint) connection
    CRCX Create (RTP) conn that terms on GW
    DLCX Delete (RTP) conn that terms on GW
    MDCX modify (RTP) conn that terms on GW
    RQNT Request notification from VG for signaling events
    EPCF Endpoint config of VG by call agent
    NTFY Notify call agent of signaling event by VG
    RSIP Restart in progress - VG informs call agent that proc is restarting

    CUCM Express

    Voice net Infra Considerations

    phone power options


    int s0/0/0:23
      isdn negotiate-bchan (Enables the router to accept a B channel that is different from
                            the B channel requested in the outgoing call-setup message and
                            specifies the cause codes for which the call is reattempted.)
      service alternate Default (specifies that default voice application takes over if
                                 MGCP call agent is unavailable.  Allows fallback to H.323
                                 or SIP.  Local dial peers will be considered for call routing).
    ccm-manager fall-back-mgcp  (enable srst for MGCP controlled ports).
    voice translation-rule 2
      rule 1 /^(4...\)/ /466\1/
    voice translation-profile Internal
      translate called 2
    no telephony-service
    call-manager-fallback (enter CM fallback cfg mode)
      ip source-addr <ipaddr> (gw source addr)
      max-ephones <num>
      max-dn 12 dual-line
      limit-dn <phonetype> <numDNs>
      system message primary Help Me - Network is down
      secondary-dialtone 9 (play dialtone after dialing 9)
      translation-profile incoming internal
    dial-peer voice 85101 pots
      destination-pattern 851....
      port 0/0/0:23
      forward-digits all
      prefix 401
    show call-manager-fallback all

    SRST counts supported by various ISR gateways

    taken from

    Platform SRST Number of Phones Supported E-SRST Number of Phones Supported Part Number (Spare)
    Cisco 800 Up to 4 phones Up to 4 phones -
    Cisco 1861 Up to 15 phones Up to 15 phones -
    Cisco 2801 Up to 25 phones Up to 25 phones FL-SRST-25=
    Cisco 2811 Up to 35 phones Up to 35 phones FL-SRST-35=
    Cisco 2821 Up to 50 phones Up to 50 phones FL-SRST-50=
    Cisco 2851 Up to 100 phones Up to 100 phones FL-SRST-100=
    Cisco 3825 Up to 350 phones* Up to 175 phones FL-SRST-175=
    Cisco 3845 Up to 730 phones** Up to 250 phones FL-SRST-250=
    Cisco 2901 Up to 35 phones Up to 35 phones FL-CME-SRST-5=, FL-CME-SRST-25=, FL-CME-SRST-100=
    Cisco 2911 Up to 50 phones Up to 50 phones FL-CME-SRST-5=, FL-CME-SRST-25=, FL-CME-SRST-100=
    Cisco 2921 Up to 100 phones Up to 100 phones FL-CME-SRST-5=, FL-CME-SRST-25=, FL-CME-SRST-100=
    Cisco 2951 Up to 250 phones Up to 150 phones FL-CME-SRST-5=, FL-CME-SRST-25=, FL-CME-SRST-100=
    Cisco 3925 Up to 730 phones Up to 250 phones FL-CME-SRST-5=, FL-CME-SRST-25=, FL-CME-SRST-100=
    Cisco 3945 Up to 1200 phones Up to 350 phones FL-CME-SRST-5=, FL-CME-SRST-25=, FL-CME-SRST-100=
    Cisco 3925E Up to 1350 phones Up to 400 phones FL-CME-SRST-5=, FL-CME-SRST-25=, FL-CME-SRST-100=
    Cisco 3945E Up to 1500 phones Up to 450 phones FL-CME-SRST-5=, FL-CME-SRST-25=, FL-CME-SRST-100=


    Getting local ssh login to work

    (config} # ip ssh version 2
    (config} # ip ssh version 2
    (config) # aaa new-model
    (config) # aaa authentication login local_auth local
    (config} # line vty 0 15
        (config-line) # transport input ssh
        (config-line) # login authentication local_auth