In this lesson, you'll learn how to configure a simple analog phone connection over IP using two telephones connected via the foreign exchange station (FXS) and foreign exchange office (FXO) interfaces on Cisco 3600 series routers. In addition, you will learn the commands to use and the necessary steps to configure these routers and verify your configurations. After you have learned the material in this section, you can go to the CIM-SE Telnet window and get some hands-on practice using the concepts you learned in this section.

 

Because Cisco 3600 series routers transmit voice traffic via IP, you need to configure signaling parameters as part of the voice-port configuration, in addition to feature-specific elements such as dial peers. Signaling was discussed in the Understanding section of this module.

Before you can configure your Cisco router to use Voice over IP (VoIP), you must first do the following:

 

After you have analyzed your dial plan and decided how to integrate it into your existing IP network, you are almost ready to configure your network devices to support VoIP. First, though, you should also understand the way in which VoIP handles a typical call. The general flow of a two-party VoIP call generally follows these steps:

  1. The caller picks up the handset, which signals an off-hook condition to the attached local loop device (the router, in the case of VoIP).
  2. The caller hears a dial tone, which is the signal that the device is ready to receive digits.
  3. The caller dials the number.
  4. The number is mapped via the dial plan mapper to a remote IP host, which is connected directly to a phone or a PBX. When the dial-plan mapper determines the necessary IP address to reach the destination telephone number, a session is invoked.
  5. The session protocol (H.323 in Cisco IOS software) establishes transmission and a reception channel for each direction over the IP network. Meanwhile, if there is a PBX involved at the called end, it completes the call to the destination phone.
  6. If Resource Reservation Protocol (RSVP) is being used, the RSVP reservations are put in place to achieve the desired quality of service (QoS) over the IP network.
  7. The analog voice signal is converted to digital and compressed using appropriate preconfigured compression techniques.
  8. Any call-progress indications and other signals that can be carried in band (for example, remote phone ringing, line busy, and so on) are cut through the voice path as soon as an end-to-end audio channel is up.
  9. When either party to the call hangs up, the physical and network resources are freed in preparation for another call.

A complete discussion of H.323 standards is beyond the scope of this tutorial, but you can refer to the linked documents, H.323 Specification and Configuring H.323 Addresses for more information on the H.323 session protocol. A complete description of this standard can be obtained by contacting the ITU. For a description of the call flow process as it is handled inside the router, refer to the document High-Level Architecture for Call Flow.

 

This section of the module explains VoIP configuration concepts that apply to Cisco 3600 series routers. A hands-on Configuration Lab exercise is included at the end of this section of the module. The first lab exercise uses a Cisco 3640 router with one voice card.

Voice Ports

Voice port commands define the characteristics associated with a particular voice-port signaling type. Voice ports for Cisco 3600 series routers support three basic voice signaling formats:

To configure FXO and FXS voice ports...

The Cisco 3600 series currently provides only analog voice ports for its implementation of Voice over IP. The type of signaling associated with these analog voice ports depends on the interface module installed into the device.

In general, voice-port commands define the characteristics associated with a particular voice-port signaling type. Under most circumstances, the default voice port command values are adequate to configure FXO and FXS ports to transport voice data over an existing IP network.

This module covers FXO and FXS configuration, the following module will cover E&M.

If you need to change the default configuration...

Call Legs

A call leg is a discrete segment of a call path; for instance, between a telephone and a router, a router and a network, a router and a PBX, or a router and the PSTN. Each call leg corresponds to a dial peer. Four call legs comprise a complete end-to-end call—two from the perspective of the router where the call originates (source), and two from the perspective of the destination router.

Dial-Peer Call Legs from the Perspective of the Source Router

 

Dial-Peer Call Legs from the Perspective of the Destination Router

Attributes applied to a call leg include Quality of Service (QoS), compression/decompression (CODEC), voice activity detection (VAD), and fax rate.

Dial Peers

The key to understanding Cisco voice implementation is to understand the use of dial peers. Dial peers are commands that are used to configure a router's phone number and determine which interface is used to call another router. Dial peers are used to define the characteristics associated with a call leg and to identify call origin and destination.

There are two basic kinds of dial peers:

When a call comes into a router, the router has to match dial peers. For inbound calls on a POTS port, a router matches a VoIP dial peer for an outbound call, as well as a POTS peer for an incoming call. The same is true for calls that come into the router over an IP network. The router matches both a POTS peer (to terminate the call) and a VoIP peer for features such as VAD.

VAD is discussed in module 3 of this tutorial.

The four defined dial peer elements are:

Using the elements, the algorithm is as follows:

For all peers where call type (VoIP or POTS) match dial peer type:
if the type is matched, associate the called number with the incoming called-number
  else if the type is matched, associate calling-number with answer-address
  else if the type is matched, associate calling-number with destination-pattern
  else if the type is matched, associate voice port to port

This algorithm shows that if a value is not configured for answer address, the origin address is used because, in most cases, the origin address and answer address are the same.

The algorithm used to associate incoming call legs with dial peers uses three signaling inputs (which are derived from signaling and interface information associated with the call) and four defined dial-peer elements.

The three signaling inputs follow:

A dial-peer database is maintained on the gateway router. This database contains addressing and connection information about the dial peer.

For additional information about dial peers and dial plans, read the related document Dial Peer Matching.

Inbound Versus Outbound Dial Peers

Dial peers are used for both inbound and outbound call legs. It is important to remember that these terms are defined from the perspective of the router. An inbound call leg originates outside the router. An outbound call leg originates from the router. For inbound call legs, a dial peer might be associated to the calling number or the port designation. Outbound call legs always have a dial peer associated with them. The destination pattern is used to identify the outbound dial peer. The call is associated with the outbound dial peer at setup time.

Establishing communication using VoIP is similar to configuring an IP static route: you are establishing a specific voice connection between two defined endpoints. For outgoing calls (from the perspective of the POTS dial peer 1), the POTS dial peer establishes the source (via the originating telephone number or voice port) of the call. The VoIP dial peer establishes the destination by associating the destination telephone number with a specific IP address.

Outgoing Calls from the Perspective of POTS Dial Peer 1

To configure call connectivity between the source and destination as illustrated above, you would enter the following commands on the source router 10.1.2.2:

dial-peer voice 1 pots
  destination-pattern 1408526....
  port 1/0/0
dial-peer voice 2 voip
  destination-pattern 1310520....
  session target ipv4:10.1.1.2

In the example, the last four digits in the VoIP dial peers destination pattern were replaced with wildcards (.). This means that from access server 10.1.2.2, calling any number string that begins with the digits "1310520" will result in a connection to 10.1.1.2. This implies that 10.1.1.2 services all numbers beginning with those digits. From access server 10.1.1.2, calling any number string that begins with the digits "1408526" will result in a connection to access server 10.1.2.2, implying that access server 10.1.2.2 services all numbers beginning with those digits.

The next illustration shows how to complete the end-to-end call between dial-peer 1 and dial-peer 4.

Outgoing Calls from the Perspective of POTS Dial Peer 2

To complete the end-to-end call between dial-peer 1 and dial-peer 4 as illustrated above, enter the following commands on router 10.1.1.2:

dial-peer voice 4 pots
  destination-pattern 1310555....
  port 1/0/0
dial-peer voice 3 voip
  destination-pattern 1408555....
  session target ipv4:10.1.2.2

Configuring Dial Peers

Create a Peer Configuration Table

Specific data about each dial peer needs to be identified before you can configure dial peers in VoIP. One way to do this is to create a peer configuration table.

Dial Peer Call Legs from the Perspective of the Source Router

Now look at this illustration again. It shows a diagram of a small voice network. Router 1, with an IP address of 10.1.1.1, connects a small branch office to the main office through Router 2. Three telephones in the sales branch office need to be established as dial peers. Router 2, with an IP address of 10.1.1.2, is the primary gateway to the main office; as such, it needs to be connected to the company's PBX. Four devices need to be established as dial peers in the main office, all of which are basic telephones connected to the PBX.

The following table shows the peer configuration table for this example.


Peer Configuration Table for Sample VoIP Network

Dial Peer Tag Ext Dest-Pattern Type Voice Port Session Target CODEC QoS
Router 1

1

6....

+1408526....

POTS

2

+1310555....

VoIP

IPV4 10.1.1.2

G.729

Best Effort

Router 2

3

+1408116....

VoIP

IPV4 10.1.1.1

G.729

Best Effort

4

2....

+1310555....

POTS


Configure POTS Dial Peers

POTS peers enable incoming calls to be received by a particular telephony device. To configure a POTS peer, you need to uniquely identify the peer (by assigning it a unique tag number), define its telephone number(s), and associate it with a voice port through which calls will be established. Under most circumstances, the default values for the remaining dial-peer configuration commands will be sufficient to establish connections.

To enter the dial-peer configuration mode (and select POTS as the method of voice-related encapsulation), use the dial-peer voice number pots command in global configuration mode. The number value of the dial-peer voice pots command is a tag that uniquely identifies the dial peer. (This number has local significance only.)

To configure the identified POTS peer, in dial-peer configuration mode:

  1. Enter destination-pattern string to define the telephone number associated with this POTS dial peer.
  2. Enter port controller number:D to associate this POTS dial peer with a specific logical dial interface.
Outbound Dialing on POTS Dial Peers

When a router receives a voice call, it selects an outbound dial peer by comparing the called number (the full E.164 telephone number) in the call information with the number configured as the destination pattern for the POTS peer. The router then strips out the left-justified numbers corresponding to the destination pattern matching the called number. If you have configured a prefix, the prefix will be put in front of the remaining numbers, creating a dial string, which the router will then dial. If all numbers in the destination pattern are stripped out, the user will receive a dial tone (depending on the attached equipment).

For example, suppose there is a voice call whose called number is 1(310) 555-2222. If you configure a destination-pattern of "1310555" and a prefix of "9," the router will strip out "1310555" from the telephone number, leaving the extension number of "2222." It will then append the prefix, "9," to the front of the remaining numbers, so that the actual number dialed is "9, 2222." The comma in this example means that the router will pause for one second between dialing the "9" and the "2" to allow for a secondary dial tone.

DID is configured for the calling POTS dial peer. To configure DID for a particular POTS dial peer, initially in global configuration mode, use the following commands:

  1. Enter dial-peer voice number pots configuration mode to configure a POTS peer.
  2. Enter direct-inward-dial to specify DID for this POTS peer.

Configure VoIP Dial Peers

Once again, VoIP peers enable outgoing calls to be made from a particular telephony device. To configure a VoIP peer, you need to uniquely identify the peer (by assigning it a unique tag number), and define its destination telephone number and destination IP address. As with POTS peers, under most circumstances, the default values for the remaining dial-peer configuration commands will be adequate to establish connections.

To enter the dial-peer configuration mode (and select VoIP as the method of voice-related encapsulation), in global configuration mode enter the command dial-peer voice number voip The number value of the dial-peer voice voip command is a tag that uniquely identifies the dial peer.

To configure the identified VoIP peer, use the following commands in dial-peer configuration mode:

  1. Enter destination-pattern string to define the destination telephone number associated with this VoIP dial peer.
  2. Enter session target {ipv4:destination-address | dns:hostname} to specify a destination IP address for this dial peer.

 

Verify the Configuration

When you have finished your configuration, you can use the show dial-peer voice command to display either a specific dial peer or all configured dial peers and verify that the data configured is correct.

Use the show dialplan number command to show the dial peer to which a particular number (destination pattern) resolves.

Private Line Automatic Ringdown (PLAR)

PLAR stands for private line automatic ringdown. In PLAR connection mode, a pair of dedicated phones are reserved. To connect both parties, you simply pick up the handset and the other phone rings without the caller having to dial a number. PLAR is an optional voice-port parameter.

Configure PLAR connection mode using the connection plar string command. The string value specifies the destination telephone number.

Dial Terminator

To designate a special character to be used as a terminator for variable-length dialed numbers, use the dial-peer terminator global configuration command to designate a particular character as a terminator. There are certain areas in the world (for example, in certain European countries) where valid telephone numbers can vary in length. When a dialed-number string has been identified as a variable-length dialed number, the system waits until the configured value for the timeouts interdigit command has expired before placing the call. To avoid waiting until the interdigit timeout value has expired, you can designate a special character as a terminator—meaning that when you dial that character, the system no longer waits for any additional digits and places the call. Valid numbers and characters are #, *, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, a, b, c, and d. The following example configures # as the special terminating character for variable-length dialed-numbers:

configure terminal dial-peer terminator #

You will not configure PLAR or a dial terminator character in the exercises in this module.

 

The following documents related to general VoIP topics can be found on Cisco Connection Online (CCO):

 

Now that you have completed this section, you can get some hands-on experience configuring basic VoIP on a Cisco 3640 router in the next section of this tutorial. The basic concepts you learned in this tutorial section will help you configure and troubleshoot VoIP on the CIM-SE simulator.

Continue to the next section of the tutorial, Configuration Lab 1: Basic Analog Telephone Connection over IP.