Software Configuration Guide
Configuring-Voice-over-IP

Table Of Contents

Configuring Voice-over-IP

Voice-over-IP Prerequisites

Configuring the Voice Interface

Voice-over-IP Configuration Examples

FXS-to-FXS Connection Using RSVP

Configuration for Router RLB-1

Configuration for Router RLB-w

Configuration for Router R12-e

Configuration for Router RLB-2

Linking PBX Users with E&M Trunk Lines

Router SJ Configuration

Router SLC Configuration

PSTN Gateway Access Using FXO Connection

Router SJ Configuration

Router SLC Configuration

PSTN Gateway Access Using FXO Connection (PLAR Mode)

Router SJ Configuration

Router SLC Configuration

Configuring Direct-Inward Dialing on a BRI Port

Router 1 Configuration

Router 2 Configuration

Router 3 Configuration

Where to Go Next


Configuring Voice-over-IP


This chapter explains how to configure voice network modules with receive and transmit (E&M), Foreign Exchange Office (FXO), and Foreign Exchange Station (FXS) interfaces for your router. Voice network modules convert telephone voice signals into a form that can be transmitted over an IP network. This chapter is divided into the following sections:

Voice-over-IP Prerequisites

Configuring the Voice Interface

Voice-over-IP Configuration Examples

Where to Go Next

You need both a voice network module and a voice interface card for a voice connection. You can install one voice interface card in a 2-channel voice network module, and two voice interface cards in a 4-channel module. At least one other network module or WAN interface card must be installed in the router to provide the connection to the IP LAN or WAN.

Voice over IP (VoIP) enables your router to carry live voice traffic (for example, telephone calls and faxes) over an IP network. VoIP offers the following benefits:

Toll bypass

Remote PBX presence over WANs

Unified voice/data trunking

Plain old telephone service (POTS)-Internet telephony gateways

Voice-over-IP Prerequisites

Before you can configure your router to use VoIP, you must first do the following:

Establish a working IP network. For more information about configuring IP, refer to the "Configuring IP" chapter in the Cisco IOS Release 11.3 Release Network Protocols Configuration Guide, Part 1.

Install the voice network module into your router. For more informationabout the voice network modules, refer to the "Connecting Voice Network Modules to a Network" chapter in the Cisco Network Modules Hardware Installation Guide.

Complete your company's dial plan. That is, decide what patterns of dialed numbers will access what telephony endpoints.

Establish a working telephony network based on your company's dial plan.

Integrate your dial plan and telephony network into your existing IP network topology.

Configuring the Voice Interface

Whenever you install a new interface, or if you want to change the configuration of an existing interface, you must configure the interface. If you replace a module that was already configured, the router recognizes it and brings up the interface in the existing configuration.

Before you configure an interface, have the following information available:

Protocols you plan to route on the new interface

IP addresses, subnet masks, network numbers, zones, or other information related to the routing protocol


Timesaver Obtain this information from your system administrator or network plan before you begin router configuration.


To configure a voice interface, you must use configuration mode (manual configuration). In this mode, you can enter Cisco IOS commands at the router prompt.

Before you begin, disconnect all WAN cables from the router to keep it from trying to run the AutoInstall process. The router tries to run AutoInstall whenever you power it on if there is a WAN connection on both ends, and the router does not have a valid configuration file stored in NVRAM (for instance, when you add a new interface). It can take several minutes for the router to determine that AutoInstall is not connected to a remote Transmission Control Protocol/Internet Protocol (TCP/IP) host.

To configure the voice interface configuration mode, follow this procedure:


Step 1 Connect a console to the router. If you need instructions for connecting a console, refer to the installation chapter of your router installation and configuration guide.

Step 2 Power onthe router. If the current configuration is no longer valid, after about one minute you see the following prompt:

Would you like to enter the initial dialog? [yes/no]: 

Answer no. You now enter the normal operating mode of the router.


Note If the current configuration is valid, you enter the normal operating mode automatically.


Step 3 After a few seconds, you see the user EXEC prompt (Router>). Type enable and the password to enter enable mode:

Router> enable
Password: <password>

Configuration changes can be made only in enable mode. The prompt changes to the privileged EXEC (enable) prompt (Router#):

Router#

Step 4 Enter the configure terminal command to enter configuration mode:

Router# configure terminal
Router(config)#

The router enters global configuration mode, indicated by the Router(config)# prompt.

Step 5 If you have not configured the router before, or want to change the configuration, use Cisco IOS commands to configure global parameters, passwords, network management, and routing protocols. In this example, IP routing is enabled:

Router(config)# ip routing

For complete information about global configuration commands, refer to the Cisco IOS configuration guides and command references.

Step 6 If you have not already done so, configure the network module or WAN interface card that you plan to use for IP traffic. For instructions, see your router's installation and configuration guide or the configuration note for the network module or WAN interface card.

Step 7 To configure another interface, enter the exit command to return to the Router(config)# prompt.

Step 8 To configure the router for voice traffic, refer to the detailed instructions in the Voice over IP Configuration document.

Step 9 When you finish configuring interfaces, exit configuration mode and return to the enable prompt by pressing Ctrl-z. To see the current operating configuration, including any changes you just made, enter the show running-config command:

Router# show running-config

To see the configuration currently stored in NVRAM, enter the show startup-config command at the enable prompt:

Router# show startup-config

Step 10 The results of the show running-config and show startup-config commands differ from each other if you have made changes to the configuration, but have not yet written them to NVRAM. To write your changes to NVRAM, making them permanent, enter the copy running-config startup-config command at the enable prompt:

Router# copy running-config startup-config
Building configuration. . .
[OK]
Router# 

The router is now configured to boot in the new configuration.


Voice-over-IP Configuration Examples

The actual VoIP configuration procedure you complete depends on the topology of your voice network. The following configuration examples should give you a starting point. Of course, these configuration examples would need to be customized to reflect your network topology.

Configuration procedures are supplied for the following scenarios:

FXS-to-FXS Connection Using RSVP

Linking PBX Users with E&M Trunk Lines

PSTN Gateway Access Using FXO Connection

PSTN Gateway Access Using FXO Connection (PLAR Mode)

Configuring Direct-Inward Dialing on a BRI Port

These examples are described in the following sections.

FXS-to-FXS Connection Using RSVP

The following example shows how to configure VoIP for simple FXS-to-FXS connections. In this example, a very small company, consisting of two offices, has decided to integrate VoIP into its existing IP network. One basic telephony device is connected to Router RLB-1; therefore Router RLB-1 has been configured for one POTS peer and one VoIP peer. Router RLB-w and Router R12-e establish the WAN connection between the two offices. Because one POTS telephony device is connected to Router RLB-2, it has also been configured for only one POTS peer and one VoIP peer.

In this example, only the calling end (Router RLB-1) is requesting RSVP. Figure 4-1 illustrates the topology of this FXS-to-FXS connection example.

Figure 4-1 FXS-to-FXS Connection Example

Configuration for Router RLB-1

hostname rlb-1
! Create voip dial-peer 10
dial-peer voice 10 voip
! Define its associated telephone number and IP address
 destination-pattern +4155264000
 sess-target ipv4:40.0.0.1
! Request RSVP 
 req-qos guaranteedDelay
! Create pots dial-peer 1
dial-peer voice 1 pots
! Define its associated telephone number and voice port
 destination-pattern +4085264000
 port 1/0/0
! Configure serial interface 0/0
interface Serial0/0
 ip address 10.0.0.1 255.0.0.0
 no ip mroute-cache
! Configure RTP header compression
 ip rtp header-compression
 ip rtp compression-connections 25
! Enable RSVP on this interface
 ip rsvp bandwidth 48 48
 fair-queue 64 256 36
 clockrate 64000
router igrp 888
 network 10.0.0.0
 network 20.0.0.0
 network 40.0.0.0

Configuration for Router RLB-w

hostname rlb-w
! Configure serial interface 1/0
interface Serial1/0
 ip address 10.0.0.2 255.0.0.0
! Configure RTP header compression
 ip rtp header-compression
 ip rtp compression-connections 25
! Enable RSVP on this interface
 ip rsvp bandwidth 96 96
 fair-queue 64 256 3
! Configure serial interface 1/3
interface Serial1/3
 ip address 20.0.0.1 255.0.0.0
! Configure RTP header compression
 ip rtp header-compression
 ip rtp compression-connections 25
! Enable RSVP on this interface
 ip rsvp bandwidth 96 96
 fair-queue 64 256 3
! Configure IGRP
router igrp 888
 network 10.0.0.0
 network 20.0.0.0
 network 40.0.0.0

Configuration for Router R12-e

hostname r12-e
! Configure serial interface 1/0
interface Serial1/0
 ip address 40.0.0.2 25.0.0.0
! Configure RTP header compression
 ip rtp header-compression
 ip rtp compression-connections 25
! Enable RSVP on this interface
 ip rsvp bandwidth 96 96
 fair-queue 64 256 3
! Configure serial interface 1/3
interface Serial1/3
 ip address 20.0.0.2 255.0.0.0
! Configure RTP header compression
 ip rtp header-compression
 ip rtp compression-connections 25
! Enable RSVP on this interface
 ip rsvp bandwidth 96 96
 fair-queue 64 256 3
 clockrate 128000
! Configure IGRP
router igrp 888
 network 10.0.0.0
 network 20.0.0.0
 network 40.0.0.0

Configuration for Router RLB-2

hostname r1b-2
! Create pots dial-peer 2
dial-peer voice 2 pots
! Define its associated telephone number and voice-port
 destination-pattern +4155264000
 port 1/0/0
! Create voip dial-peer 20
dial-peer voice 20 voip
!Define its associated telephone number and IP address
 destination-pattern +4085264000
 sess-target ipv4:10.0.0.1
! Configure serial interface 0/0
interface Serial0/0
 ip address 40.0.0.1 255.0.0.0
 no ip mroute-cache
! Configure RTP header compression
 ip rtp header-compression
 ip rtp compression-connections 25
! Enable RSVP on this interface
 ip rsvp bandwidth 96 96
 fair-queue 64 256 3
 clockrate 64000
! Configure IGRP
router igrp 888
 network 10.0.0.0
 network 20.0.0.0
 network 40.0.0.0

Linking PBX Users with E&M Trunk Lines

The following example shows how to configure VoIP to link PBX users with E&M trunk lines.

In this example, a company wants to connect two offices: one in San Jose, California and the other in Salt Lake City, Utah. Each office has an internal telephone network using PBX, connected to the voice network by an E&M interface. Both the Salt Lake City and the San Jose offices are using E&M Port Type II, with four-wire operation and ImmediateStart signaling. Each E&M interface connects to the router using two voice interface connections. Users in San Jose dial "8-569" and then the extension number to reach a destination in Salt Lake City. Users in Salt Lake City dial "4-527" and then the extension number to reach a destination in San Jose.

Figure 4-2 illustrates the topology of this connection example.

Figure 4-2 Linking PBX Users with E&M Trunk Lines Example


Note This example assumes that the company already has established a working IP connection between its two remote offices.


Router SJ Configuration

hostname sanjose
!Configure pots dial-peer 1
dial-peer voice 1 pots
 destination-pattern +527....
 port 1/0/0
!Configure pots dial-peer 2
dial-peer voice 2 pots
 destination-pattern +527....
 port 1/0/1
!Configure voip dial-peer 3
dial-peer voice 3 voip
 destination-pattern +569....
 session target ipv4:172.16.65.182
!Configure the E&M interface
voice-port 1/0/0
 signal immediate
 operation 4-wire
 type 2
voice-port 1/0/1
 signal immediate
 operation 4-wire
 type 2
!Configure the serial interface
interface serial 0/0
 description serial interface type dce (provides clock)
 clock rate 2000000
 ip address 172.16.1.123
 no shutdown

Router SLC Configuration

hostname saltlake
!Configure pots dial-peer 1
dial-peer voice 1 pots
 destination-pattern +569....
 port 1/0/0
!Configure pots dial-peer 2
dial-peer voice 2 pots
 destination-pattern +569....
 port 1/0/1
!Configure voip dial-peer 3
dial-peer voice 3 voip
 destination-pattern +527....
 session target ipv4:172.16.1.123
!Configure the E&M interface
voice-port 1/0/0
 signal immediate
 operation 4-wire
 type 2
voice-port 1/0/0
 signal immediate
 operation 4-wire
 type 2
!Configure the serial interface
interface serial 0/0
 description serial interface type dte
 ip address 172.16.65.182
 no shutdown

Note PBXs should be configured to pass all DTMF signals to the router. Cisco recommends that you do not configure "store-and-forward" tone.



Note If you change the gain or the telephony port, make sure that the telephony port still accepts DTMF signals.


PSTN Gateway Access Using FXO Connection

The following example shows how to configure VoIP to link users with the PSTN gateway using an FXO connection.

In this example, users connected to Router SJ in San Jose, California can reach PSTN users in Salt Lake City, Utah via Router SLC. Router SLC in Salt Lake City is connected directly to the PSTN through an FXO interface.

Figure 4-3 illustrates the topology of this connection example.

Figure 4-3 PSTN Gateway Access Using FXO Connection Example


Note This example assumes that the company already has established a working IP connection between its two remote offices.


Router SJ Configuration

! Configure pots dial-peer 1
dial-peer voice 1 pots
 destination-pattern +14085274000
 port 1/0/0
! Configure voip dial-peer 2
dial-peer voice 2 voip
 destination-pattern +9...........
 session target ipv4:172.16.65.182
! Configure the serial interface
interface serial 0/0
 clock rate 2000000
 ip address 172.16.1.123
 no shutdown

Router SLC Configuration

! Configure pots dial-peer 1
dial-peer voice 1 pots
 destination-pattern +9...........
 port 1/0/0
! Configure voip dial-peer 2
dial-peer voice 2 voip
 destination-pattern +14085274000
 session target ipv4:172.16.1.123
! Configure serial interface
interface serial 0/0
 ip address 172.16.65.182
 no shutdown

PSTN Gateway Access Using FXO Connection (PLAR Mode)

The following example shows how to configure VoIP to link users with the PSTN gateway using an FXO connection (PLAR mode).

In this example, PSTN users in Salt Lake City, Utah, can dial a local number and establish a private line connection in a remote location. As in the previous example, Router SLC in Salt Lake City is connected directly to the PSTN through an FXO interface.

Figure 4-4 illustrates the topology of this connection example.

Figure 4-4 PSTN Gateway Access Using FXO Connection (PLAR Mode)


Note This example assumes that the company already has established a working IP connection between its two remote offices.


Router SJ Configuration

! Configure pots dial-peer 1
dial-peer voice 1 pots
 destination-pattern +14085274000
 port 1/0/0
! Configure voip dial-peer 2
dial-peer voice 2 voip
 destination-pattern +9...........
 session target ipv4:172.16.65.182
! Configure the serial interface
interface serial 0/0
 clock rate 2000000
 ip address 172.16.1.123
 no shutdown

Router SLC Configuration

! Configure pots dial-peer 1
dial-peer voice 1 pots
 destination-pattern +9...........
 port 1/0/0
! Configure voip dial-peer 2
dial-peer voice 2 voip
 destination-pattern +14085274000
 session target ipv4:172.16.1.123
! Configure the voice port
voice port 1/0/0
connection plar 14085274000
! Configure the serial interface
interface serial 0/0
 ip address 172.16.65.182
 no shutdown

Configuring Direct-Inward Dialing on a BRI Port

The following example shows how to configure a BRI port for direct-inward dialing (DID). This configuration allows the called number information from the ISDN Q.931 setup message to be used for routing on an ISDN line.

In this example, a call comes in to router 1 on the BRI port. The DID information allows the router to route the call based on the called number. If the called number is 2xxx, the call is routed to router 2000, and if the called number is 3xxx, the call is routed to router 3000.

Figure 4-5 illustrates the topology of this connection example.

Figure 4-5 Configuring DID on a BRI Port

Router 1 Configuration

dial-peer voice 1 pots
	 port 1/0/0
	 destination-pattern 1...
	 direct-inward-dial
dial-peer voice 2 voip
	 session target ipv4:1.1.1.2
	 destination-pattern 2...
dial-peer voice 3 voip
		 session target ipv4:1.1.1.3
	 destination-pattern 3...

Router 2 Configuration

dial-peer voice 1 pots
	 port 1/0/0
	 destination-pattern 2000

Router 3 Configuration

dial-peer voice 1 pots
	 port 1/0/0
	 destination-pattern 3000

Where to Go Next

At this point you can proceed to the following:

Voice over IP Software Configuration Guide for further information on Voice over IP configuration procedures and commands.

Cisco IOS software configuration guide and command reference publications for more advanced configuration topics. These publications are available on Cisco.com, the Documentation CD-ROM that came with your router, or you can order printed copies.