Certification Zone Zone Newsletter

This is a Tutorial excerpt from Voice Over X by Jason Sinclair.

If you're not a Certification Zone Subscriber and you would like complete, unrestricted access to the rest of this and every other Tutorial, Study Quiz, Lab Scenario, and Practice Exam available at Certification Zone, become a Subscriber today!

Configuring Voice over IP

Configuring Voice over IP on Cisco devices is simple because the same IOS that supports data networking tasks is used to configure voice. This section will introduce some of the more common Voice over IP configuration tasks. This section is intended not only to introduce real-world tasks that may be encountered, but also to provide a solid foundation of configuration information that will be necessary for the voice components of the Cisco CCIE Lab Exam.

Configuring FXS/FXO Ports

Configuring FXS and FXO ports is trivial, as the default settings are generally suitable for most implementations.

Some of the more commonly configured settings are:

The following code reveals how to configure these options on FXS/FXO ports:

router(config)#voice-port 1/0/0
router(config-voiceport)#description Test Voice Port
router(config-voiceport)#cptone AU
router(config-voiceport)#signal [loop-start | ground-start]

Configuring Voice Activity Detection (VAD)

Generally, only one person speaks at a time during a telephone conversation (unless you are speaking with my mother-in-law!), and thus, in traditional voice networks, more than 50% of bandwidth is wasted in any voice call.

Enabling VAD allows for this otherwise wasted bandwidth to be used for other purposes. VAD detects when someone is speaking and cuts off voice traffic when there is silence. This allows the VoIP implementation to not transmit silence packets. VAD does have some limitations, however. The most prominent is clipped speech, which is due to VAD sometimes kicking in just after a person starts talking. This clipping is generally not noticeable, and the bandwidth savings generally outweighs any drawbacks. Another somewhat disconcerting effect of enabling VAD is that when there is no user speaking, it sounds as though the call has been disconnected. This can be overcome by enabling comfort noise, which generates some virtual background noise, allowing the user to recognize that the call is still connected. When VAD is enabled, comfort noise is also enabled by default.

VAD is configured on dial peers as follows:


Configuring E&M Ports

When configuring E&M ports, it is critical to remember that the default settings are usually not sufficient to enable voice transmission. This is because E&M ports are designed to connect directly to a PBX and must match the specifications of that equipment. The following settings must be configured:

router(config)#voice-port 1/0/0
router(config-voiceport)#signal [wink-start | immediate | delay-dial]
router(config-voiceport)#cptone CountryCode
router(config-voiceport)#operation [2-wire | 4-wire]
router(config-voiceport)#type [1 | 2 | 3 | 5]
router(config-voiceport)#impedance [600c | 600r | 900c | complex1 | complex2]

As with FXS/FXO ports, the description, VAD, and comfort noise can also be configured.

The connection Command

The connection command can be used to set special modes for voice ports. If the connection command is not implemented, the voice port will provide dial tone and collect digits from the handset or end device as per usual. The following list highlights the connection options and their use:

connection plar

One of the most commonly used connection commands is the PLAR function. This allows a user to lift the handset and be automatically connected to a remote number. Configuring PLAR is simply a matter of adding the connection command under the voice port and specifying the destination number to be called:

router(config)#voice-port 1/0/0
router(config-voiceport)#connection plar 5512341234

Correct PLAR configuration can be verified by issuing the show voice port command:

router#show voice port 1/0/0
Foreign Exchange Office
 Type of VoicePort is FXS
 Operation State is DORMANT
 Administrative State is UP
 The Last Interface Down Failure Cause is Administrative Shutdown
 Description is not set
 Noise Regeneration is enabled
 Non Linear Processing is enabled
 Music On Hold Threshold is Set to -38 dBm
 In Gain is Set to 0 dB
 Out Attenuation is Set to 0 dB
 Echo Cancellation is enabled
 Echo Cancel Coverage is set to 8 ms
 Connection Mode is plar
 Connection Number is 5512341234

Configuring Dial Peers

As discussed previously, the dial plan is the heart of any VoIP implementation. Dial peers are the configuration element that implements the dial plan. Dial plan design and strategies will be discussed further in a forthcoming Study Guide. The following section will detail how to configure basic dial peers.

There are two forms of dial peers: POTS and voice network (VoIP, VoFR, and VoATM). The following diagram highlights the different call legs:

Figure 6. Call Legs

The POTS dial peer only requires the following for a basic setup:

Dial Peer Tags

I strongly advocate the practice of using a dial peer tag that matches the destination pattern. This reduces troubleshooting time and makes configurations much easier to read.

Very few commands are required to create a basic POTS dial peer. The following configures the router to send all calls destined for 1234 to the telephone on voice port 1/0/0:

router#configure terminal
router(config)#dial-peer voice 1234 pots
router(config-dial-peer)#destination-pattern 1234

As for the POTS dial peer, the voice network dial peer is also simple to configure. VoFR and VoATM configurations are discussed in later sections. The following parameters are all are required to be defined for a VoIP dial peer:

Codecs Must Match!

Note that it is critical that the codecs on both voice peers match; otherwise, the call will fail.

The following example configures the router for a VoIP dial peer at for a destination pattern (telephone number) of 1234 using codec G711.alaw:

router(config)#dial-peer voice tag-number  voip
router(config-dial-peer)#session target ipv4:
router(config-dial-peer)#codec g711alaw
router(config-dial-peer)#destination-pattern 1234

Configuring Digit Manipulation

Another aspect of voice configuration is digit manipulation. Number expansion is a technique in which digits can be prepended to the number the user dials. This is commonly used by PABX maintainers for extension-level dialing. For example, a subscriber's desk number may be 1-234-5678; however, for ease of use, the network may be configured so that the user only needs to dial 5678 to reach that phone. By configuring number expansion, we can instruct the router to prepend the digits 1234 to the 5678 to complete the number.

router(config)num-exp 5678 12345678

Wildcards can be used with number expansion. For example, if you wished to configure all four-digit extensions that start with the digit 5 to be expanded to add the prefix 999, you could configure

router(config)num-exp 5... 9995...

Configuring Voice over Frame Relay

Following is an example of a partial configuration of a corporate headquarters router. The configuration includes only the explicit portion needed to configure the Voice over Frame Relay network.

Figure 8. Frame Relay Network Topology

  1. Configure the serial interface and subinterfaces:

    1. Frame Relay must be the encapsulation of the serial interface. Frame Relay traffic shaping must also be defined here.

    2. On the subinterfaces, define the segmentation for the PVC. Use frame-relay interface-dlci to configure voice on this interface. voice-encap tells the IOS that the DLCI will be used to transport voice. Following voice-encap is the segment size. Last, the Frame Relay map class is stated.

      interface serial 0
       encapsulation frame-relay
       frame-relay traffic-shaping
      interface serial 0.1 point-to-point
       ip address
       frame-relay interface-dlci 101 voice-encap 80 class FRtype1
      interface serial 0.2 point-to-point
       ip address
       frame-relay interface-dlci 102 voice-encap 80 class Frtype1
      interface serial 0.3 point-to-point
       ip address
       frame-relay interface-dlci 103 voice-encap 160 class Frtype2

    Map Classes

    One of the most important configuration aspects of VoFR is the Frame Relay map class. Without a correct map class configured, it is possible for the VoFR configuration to consume the entire bandwidth of the Frame Relay PVC, thus denying access to data traffic. Make sure you use map classes whenever configuring VoFR.

  2. Configure the Frame Relay map class:

    1. Configure BECN to be a part of traffic shaping for further throttling of the circuit.

    2. State the CIR to allow the IOS to properly throttle the DLCI.

    3. BC stands for burst control. This is the excess bandwidth allowed for bursting.

      Map-class frame-relay Frtype1
       frame-relay adaptive-shaping becn
       frame-relay cir 128000
       frame-relay bc 1000
      map-class frame-relay Frtype2
       frame-relay adaptive-shaping becn
       frame-relay cir 256000
       frame-relay bc 1000

  3. Configure Frame Relay dial peers:

    dial-peer voice 101 VOFR
     destination-pattern 5...
     session-target serial 0 101
    dial-peer voice 102 VOFR
     destination-pattern 5...
     session-target serial 0 102
    dial-peer voice 103 VOFR
     destination-pattern 5...
     session-target serial 0 103

Configuring Voice over ATM

Configuring Voice over ATM is very similar to configuring Voice over Frame Relay. VoATM is diminishing in support as the reach of ATM is diminishing. The following example shows a basic configuration for VoATM with a destination number of 1234 and a VPI/VCI defined by the carrier as 30/100. The ATM PVC is configured on interface ATM 1/1.

router(config)#dial-peer voice 1234 voatm

router(config-dial-peer)#destination-pattern 1234

router(config-dial-peer)#session target ATM 1/1 pvc 30/100

Configuring Digital Voice

As well as allowing configuring dedicated voice ports to support VoIP, Cisco routers can also be configured to support voice calls over dedicated digital connections such as ISDN BRI and PRI links.


The following code is a sample configuration for connecting a Cisco router to an ISDN BRI carrier service or a BRI port on a PABX:

router(config)# isdn switch-type switch-type
router(config)# interface bri slot|port
router(config-if)# no ip address
router(config-if)# isdn incoming-voice voice
router(config-if)# shutdown
router(config-if)# isdn layer1-emulate {user | network}
router(config-if)# no shutdown
router(config-if)# [no] line-power
router(config-if)# isdn protocol-emulate {user | network}


There is a little more work required when configuring PRI connections to a router. At a minimum, you must define the following:

A sample configuration follows:

router#config terminal
router(config)#isdn switch-type basic-ni1
router(config)#controller t1 1/0
router(config-controller)#framing esf
router(config-controller)#clock source internal
router(config-controller)#linecode b8zs
router(config-controller)#pri-group timeslots 1-24

Adding Q.931 Support

Q.931 is used for the setup and teardown of the connection in the ISDN circuit. It is located at the Network Layer in the protocol stack. The basic steps to configure ISDN PRI with Q.931 support are as follows:

router(config)#isdn switch-type primary-net5
router(config)# controller {T1 | E1} slot/port
router(config-controller)# pri-group timeslots range
router(config-controller)# exit
router(config)# interface serial0/0:n
router(config)#isdn protocol-emulate {network | user}
router(config-if)# [no] line-power
router(config-if)# isdn incoming-voice voice
router(config-if)# ^Z

Configuring QSIG

QSIG configuration on a Cisco router allows the router to appear to a PABX as though it is in fact the PSTN.

The two commands used for configuring QSIG with an ISDN PRI circuits are:

router(config)#isdn switch-type primary-qsig
router(config-if)#isdn protocol-emulate {user | network}

Configuring CAS

It is a trivial task to configure CAS support on a Cisco router:

router(config)#controller E1 0/0
router(config-controller)#framing crc-4
router(config-controller)#clock source line primary
router(config-controller)#linecode hdb3
router(config-controller)#cas-group 0 timeslots 1-31 type e&m-fgb dtmf dnis

The various CAS signaling types are listed in the following table:

Table 9. CAS Signaling Types

Signaling TypeDescription
e&m-fgbE&M Type II FGB
e&m-fgdE&M Type II FGD
e&m-immediate-startE&M Immediate Start
fxs-ground-startFXS Ground Start
fxs-loop-startFXS Loop Start
p7P7 switch
R2-analogR2 ITU Q411
R2-digitalR2 ITU Q421
R2-pulseR2 ITU Supplement 7
sas-ground-startSAS Ground Start
sas-loop-startSAS Loop Start

Configuring CCS

As with CAS, configuring Common Channel Signaling support is also quite straightforward:

router(config)#isdn switch-type primary-dms100
router(config)#controller T1 0/0
router(config-controller)#framing esf
router(config-controller)#clock source line primary
router(config-controller)#linecode b8zs
router(config-controller)#pri-group timeslots 1-24
router(config-dial-peer)#dial-peer voice 100 pots
router(config-dial-peer)#destination-pattern 10..
router(config-dial-peer)#port 0:D


This is a Tutorial excerpt from Voice Over X by Jason Sinclair.

If you're not a Certification Zone Subscriber and you would like complete, unrestricted access to the rest of this and every other Tutorial, Study Quiz, Lab Scenario, and Practice Exam available at Certification Zone, become a Subscriber today!