Curso de Telefonía IP para el MTC. Sesión 5-1 Implementación de Gateways SIP. Mg. Antonio Ocampo Zúñiga



Similar documents
Cisco IOS SIP Configuration Guide

Let's take a look at another example, which is based on the following diagram:

Configuring Network Side ISDN PRI Signaling, Trunking, and Switching

Call Setup and Digit Manipulation

Cisco ISDN PRI to SIP Gateway

Voice Dial Plans, Configuring Voice Interfaces and Dial Peers

Cisco CME SIP Trunk Configuration

Cisco Voice over IP

Session Initiation Protocol (SIP) The Emerging System in IP Telephony

NAT TCP SIP ALG Support

Session Initiation Protocol

NTP VoIP Platform: A SIP VoIP Platform and Its Services

SIP Trunking Manual Technical Support Web Site: (registration is required)

Dial Peer. Example: Dial-Peer Configuration

Application Notes for Configuring SIP Trunking between McLeodUSA SIP Trunking Solution and an Avaya IP Office Telephony Solution 1.

TECHNICAL SUPPORT NOTE. 3-Way Call Conferencing with Broadsoft - TA900 Series

How To Understand The Purpose Of A Sip Aware Firewall/Alg (Sip) With An Alg (Sip) And An Algen (S Ip) (Alg) (Siph) (Network) (Ip) (Lib

Cisco Voice Gateways. PacNOG6 VoIP Workshop Nadi, Fiji. November Jonny Martin - jonny@jonnynet.net

Media Gateway Controller RTP

SIP Basics. CSG VoIP Workshop. Dennis Baron January 5, Dennis Baron, January 5, 2005 Page 1. np119

Session Initiation Protocol (SIP) 陳 懷 恩 博 士 助 理 教 授 兼 計 算 機 中 心 資 訊 網 路 組 組 長 國 立 宜 蘭 大 學 資 工 系 TEL: # 340

Formación en Tecnologías Avanzadas

IP Office Technical Tip

Voice over IP (SIP) Milan Milinković

AT&T IP Flex Reach/ IP Toll Free Configuration Guide IC 3.0 with Interaction SIP Proxy

nexvortex Setup Guide

VoIP Gateway/IP-PBX Interworking with Skype

Curso de Telefonía IP para el MTC. Sesión 4-1 Tipos de llamadas. Mg. Antonio Ocampo Zúñiga

SIP Essentials Training

Building a Scalable Numbering Plan

Three-Way Calling using the Conferencing-URI

1 SIP Carriers Warnings Vendor Contact Vendor Web Site : Versions Verified SIP Carrier status as of 9/11/2011

Curso de Telefonía IP para el MTC. Sesión 1 Introducción. Mg. Antonio Ocampo Zúñiga

Q&A. DEMO Version

Configuring SIP Trunking and Networking for the NetVanta 7000 Series

IP Office 4.2 SIP Trunking Configuration Guide AT&T Flexible Reach and AT&T Flexible Reach with Business in a Box (SM)

SIP Trunking Service Configuration Guide for Time Warner Cable Business Class

Avaya IP Office 8.1 Configuration Guide

SIP Trunking Service Configuration Guide for Skype

SIP Trunking Service Configuration Guide for Broadvox Fusion

Note: As of Feb 25, 2010 Priority Telecom has not completed FXS verification of fax capabilities. This will be updated as soon as verified.

Configuring SIP Support for SRTP

Application Notes for Avaya IP Office 7.0 Integration with Skype Connect R2.0 Issue 1.0

Voice over IP & Other Multimedia Protocols. SIP: Session Initiation Protocol. IETF service vision. Advanced Networking

SIP Trunking Service Configuration Guide for MegaPath

SIP Trunking. Service Guide. Learn More: Call us at

SIP: Protocol Overview

SIP Trunking Service Configuration Guide for PAETEC (Broadsoft Platform)

Session Initiation Protocol (SIP)

Part II. Prof. Ai-Chun Pang Graduate Institute of Networking and Multimedia, Dept. of Comp. Sci. and Info. Engr., National Taiwan University

Avaya IP Office 4.0 Customer Configuration Guide SIP Trunking Configuration For Use with Cbeyond s BeyondVoice with SIPconnect Service

Session Initiation Protocol

TSIN02 - Internetworking

ARCHITECTURES TO SUPPORT PSTN SIP VOIP INTERCONNECTION

SIP Trunking & Peering Operation Guide

IMPLEMENTING CISCO VOICE COMMUNICATIONS AND QOS Volume 1

CVOICE - Cisco Voice Over IP

3.1 SESSION INITIATION PROTOCOL (SIP) OVERVIEW

Configuring VoIP Call Setup Monitoring

Implementing Intercluster Lookup Service

Cisco Networks (ONT) 2006 Cisco Systems, Inc. All rights reserved.

Table of Contents. Cisco Mapping Outbound VoIP Calls to Specific Digital Voice Ports

Mediatrix 3000 with Asterisk June 22, 2011

NTP VoIP Platform: A SIP VoIP Platform and Its Services 1

IP-Telephony SIP & MEGACO

Firewall Support for SIP

Avaya one-x Quick Edition Interoperability with Cisco Integrated Services Router (ISR) SIP Gateway - Issue 1.0

Configuring SIP Registration Proxy on Cisco UBE

Optimizing Converged Cisco Networks (ONT)

IP Telephony v1.0 Scope and Sequence. Cisco Networking Academy Program

Direct Inward Dial Digit Translation Service

internet technologies and standards

Voice over IP Fundamentals

Application Notes for Configuring Intelepeer SIP Trunking with Avaya IP Office Issue 1.0

Cisco Voice over IP CIPT1. Volume 2. Student Guide. Version 6.0. Editorial, Production, and Web Services:

White paper. SIP An introduction

Voice Call Flow Overview

Configuring Interoperability between Avaya IP Office and Avaya Business Communication Manager

EE4607 Session Initiation Protocol

SIP for Voice, Video and Instant Messaging

SIP A Technology Deep Dive

Application Notes for IDT Net2Phone SIP Trunking Service with Avaya IP Office Issue 1.0

Internet Voice, Video and Telepresence Harvard University, CSCI E-139. Lecture #5

SIP: Session Initiation Protocol. Copyright by Elliot Eichen. All rights reserved.

VoIP. What s Voice over IP?

SV9100 SIP Trunking Service Configuration Guide for Time Warner Cable Business Class

VOIP-211RS/210RS/220RS/440S. SIP VoIP Router. User s Guide

Technical Configuration Notes

SIP: Ringing Timer Support for INVITE Client Transaction

Need for Signaling and Call Control

SIP Trunk Configuration Guide. using

Mediatrix 4404 Step by Step Configuration Guide June 22, 2011

Cisco CCA Tool SIP Security methods

SIP PBX TRUNKING WITH SIP-DDI 1.0

VoIP Signaling and Call Control

How to Configure the Avaya IP Office 6.1 for use with Integra Telecom SIP Solutions

For internal circulation of BSNL only

Session Initiation Protocol Gateway Call Flows and Compliance Information

Chapter 10 Session Initiation Protocol. Prof. Yuh-Shyan Chen Department of Computer Science and Information Engineering National Taipei University

Voice Traffic over SIP Trunks

Transcription:

Curso de Telefonía IP para el MTC Sesión 5-1 Implementación de Gateways SIP Mg. Antonio Ocampo Zúñiga

SIP Fundamentals SIP is a simple extensible protocol. SIP is defined in IETF RFC 2543 and RFC 3261. SIP creates, modifies, and terminates multimedia sessions with one or more participants. SIP leverages various standards: RTP, RTCP, HTTP, SDP, DNS, SAP, MGCP, and RTSP.

SIP Fundamentals Handles the transfer and termination of calls SIP performs addressing by E.164, e-mail, or DNS service record. SIP is ASCII text-based for easy implementation and debugging.

SIP Fundamentals (Cont.) SIP provides these capabilities: Determines the location of the target endpoint Determines the media capabilities of the target endpoint Determines the availability of the target endpoint Establishes a session between the originating and target endpoints

How SIP Works ASCII-based protocol User identified by a unique SIP address sip:userid@gateway.com Users register with registrar server using their assigned SIP addresses When user initiates a call, a SIP request is sent to a SIP server Location of end user can be dynamically registered with the SIP server

Why SIP Advantages of SIP gateways: Dial-plan configuration directly on the gateway Translations defined per gateway Advanced support for third-party telephony system integration Interoperability with third-party voice gateways Support of third-party end devices (SIP phones)

SIP Architecture SIP Proxy, Registrar, Location, and Redirect Servers SIP SIP User Agents (UAs) SIP RTP SIP SIP Gateway PSTN T1 or PRI Legacy PBX

SIP Call Flow SIP Proxy Server SIP Gateway PSTN Invite (SDP) 100 Trying 180 Ringing 200 OK ACK Invite (SDP) 100 Trying 180 Ringing 200 OK ACK Signaling RTP Stream BYE 200 OK Bearer or Media Signaling

Direct Call Setup SIP Gateway SIP Gateway IP Calling Party Invite (SDP) 100 Trying 180 Ringing 200 OK Called Party SIP Signaling and SDP (UDP or TCP) ACK RTP Stream BYE 200 OK Bearer or Media (UDP) Signaling

Call Setup Using a Proxy Server SIP Gateway Proxy Server SIP Gateway IP Calling Party Invite (SDP) Invite (SDP) Called Party SIP Signaling and SDP (UDP or TCP) 100 Trying 180 Ringing 200 OK 100 Trying 180 Ringing 200 OK ACK ACK Bearer or Media (UDP) BYE RTP Stream BYE 200 OK 200 OK

Call Setup Using a Redirect Server SIP Gateway Redirect Server SIP Gateway IP Calling Party Invite Moved Called Party SIP Signaling and SDP (UDP or TCP) Invite Trying Ringing OK ACK Bearer or Media (UDP) RTP Stream BYE 200 OK

SIP Addresses Fully qualified domain names sip:jdoe@pucp.edu.pe E.164 addresses sip:14085551234@gateway.com; user=phone Mixed addresses sip:14085551234; password=changeme@10.1.1.1 sip:jdoe@10.1.1.1

Address Registration Registrar Server Redirect Server Location Database SIP Proxy (UAS) Register Here I am! SIP UACs SIP UACs SIP Gateway

Address Resolution Registrar Server Redirect Server Location Database Where is the name or phone number? SIP Proxy

Configuring a SIP Gateway Enable SIP voice services Configure SIP service Transport Bind interface Configure SIP User Agent (UA) Timers Authentication SIP servers

Configuring a SIP Gateway Configure dial-peer SIP parameters Session protocol Session target DTMF relay

Integrating Gateways with a SIP ITSP Sip2.pucp.edu.pe Configure Gateway to connect to a SIP service provider network and route external calls via that connection. SIP ITSP SIP Gateway router(config)# voice service voip router(conf-voi-serv)# sip router(conf-serv-sip)# session transport udp router(conf-serv-sip)# bind control source-interface Loopback 0 router(conf-serv-sip)# bind media source-interface Loopback 0

Integrating Gateways with a SIP ITSP (Cont.) Sip2.pucp.edu.pe SIP ITSP SIP Gateway router(config)# sip-ua router(config-sip-ua)# authentication username JDoe password secret router(config-sip-ua)# registrar dns:sip2.pucp.edu.pe expires 3600 router(config-sip-ua)# sip-server dns:sip2.pucp.edu.pe router(config-sip-ua)# retry invite 2 router(config-sip-ua)# retry response 2 router(config-sip-ua)# retry bye 2 router(config-sip-ua)# retry cancel 2

Integrating Gateways with a SIP ITSP (Cont.) Sip2.pucp.edu.pe Gateway 10.1.1.15 SIP Gateway 192.168.1.100 Ext.: 2 SIP ITSP router(config)# dial-peer voice 2000 voip router(config-dial-peer)# destination-pattern 2... router(config-dial-peer)# session protocol sipv2 router(config-dial-peer)# session target sip-server router(config-dial-peer)# dtmf-relay rtp-nte router(config)# dial-peer voice 2001 voip router(config-dial-peer)# destination-pattern 2... router(config-dial-peer)# session protocol sipv2 router(config-dial-peer)# session target ipv4:10.1.1.15 router(config-dial-peer)# dtmf-relay sip-notify router(config-dial-peer)# preference 1 router(config)# dial-peer voice 90 voip router(config-dial-peer)# destination-pattern 9T router(config-dial-peer)# session target ipv4:192.168.1.100 router(config-dial-peer)# session protocol sipv2 router(config-dial-peer)# dtmf-relay rtp-nte

Verifying SIP Gateways Command show sip-ua service show sip-ua status show sip-ua register status show sip-ua timers show sip-ua connections show sip-ua calls show sip-ua statistics Description Displays the status of the SIP VoIP service. Displays the status of the SIP UA. Displays the status of E.164 numbers that a SIP gateway has registered with an external primary SIP registrar. Displays SIP UA timers. Displays active SIP UA connections. Displays active SIP UA calls. Displays SIP traffic statistics.

Verifying SIP Gateways (Cont.) Router# show sip service SIP Service is up Router# show sip-ua status SIP User Agent Status SIP User Agent for UDP : ENABLED SIP User Agent for TCP : ENABLED SIP User Agent bind status(signaling): DISABLED SIP User Agent bind status(media): DISABLED SIP max-forwards : 6 SIP DNS SRV version: 1 (rfc 2052) Redirection (3xx) message handling: ENABLED Router# show sip-ua timers SIP UA Timer Values (millisecs) trying 500, expires 180000, connect 500, disconnect 500 comet 500, prack 500, rel1xx 500, notify 500 refer 500, register 500

Verifying SIP Gateways (Cont.) Router# show sip-ua register status Line peer expires(sec) registered 4001 20001 596 no 4002 20002 596 no 5100 1 596 no 9998 2 596 no

Verifying SIP Gateways (Cont.) router# show sip-ua calls SIP UAC CALL INFO Number of SIP User Agent Client(UAC) calls: 0 SIP UAS CALL INFO Call 1 SIP Call ID : D215F304-7B5A11DC-8005EA1A- 6A8F4AD@10.10.10.2 State of the call : STATE_ACTIVE (7) Substate of the call : SUBSTATE_NONE (0) Calling Number : 2818902001 Called Number : 1003 Bit Flags : 0x1212003A 0x100000 0x488 CC Call ID : 1 Source IP Address (Sig ): 10.10.10.1 Destn SIP Req Addr:Port : 10.10.10.2:5060 Destn SIP Resp Addr:Port: 10.10.10.2:56884 Destination Name : 10.10.10.2..

Verifying SIP Gateways (Cont.).. Number of Media Streams : 1 Number of Active Streams: 1 RTP Fork Object : 0x0 Media Stream 1 State of the stream : STREAM_ACTIVE Stream Call ID : 1 Stream Type : voice-only (0) Negotiated Codec : g729r8 (20 bytes) Codec Payload Type : 18 Negotiated Dtmf-relay : inband-voice Dtmf-relay Payload Type : 0 Media Source IP Addr:Port: 10.10.10.1:18050 Media Dest IP Addr:Port : 10.10.10.2:16522 Orig Media Dest IP Addr:Port : 0.0.0.0:0 Number of SIP User Agent Server(UAS) calls: 1

Debug Commands Command debug asnl events debug voip ccapi inout debug voip ccapi protoheaders debug ccsip Description Verifies that the SIP subscription server is up. Shows every interaction with the call control API. Displays messages sent between the originating and terminating gateways. For general SIP debugging; for example views direction-attribute settings and port and network address-translation traces.

Debug Commands (Cont.) HQ-1# debug ccsip messages SIP Call messages tracing is enabled HQ-1# *Mar 6 14:19:14: Sent: INVITE sip:3660210@166.34.245.231;user=phone;phone-context=unknown SIP/2.0 Via: SIP/2.0/UDP 166.34.245.230:55820 From: "3660110" <sip:3660110@166.34.245.230> To: <sip:3660210@166.34.245.231;user=phone;phone-context=unknown> Date: Sat, 06 Mar 1993 19:19:14 GMT Call-ID: ABBAE7AF-823100E2-0-1CD274BC@172.18.192.194 Cisco-Guid: 2881152943-2184249568-0-483551624 User-Agent: Cisco VoIP Gateway/ IOS 12.x/ SIP enabled CSeq: 101 INVITE Max-Forwards: 6 Timestamp: 731427554 Contact: <sip:3660110@166.34.245.230:5060;user=phone> Expires: 180 Content-Type: application/sdp Content-Length: 138

Debug Commands (Cont.) *Mar 6 14:19:16: Received: SIP/2.0 200 OK Via: SIP/2.0/UDP 166.34.245.230:55820 From: "3660110" <sip:3660110@166.34.245.230> To: <sip:3660210@166.34.245.231;user=phone;phonecontext=unknown>;tag=27dbc6d8-1357 Date: Mon, 08 Mar 1993 22:45:12 GMT Call-ID: ABBAE7AF-823100E2-0-1CD274BC@172.18.192.194 Timestamp: 731427554 Server: Cisco VoIP Gateway/ IOS 12.x/ SIP enabled Contact: <sip:3660210@166.34.245.231:5060;user=phone> CSeq: 101 INVITE Content-Type: application/sdp Content-Length: 138 v=0 o=ciscosystemssip-gw-useragent 1193 7927 IN IP4 166.34.245.231 s=sip Call t=0 0 c=in IP4 166.34.245.231 m=audio 20224 RTP/AVP 0

Debug Commands (Cont.) *Mar 6 14:19:19: Received: BYE sip:3660110@166.34.245.230:5060;user=phone SIP/2.0 Via: SIP/2.0/UDP 166.34.245.231:53600 From: <sip:3660210@166.34.245.231;user=phone;phonecontext=unknown>;tag=27dbc6d8-1357 To: "3660110" <sip:3660110@166.34.245.230> Date: Mon, 08 Mar 1993 22:45:14 GMT Call-ID: ABBAE7AF-823100E2-0-1CD274BC@172.18.192.194 User-Agent: Cisco VoIP Gateway/ IOS 12.x/ SIP enabled Max-Forwards: 6 Timestamp: 731612717 CSeq: 101 BYE Content-Length: 0

Summary SIP is defined by IETF RFC 2543 and RFC 3261 and allows easy integration with thirdparty VoIP networks. There are five advantages to using SIP gateways as voice gateways. SIP is modeled on the interworking of UAs and network servers. A SIP call flow consists of signaling and transmitting bearer and media packets.

Summary (Cont.) A SIP address consists of an optional user ID, a host description, and optional parameters to qualify the address more precisely. SIP call-setup models include direct, proxy server, and redirection.

Curso de Telefonía IP para el MTC Sesión 5-2 Planes de marcación Mg. Antonio Ocampo Zúñiga

Defining Dial Plans A dial plan defines how calls are interconnected: Endpoint addressing: Internal destination accessibility can be provided by assigning directory numbers to all endpoints. Call routing and path selection: Different paths can be selected to reach the same destination. Digit manipulation: Digits can be manipulated prior to or after a routing decision has been made.

Defining Dial Plans Calling privileges: Different groups of devices can be assigned to different classes of service, by granting or denying access to certain destinations or resources. Call coverage: Special groups of devices can be created to handle incoming calls for a certain service according to different rules, avoiding dropped calls.

Defining Dial Plans (Cont.) Dial Plan Component Gateway Communications Manager Endpoint addressing Call routing and path selection Digit manipulation Calling privileges Call coverage POTS* dial peers for FXS ports and ephone-dn Dial peers Voice translation profiles prefix, digit-strip, forward-digits, and num-exp Class of restriction (COR) and COR lists Dial peers, hunt groups, and call applications Directory number Route patterns, route groups, route lists, translation patterns, partitions, and calling search spaces Translation patterns, route patterns, and route lists Partitions, calling search spaces, and FAC*s Line groups, hunt lists, and hunt pilots *POTS = Plain old telephone service *FXS = Foreign Exchange Station *FACs = Forced Authorization Codes

Defining Dial Plans (Cont.) Lima DID: +14085552XXX Trujillo DID: +15125553XXX IP WAN Router1 Router2 Phone1-1 2001 Phone1-2 2002 PSTN Phone2-1 3001 Phone2-2 3002

Endpoint Addressing Directory numbers are assigned to endpoints (e.g., phones) Internal extensions are mapped to inbound PSTN calls Often dependant on range of DID numbers Auto-attendant can be used for non-did numbers

Endpoint Addressing The biggest challenge: creating an endpoint addressing scheme in multisite environments Primarily a Communications Manager issue Gateways simply route the call to the call agent Exception: Gateway routes calls during SRST mode

Call Routing and Path Selection Route the call depending on the dialed number. Select the appropriate path. Handled by dial peers on gateways: Inbound and outbound dial-peer matching determines the routing. Complexity depends on design.

Digit Manipulation Digit manipulation is closely connected with call routing and path selection. Inbound calls: Called number needs to match internally used patterns. Calling number should be presented as a dialable number. Outbound calls: Called number needs to satisfy internal and PSTN requirements. Calling number needs to be dialable. Special consideration needs to given to emergency calls. Various commands are available for digit manipulation: digit-strip, prefix, forward-digits, num-exp, voice translation-profile, and clid

Calling Privileges Defines the destinations a user is allowed to call Often used to control telephony charges: Blocks costly service numbers Restricts international calls Often called Class of Service in PBX systems Not the same as Layer 2 CoS

Call Coverage Call coverage ensures that all incoming calls are answered: For individuals: Call forwarding if original called phone is not answering For user groups with pilot numbers: Hunt through multiple phones Hunt through multiple user groups

Scalable Dial Plans North American Numbering Plan (NANP) - N X X N X X - X X X X 10-Digit Dial Plan 5 1 2-5 5 5-0 1 0 1 User dials 512-555-0101 Area Code Local Exchange (CO) Subscriber Local PSTN Remote PSTN 512-555-0101 Dial plans contain specific dialing patterns for a user who wants to reach a particular telephone number.

Scalable Dial Plans (Cont.) 703555. 202555. Site E Site F Site A 727555. 10 Digits Centrex IP 10 Digits Site B 4 Digits 813555. Site D 10 Digits 10 Digits 4 Digits Site C 305555. 4 Digits

Attributes of a Scalable Dial Plan Dial plan logic distribution Hierarchical numbering plan summarization Simplicity in provisioning Reduction in postdial delay Availability and fault tolerance Conformance to public standards

PSTN Dial Plan Requirements PSTN Requirements Inbound call routing Outbound call routing Correct ANI presentation 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 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 Digit manipulation to transform ANI to meet PSTN requirements

Inbound PSTN Calls 3 Gateway modifies DNIS to 2001 and routes to voice port. Phone1-1 rings. 4 Gateway DID 4085552XXX 2 PSTN 1 15125556001 Phone1-1 2001 Phone1-2 2002 Call setup from PSTN: DNIS 4085552001 User dials 14085552001.

Outbound PSTN Calls H.323 call setup: DNIS 915125556001 ANI 2001 Gateway modifies DNIS and ANI. 2 1 User dials 915125556001 PSTN Gateway DID: 408555XXXX 3 4 5125556001 Phone1-1 2001 Phone1-2 2002 Q.931 call setup: DNIS 15125556001 ANI 4085552001 PSTN phone rings.

ISDN Dial Plan Requirements ISDN Requirements Dial Plan Components Correct PSTN inbound ANI presentation depending on TON Digit 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 and PBX requirements

4 Inbound ISDN Calls Lima DID range: 4085552XXX H.323 call setup: ANI 915125556001 Gateway prepends 91 to ANI due to TON. 3 Phone1-1 rings. ANI 915125556001 PSTN Gateway 15125556001 Phone 1-1 2001 Phone 2-1 2002 Call setup from PSTN: ANI 5125556001 TON National 2 User dials 14085552001. 1

Configuring PSTN Dial Plans 1. Configure digit manipulation for inbound and outbound PSTN calls. 2. Configure digit manipulation for intersite calls. 3. Configure inbound and outbound dial-peer matching.

PSTN Dial Plan Scenario 5125551002 Lima PSTN Users should be able to reach the other site via an extension. Trujillo DID: 4085552XXX DID: 5125553XXX Router1 Router3 Phone1-1 2001 Phone1-2 2002 IP WAN Phone2-1 3001 Phone2-2 3002

Digit Manipulation for Inbound Calls Lima Trujillo PSTN Router1 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 Router3 voice translation-rule 1 rule 1 /^5125553/ /3/ voice translation-profile pstn-in translate called 1 voice-port 0/0/0:23 translation-profile incoming pstn-in

Digit Manipulation for Outbound Calls Lima Trujillo PSTN Router1 voice translation-rule 2 rule 1 /^2/ /4085552/ voice translation-profile pstn-out translate calling 2 voice-port 0/0/0:23 translation-profile outgoing pstn-out Router3 voice translation-rule 2 rule 1 /^3/ /5125553/ voice translation-profile pstn-out translate calling 2 voice-port 0/0/0:23 translation-profile outgoing pstn-out

Global Digit Manipulation for Intersite Calls Lima Trujillo PSTN Router1 Router3 num-exp 3... 915125553... num-exp 2... 914085552...

Outbound Dial Peer Matching Lima Trujillo PSTN Router1 Router3 dial-peer voice 910 pots destination-pattern 9[2-9]..[2-9]... direct-inward-dial port 0/0/0:23 dial-peer voice 910 pots destination-pattern 9[2-9]..[2-9]... direct-inward-dial port 0/0/0:23

Inbound Dial Peer Matching Lima Trujillo PSTN Router1 Router3 dial-peer voice 910 pots destination-pattern 9[2-9].. [2-9]... incoming called-number 2... direct-inward-dial port 0/0/0:23 dial-peer voice 910 pots destination-pattern 9[2-9].. [2-9]... incoming called-number 3... direct-inward-dial port 0/0/0:23

Inbound PSTN Call Flow 1 2001 0/0/1 DID: 4085552XXX 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 PSTN 5125553002 Incoming Outgoing DNIS 4085552001 2001 ANI 5125553002 95125553002 2 3 dial-peer voice 910 pots destination-pattern 9[2-9]..[2-9]... incoming called-number 2... direct-inward-dial port 0/0/0:23 dial-peer voice 2001 pots destination-pattern 2001 port 0/0/1 Incoming Outgoing DNIS 2001 2001 ANI 95125553002 95125553002 Incoming Outgoing DNIS 2001 2001 ANI 95125553002 95125553002

Outbound PSTN Call Flow 2001 DID: 4085552XXX PSTN 5125553002 1 dial-peer voice 2001 pots destination-pattern 2001 port 0/0/1 Incoming Outgoing DNIS 95125553002 95125553002 ANI 2001 2001 2 3 dial-peer voice 910 pots destination-pattern 9[2-9]..[2-9]... incoming called-number 2... direct-inward-dial port 0/0/0:23 voice translation-rule 2 rule 1 /^2/ /4085552/ voice translation-profile pstn-out translate calling 2 voice-port 0/0/0:23 translation-profile outgoing pstn-out Incoming Outgoing DNIS 95125553002 5125553002 ANI 2001 2001 Incoming Outgoing DNIS 5125553002 5125553002 ANI 2001 4085552001

Verifying PSTN Dial Plans Command show dial-peer voice <number> show dial-peer voice summary show dialplan number dialstring [carrier identifier] [fax huntstop voice] [timeout] Description Displays information for a specific voice dial peer. Displays a short summary of each voice dial peer. Displays which outgoing dial peer is reached when a particular telephone number is dialed.

Verifying PSTN Dial Plans (Cont.) router# show dial-peer voice summary Displays a summary of all dial peers Session Target Voice Port Router1# show dial-peer voice summary dial-peer hunt 0 AD PRE PASS OUT TAG TYPE MIN OPER PREFIX DEST-PATTERN FER THRU SESS-TARGET STAT PORT 9 pots up up 9T 0 up 1/0:23 20 voip up up 2... 0 syst ipv4:192.168.1.1 21 voip up up 2... 1 syst ipv4:192.168.1.2 Administrative and Operational States Destination Pattern Preference

Verifying PSTN Dial Plans (Cont.) router# show dialplan number 1001 VoiceEncapPeer20001 peer type = voice, information type = voice, description = `', tag = 20001, destination-pattern = `1001$', answer-address = `', preference=0, CLID Restriction = None CLID Network Number = `' CLID Second Number sent CLID Override RDNIS = disabled, source carrier-id = `', target carrier-id = `', source trunk-group-label = `', target trunk-group-label = `', numbering Type = `unknown' group = 20001, Admin state is up, Operation state is up, incoming called-number = `', connections/maximum = 0/unlimited, DTMF Relay = disabled, URI classes: Destination = huntstop = enabled, in bound application associated: 'DEFAULT' out bound application associated: '' dnis-map = permission :both incoming COR list:maximum capability outgoing COR list:minimum requirement

Verifying PSTN Dial Plans (Cont.) Translation profile (Incoming): Translation profile (Outgoing): incoming call blocking: translation-profile = `' disconnect-cause = `no-service' advertise 0x40 capacity_update_timer 25 addrfamily 4 oldaddrfamily 4 type = pots, prefix = `', forward-digits 0 session-target = `', voice-port = `50/0/11', direct-inward-dial = disabled, digit_strip = enabled, register E.164 number with H323 GK and/or SIP Registrar = TRUE fax rate = system, payload size = 20 bytes supported-language = '' Time elapsed since last clearing of voice call statistics never Connect Time = 0, Charged Units = 0, Successful Calls = 2, Failed Calls = 0, Incomplete Calls = 0 Accepted Calls = 0, Refused Calls = 0, Last Disconnect Cause is "10 ", ast Disconnect Text is "normal call clearing (16)", Last Setup Time = 436050. Matched: 1001 Digits: 5 Target:

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

debug isdn q931 Router# debug isdn q931 RX <- SETUP pd = 8 callref = 0x06 Bearer Capability i = 0x8890 Channel ID i = 0x89 Calling Party Number i = 0x0083, 81012345678902 TX -> CONNECT pd = 8 callref = 0x86 RX <- CONNECT_ACK pd = 8 callref = 0x06

debug isdn q931 (Cont.) Router# debug isdn q931 TX -> SETUP pd = 8 callref = 0x04 Bearer Capability i = 0x8890 Channel ID i = 0x83 Called Party Number i = 0x80, 4085552001 RX <- CALL_PROC pd = 8 callref = 0x84 Channel ID i = 0x89 RX <- CONNECT pd = 8 callref = 0x84 TX -> CONNECT_ACK pd = 8 callref = 0x04... Success rate is 0 percent (0/5)

debug voip dialpeer *Apr 18 21:07:35.291: //-1/xxxxxxxxxxxx/DPM/MatchNextPeer: Result=Success(0); Incoming Dial-peer=1 Is Matched *Apr 18 21:07:35.291: //- 1/xxxxxxxxxxxx/DPM/dpAssociateIncomingPeerCore: Match Rule=DP_MATCH_INCOMING_DNIS; Called Number=83103 *Apr 18 21:07:35.291: //-1/xxxxxxxxxxxx/DPM/dpMatchPeertype: Is Incoming=TRUE, Number Expansion=FALSE *Apr 18 21:07:35.291: //-1/xxxxxxxxxxxx/DPM/dpMatchCore: Dial String=83103, Expanded String=83103, Calling Number= Timeout=TRUE, Is Incoming=TRUE, Peer Info Type=DIALPEER_INFO_FAX *Apr 18 21:07:35.291: //-1/xxxxxxxxxxxx/DPM/dpMatchCore: Result=-1 *Apr 18 21:07:35.291: //- 1/xxxxxxxxxxxx/DPM/dpAssociateIncomingPeerCore: Match Rule=DP_MATCH_ANSWER; Calling Number=4085550111 *Apr 18 21:07:35.291: //-1/xxxxxxxxxxxx/DPM/dpMatchPeertype: Is Incoming=TRUE, Number Expansion=FALSE

debug voip dialpeer (Cont.) *Apr 18 21:07:35.291: //-1/xxxxxxxxxxxx/DPM/dpMatchCore: Dial String=, Expanded String=, Calling Number=4085550111T Timeout=TRUE, Is Incoming=TRUE, Peer Info Type=DIALPEER_INFO_FAX *Apr 18 21:07:35.291: //-1/xxxxxxxxxxxx/DPM/dpMatchCore: Result=-1 *Apr 18 21:07:35.291: //- 1/xxxxxxxxxxxx/DPM/dpAssociateIncomingPeerCore: Match Rule=DP_MATCH_ORIGINATE; Calling Number=4085550111 *Apr 18 21:07:35.291: //-1/xxxxxxxxxxxx/DPM/dpMatchPeertype: Is Incoming=TRUE, Number Expansion=FALSE *Apr 18 21:07:35.291: //-1/xxxxxxxxxxxx/DPM/dpMatchCore: Dial String=, Expanded String=, Calling Number=4085550111T Timeout=TRUE, Is Incoming=TRUE, Peer Info Type=DIALPEER_INFO_FAX *Apr 18 21:07:35.295: //-1/xxxxxxxxxxxx/DPM/dpMatchCore: Result=-1

debug voice translation Router# debug voice translation 00:51:56:regxrule_get_profile_from_trunkgroup:Voice port 0x64143DA8 does not belong to any trunk group 00:51:56:regxrule_get_profile_from_trunkgroup:Voice port 0x64143DA8 does not belong to any trunk group 00:51:56:regxrule_stack_pop_RegXruleNumInfo:stack=0x63DECAF4; count=1 00:51:56:regxrule_stack_push_RegXruleNumInfo:stack=0x63DECAF4; count=0 This output shows the details of the original number following "regxrule_profile_translate". 00:51:56:regxrule_profile_translate:number=4088880101 type=unknown plan=unknown numbertype=calling Following "regxrule_profile_match", the output shows that rule 1 in the translation rule 1001 was a match and the details of the SED substitution are shown. 00:51:56:regxrule_profile_match:Matched with rule 1 in ruleset 1001 00:51:56:regxrule_profile_match:Matched with rule 1 in ruleset 1001 00:51:56:sed_subst:Successful substitution; pattern=4088880101 matchpattern=^.* replacepattern=5551212 replaced pattern=5551212 00:51:56:regxrule_subst_num_type:Match Type = none, Replace Type = none Input Type = unknown 00:51:56:regxrule_subst_num_plan:Match Plan = none, Replace Plan = none Input Plan = unknown Then the output shows the details of the translated number following "regxrule_profile_translate". 00:51:56:regxrule_profile_translate:xlt_number=5551212 xlt_type=unknown xlt_plan=unknown 00:51:56:regxrule_profile_translate:number= type=unknown plan=unknown

debug voice translation (Cont.) numbertype=redirect-called 00:51:56:regxrule_get_RegXrule:Invalid translation ruleset tag=0 In this example, because there was no called number or redirect number translation that was configured on the translation profile, corresponding errors were generated with a message that no match was found. 00:51:56:regxrule_profile_match:Error:ruleset for redirect-called number not found 00:51:56:regxrule_profile_translate:No match:number= type=unknown plan=unknown 00:51:56:regxrule_profile_translate:number=5108880101 type=unknown plan=unknown numbertype=called 00:51:56:regxrule_get_RegXrule:Invalid translation ruleset tag=0 00:51:56:regxrule_profile_match:Error:ruleset for called number not found 00:51:56:regxrule_profile_translate:No match:number=5108880101 type=unknown plan=unknown 00:51:56:regxrule_stack_push_RegXruleNumInfo:stack=0x63DECAF4; count=1 Following "regxrule_dp_translate", the output indicates that there is no translation profile for outgoing direction, and then it prints the numbers sent to the outgoing service provider interface (SPI). 00:51:56:regxrule_dp_translate:No profile found in peer 5108888 for outgoing direction 00:51:56:regxrule_dp_translate:calling_number=5551212 calling_octet=0x0 called_number=5108880101 called_octet=0x80 redirect_number= redirect_type=4294967295 redirect_plan=4294967295 00:51:56:regxrule_stack_pop_RegXruleNumInfo:stack=0x63DECAF4; count=2 00:51:56:regxrule_stack_push_RegXruleNumInfo:stack=0x63DECAF4; count=1

Summary A dial plan defines how calls are interconnected and routed. Endpoint addressing assigns directory numbers to endpoints. Call routing and path selection define where a call is routed to and usually depends on the called party number. The digit manipulation feature ensures that numbers are presented in the correct format and is closely connected to call routing.

Summary Calling privileges define the destinations a user may dial. Call coverage ensures that incoming calls are not lost. Several factors must be considered when designing a scalable dial plan. Interworking with the PSTN requires appropriate call routing and digit manipulation.

Summary Digit manipulation based on a TON and numbering plan is required for ISDN networks. 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.