Anda di halaman 1dari 31

Planes de Marcado en Gateways Cisco IOS

Implementando Planes de Marcado de


Multiples Sitios en Gateways Cisco

V1.1
2006 Cisco Systems, Inc. All rights reserved. GWGK v2.03-1
Orden de Operaciones para Manipulacin
de Dgitos
POTS VOIP
1. Inbound Voice Port Digit Manipulation
1. Match Outbound Dial Peer
2. Number Expansion
2. CLID
3. Match Inbound Dial Peer
3. Voice Translation Profile
4. CLID
Llamada Entrante

5. Voice Translation Profile

VOIP POTS
1. Match Outbound Dial Peer
1. Global Voice Translation Profiles
2. Voice Translation Profile
2. Number Expansion
3. CLID
3. Match Inbound Dial Peer
4. Digit Strip
4. CLID
5. Prefix
5. Voice Translation Profile
6. Forward Digits

2006 Cisco Systems, Inc. All rights reserved. GWGK v2.03-2


Dial-Peer Manipulacin de Dgitos

digit - strip
prefix
forward - digits
num - exp
translation - profile

2006 Cisco Systems, Inc. All rights reserved. GWGK v2.03-3


POTS Stripped Digits

Router_A#configure terminal
Router_A(config)#dial-peer voice 10 pots
Router_A(config-dial-peer)#destination-pattern 555...
Router_A(config-dial-peer)#no digit-strip
Router_A(config-dial-peer)#port 1/0:1
Router_A(config-dial-peer)#end
Router_A#

Enva 7 dgitos hacia el Call Leg de salida

2006 Cisco Systems, Inc. All rights reserved. GWGK v2.03-4


POTS Prefixes

Router_B#configure terminal
Router_B(config)#dial-peer voice 50 pots
Router_B(config-dial-peer)#destination-pattern 131255.....
Router_B(config-dial-peer)#prefix 53
Router_B(config-dial-peer)#port 1/0:1
Router_B(config-dial-peer)#end
Router_B#

Enva 7 dgitos hacia el Call Leg de salida, con el 53 al inicio.

2006 Cisco Systems, Inc. All rights reserved. GWGK v2.03-5


POTS Forward - Digits

Router_C#configure terminal
Router_C(config)#dial-peer voice 5 pots
Router_C(config-dial-peer)#destination-pattern 91312.......
Router_C(config-dial-peer)#forward-digits 10
Router_C(config-dial-peer)#port 1/0:1
Router_C(config-dial-peer)#end
Router_C#

Enva los ltimos 10 dgitos hacia la PSTN.

2006 Cisco Systems, Inc. All rights reserved. GWGK v2.03-6


POTS Number Expansion

Router_D#configure terminal
Router_D(config)#ephone-dn 1
Router_D(config-ephone-dn)#number 7735553784
Router_D(config-ephone-dn)#ephone-dn 2
Router_D(config-ephone-dn)#number 7735553991
Router_D(config)#ephone 1
Router_D(config-ephone)#button 1:1
Router_D(config-ephone)#ephone 2
Router_D(config-ephone)#button 1:2
Router_D(config-ephone)#end
Router_D#configure terminal
Router_D(config)#num-exp 3... 7735553...
Router_D(config)#exit

ephone 1 puede marcar 3991 y ephone 2 sonar.

2006 Cisco Systems, Inc. All rights reserved. GWGK v2.03-7


POTS y VoIP Manipulacin de Dgitos
Usando Perfiles de Traduccin.

Los perfiles de traduccin funcionan de manera similar


a las Listas de Control de Acceso (ACL) en un router

2006 Cisco Systems, Inc. All rights reserved. GWGK v2.03-8


Ejemplos de Reglas de traduccin

Regla Cadena de Entrada Cadena de Salida


/^9/ // 914085550123 14085550123
/^2001/ /3001/ 2001 3001
/^[23].../ /4000/ 2025 o 3051 4000
/^2.../ /801&/ 2001 8012001
/^2.../ /801\0/ 2001 8012001
/\(9\)\([^10].*\)/ /\11408\2/ 95551234 914085551234
/.*/ /91&/ 3125552001 913125552001

Implementing Cisco Unified Communications Voice over IP and QoS (CVoice) Foundation Learning Guide ( pp. 442)

2006 Cisco Systems, Inc. All rights reserved. GWGK v2.03-9


Regla de traduccin , detalle
Regla Cadena de Entrada Cadena de Salida
/\(9\)\([^10].*\)/ /\11408\2/ 95551234 914085551234

Este ejemplo antepone un 1 para llamada larga distancia y un cdigo


de rea al nmero marcado que sale de la red a travs de la PSTN y
accede a un abonado de larga distancia.

**El usuario marca un 9 ms siete dgitos para acceder a los nmeros externos.

As es la operacin si se utiliza la cadena de entrada 95550134:


El 9 se vuelve a insertar utilizando el \ 1.
Sigue los dgitos 1408.
Luego sigue 5550134, que est referenciado por el \ 2.
La cadena resultante es 914085550134.

Nota El primer conjunto de parntesis se hace referencia con \ 1 y el


segundo conjunto con \ 2.
2006 Cisco Systems, Inc. All rights reserved. GWGK v2.03-10
Comando para verificar reglas de
traduccin

Ejemplo 1
Este ejemplo reemplaza cualquier nmero de cinco dgitos que
comienza con "40" con el nmero "6666000".

voice translation-rule 1
rule 1 /^40.../ /6666000/

router#test voice translation-rule 1 40123


Matched with rule 1
Original number: 40123 Translated number: 6666000

2006 Cisco Systems, Inc. All rights reserved. GWGK v2.03-11


Comando para verificar reglas de
traduccin

Ejemplo 2
Este ejemplo reemplaza todos los nmeros con "5554000"

voice translation-rule 2
rule 1 /.*/ /5554000/

router#test voice translation-rule 2 123


Matched with rule 1
Original number: 123 Translated number: 5554000

router#test voice translation-rule 2 86573


Matched with rule 1
Original number: 86573 Translated number: 5554000

router#test voice translation-rule 2 ""


Matched with rule 1
Original number: Translated number: 5554000

2006 Cisco Systems, Inc. All rights reserved. GWGK v2.03-12


Comando para verificar reglas de
traduccin

Ejemplo 3
En este ejemplo se reemplaza la primera ocurrencia del nmero "123"
por "456"
voice translation-rule 1 router#test voice translation-rule 1 6123123
rule 1 /123/ /456/ Matched with rule 1
Original number: 6123123 Translated number: 6456123
router#test voice translation-rule 1 123 Original number type: none Translated number type: none
Matched with rule 1 Original number plan: none Translated number plan: none
Original number: 123 Translated number: 456

router#test voice translation-rule 1 1234


Matched with rule 1
Original number: 1234 Translated number: 4564

router#test voice translation-rule 1 6123


Matched with rule 1
Original number: 6123 Translated number: 6456

2006 Cisco Systems, Inc. All rights reserved. GWGK v2.03-13


Site-Code Dialing and Toll Bypass

Site codes are assigned to sites


Users dial <site code> + <user extension> to reach a user in
a specific site
Site codes should be in a single range if possible
(e.g., 8XX).
Calling number should also include the site code of the
calling party
This can be done via digit manipulation.
Easy way to solve overlapping numbering plan issues

2006 Cisco Systems, Inc. All rights reserved. GWGK v2.03-14


Site-Code Dialing and Toll Bypass Example

San Jose Chicago


Site Code: 801 Site Code: 802

IP WAN
2
Phone1-1 rings.
Calling number:
8022001

Router1 Router3
(MGCP) (CUCME)

PSTN
Phone1-1 Phone1-2 Phone2-1 Phone2-2
2001 2002 2001 2002
1
User dials 8012001.

CUCME = Cisco Unified CallManager Express

2006 Cisco Systems, Inc. All rights reserved. GWGK v2.03-15


Configuring Site-Code Dialing and
Toll Bypass

1. Configure voice translation profiles for VoIP intersite


routing.
2. Define dial peers for VoIP intersite routing.
3. Configure voice translation rules and profiles for PSTN
intersite routing.
4. Define dial peers for PSTN intersite routing.

2006 Cisco Systems, Inc. All rights reserved. GWGK v2.03-16


Site-Code Dialing and Toll Bypass Scenario

San Jose Users should be Chicago


able to reach other
801 sites via site 802
codes.

CM1: 192.168.1.1 IP WAN


CM2: 192.168.1.2

DID: 408555XXXX DID: 312555XXXX

Router1 CUCME
H.323

PSTN
Phone1-1 Phone1-2 Phone2-1 Phone2-2
2001 2002 2001 2002
If WAN fails, the
PSTN path should
be used.
CUCME = Cisco Unified CallManager Express

2006 Cisco Systems, Inc. All rights reserved. GWGK v2.03-17


Step 1: Configure Voice Translation Profiles
for VoIP Intersite Routing

Router3
CUCME
voice translation-rule 1
rule 1 /^2/ /8022/
voice translation-rule 2
rule 1 /^8022/ /2/
voice translation-profile intersite-out
translate calling 1
voice translation-profile intersite-in
translate called 2

CUCME = Cisco Unified CallManager Express

2006 Cisco Systems, Inc. All rights reserved. GWGK v2.03-18


Step 2: Define Dial Peers for VoIP Intersite
Routing

Router3
CUCME
dial-peer voice 8011 voip
destination-pattern 8012...
session-target ipv4:192.168.1.1
preference 1
translation-profile incoming intersite-in
translation-profile outgoing intersite-out
dial-peer voice 8012 voip
destination-pattern 8012...
session-target ipv4:192.168.1.2
preference 2
translation-profile incoming intersite-in
translation-profile outgoing intersite-out

CUCME = Cisco Unified CallManager Express

2006 Cisco Systems, Inc. All rights reserved. GWGK v2.03-19


Step 3: Configure Voice Translation Rules
and Profiles for PSTN Intersite Routing

Router3
CUCME
voice translation-rule 3
rule 1 /^8012/ /14085552/
voice translation-profile 801PSTN
translate called 3

CUCME = Cisco Unified CallManager Express

2006 Cisco Systems, Inc. All rights reserved. GWGK v2.03-20


Step 4: Define Dial Peers for PSTN Intersite
Routing

Router3
CUCME
dial-peer voice 8012 pots
destination-pattern 8012...
port 0/0/0:23
preference 3
translation-profile outgoing 801PSTN

CUCME = Cisco Unified CallManager Express

2006 Cisco Systems, Inc. All rights reserved. GWGK v2.03-21


Outbound Site-Code Dialing Example
dial-peer voice 8011 voip
1 destination-pattern 8012... Incoming Outgoing
session-target ipv4:192.168.1.1 DNIS 8012001 8012001
preference 1
ANI 2001 8022001
translation-profile outgoing intersite-out
translation-profile incoming intersite-in

1
IP WAN

Router1 CUCME Phone2-1


CM2 IP: 192.168.1.2 H.323 PSTN 2 2001

2 dial-peer voice 8013 pots Incoming Outgoing


destination-pattern 8012... DNIS 8012001 14085552001
port 0/0/0:23 ANI 2001 3125552001
preference 3
translation-profile outgoing 801PSTN CUCME = Cisco Unified CallManager Express

2006 Cisco Systems, Inc. All rights reserved. GWGK v2.03-22


Inbound Site-Code Dialing Example
dial-peer voice 8011 voip
destination-pattern 8012... Incoming Outgoing
session-target ipv4:192.168.1.1 DNIS 8022001 2001
preference 1
ANI 8012001 8012001
translation-profile outgoing intersite-out
translation-profile ncoming intersite-in

IP WAN

Router1 CUCME Phone2-1


CM2 IP: 192.168.1.2 H.323 PSTN 2001

CUCME = Cisco Unified CallManager Express

2006 Cisco Systems, Inc. All rights reserved. GWGK v2.03-23


Ejemplo de Manipulacin de Dgitos-
Reglas de marcado (Overlapping)- WAN

DID: 555XXXX DID: 333XXXX

IP WAN
CUCME2: 20.20.20.20 CUCME1: 30.30.30.30

CUCME
CUCME

Telfono 1 Telfono 2 Telfono 1 Telfono 2


2000 2001 2000 2001

Telfono 3
800801 CUCME = Cisco Unified CallManager Express

2006 Cisco Systems, Inc. All rights reserved. GWGK v2.03-24


GNS3, LAB Manipulacin de Dgitos-
Reglas de marcado (Overlapping )- WAN
CUCME1# telephony-service
! max-ephones 20
voice translation-rule 1 max-dn 20
rule 1 /^2/ /3332/ ip source-address 30.30.30.30 port 2000
! timeouts interdigit 6
voice translation-rule 2 system message CUCME-1
rule 1 /^3332/ /2/ date-format yy-mm-dd
! max-conferences 8 gain -6
voice translation-profile Llamada-Entrante transfer-system full-consult
translate called 2 !
! !
voice translation-profile Llamada-Saliente ephone-dn 1
translate calling 1 number 2000
! description Codigo de Area 333
interface Loopback0 name CUCME-1
ip address 30.30.30.30 255.255.255.0 !
! ephone-dn 2
interface FastEthernet0/0 number 2001
ip address 192.168.1.200 255.255.255.0 !
duplex auto ephone-dn 3
speed auto number 2002
! !
interface FastEthernet0/1 ephone-dn 4
ip address 1.1.1.1 255.255.255.0 number 2003
duplex auto !
speed auto ephone-dn 5
! number 2004
ip route 20.20.20.0 255.255.255.0 1.1.1.2 !
! ephone 1
dial-peer voice 1 voip mac-address 0000.0001.0001
translation-profile incoming Llamada-Entrante type CIPC
translation-profile outgoing Llamada-Saliente button 1:1 2:2 3:3 4:4
destination-pattern 80080. button 5:5
session target ipv4:20.20.20.20 !
! !
dial-peer voice 555 voip end
translation-profile incoming Llamada-Entrante
translation-profile outgoing Llamada-Saliente
destination-pattern 5552...
session target ipv4:20.20.20.20

2006 Cisco Systems, Inc. All rights reserved. GWGK v2.03-25


GNS3, LAB Manipulacin de Dgitos-
Reglas de marcado (Overlapping )- WAN
CUCME2#sh running-config telephony-service
! max-ephones 10
hostname CUCME2 max-dn 10
! ip source-address 20.20.20.20 port 2000
voice translation-rule 1 auto assign 1 to 2
rule 1 /^2/ /5552/ timeouts interdigit 6
! timeouts busy 22
voice translation-rule 2 timeouts ringing 5
rule 1 /^5552/ /2/ system message CUCME-2
! date-format yy-mm-dd
voice translation-profile Llamada-Entrante max-conferences 8 gain -6
translate called 2 call-forward system redirecting-expanded
! transfer-system full-consult
voice translation-profile Llamada-Saliente transfer-pattern 200
translate calling 1 !
! ephone-dn 1
interface Loopback0 number 2000
ip address 20.20.20.20 255.255.255.255 description Codigo de Area 555
! !
interface FastEthernet0/0 ephone-dn 2
ip address 192.168.2.1 255.255.255.0 number 2001
duplex auto !
speed auto ephone-dn 3
! number 2002
interface FastEthernet0/1 !
ip address 1.1.1.2 255.255.255.0 ephone-dn 4
duplex auto number 2003
speed auto !
! ephone-dn 5
ip route 0.0.0.0 0.0.0.0 1.1.1.1 number 2004
! !
dial-peer voice 333 voip ephone-dn 6
translation-profile incoming Llamada-Entrante number 800801
translation-profile outgoing Llamada-Saliente !
destination-pattern 3332... ephone 1
session target ipv4:30.30.30.30 mac-address 0000.0000.0002
! type CIPC
button 1:1 2:2 3:3 4:4
button 5:5 6:6
!
end

2006 Cisco Systems, Inc. All rights reserved. GWGK v2.03-26


GNS3, LAB Manipulacin de Dgitos-
Reglas de marcado (Overlapping ) - WAN

2006 Cisco Systems, Inc. All rights reserved. GWGK v2.03-27


GNS3, LAB Manipulacin de Dgitos-
Reglas de marcado (Overlapping ) - WAN

DID: 555XXXX

IP WAN
CUCME2: 20.20.20.20

CUCME

Telfono 1 Telfono 2
2000 2001

Telfono 3
800801

2006 Cisco Systems, Inc. All rights reserved. GWGK v2.03-28


Lab : Manipulacin de Dgitos
Reglas de marcado (Sin Overlapping)- WAN

X es el nmero de POD.
DID: 33X551 DID: 33X552

IP WAN

HQ-X
BR-X

Telfono 1 Telfono 2 Telfono 1 Telfono 2


X101 X102 X201 X202
Configure los dial-peer a las loopbacks respectivas, para que HQ-X
pueda llamar a BR-X y viceversa.
Telfono 3 El calling number debe aparecer en el telfono remoto.
X003-X006

2006 Cisco Systems, Inc. All rights reserved. GWGK v2.03-29


Referencias

https://drive.google.com/drive/folders/0BwD-USH-s_IbSi1uT2U2bjk4dG8
https://drive.google.com/open?id=0B8xKFKmLpTZ7Nm9NUmJsVG4zSms&authuser=0
https://supportforums.cisco.com/es/discussion/11876336
http://www.voicecerts.com/2011/04/voice-translation-rules-examples.html
http://www.cisco.com/c/en/us/support/docs/voice/call-routing-dial-plans/61083-voice-transla-rules.html
CCNA voice study guide (640-460) / Andrew Froehlich. 1st ed.

2006 Cisco Systems, Inc. All rights reserved. GWGK v2.03-30


2006 Cisco Systems, Inc. All rights reserved. GWGK v2.03-31