Gateway Deployments Implementing H.323 Gateways © 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-1 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 © 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-2 H.323 Call Flow H.323 Gateway PSTN Setup Call Proceeding Alerting Signaling Connect RTP Stream Release Complete © 2006 Cisco Systems, Inc. All rights reserved. Bearer or Media Signaling BSCI v3.0—6-3 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. © 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-4 Example: Regional Requirements Calling party: 43917216111 Type: international 1 Calling Mel in the United States. I’ve got an external call. To call back, I need to dial 901143917216111. 4 2 © 2006 Cisco Systems, Inc. All rights reserved. Madrid 5 I’ve got an external call. To call back, I need to dial 00043917216111. U.S. Gateway Translate calling and route to destination. Mel Calling Max in Germany. Germany Gateway 3 Translate calling and route to destination. 6 Max BSCI v3.0—6-5 7 H.323 Commands (Cont.) Configuring a router interface as a gateway: router(config-if)# h323-gateway voip bind srcaddr ip-address • Sets the IP address that is used as H.323 signaling source © 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-6 H.323 Commands (Cont.) Configuring a DTMF relay: router(config-dial-peer)# dtmf-relay • Specifies how DTMF tones are forwarded router(config-dial-peer)# rtp payload-type type • Identifies the payload type of an RTP packet © 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-7 H.323 Commands (Cont.) Configuring voice classes router(config)# voice class codec tag • Enters voice class codec configuration mode and assigns an identification tag router(config)# voice class type • Enters voice class configuration mode for special voice classes like H.323 and assigns an identification tag © 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-8 H.323 Commands (Cont.) Configuring codecs router(config-class)# codec preference codec-type [bytes payload-size] • Adds a codec to the class and defines its preference router(config-dial-peer)# codec codec • Specifies the single codec used router(config-dial-peer)# voice-class type tag • Specifies the voice class parameters voice class to be used © 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-9 H.323 Commands (Cont.) Tuning H.323 timers: router(conf-voi-serv)# h225 timeout setup seconds • Defines the H.323 setup timeout value router(config-class)# h225 timeout tcp establish seconds • Defines the H.323 TCP establish timeout value router(conf-voi-serv)# h225 timeout tcp call-idle value minutes • Defines the H.323 TCP call-idle timeout value © 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-10 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. © 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-11 Integrating H.323 Gateways with Cisco Unified CallManager: Enable H.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 PSTN Router1 H.323 Phone1-1 2001 Phone1-2 2002 © 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-12 Integrating H.323 Gateways with Cisco Unified CallManager: Define the POTS Dial Peer dial-peer voice 9 pots destination-pattern 9T incoming called-number 2... direct-inward-dial port 1/0:23 PSTN Router1 H.323 Phone1-1 2001 Phone1-2 2002 © 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-13 Integrating H.323 Gateways with Cisco Unified CallManager: Add the First VoIP Dial Peer 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 PSTN Router1 H.323 Phone1-1 2001 Phone1-2 2002 © 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-14 Integrating H.323 Gateways with Cisco Unified CallManager: Add the Second VoIP Dial Peer 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 PSTN Router1 H.323 Phone1-1 2001 Phone1-2 2002 © 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-15 Integrating H.323 Gateways with Cisco Unified CallManager: Add the Gateway PSTN Router1 H.323 Phone1-1 2001 Phone1-2 2002 © 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-16 Integrating H.323 Gateways with Cisco Unified CallManager: Configure Parameters PSTN Router1 H.323 Phone1-1 2001 Phone1-2 2002 © 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-17 Integrating H.323 Gateways with Cisco Unified CallManager: Define the Route Pattern PSTN Router1 H.323 Phone1-1 2001 Phone1-2 2002 © 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-18 Verifying an H.323 Integration with Cisco Unified CallManager Dial-peer show and debug commands: router# show dial-peer voice tag • Displays detailed information about the specified dial peer router# show dial-peer voice summary • Displays a summary of all active dial peers router# debug voip dialpeer • Displays default debug output for all active VoIP dial peers © 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-19 Verifying an H.323 Integration with Cisco Unified CallManager (Cont.) H.323 debug commands: router# debug h225 asn1 • Displays ASN.1 content of H.225 messages on the router router# debug h225 q931 • Displays H.225 Q931 information element details router# debug h245 events • Displays H.245 events on the router © 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-20 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. © 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-21 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. © 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-22 © 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-23 Gateway Deployments Implementing MGCP Gateways © 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-24 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 © 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-25 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. © 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-26 MGCP Call Flow MGCP Gateway PSTN RQNT RQNT Response NTFY CRCX Signaling CRCX Response MDCX MDCX Response RTP Stream Bearer or Media NTFY DLCX Signaling DLCX Response © 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-27 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 © 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-28 Why MGCP? (Cont.) H.323 versus MGCP gateways: H.323 Pros Dial plan directly on the gateway Centralized dial-plan configuration Translations defined per gateway Centralized gateway configuration Regional requirements can be met Simple gateway configuration More specific call routing Support of QSIG supplementary services Extra SRST-related call routing configuration Advanced fax support Cons MGCP Complex configuration © 2006 Cisco Systems, Inc. All rights reserved. Easy implementation BSCI v3.0—6-29 MGCP Configuration Considerations The MGCP gateway downloads the configuration from the Cisco Unified CallManager TFTP server. Cisco Unified CallManager Administration Configuration is done via the web-based Cisco Unified CallManager Administration page. TFTP Server on Cisco Unified CallManager MGCP Gateway © 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-30 Basic MGCP Configuration Configuring The MGCP configuration server: Router(config)# ccm-manager config server ip-address • Identifies the server from which the MGCP configuration should be downloaded router(config)# ccm-manager config • Enables the MGCP configuration download from the configured server © 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-31 Basic MGCP Configuration (Cont.) ccm-manager config server 192.168.1.1 ccm-manager config ccm-manager mgcp ccm-manager music-on-hold ccm-manager config server 192.168.1.1 Manually ccm-manager config configured ! mgcp mgcp call-agent 192.168.1.1 2427 service-type mgcp version 0.1 mgcp dtmf-relay voip codec all mode out-of-band mgcp rtp unreachable timeout 1000 action notify mgcp modem passthrough voip mode nse mgcp package-capability rtp-package no mgcp package-capability res-package mgcp package-capability sst-package no mgcp package-capability fxr-package Configuration mgcp package-capability pre-package after TFTP no mgcp timer receive-rtcp download mgcp sdp simple mgcp rtp payload-type g726r16 static ! mgcp profile default © 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-32 MGCP Commands Enable MGCP and define the MGCP call agent: Router(config)# mgcp • Enables the MGCP protocol router(config)# mgcp call-agent ip-address • Specifies the primary Cisco Unified CallManager router(config)# ccm-manager mgcp • Enables the MGCP gateway to support Cisco Unified CallManager © 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-33 MGCP Commands (Cont.) Configuring MGCP redundancy: Router(config)# ccm-manager redundant-host ip-address • Identifies up to two backup Cisco Unified CallManager servers router(config)# ccm-manager switchback mode • Configures switchback mode for returning control to the primary Cisco Unified CallManager router(config)# ccm-manager fallback-mgcp • Enables the MGCP fallback feature © 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-34 MGCP Commands (Cont.) Configuring MOH and DTMF: Router(config)# ccm-manager music-on-hold • Enables music-on-hold router(config)# ccm-manager music-on-hold bind interface • Binds the multicast MOH feature to a designated interface Router(config)# mgcp dtmf-relay voip codec {all | low-bit-rate} mode {cisco | nse | out-of-band} • Defines DTMF relay parameters © 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-35 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. © 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-36 Integrating MGCP Gateways with Cisco Unified CallManager: Add the Gateway PSTN Router1 MGCP Phone1-1 2001 Phone1-2 2002 © 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-37 Integrating MGCP Gateways with Cisco Unified CallManager: Configure the Device PSTN Router1 MGCP Phone1-1 2001 Phone1-2 2002 © 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-38 Integrating MGCP Gateways with Cisco Unified CallManager: Configure the Port PSTN Router1 MGCP Phone1-1 2001 Phone1-2 2002 © 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-39 Integrating MGCP Gateways with Cisco Unified CallManager: Define the Route Pattern PSTN Router1 MGCP Phone1-1 2001 Phone1-2 2002 © 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-40 Integrating MGCP Gateways with Cisco Unified CallManager: Enable MGCP ccm-manager config server 10.1.1.1 ccm-manager config PSTN Router1 MGCP Phone1-1 2001 Phone1-2 2002 © 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-41 Verifying an MGCP Integration with Cisco Unified CallManager MGCP show commands: Router# show mgcp • Displays the MGCP settings on the gateway router# show ccm-manager • Displays the Cisco Unified CallManager failover options router# show ccm-manager fallback-mgcp • Displays whether MGCP fallback is enabled and whether it is active or not (on or off) © 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-42 Verifying an MGCP Integration with Cisco Unified CallManager (Cont.) MGCP show commands (Cont.): Router# show mgcp endpoint • Displays endpoints controlled by MGCP router# show isdn status • Displays information about the status of ISDN Layers 1 to 3 © 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-43 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. © 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-44 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. © 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-45 © 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-46 Dial Plans on Cisco IOS Gateways Implementing Dial Plans © 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-47 PSTN Dial Plan Requirements PSTN Requirements Inbound call routing Dial Plan Components • 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 © 2006 Cisco Systems, Inc. All rights reserved. • Digit manipulation to transform ANI to meet PSTN requirements BSCI v3.0—6-48 Inbound PSTN Calls 4 3 H.323 call setup: DNIS 2001 Gateway modifies DNIS to 2001 and routes to CallManager. 5 Phone1-1 rings. PSTN H.323 Gateway DID 4085552XXX 13125556666 Call setup from PSTN: DNIS 4085552001 Phone1-1 2001 © 2006 Cisco Systems, Inc. All rights reserved. Phone1-2 2002 User dials 14085552001. 1 2 BSCI v3.0—6-49 Outbound PSTN Calls 2 H.323 call setup: DNIS 913125556666 ANI 2001 3 Gateway modifies DNIS and ANI. 1 User dials 913125556666. PSTN H.323 Gateway DID: 4085552XXX Call setup: DNIS 13125556666 ANI´4085552001 Phone1-1 2001 © 2006 Cisco Systems, Inc. All rights reserved. Phone1-2 2002 3125556666 PSTN phone rings. 5 4 BSCI v3.0—6-50 ISDN Dial Plan Requirements ISDN Requirements Correct PSTN inbound ANI presentation depending on TON Correct ISDN numbering plan and TON presentation © 2006 Cisco Systems, Inc. All rights reserved. Dial Plan Components Digit manipulation to transform inbound PSTN ANI according to TON Manipulate ISDN numbering plan or TON to meet PSTN/PBX requirements BSCI v3.0—6-51 Inbound ISDN Calls San Jose DID range: 4085552XXX 4 3 H.323 call setup: ANI 913125556666 Gateway prepends 91 to ANI due to TON. CM 192.168.1.1 5 Phone1-1 rings. ANI 913125556666 PSTN H.323 Gateway Phone1-1 2001 © 2006 Cisco Systems, Inc. All rights reserved. Phone1-2 2002 13125556666 Call setup from PSTN: ANI 3125556666 TON National User dials 14085552001. 1 2 BSCI v3.0—6-52 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 © 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-53 Digit Manipulation (Cont.) POTS 1. 2. 3. 4. 5. Inbound voice port digit manipulation Global number expansion Match inbound dial peer Voice translation profile CLID VoIP 1. 2. 3. 4. 5. VoIP Inbound dial peer match Global voice translation profiles Global number expansion Match inbound dial peer CLID Voice translation profile © 2006 Cisco Systems, Inc. All rights reserved. 1. 2. 3. Match outbound dial peer Voice translation profile CLID Outbound dial peer match 1. 2. 3. 4. 5. 6. POTS Match outbound dial peer Voice translation profile Digit strip Prefix Forward digits CLID BSCI v3.0—6-54 Simple Digit Manipulation for POTS Dial Peers dial-peer voice 9 pots destination 9T User dials 913125556666. PSTN Phone1-1 2001 H.323 Gateway DID: 4085552XXX 13125556666 Command DNIS no digit-strip 913125556666 digit-strip (default) 13125556666 forward-digits 4 6666 prefix 9 and digit-strip 913125556666 © 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-55 Digit Manipulation with Number Expansion num-exp 6666 913125556666 dial-peer voice 9 pots destination 9T PSTN Phone1-1 2001 1 H.323 Gateway DID: 4085552XXX 2 User dials 6666. © 2006 Cisco Systems, Inc. All rights reserved. Number is inflated to 91312555666 and routed to PSTN. 13125556666 3 Phone rings. BSCI v3.0—6-56 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 © 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-57 Voice Translation Rules and Profiles (Cont.) Profile Called Dial Peer Rule Voice Port VoIP Incoming Incoming Source IP Group Calling Rule 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Outgoing Trunk Group NFAS SRST © 2006 Cisco Systems, Inc. All rights reserved. Redirected Called Rule BSCI v3.0—6-58 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. © 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-59 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 © 2006 Cisco Systems, Inc. All rights reserved. 913125552001 type national BSCI v3.0—6-60 Voice Translation Rule Search-and-Replace Examples (Cont.) Translation Rule: /\(9\)\([^10].*\)/ /\11408\2/ Replace Search / \(9\) \([^10].*\) / / \1 Input 9 5551234 © 2006 Cisco Systems, Inc. All rights reserved. 1408 \2 / Output 9 1408 5551234 BSCI v3.0—6-61 Voice Translation Profile Example: Search and Replace PSTN-IN Called Calling Redirected Called © 2006 Cisco Systems, Inc. All rights reserved. Rule 1 Rule 2 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 international voice translation-profile pstn-in translate called 1 translate calling 2 BSCI v3.0—6-62 Cisco Unified CallManager Express with Voice Translation Profiles Replaces the dial plan pattern and covers inbound and outbound routing of any dial peers. voice translation-rule 1 rule 1 /^4085552/ /2/ voice translation-profile pstn-in translate called 1 voice-port 0/0/0:23 translation-profile incoming pstn-in dial-peer voice 2001 pots port 1/0/0 destination-pattern 2001 PSTN CME FXS Phone1-1 DID: 4085552XXX 2001 3 2 Phone rings. © 2006 Cisco Systems, Inc. All rights reserved. Profile modifies DNIS to 2001. 13125556666 1 User dials 14085552001. BSCI v3.0—6-63 Digit Manipulation Commands router(config-dial-peer)# digit-strip • Enables stripping of matched digits (default) router(config-dial-peer)# prefix digits • Prefixes the specified digits after the pattern has matched router(config-dial-peer)# forward-digits [0-32]|all|extra • Specifies how many digits to forward, right-justified © 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-64 Digit Manipulation Commands (Cont.) router(config)# num-exp dialed-digits substitution • Matches on dialed digits and replaces them (wildcards allowed) router(config)# voice translation-rule rule-tag • Creates or modifies a voice translation rule with the specified numeric tag router(cfg-translation-rule)# rule precedence /match/ /replace/ [type {match-type replace-type} [plan {match-plan replace-plan}]] • Creates a match-and-replace rule © 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-65 Digit Manipulation Commands (Cont.) router(config)# voice translation-profile profile-name • Creates or modifies a voice translation profile with the specified name router(cfg-translation-profile)# translate {called | calling | redirect-called} translation-rule-number • Binds a translation rule to a profile © 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-66 Digit Manipulation Commands (Cont.) router(dial-peer)# translation-profile {incoming | outgoing} name • Binds a translation profile to a dial peer router# test voice translation-rule number input-test-string [type match-type [plan match-plan] ] • Tests a translation rule with a user-defined test string © 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-67 Call Routing and Path Selection Commands router(config-dial-peer)# destination-pattern [+]string[T] • Defines the destination pattern of a dial peer that will be used during outbound dial-peer matching router(config-dial-peer)# incoming called-number [+]string[T] • Specifies the incoming called number that will be used during inbound dial-peer matching router(config-dial-peer)# answer-address [+]string[T] • Specifies the incoming calling number will be used during inbound dial-peer matching © 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-68 Call Routing and Path Selection Commands (Cont.) router(config-dial-peer)# direct-inward-dial • Uses the inbound POTS DNIS to match the outbound dial peer (usually required for any DID PSTN trunk) router(config-dial-peer)# preference [0-9] • Specifies the preference of a dial peer; lower number = high priority default=0 router(config)# no dial-peer outbound status-check pots • 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 © 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-69 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. © 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-70 PSTN Dial Plan Scenario 3125556666 San Jose Users should be able to reach the other site via an extension. PSTN CM1: 192.168.1.1 CM2: 192.168.1.2 Phone1-1 2001 DID: 408555XXXX DID: 312555XXXX Router1 H.323 Router3 CME Phone1-2 2002 © 2006 Cisco Systems, Inc. All rights reserved. Chicago IP WAN Phone2-1 3001 Phone2-2 3002 BSCI v3.0—6-71 Step 1: Configure Digit Manipulation for Inbound Calls Router1 H.323 Router3 CME 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 international voice translation-profile pstn-in translate called 1 translate calling 2 voice-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 international voice translation-profile pstn-in translate called 1 translate calling 2 voice-port 0/0/0:23 translation-profile incoming pstn-in © 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-72 Step 2: Define Dial Peers Router1 H.323 dial-peer voice 9 pots destination-pattern 9T direct-inward-dial port 0/0/0:23 dial-peer voice 20 voip destination-pattern 2... session-target ipv4:192.168.1.1 codec g711ulaw dial-peer voice 21 voip preference 1 destination-pattern 2... session-target ipv4:192.168.1.2 codec g711ulaw © 2006 Cisco Systems, Inc. All rights reserved. Router3 CME dial-peer voice 9 pots destination-pattern 9T direct-inward-dial port 0/0/0:23 BSCI v3.0—6-73 Step 3: Configure Inbound Dial-Peer Matching Router1 H.323 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 dial-peer voice 21 voip answer-address 2... preference 1 destination-patter 2... session-target ipv4:192.168.1.2 codec g711ulaw © 2006 Cisco Systems, Inc. All rights reserved. Router3 CME dial-peer voice 9 pots destination-pattern 9T incoming called-number 3... direct-inward-dial port 0/0/0:23 BSCI v3.0—6-74 Step 4: Configure Digit Manipulation for Outbound Calls Router1 H.323 voice translation-rule 3 rule 1 /^2/ /4085552/ voice translation-profile pstn-out translate calling 3 voice-port 0/0/0:23 translation-profile outgoing pstnout © 2006 Cisco Systems, Inc. All rights reserved. Router3 CME voice translation-rule 3 rule 1 /^3/ /3125553/ voice translation-profile pstn-out translate calling 3 voice-port 0/0/0:23 translation-profile outgoing pstnout BSCI v3.0—6-75 Step 5: Configure Digit Manipulation for Intersite Calls Router1 H.323 num-exp 3... 913125553... © 2006 Cisco Systems, Inc. All rights reserved. Router3 CME num-exp 2... 914085552... BSCI v3.0—6-76 Inbound PSTN Call Flow 3 1 2 PSTN H.323 Gateway DID: 4085552XXX 1 2 3 voice-port 0/0/0:23 translation-profile incoming pstn-in 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 © 2006 Cisco Systems, Inc. All rights reserved. 3125556666 Incoming Outgoing DNIS 4085552001 2001 ANI 3125556666 913125556666 Incoming Outgoing DNIS 2001 2001 ANI 913125556666 913125556666 Incoming Outgoing DNIS 2001 2001 ANI 913125556666 913125556666 BSCI v3.0—6-77 Outbound PSTN Call Flow 1 3 2 PSTN H.323 Gateway DID: 4085552XXX 1 2 3 dial-peer voice 20 voip answer-address 2... destination-patter 2... session-target ipv4:192.168.1.1 codec g711ulaw 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 outgoing pstn-out © 2006 Cisco Systems, Inc. All rights reserved. 3125556666 Incoming Outgoing DNIS 913125556666 913125556666 ANI 2001 2001 Incoming Outgoing DNIS 913125556666 13125556666 ANI 2001 2001 Incoming Outgoing DNIS 13125556666 13125556666 ANI 2001 4085552001 BSCI v3.0—6-78 Verifying PSTN Dial Plans router# show dialpeer voice summary • Displays a summary of all dial peers Session Target Router1#show dial-peer voice summary dial-peer hunt 0 AD TAG TYPE MIN OPER PREFIX DEST-PATTERN 9 pots up up 9T 20 voip up up 2... 21 voip up up 2... Administrative and Operational State © 2006 Cisco Systems, Inc. All rights reserved. Destination Pattern PRE FER 0 0 1 Voice Port PASS THRU SESS-TARGET OUT STAT PORT up 1/0:23 syst ipv4:192.168.1.1 syst ipv4:192.168.1.2 Preference BSCI v3.0—6-79 Verifying PSTN Dial Plans (Cont.) router# debug isdn q931 • Debugs ISDN Layer 3 information, which includes DNIS and ANI information router# debug voip dialpeer • Debugs dial-peer matching router# debug voice translation • Debugs voice-translation-rule operation © 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-80 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. © 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-81 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. © 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-82 © 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.0—6-83