gateway deployments

83
© 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-1 Gateway Deployments Implementing H.323 Gateways

Upload: trista

Post on 24-Feb-2016

68 views

Category:

Documents


1 download

DESCRIPTION

Gateway Deployments. Implementing H.323 Gateways. Overview of H.323 Gateways. H.323 gateways perform these services: Translation between audio, video, and data formats Conversion between call setup signals and procedures Conversion between communication control signals and procedures. PSTN. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Gateway Deployments

© 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-1

Gateway Deployments

Implementing H.323 Gateways

Page 2: Gateway Deployments

© 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-2

Overview of H.323 Gateways

H.323 gateways perform these services:• Translation between audio, video, and data formats• Conversion between call setup signals and procedures• Conversion between communication control signals and

procedures

Page 3: Gateway Deployments

© 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-3

H.323 Call Flow

H.323 Gateway

PSTN

Bearer or MediaRTP Stream

Setup

Connect

SignalingCall Proceeding

Alerting

SignalingRelease Complete

Page 4: Gateway Deployments

© 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-4

Why H.323?

Advantages of H.323 gateways:• Dial plan can be configured directly on the gateway.• Translations can be defined per gateway.• Regional conditions can be met within multisite deployments.• Call routing configuration can be more specific than on Cisco

CallManager.• There is no need for extra SRST-related call routing configuration.• There is no dependency on the Cisco Unified CallManager version.• More voice interface types are supported.• ISDN NFAS is supported.• Fax support is advanced.• Call preservation was enhanced for PRI calls since Cisco IOS

Software Release 12.4(9)T.

Page 5: Gateway Deployments

© 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-5

Example: Regional Requirements

Calling party: 43917216111Type: international

U.S. Gateway

Germany Gateway

I’ve got an external call. To call back, I need to dial 901143917216111.

I’ve got an external call. To call back, I need to dial 00043917216111.

Calling Mel in the United States.

Translate calling and route to destination.

Mel Max

Calling Max in Germany.

Translate calling and route to destination.

1

2

3

4

5

7

6

Madrid

Page 6: Gateway Deployments

© 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-6

h323-gateway voip bind srcaddr ip-addressrouter(config-if)#

• Sets the IP address that is used as H.323 signaling source

H.323 Commands (Cont.)

Configuring a router interface as a gateway:

Page 7: Gateway Deployments

© 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-7

dtmf-relay router(config-dial-peer)#

• Specifies how DTMF tones are forwarded

rtp payload-type typerouter(config-dial-peer)#

• Identifies the payload type of an RTP packet

H.323 Commands (Cont.)

Configuring a DTMF relay:

Page 8: Gateway Deployments

© 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-8

voice class codec tagrouter(config)#

• Enters voice class codec configuration mode and assigns an identification tag

H.323 Commands (Cont.)

Configuring voice classes

voice class typerouter(config)#

• Enters voice class configuration mode for special voice classes like H.323 and assigns an identification tag

Page 9: Gateway Deployments

© 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-9

H.323 Commands (Cont.)

Configuring codecs

voice-class type tagrouter(config-dial-peer)#

• Specifies the voice class parameters voice class to be used

codec codecrouter(config-dial-peer)#

• Specifies the single codec used

codec preference codec-type [bytes payload-size]router(config-class)#

• Adds a codec to the class and defines its preference

Page 10: Gateway Deployments

© 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-10

H.323 Commands (Cont.)

Tuning H.323 timers:

h225 timeout tcp call-idle value minutesrouter(conf-voi-serv)#

• Defines the H.323 TCP call-idle timeout value

h225 timeout setup secondsrouter(conf-voi-serv)#

• Defines the H.323 setup timeout value

h225 timeout tcp establish secondsrouter(config-class)#

• Defines the H.323 TCP establish timeout value

Page 11: Gateway Deployments

© 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-11

Integrating H.323 Gateways with Cisco Unified CallManager

Perform at least these steps to integrate an H.323 voice gateway into Cisco Unified CallManager:

1. Make sure that H.323 is enabled and specify the H.323 source address on the voice gateway.

2. Configure POTS and VoIP dial peer on the gateway.3. Add a new gateway on Cisco Unified CallManager.4. Configure the IP address and device pool for the gateway

on Cisco Unified CallManager.5. Add a new route pattern pointing to the gateway on Cisco

Unified CallManager.

Page 12: Gateway Deployments

© 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-12

Phone1-12001

Phone1-22002

Integrating H.323 Gateways with Cisco Unified CallManager: Enable H.323

PSTN

Router1H.323

voice service voip h323 ccm-compatible no shutdown!interface FastEthernet0/0 ip address 10.1.1.1 255.255.255.0 h323-gateway voip bind srcaddr 10.1.1.1 no shutdown

Page 13: Gateway Deployments

© 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-13

Phone1-12001

Phone1-22002

Integrating H.323 Gateways with Cisco Unified CallManager: Define the POTS Dial Peer

PSTN

Router1H.323

dial-peer voice 9 pots destination-pattern 9T incoming called-number 2... direct-inward-dial port 1/0:23

Page 14: Gateway Deployments

© 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-14

Phone1-12001

Phone1-22002

Integrating H.323 Gateways with Cisco Unified CallManager: Add the First VoIP Dial Peer

PSTN

Router1H.323

voice class h323 1 h225 timeout tcp establish 3!dial-peer voice 21 voip preference 1 destination-pattern 2... voice-class h323 1 session target ipv4:10.1.1.2 incoming called-number 9 codec g711alaw

Page 15: Gateway Deployments

© 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-15

Phone1-12001

Phone1-22002

Integrating H.323 Gateways with Cisco Unified CallManager: Add the Second VoIP Dial Peer

PSTN

Router1H.323

dial-peer voice 22 voip preference 2 destination-pattern 2... voice-class h323 1 session target ipv4:10.1.1.3 incoming called-number 9 codec g711alaw

Page 16: Gateway Deployments

© 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-16

PSTN

Router1H.323

Integrating H.323 Gateways with Cisco Unified CallManager: Add the Gateway

Phone1-12001

Phone1-22002

Page 17: Gateway Deployments

© 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-17

PSTN

Router1H.323

Integrating H.323 Gateways with Cisco Unified CallManager: Configure Parameters

Phone1-12001

Phone1-22002

Page 18: Gateway Deployments

© 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-18

PSTN

Router1H.323

Integrating H.323 Gateways with Cisco Unified CallManager: Define the Route Pattern

Phone1-12001

Phone1-22002

Page 19: Gateway Deployments

© 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-19

show dial-peer voice tagrouter#

• Displays detailed information about the specified dial peer

show dial-peer voice summaryrouter#

• Displays a summary of all active dial peers

Verifying an H.323 Integration with Cisco Unified CallManager

Dial-peer show and debug commands:

debug voip dialpeerrouter#

• Displays default debug output for all active VoIP dial peers

Page 20: Gateway Deployments

© 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-20

Verifying an H.323 Integration with Cisco Unified CallManager (Cont.)

H.323 debug commands:

debug h225 asn1router#

• Displays ASN.1 content of H.225 messages on the router

debug h225 q931router#

• Displays H.225 Q931 information element details

debug h245 eventsrouter#

• Displays H.245 events on the router

Page 21: Gateway Deployments

© 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-21

Summary

• H.323 gateways are used to interconnect H.323 VoIP networks to networks that are using different signaling and/or bearer types.

• An H.323 call flow consists of signaling and transmission of bearer and media packets.

• H.323 allows extremely flexible decentralized call processing and call handling.

• When implementing H.323 gateways, also consider DTMF and fax.

• To configure an H.323 gateway, you must define at least the H.323 voice service, voice ports, and VoIP and POTS dial peers.

Page 22: Gateway Deployments

© 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-22

Summary (Cont.)

• To integrate an H.323 gateway into Cisco Unified CallManager, at least a new gateway and a route pattern.

• To verify the Cisco Unified CallManager integration of a gateway, there are useful show and debug commands available on Cisco IOS voice gateways.

Page 23: Gateway Deployments

© 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-23

Page 24: Gateway Deployments

© 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-24

Gateway Deployments

Implementing MGCP Gateways

Page 25: Gateway Deployments

© 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-25

Overview of MGCP Gateways

• Call processing is done by a call agent such as Cisco Unified CallManager.

• MGCP gateways translate voice streams between audio signals and the IP packet network.

• Configuration commands for MGCP define this information: – The path between the call agent and the gateway – The type of gateway – The type of calls handled by the gateway

Page 26: Gateway Deployments

© 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-26

Overview of MGCP Gateways (Cont.)

• MGCP uses endpoints and connections to construct a call.– Endpoints:

• Sources of or destinations for data• Physical or logical locations in a device

– Connections: • Point-to-point• Multipoint

• MGCP uses UDP for establishing audio connections over IP networks.

Page 27: Gateway Deployments

© 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-27

MGCP Call Flow

MGCP Gateway

RQNT

PSTN

Signaling

Bearer or MediaRTP Stream

RQNT ResponseNTFYCRCX

CRCX ResponseMDCX

MDCX Response

NTFYDLCX

DLCX ResponseSignaling

Page 28: Gateway Deployments

© 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-28

Why MGCP?

Advantages of MGCP gateways:• Centralized dial plan configuration on the Cisco Unified

CallManager• Centralized gateway configuration on the Cisco Unified

CallManager • Simple Cisco IOS gateway configuration• Supports QSIG supplementary services with Cisco Unified

CallManager

Page 29: Gateway Deployments

© 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-29

Why MGCP? (Cont.)

H.323 versus MGCP gateways:H.323 MGCP

Pros

Dial plan directly on the gatewayTranslations defined per gatewayRegional requirements can be metMore specific call routingAdvanced fax support

Centralized dial-plan configurationCentralized gateway configurationSimple gateway configurationEasy implementationSupport of QSIG supplementary services

Cons Complex configuration Extra SRST-related call routing configuration

Page 30: Gateway Deployments

© 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-30

MGCP Configuration Considerations

TFTP Server onCisco Unified CallManager

Cisco Unified CallManagerAdministration

MGCPGateway

Configuration is done via the web-based Cisco Unified CallManager Administration page.

The MGCP gateway downloads the

configuration from the Cisco Unified

CallManager TFTP server.

Page 31: Gateway Deployments

© 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-31

ccm-manager config server ip-addressRouter(config)#

• Identifies the server from which the MGCP configuration should be downloaded

ccm-manager configrouter(config)#

• Enables the MGCP configuration download from the configured server

Basic MGCP Configuration

Configuring The MGCP configuration server:

Page 32: Gateway Deployments

© 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-32

Basic MGCP Configuration (Cont.)ccm-manager config server 192.168.1.1ccm-manager config

ccm-manager mgcpccm-manager music-on-holdccm-manager config server 192.168.1.1ccm-manager config!mgcpmgcp call-agent 192.168.1.1 2427 service-type mgcp version 0.1mgcp dtmf-relay voip codec all mode out-of-bandmgcp rtp unreachable timeout 1000 action notifymgcp modem passthrough voip mode nsemgcp package-capability rtp-packageno mgcp package-capability res-packagemgcp package-capability sst-packageno mgcp package-capability fxr-packagemgcp package-capability pre-packageno mgcp timer receive-rtcpmgcp sdp simplemgcp rtp payload-type g726r16 static!mgcp profile default

Manually configured

Configuration after TFTP download

Page 33: Gateway Deployments

© 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-33

mgcpRouter(config)#

• Enables the MGCP protocol

mgcp call-agent ip-addressrouter(config)#

• Specifies the primary Cisco Unified CallManager

MGCP Commands

Enable MGCP and define the MGCP call agent:

ccm-manager mgcprouter(config)#

• Enables the MGCP gateway to support Cisco Unified CallManager

Page 34: Gateway Deployments

© 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-34

ccm-manager redundant-host ip-addressRouter(config)#

• Identifies up to two backup Cisco Unified CallManager servers

ccm-manager switchback moderouter(config)#

• Configures switchback mode for returning control to the primary Cisco Unified CallManager

MGCP Commands (Cont.)

Configuring MGCP redundancy:

ccm-manager fallback-mgcprouter(config)#

• Enables the MGCP fallback feature

Page 35: Gateway Deployments

© 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-35

ccm-manager music-on-holdRouter(config)#

• Enables music-on-hold

ccm-manager music-on-hold bind interfacerouter(config)#

• Binds the multicast MOH feature to a designated interface

MGCP Commands (Cont.)

Configuring MOH and DTMF:

mgcp dtmf-relay voip codec {all | low-bit-rate} mode {cisco | nse | out-of-band}

Router(config)#

• Defines DTMF relay parameters

Page 36: Gateway Deployments

© 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-36

Integrating MGCP Gateways with Cisco Unified CallManager

Perform at least these steps to integrate an MGCP-controlled voice gateway into Cisco Unified CallManager:

1. Add a new MGCP gateway on Cisco Unified CallManager.2. Configure the device hardware on Cisco Unified

CallManager.3. Configure the ports on Cisco Unified CallManager.4. Add a new route pattern pointing to the gateway on Cisco

Unified CallManager.5. Enable MGCP and define the Cisco Unified CallManager as

the call agent on the voice gateway.

Page 37: Gateway Deployments

© 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-37

PSTN

Router1MGCP

Integrating MGCP Gateways with Cisco Unified CallManager: Add the Gateway

Phone1-12001

Phone1-22002

Page 38: Gateway Deployments

© 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-38

PSTN

Router1MGCP

Integrating MGCP Gateways with Cisco Unified CallManager: Configure the Device

Phone1-12001

Phone1-22002

Page 39: Gateway Deployments

© 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-39

PSTN

Router1MGCP

Integrating MGCP Gateways with Cisco Unified CallManager: Configure the Port

Phone1-12001

Phone1-22002

Page 40: Gateway Deployments

© 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-40

PSTN

Router1MGCP

Integrating MGCP Gateways with Cisco Unified CallManager: Define the Route Pattern

Phone1-12001

Phone1-22002

Page 41: Gateway Deployments

© 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-41

Phone1-12001

Phone1-22002

Integrating MGCP Gateways with Cisco Unified CallManager: Enable MGCP

PSTN

Router1MGCP

ccm-manager config server 10.1.1.1ccm-manager config

Page 42: Gateway Deployments

© 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-42

show mgcpRouter#

• Displays the MGCP settings on the gateway

show ccm-managerrouter#

• Displays the Cisco Unified CallManager failover options

Verifying an MGCP Integration with Cisco Unified CallManager

MGCP show commands:

show ccm-manager fallback-mgcprouter#

• Displays whether MGCP fallback is enabled and whether it is active or not (on or off)

Page 43: Gateway Deployments

© 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-43

show mgcp endpointRouter#

• Displays endpoints controlled by MGCP

show isdn statusrouter#

• Displays information about the status of ISDN Layers 1 to 3

Verifying an MGCP Integration with Cisco Unified CallManager (Cont.)

MGCP show commands (Cont.):

Page 44: Gateway Deployments

© 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-44

Summary

• Within an MGCP environment, call routing is done on Cisco Unified CallManager.

• Within an MGCP environment, MGCP signaling is done between Cisco Unified CallManager and the gateway while RTP traffic is transferred between the phone and the gateway.

• MGCP simplifies and centralizes configuration.• The MGCP configuration is downloaded from the Cisco

Unified CallManager TFTP server by the gateway.• There are several MGCP commands available on Cisco IOS

gateways.

Page 45: Gateway Deployments

© 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-45

Summary (Cont.)

• To integrate an MGCP gateway into Cisco Unified CallManager, you must configure the device settings on the Cisco Unified CallManager.

• You use show commands to view the MGCP status on Cisco IOS gateways.

Page 46: Gateway Deployments

© 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-46

Page 47: Gateway Deployments

© 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-47

Dial Plans on Cisco IOS Gateways

Implementing Dial Plans

Page 48: Gateway Deployments

© 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-48

PSTN Dial Plan Requirements

PSTN Requirements Dial Plan Components

Inbound call routing

• Call routing and path selection for inbound PSTN dial peer to outbound VoIP or local dial peer

• Digit manipulation to transform inbound DNIS to endpoints

Outbound call routing

• Call routing and path selection for inbound VoIP or local dial peer to outbound PSTN dial peer

• Digit manipulation to transform outbound DNIS to PSTN requirements

Correct ANI presentation • Digit manipulation to transform ANI to meet PSTN requirements

Page 49: Gateway Deployments

© 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-49

Inbound PSTN Calls

PSTN

Phone1-12001

Phone1-22002

1

User dials 14085552001.

Call setup from PSTN:

DNIS 4085552001

2

H.323 GatewayDID 4085552XXX

H.323 call setup: DNIS 2001

4

5Phone1-1 rings.

13125556666

Gateway modifies DNIS to 2001 and

routes to CallManager.

3

Page 50: Gateway Deployments

© 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-50

Outbound PSTN Calls

PSTN

Phone1-12001

Phone1-22002

5

PSTN phone rings.Call setup:DNIS 13125556666

ANI´4085552001

4

H.323 GatewayDID: 4085552XXX

H.323 call setup: DNIS 913125556666

ANI 2001

2

1User dials

913125556666.

3125556666

Gateway modifies DNIS and ANI.

3

Page 51: Gateway Deployments

© 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-51

ISDN Dial Plan Requirements

ISDN Requirements Dial Plan Components

Correct PSTN inbound ANI presentation

depending on TONDigit manipulation to transform inbound PSTN ANI according to TON

Correct ISDN numbering plan and TON presentation

Manipulate ISDN numbering plan or TON to meet PSTN/PBX requirements

Page 52: Gateway Deployments

© 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-52

Inbound ISDN Calls

PSTN

Phone1-12001

Phone1-22002

1

User dials 14085552001.

San JoseDID range: 4085552XXX

Call setup from PSTN:

ANI 3125556666TON National

2

H.323 Gateway

CM 192.168.1.1

H.323 call setup: ANI 913125556666

4

5Phone1-1 rings.

ANI 913125556666

13125556666

Gateway prepends 91 to ANI due to

TON.

3

Page 53: Gateway Deployments

© 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-53

Digit Manipulation

Various mechanisms for digit manipulations:• Simple digit manipulation to strip off or prefix digits for POTS dial

peers:– digit-strip– forward-digits– prefix– clid

• Number expansion to globally inflate or deflate numbers:– num-exp– Typically used for short dials and site codes

• Voice translation rules and profiles:– Powerful and complex digit manipulation using regular

expressions

Page 54: Gateway Deployments

© 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-54

Digit Manipulation (Cont.)

1. Inbound voice port digit manipulation

2. Global number expansion3. Match inbound dial peer4. Voice translation profile5. CLID

Inbound dial peermatch

Outbound dial peermatch

1. Match outbound dial peer2. Voice translation profile3. CLID

1. Match outbound dial peer2. Voice translation profile3. Digit strip4. Prefix5. Forward digits6. CLID

1. Global voice translation profiles

2. Global number expansion3. Match inbound dial peer4. CLID5. Voice translation profile

POTS

POTS VoIP

VoIP

Page 55: Gateway Deployments

© 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-55

Simple Digit Manipulation for POTSDial Peers

PSTN

Phone1-12001 13125556666

Command DNIS

no digit-strip 913125556666

digit-strip (default) 13125556666forward-digits 4 6666prefix 9 and digit-strip 913125556666

dial-peer voice 9 pots destination 9T

H.323 GatewayDID: 4085552XXX

User dials 913125556666.

Page 56: Gateway Deployments

© 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-56

Digit Manipulation with Number Expansion

PSTN

Phone1-12001 13125556666

num-exp 6666 913125556666dial-peer voice 9 pots destination 9T

H.323 GatewayDID: 4085552XXX

User dials 6666. Number is inflated to 91312555666 and routed to

PSTN.

Phone rings.

1 2 3

Page 57: Gateway Deployments

© 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-57

Voice Translation Rules and Profiles

• Voice translation rules define up to 15 sub rules to manipulate digits, TONs, and numbering plans.

• Voice translation profiles reference up to three rules:– Called: Translation rule for the called number– Calling: Translation rule for the calling number– Redirect-called: Translation rule for the redirect number

• Voice translation profiles can be referenced by:– Dial peers, voice ports, any inbound VoIP call, specific

range of source IP addresses in VoIP calls, trunk groups, NFAS controllers, or SRST

Page 58: Gateway Deployments

© 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-58

Profile

Voice Translation Rules and Profiles (Cont.)

Called Rule

1 2 3 4 5

6 7 8 9 10

11 12 13 14 15

Rule

1 2 3 4 5

6 7 8 9 10

11 12 13 14 15

Rule

1 2 3 4 5

6 7 8 9 10

11 12 13 14 15

Calling

RedirectedCalled

Incoming

Outgoing

Dial Peer

Voice Port

VoIP Incoming

Source IP Group

Trunk Group

NFAS

SRST

Page 59: Gateway Deployments

© 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-59

Voice Translation Rules and Profiles (Cont.)Char Description

^ Match the expression at the start of a line.$ Match the expression at the end of the line.

/ Delimiter that marks the start and end of both the matching and replacement strings.

\ Escape the special meaning of the next character.- Indicates a range when not in the first or last position. Used with the'[' and ']'.[list] Match a single character in a list.[^list] Do not match a single character specified in the list.

. Match any single character.

* Repeat the previous regular expression zero or more times.

+ Repeat the previous regular expression one or more times.

? Repeat the previous regular expression zero or one time (use CTRL-V in order to enter in IOS).

\(\) Groups regular expressions. Use \1-9 to refer to matched groups.

& Match the substring (matched string). Can also use \0.

Page 60: Gateway Deployments

© 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-60

Voice Translation Rule Search-and-Replace Examples

Rule Input String Output String

/^9/ // 914085556666 14085556666/^2001/ /3001/ 2001 3001/^[23]…/ /4000/ 2025 or 3051 4000/^2…/ /801&/ 2001 8012001/^2…/ /801\0/ 2001 8012001/.*/ /91&/ type national national 3125552001 type national 913125552001 type national

Page 61: Gateway Deployments

© 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-61

Voice Translation Rule Search-and-Replace Examples (Cont.)

\(9\) \([^10].*\) \1 \21408

9 5551234 9 55512341408

/ / / /

Search Replace

OutputInput

Translation Rule: /\(9\)\([^10].*\)/ /\11408\2/

Page 62: Gateway Deployments

© 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-62

Voice Translation Profile Example: Search and Replace

PSTN-IN

Called Rule 1

Rule 2Calling

RedirectedCalled

1 /^4085552/ /2/

1 /^.*/ /9&/ type subscriber scubscriber

2 /^.*/ /91&/ type national national

3 /^.*/ /9011&/ type international international

voice translation-rule 1 rule 1 /^4085552/ /2/voice translation-rule 2 rule 1 /^.*/ /9&/ type subscriber subscriber rule 2 /^.*/ /91&/ type national national rule 3 /^.*/ /9011&/ type international internationalvoice translation-profile pstn-in translate called 1 translate calling 2

Page 63: Gateway Deployments

© 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-63

Cisco Unified CallManager Express with Voice Translation Profiles

PSTN

voice translation-rule 1 rule 1 /^4085552/ /2/voice translation-profile pstn-in translate called 1voice-port 0/0/0:23 translation-profile incoming pstn-indial-peer voice 2001 pots port 1/0/0 destination-pattern 2001

13125556666

Phone rings. Profile modifies DNIS to 2001.

User dials 14085552001.

3 2 1

Replaces the dial plan pattern and

covers inbound and outbound routing of

any dial peers.

FXS Phone1-12001

CMEDID: 4085552XXX

Page 64: Gateway Deployments

© 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-64

digit-striprouter(config-dial-peer)#

• Enables stripping of matched digits (default)

prefix digitsrouter(config-dial-peer)#

• Prefixes the specified digits after the pattern has matched

forward-digits [0-32]|all|extrarouter(config-dial-peer)#

• Specifies how many digits to forward, right-justified

Digit Manipulation Commands

Page 65: Gateway Deployments

© 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-65

num-exp dialed-digits substitutionrouter(config)#

• Matches on dialed digits and replaces them (wildcards allowed)

voice translation-rule rule-tagrouter(config)#

• Creates or modifies a voice translation rule with the specified numeric tag

rule precedence /match/ /replace/ [type {match-type replace-type} [plan {match-plan replace-plan}]]

router(cfg-translation-rule)#

• Creates a match-and-replace rule

Digit Manipulation Commands (Cont.)

Page 66: Gateway Deployments

© 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-66

Digit Manipulation Commands (Cont.)

voice translation-profile profile-namerouter(config)#

• Creates or modifies a voice translation profile with the specified name

translate {called | calling | redirect-called} translation-rule-number

router(cfg-translation-profile)#

• Binds a translation rule to a profile

Page 67: Gateway Deployments

© 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-67

Digit Manipulation Commands (Cont.)

translation-profile {incoming | outgoing} namerouter(dial-peer)#

• Binds a translation profile to a dial peer

test voice translation-rule number input-test-string [type match-type [plan match-plan] ]

router#

• Tests a translation rule with a user-defined test string

Page 68: Gateway Deployments

© 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-68

destination-pattern [+]string[T] router(config-dial-peer)#

• Defines the destination pattern of a dial peer that will be used during outbound dial-peer matching

incoming called-number [+]string[T] router(config-dial-peer)#

• Specifies the incoming called number that will be used during inbound dial-peer matching

answer-address [+]string[T] router(config-dial-peer)#

• Specifies the incoming calling number will be used during inbound dial-peer matching

Call Routing and Path Selection Commands

Page 69: Gateway Deployments

© 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-69

direct-inward-dialrouter(config-dial-peer)#

• Uses the inbound POTS DNIS to match the outbound dial peer (usually required for any DID PSTN trunk)

Call Routing and Path Selection Commands (Cont.)

preference [0-9]router(config-dial-peer)#

• Specifies the preference of a dial peer; lower number = high priority default=0

no dial-peer outbound status-check potsrouter(config)#

• Disables status checking of outbound POTS dial peers during call setup; always includes dial peer in call routing, even if POTS status is down; and useful for some ISDN links

Page 70: Gateway Deployments

© 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-70

Configuring PSTN Dial Plans

1. Configure digit manipulation for inbound calls.2. Define dial peers.3. Configure inbound dial-peer matching.4. Configure digit manipulation for outbound calls.5. Configure digit manipulation for intersite calls.

Page 71: Gateway Deployments

© 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-71

PSTN Dial Plan Scenario

PSTN

IP WANPhone1-1

2001Phone1-2

2002Phone2-1

3001Phone2-2

3002

San Jose Chicago

Router1H.323

Router3CME

3125556666

CM1: 192.168.1.1CM2: 192.168.1.2

Users should be able to reach the other

site via an extension.

DID: 312555XXXXDID: 408555XXXX

Page 72: Gateway Deployments

© 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-72

Step 1: Configure Digit Manipulation for Inbound Calls

Router1H.323

Router3CME

voice translation-rule 1 rule 1 /^4085552/ /2/voice translation-rule 2 rule 1 /^.*/ /9&/ type subscriber subscriber rule 2 /^.*/ /91&/ type national national rule 2 /^.*/ /9011&/ type international internationalvoice translation-profile pstn-in translate called 1 translate calling 2voice-port 0/0/0:23 translation-profile incoming pstn-in

voice translation-rule 1 rule 1 /^3125553/ /3/voice translation-rule 2 rule 1 /^.*/ /9&/ type subscriber subscriber rule 2 /^.*/ /91&/ type national national rule 2 /^.*/ /9011&/ type international internationalvoice translation-profile pstn-in translate called 1 translate calling 2voice-port 0/0/0:23 translation-profile incoming pstn-in

Page 73: Gateway Deployments

© 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-73

Step 2: Define Dial Peers

Router1H.323

Router3CME

dial-peer voice 9 pots destination-pattern 9T direct-inward-dial port 0/0/0:23

dial-peer voice 9 pots destination-pattern 9T direct-inward-dial port 0/0/0:23dial-peer voice 20 voip destination-pattern 2... session-target ipv4:192.168.1.1 codec g711ulawdial-peer voice 21 voip preference 1 destination-pattern 2... session-target ipv4:192.168.1.2 codec g711ulaw

Page 74: Gateway Deployments

© 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-74

Step 3: Configure Inbound Dial-Peer Matching

Router1H.323

Router3CME

dial-peer voice 9 pots destination-pattern 9T incoming called-number 2... direct-inward-dial port 0/0/0:23dial-peer voice 20 voip answer-address 2... destination-patter 2... session-target ipv4:192.168.1.1 codec g711ulawdial-peer voice 21 voip answer-address 2... preference 1 destination-patter 2... session-target ipv4:192.168.1.2 codec g711ulaw

dial-peer voice 9 pots destination-pattern 9T incoming called-number 3... direct-inward-dial port 0/0/0:23

Page 75: Gateway Deployments

© 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-75

Step 4: Configure Digit Manipulation for Outbound Calls

Router1H.323

Router3CME

voice translation-rule 3 rule 1 /^2/ /4085552/voice translation-profile pstn-out translate calling 3voice-port 0/0/0:23 translation-profile outgoing pstn-out

voice translation-rule 3 rule 1 /^3/ /3125553/voice translation-profile pstn-out translate calling 3voice-port 0/0/0:23 translation-profile outgoing pstn-out

Page 76: Gateway Deployments

© 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-76

Step 5: Configure Digit Manipulation for Intersite Calls

Router1H.323

Router3CME

num-exp 3... 913125553... num-exp 2... 914085552...

Page 77: Gateway Deployments

© 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-77

Inbound PSTN Call Flow

PSTN

H.323 GatewayDID: 4085552XXX 3125556666

dial-peer voice 9 pots destination-pattern 9T incoming called-number 2... direct-inward-dial port 0/0/0:23

voice-port 0/0/0:23 translation-profile incoming pstn-in

dial-peer voice 20 voip answer-address 2... destination-patter 2... session-target ipv4:192.168.1.1 codec g711ulaw

1

2

3

123

ANIDNIS

913125556666312555666620014085552001OutgoingIncoming

ANIDNIS

91312555666691312555666620012001OutgoingIncoming

ANIDNIS

91312555666691312555666620012001OutgoingIncoming

Page 78: Gateway Deployments

© 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-78

Outbound PSTN Call Flow

PSTN

H.323 GatewayDID: 4085552XXX 3125556666

dial-peer voice 9 pots destination-pattern 9T incoming called-number 2... direct-inward-dial port 0/0/0:23

dial-peer voice 20 voip answer-address 2... destination-patter 2... session-target ipv4:192.168.1.1 codec g711ulaw

voice-port 0/0/0:23 translation-profile outgoing pstn-out

1

2

3

321

ANIDNIS

20012001913125556666913125556666OutgoingIncoming

ANIDNIS

2001200113125556666913125556666OutgoingIncoming

ANIDNIS

408555200120011312555666613125556666OutgoingIncoming

Page 79: Gateway Deployments

© 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-79

Verifying PSTN Dial Plans

show dialpeer voice summaryrouter#

Router1#show dial-peer voice summarydial-peer hunt 0 AD PRE PASS OUTTAG TYPE MIN OPER PREFIX DEST-PATTERN FER THRU SESS-TARGET STAT PORT9 pots up up 9T 0 up 1/0:2320 voip up up 2... 0 syst ipv4:192.168.1.121 voip up up 2... 1 syst ipv4:192.168.1.2

• Displays a summary of all dial peers

Destination Pattern Preference

Voice PortSession Target

Administrative and Operational State

Page 80: Gateway Deployments

© 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-80

Verifying PSTN Dial Plans (Cont.)

debug isdn q931router#

• Debugs ISDN Layer 3 information, which includes DNIS and ANI information

debug voip dialpeerrouter#

• Debugs dial-peer matching

debug voice translation router#

• Debugs voice-translation-rule operation

Page 81: Gateway Deployments

© 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-81

Summary

• Interworking with the PSTN requires appropriate call routing and digit manipulation.

• Digit manipulation based on a TON and numbering plan is required for ISDN networks.

• Voice translation profiles are powerful tools for digit manipulation but sometimes can be replaced by more simple mechanisms.

• Voice translation profiles consist of voice translation rules that use regular expressions for match and replace.

• Voice translation profiles can be used to work around issues with the dialplan-pattern command.

• Voice translation rules are configured to be used within voice translation profiles.

Page 82: Gateway Deployments

© 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-82

Summary (Cont.)

• Call routing and path selection are configured using dial peers.

• Configuring a PSTN dial plan includes configuration of digit manipulation, inbound dial peers, inbound dial-peer matching and outbound dial-peer matching.

• Verify correct dial-peer matching and digit manipulation using show and debug commands.

Page 83: Gateway Deployments

© 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-83