Guest

Voice Quality

Understanding One Stage and Two Stage Voice Dialing

Document ID: 22373

Updated: Feb 02, 2006

   Print

Introduction

This document discusses the aspects of one and two stage dialing.

Prerequisites

Requirements

Readers of this document should be knowledgeable of these topics:

Components Used

The information in this document is based on these software and hardware versions:

  • All Cisco IOS® Software versions

The information in this document was created from the devices in a specific lab environment. All of the devices used in this document started with a cleared (default) configuration. If your network is live, make sure that you understand the potential impact of any command.

Conventions

Refer to the Cisco Technical Tips Conventions for more information on document conventions.

One Stage Dialing

In the case of Digital Interfaces, when the PBX or central office (CO) switch sends a setup message that contains all the digits necessary to fully route the call, those digits can be mapped to an outbound Voice over IP (VoIP) dial-peer (or hairpin to plain old telephone service (POTS) dial-peer directly). The router/gateway does not present a secondary dial tone to the caller and does not collect digits. It forwards the call directly to the configured destination. This is called one stage dialing.

In the case of analog interfaces, the user only hears the dial tone once (either local or remote), and then dials the digits and gets through to the destination phone.

T1/E1 Digital Interfaces

When one receives an inbound call from a POTS interface, the Direct Inward Dial (DID) feature in dial-peers enables the router/gateway to use the called number (dialed number identification service (DNIS)) to directly match an outbound dial-peer. When DID is configured on the inbound POTS dial-peer, the called number is automatically used to match the destination pattern for the outbound call leg.

Enter these Cisco IOS commands beginning in global configuration mode in order to configure a POTS dial-peer for DID:

Router(config)#dial-peer voice number pots		
Router(config-dial-peer)#direct-inward-dial

doctop2.gif

In this figure, when someone picks up Phone 1, the user hears a dial tone that comes from the PBX. The PBX has an access code which is programmed to seize a channel to the router. The user dials the access code and the destination number. For this example, the assumption is that the access code is 99. The user on Phone 1 dials 995678. Based on how the PBX is programmed, it either forwards all six digits to the router, or strips off its own access code and sends only the destination digits to the router. Similarly, when a user connected to the Public Switched Telephone Network (PSTN) picks up the phone, a dial tone from the PSTN is heard. When the user dials 1234, the PSTN routes the call to the router. Since it has direct-inward-dial configured, the router looks at the dialed digits and matches its outbound VoIP dial-peer, which sends the call to Router A.

This is the configuration for Router A:

dial-peer voice 99 pots
destination-pattern 1234
direct-inward-dial  

!--- This command is required for one stage dialing so 
!--- the router routes the call based on the dialed digits.

port 1/0:0
prefix 1234
!
dial-peer voice 100 voip
destination-pattern 5678
session target ipv4:192.168.1.2

This is the configuration for Router B:

dial-peer voice 201 pots
destination-pattern 5678
direct-inward-dial  

!--- This command is required for one 
!--- stage dialing so the router routes the call based on the dialed digits.

port 1/0:0
prefix 5678

dial-peer voice 200 voip
destination-pattern 1234
session target ipv4:192.168.1.1

You need to add the prefix in the remote router because the POTS dial-peer, by default, strips all digits it matches in the destination pattern and these digits need to be sent to the terminating CO.

Note: On Cisco 2600/3600 platforms, DID is enabled by default on channel associated signaling (CAS) (immediate, wink, delay) interfaces. Therefore, do not configure the direct-inward-dial command for incoming calls. On Cisco AS5300 platforms, DID is not supported on interfaces configured for E&M immediate signaling.

Make sure the inbound call matches a POTS dial-peer that has direct-inward-dial configured. Refer to Voice - Understanding How Inbound and Outbound Dial-peers are Matched on Cisco IOS Platforms for more information on dial-peer matching.

Analog Voice Interface Cards

Note: The direct-inward-dial feature is not supported for Foreign Exchange Office/Foreign Exchange Station/E&M (FXO/FXS/E&M) interfaces. You must use the VIC-2DID card to set up DID for analog ports. Refer to Analog DID for Cisco 2600 and Cisco 3600 Series Routers for more information on Cisco analog DID.

Consider this scenario:

doctop3.gif

There are two ways to configure one stage dialing for Phone 1:

Local Dial Tone

When the user picks up the phone, a dial tone is heard from the router (debug). The user then dials either 5678 or 4321. The router searches for an outbound dial-peer and sends the call to Router B. Router B then seizes the port for PBX/CO and sends the DNIS (called number) digits to the PBX/CO, which sends the call to the phone. No special configuration is required for this scenario. Router B must send the DNIS digits to the PBX/CO.

This is the configuration for Router A:

dial-peer voice 99 pots
destination-pattern 1234
port 1/0/0
prefix 1234
!
dial-peer voice 100 voip
destination-pattern 5678
session target ipv4:192.168.1.2

This is the configuration for Router B:

dial-peer voice 201 pots
destination-pattern 5678
port 1/0:0
prefix 5678 

!--- Send the digits to the terminating PBX/CO.
 

dial-peer voice 200 voip
destination-pattern 1234
session target ipv4:192.168.1.1

Remote Dial Tone

When the user picks up Phone 1, a dial tone from the PBX/CO on the other side is heard. This makes the phone appear to be attached to the PBX/CO on the remote side. Use the private line, automatic ringdown (PLAR) configuration to achieve this. Also, make sure that Router B does not send any digits to the PBX/CO. Some PBXs can be configured to return dial tone even if they do receive any DNIS digits.

This is the configuration for Router A:

voice-port 1/0/0
connection plar 1000 

!--- Connection PLAR is configured under the voice port.

!
dial-peer voice 100 voip
destination-pattern 1000 

!--- Dialed string for connection PLAR 
!--- which sends the call to Router B.

    session target ipv4:192.168.1.2

This is the configuration for Router B:


!--- This dial matches the entire destination pattern, 
!--- strips it all off, and does not send any digits to the PBX/CO.

dial-peer voice 201 pots
destination-pattern 1000 

!--- Dialed string for PLAR 
!--- that comes into this router from Router A.

port 1/0:0
!

For more information to help you configure PLAR and the difference between connection PLAR and connection trunk, refer to Configuring Connection PLAR for VoIP Gateways.

Two Stage Dialing

When a voice call comes into the Cisco IOS router/gateway, the voice port on the router is seized inbound by a PBX or CO switch. The router/gateway then presents a dial tone to the caller and collects digits until it can identify an outbound dial-peer. Whether the digits are dialed with irregular intervals by humans or in a regular fashion by telephony equipment that sends the pre-collected digits, dial-peer matching is done digit-by-digit. This means the router/gateway attempts to match a dial-peer after each digit is received. This process is called two stage dialing.

T1/E1 Digital Interfaces

Consider this scenario:

doctop2.gif

These two methods are available for using two stage dialing:

Local Dial Tones

When a user picks up Phone 1, a dial tone is heard coming from the PBX, the user dials the access code (which is programmed in the PBX) for the router and then receives a dial tone from the router ( debug ). Next, the user dials 5678 and the call is routed to Router B and subsequently to Phone 2.

For example, if the PBX has another line that goes to a different router, there is an access code programmed in the PBX for each router. Also, based on what access code you dial, you can draw dial tone from a different local router.

This is the configuration for Router A:


!--- This dial-peer does not have 
!--- direct-inward-dial configured. 
!--- By default, when a call comes in, the router 
!--- provides dial tone to the user.

dial-peer voice 99 pots
destination-pattern 1234
port 1/0:0
prefix 1234
!
dial-peer voice 100 voip
destination-pattern 5678
session target ipv4:192.168.1.2
!

This is the configuration for Router B:

dial-peer voice 201 pots
destination-pattern 5678
port 1/0:0
prefix 5678
!

Local and Remote Dial Tones

When the user picks up Phone 1, the dial tone is heard from the PBX. The user enters the digits and then hears another dial tone from the PBX/CO connected to Router B. There are two ways to achieve this:

  1. Use direct-inward-dial on Router A.

    With direct-inward-dial configured, when the PBX/CO seizes the port on the router and sends a setup message that contains the DNIS digits. The router uses those digits to match an outbound VoIP dial-peer and sends the call to the remote router. Router B then seizes the line to its PBX/CO and does not forward it any digits. The remote PBX/CO then provides a dial tone to the user on Phone 1. It then appears as if the user is connected to that PBX/CO.

    This is the configuration for Router A:

    dial-peer voice 99 pots
    destination-pattern 1234
    direct-inward-dial 
    
    !--- This command is needed so that the router 
    !--- routes the call based on the dialed digits.
    
    port 1/0:0
    prefix 1234
    !
    dial-peer voice 100 voip
    destination-pattern 5678
    session target ipv4:192.168.1.2

    This is the configuration for Router B:

    
    !--- This dial-peer matches the entire destination pattern, 
    !--- strips it all off, and does not send any digits to the PBX/CO.
    
    dial-peer voice 201 pots
    destination-pattern 5678
    port 1/0:0
    !
  2. Use connection PLAR and connection trunk.

    Use connection PLAR to set up the IP leg of the call as soon as it detects a seizure on its voice interface instead of having the router match the DNIS digits sent to it by the PBX/CO. Router B receives this call from Router A, seizes the port on the PBX/CO, and does not send any digits to it. The remote PBX/CO then provides a dial tone to the user on Phone 1 and it appears as if the user is connected to that PBX/CO.

    This is the configuration for Router A:

    voice-port 1/0:0
    connection plar 6666 
    
    !--- Connection PLAR is configured under the voice port.
    
    !
    dial-peer voice 99 pots
    destination-pattern 1234
    port 1/0:0
    prefix 1234
    !
    dial-peer voice 100 voip
    destination-pattern 6666 
    
    !--- Dialed string for connection PLAR 
    !--- which sends the call to Router B.
    
    session target ipv4:192.168.1.2
    !

    This is the configuration for Router B:

    
    !--- This dial matches the entire destination pattern, 
    !--- strips it all off, and does not send any digits to the PBX/CO.
    
    dial-peer voice 201 pots
    destination-pattern 6666 
    
    !--- Dialed string for PLAR that comes 
    !--- into this router from Router A.
    
        port 1/0:0
    !

Analog Voice Interface Cards

Consider this scenario:

doctop4.gif

When a user picks up Phone 1 or when the PSTN number is dialed for the FXO line, the router provides the dial tone to the calling party (debug). The user then enters the digits and receives the dial tone from the terminating PBX/CO. The user then dials the destination number (9876 or 4321), and gets to the other phone. Make sure Router B does not send any digits to the PBX/CO.

This is the configuration for Router A:

dial-peer voice 99 pots
destination-pattern 1234
port 1/0/0
prefix 1234
!
dial-peer voice 100 voip
destination-pattern 9876
session target ipv4:192.168.1.2
!
!
dial-peer voice 101 voip
destination-pattern 4321
session target ipv4:192.168.1.2

This is the configuration for Router B:


!--- This dial matches the entire destination pattern, strips it all off,
!--- and does not send any digits to the PBX/CO.

dial-peer voice 201 pots
destination-pattern 9876
port 1/0:0
!

Output of debug voip ccapi inout Command for Router that Provides Dial Tone

Mar 9 06:30:26.270: cc_api_call_setup_ind (vdbPtr=0x823F6E70,
callInfo={called=,called_oct3=0x81,calling=,calling_oct3=0x0,calling_oct3a=0x0,
calling_xlated=false,subscriber_type_str=RegularLine,fdest=0,
peer_tag=700, prog_ind=3},callID=0x820704FC)
Mar 9 06:30:26.270: cc_api_call_setup_ind type 3 , prot 0
Mar 9 06:30:26.274: cc_process_call_setup_ind (event=0x823D0448)
Mar 9 06:30:26.274: >>>>CCAPI handed cid 2 with tag 700 to app "DEFAULT"
Mar 9 06:30:26.278: sess_appl: ev(24=CC_EV_CALL_SETUP_IND), cid(2), disp(0)
Mar 9 06:30:26.278: sess_appl: ev(SSA_EV_CALL_SETUP_IND), cid(2), disp(0)
Mar 9 06:30:26.278: ssaCallSetupInd
Mar 9 06:30:26.278: ccCallSetContext (callID=0x2, context=0x825A5C7C)
Mar 9 06:30:26.278: ssaCallSetupInd cid(2), st(SSA_CS_MAPPING),oldst(0),
ev(24)ev->e.evCallSetupInd.nCallInfo.finalDestFlag = 0
Mar 9 06:30:26.278: ccCallSetupAck (callID=0x2)
Mar 9 06:30:26.278: ccGenerateTone (callID=0x2 tone=8)
Mar 9 06:30:26.282: ccCallReportDigits (callID=0x2, enable=0x1)
Mar 9 06:30:26.282: cc_api_call_report_digits_done (vdbPtr=0x823F6E70, callID=0x2, disp=0)
Mar 9 06:30:26.282: sess_appl: ev(53=CC_EV_CALL_REPORT_DIGITS_DONE), cid(2), disp(0)
Mar 9 06:30:26.282: cid(2)st(SSA_CS_MAPPING)ev(SSA_EV_CALL_REPORT_DIGITS_DONE)
oldst(SSA_CS_MAPPING)cfid(-1)csize(0)in(1)fDest(0)
Mar 9 06:30:26.282: ssaReportDigitsDone cid(2) peer list: (empty)
Mar 9 06:30:26.282: ssaReportDigitsDone callid=2 Enable succeeded
Mar 9 06:30:26.282: ccGenerateTone (callID=0x2 tone=8)

!--- Router that provides dial tone.

Related Information

Updated: Feb 02, 2006
Document ID: 22373