Sie sind auf Seite 1von 96

Guia de Configurao CPE - VIPLINE

1 - Hardware e IOS
Em todas configuraes devem ser utilizadas as verses de IOS abaixo especificadas ou superior.

CISCO
CPE

IOS

FLASH

DRAM

SUGERIDA

SUGERIDA

2801

c2801-advipservicesk9-mz.151-4.M1.bin

384MB

128MB

2801

c2801-adventerprisek9-mz.124-24.T5.bin

192MB

64MB

2811 / 2821

c2800nm-advipservicesk9-mz.151-4.M1.bin

512MB

128MB

2811 / 2821

c2800nm-adventerprisek9-mz.124-24.T5.bin

256MB

128MB

2851

c2800nm-advipservicesk9-mz.151-4.M1.bin

512MB

128MB

2851

c2800nm-adventerprisek9-mz.124-24.T5.bin

256MB

128MB

2901 / 2911 / 2921

c2900-universalk9-mz.SPA.151-4.M1.bin

512MB

256MB

2951

c2951-universalk9-mz.SPA.151-4.M1.bin

512MB

256MB

3825

c3825-advipservicesk9-mz.151-4.M1.bin

512MB

128MB

3825

c3825-advipservicesk9-mz.124-24.T5.bin

512MB

128MB

3845

c3845-advipservicesk9-mz.151-4.M1.bin

512MB

128MB

3845

c3845-advipservicesk9-mz.124-24.T5.bin

512MB

128MB

c3900-universalk9-mz.SPA.151-4.M1.bin

1GB

256MB

3925 / 3945

HP
CPE
MSR 20-1X
MSR 30-1X

IOS
A_MSR201X-CMW520-R2512P04
A_MSR301X-CMW520-R2512P04-SI

DIGISTAR
CPE
AG30

IOS
system_ag30plus_v1.7.img

Script CPE Cenrio VIPLINE Sin. R2 entre PABX e CPE


hostname <nome_cliente_CNL>
!
card type e1 0 0
!
network-clock-participate wic 0
network-clock-select 1 E1 0/0/0
voice service voip
ip address trusted authenticate
ip address trusted list
ipv4 0.0.0.0 0.0.0.0
fax protocol t38 ls-redundancy 0 hs-redundancy 0 fallback pass-through g711alaw
sip
!
trunk group troncor2
hunt-scheme sequential both down
!
voice class codec 1
codec preference 1 g729r8
codec preference 2 g729br8
codec preference 3 g711alaw
!
!
! Exemplo de n chave e faixa - 21594650 (4650 4699)
voice translation-rule 10
rule 1 /^\(215946[5-9][0-9]\)/ /\1/
rule 2 /^\(46[5-9][0-9]\)/ /2159\1/
rule 3 /^.*/ /21594650/
!
!
voice translation-profile EBT_BSOD
translate calling 10
!
!
voice-card 0
dsp services dspfarm
!
!
controller E1 0/0/0
framing NO-CRC4
ds0-group 0 timeslots 1-15,17-31 type r2-digital r2-compelled ani
cas-custom 0
country brazil use-defaults

metering
category 1
answer-signal group-b 1
trunk-group troncor2
!
class-map match-any Voz_RealIp
match dscp cs3 ef
class-map match-any NetworkControl_RealIp
match dscp cs2 cs6 cs7
!
!
policy-map Voz_Ger
class Voz_RealIp
police rate <police_rate>
conform-action transmit
exceed-action drop
class NetworkControl_RealIp
bandwidth 63
queue-limit 32
class class-default
random-detect
policy-map Saida_Voz
class class-default
shape average <velocidade_ccto_VL>
service-policy Voz_Ger
!
PARA ACESSO ETHERNET

!
interface GigabitEthernet0/0
description <description encontrada no SAIP>
bandwidth <banda>

ip address <ip_wan_cliente> 255.255.255.252


speed 100
duplex full
service-policy output Saida_Voz
no shut
!
PARA ACESSO FRAME-RELAY - Dependendo da verso de IOS necessrio aplicar o QoS no modelo hierarquico.

!
map-class frame-relay FR_1500k
frame-relay cir 1500000
frame-relay bc 15000
frame-relay be 0
frame-relay mincir 1500000
service-policy output Saida_Voz
!

interface Serial0/0/0
description <description encontrada no SAIP>
bandwidth <banda>
no ip address
encapsulation frame-relay
frame-relay traffic-shaping
frame-relay lmi-type cisco
frame-relay intf-type dce
no shutdown
!
interface Serial0/0/0.1 point-to-point
description <description encontrada no SAIP>
bandwidth <banda>
ip address <ip_wan_cliente> 255.255.255.252
frame-relay interface-dlci 100
class FR_1500k
no shutdown
!
!
!
!
ip forward-protocol nd
ip route 0.0.0.0 0.0.0.0 <ip_wan_PE>
!
voice-port 0/0/0:0
translation-profile incoming EBT_BSOD
no vad
no comfort-noise
cptone BR
timeouts interdigit 5
!
mgcp fax t38 ecm
!
dial-peer voice 100 voip
description LOCAL
destination-pattern [2-6].......
rtp payload-type cisco-codec-fax-ack 111
rtp payload-type cisco-codec-fax-ind 110
rtp payload-type nse 102
rtp payload-type nte 97
modem passthrough nse codec g711alaw
voice-class codec 1
session protocol sipv2
session target sip-server
incoming called-number .T
dtmf-relay rtp-nte

playout-delay mode fixed no-timestamps


fax protocol t38 ls-redundancy 0 hs-redundancy 0 fallback pass-through g711alaw
no vad
!
dial-peer voice 101 voip
description LONGA_DISTANCIA
destination-pattern 0[1-9].[1-9][1-9][2-9].......$
rtp payload-type cisco-codec-fax-ack 111
rtp payload-type cisco-codec-fax-ind 110
rtp payload-type nse 102
rtp payload-type nte 97
modem passthrough nse codec g711alaw
voice-class codec 1
session protocol sipv2
session target sip-server
dtmf-relay rtp-nte
playout-delay mode fixed no-timestamps
fax protocol t38 ls-redundancy 0 hs-redundancy 0 fallback pass-through g711alaw
no vad
!
dial-peer voice 102 voip
description A_COBRAR_LOCAL
destination-pattern 9090........$
rtp payload-type cisco-codec-fax-ack 111
rtp payload-type cisco-codec-fax-ind 110
rtp payload-type nse 102
rtp payload-type nte 97
modem passthrough nse codec g711alaw
voice-class codec 1
session protocol sipv2
session target sip-server
dtmf-relay rtp-nte
playout-delay mode fixed no-timestamps
fax protocol t38 ls-redundancy 0 hs-redundancy 0 fallback pass-through g711alaw
no vad
!
dial-peer voice 103 voip
description A_COBRAR_LONGA_DISTANCIA
destination-pattern 90[^0][^0]..........$
rtp payload-type cisco-codec-fax-ack 111
rtp payload-type cisco-codec-fax-ind 110
rtp payload-type nse 102
rtp payload-type nte 97
modem passthrough nse codec g711alaw
voice-class codec 1
session protocol sipv2

session target sip-server


dtmf-relay rtp-nte
playout-delay mode fixed no-timestamps
fax protocol t38 ls-redundancy 0 hs-redundancy 0 fallback pass-through g711alaw
no vad
!
dial-peer voice 104 voip
description ZERO_800
destination-pattern 0800......T
rtp payload-type cisco-codec-fax-ack 111
rtp payload-type cisco-codec-fax-ind 110
rtp payload-type nse 102
rtp payload-type nte 97
modem passthrough nse codec g711alaw
voice-class codec 1
session protocol sipv2
session target sip-server
dtmf-relay rtp-nte
playout-delay mode fixed no-timestamps
fax protocol t38 ls-redundancy 0 hs-redundancy 0 fallback pass-through g711alaw
no vad
!
dial-peer voice 105 voip
description ZERO_300
destination-pattern 0300......T
rtp payload-type cisco-codec-fax-ack 111
rtp payload-type cisco-codec-fax-ind 110
rtp payload-type nse 102
rtp payload-type nte 97
modem passthrough nse codec g711alaw
voice-class codec 1
session protocol sipv2
session target sip-server
dtmf-relay rtp-nte
playout-delay mode fixed no-timestamps
fax protocol t38 ls-redundancy 0 hs-redundancy 0 fallback pass-through g711alaw
no vad
!
dial-peer voice 106 voip
description INTERNACIONAL
destination-pattern 00.T
modem passthrough nse codec g711alaw
voice-class codec 1
session protocol sipv2
session target sip-server
dtmf-relay rtp-nte

fax protocol t38 ls-redundancy 0 hs-redundancy 0 fallback pass-through g711alaw


no vad
!
dial-peer voice 107 voip
description Servicos Publicos
destination-pattern 1..T
rtp payload-type cisco-codec-fax-ack 111
rtp payload-type cisco-codec-fax-ind 110
rtp payload-type nse 102
rtp payload-type nte 97
modem passthrough nse codec g711alaw
voice-class codec 1
session protocol sipv2
session target sip-server
dtmf-relay rtp-nte
playout-delay mode fixed no-timestamps
fax protocol pass-through g711alaw
no vad
!
dial-peer voice 108 voip
description LOCAL CELULAR
destination-pattern [7-9].......
rtp payload-type cisco-codec-fax-ack 111
rtp payload-type cisco-codec-fax-ind 110
rtp payload-type nse 102
rtp payload-type nte 97
modem passthrough nse codec g711alaw
voice-class codec 1
session protocol sipv2
session target sip-server
dtmf-relay rtp-nte
playout-delay mode fixed no-timestamps
fax protocol t38 ls-redundancy 0 hs-redundancy 0 fallback pass-through g711alaw
no vad
!
dial-peer voice 109 voip
description IG Provedores
destination-pattern 1[5-9]......
rtp payload-type cisco-codec-fax-ack 111
rtp payload-type cisco-codec-fax-ind 110
rtp payload-type nse 101
rtp payload-type nte 97
modem passthrough nse codec g711alaw
voice-class codec 1
session protocol sipv2
session target sip-server

dtmf-relay rtp-nte
playout-delay mode fixed no-timestamps
fax protocol t38 ls-redundancy 0 hs-redundancy 0 fallback pass-through g711alaw
no vad
!
!
dial-peer voice 110 voip
description ZERO_500
destination-pattern 0500......T
rtp payload-type cisco-codec-fax-ack 111
rtp payload-type cisco-codec-fax-ind 110
rtp payload-type nse 102
rtp payload-type nte 97
modem passthrough nse codec g711alaw
voice-class codec 1
session protocol sipv2
session target sip-server
dtmf-relay rtp-nte
playout-delay mode fixed no-timestamps
fax protocol t38 ls-redundancy 0 hs-redundancy 0 fallback pass-through g711alaw
no vad
!
dial-peer voice 114 voip
description LONGA_DISTANCIA_9 digito SP
destination-pattern 0[1-9].[1-9][1-9]9........$
rtp payload-type cisco-codec-fax-ack 111
rtp payload-type cisco-codec-fax-ind 110
rtp payload-type nse 102
rtp payload-type nte 97
modem passthrough nse codec g711alaw
voice-class codec 1
session protocol sipv2
session target sip-server
dtmf-relay rtp-nte
playout-delay mode fixed no-timestamps
fax protocol t38 ls-redundancy 0 hs-redundancy 0 fallback pass-through g711alaw
no vad
!
dial-peer voice 115 voip
description LONGA_DISTANCIA_servicos
destination-pattern 0[1-9].[1-9][1-9]1..T
rtp payload-type cisco-codec-fax-ack 111
rtp payload-type cisco-codec-fax-ind 110
rtp payload-type nse 102
rtp payload-type nte 97
modem passthrough nse codec g711alaw

voice-class codec 1
session protocol sipv2
session target sip-server
dtmf-relay rtp-nte
playout-delay mode fixed no-timestamps
fax protocol t38 ls-redundancy 0 hs-redundancy 0 fallback pass-through g711alaw
no vad
!
dial-peer voice 116 voip
description A_COBRAR_LOCAL_9 digito SP
destination-pattern 90909........$
rtp payload-type cisco-codec-fax-ack 111
rtp payload-type cisco-codec-fax-ind 110
rtp payload-type nse 102
rtp payload-type nte 97
modem passthrough nse codec g711alaw
voice-class codec 1
session protocol sipv2
session target sip-server
dtmf-relay rtp-nte
playout-delay mode fixed no-timestamps
fax protocol t38 ls-redundancy 0 hs-redundancy 0 fallback pass-through g711alaw
no vad
!
dial-peer voice 117 voip
description A_COBRAR_LONGA_DISTANCIA
destination-pattern 90[^0][^0][1-9][1-9]9........$
rtp payload-type cisco-codec-fax-ack 111
rtp payload-type cisco-codec-fax-ind 110
rtp payload-type nse 102
rtp payload-type nte 97
modem passthrough nse codec g711alaw
voice-class codec 1
session protocol sipv2
session target sip-server
dtmf-relay rtp-nte
playout-delay mode fixed no-timestamps
fax protocol t38 ls-redundancy 0 hs-redundancy 0 fallback pass-through g711alaw
no vad
!
!
dial-peer voice 118 voip
description Servicos Publicos
destination-pattern 19.
rtp payload-type cisco-codec-fax-ack 111
rtp payload-type cisco-codec-fax-ind 110

rtp payload-type nse 102


rtp payload-type nte 97
modem passthrough nse codec g711alaw
voice-class codec 1
session protocol sipv2
session target sip-server
dtmf-relay rtp-nte
playout-delay mode fixed no-timestamps
fax protocol pass-through g711alaw
no vad
!
dial-peer voice 119 voip
description LOCAL CELULAR 9 DIGITO
destination-pattern 9........$
rtp payload-type cisco-codec-fax-ack 111
rtp payload-type cisco-codec-fax-ind 110
rtp payload-type nse 102
rtp payload-type nte 97
modem passthrough nse codec g711alaw
voice-class codec 1
session protocol sipv2
session target sip-server
dtmf-relay rtp-nte
playout-delay mode fixed no-timestamps
fax protocol t38 ls-redundancy 0 hs-redundancy 0 fallback pass-through g711alaw
no vad
!
dial-peer voice 10 pots
description INBOUND Rede Publica para tronco Vipline
trunkgroup troncor2
destination-pattern 215946[5-9][0-9]$ <exemplo numero chave do cliente - faixa de ramais MCDU 4650 4699>
progress_ind alert strip 8
direct-inward-dial
forward-digits 4
!
dial-peer voice 11 pots
trunkgroup troncor2
description PABX - Chamada a cobrar
destination-pattern 90.T
forward-digits 4
!
dial-peer voice 12 pots
description OUTBOUND Tronco VIPLINE para rede publica
direct-inward-dial
port 0/0/0:0
!

sip-ua
sip-server ipv4:<endereo_sip_interface_lado_acesso - SBC>
!

Regra 1 converte qualquer nmero com 5 ou mais dgitos no nmero chave;


Regra 2 acrescenta o prefixo 7100 a um nmero recebido na faixa fornecida ao cliente
Regra 3 converte qualquer nmero de quatro dgitos que no esteja na faixa do cliente no nmero cha

Regra 1 mantm os nmeros completos (prefixo + MCDU) recebidos na faixa fornecida para o cliente;
Regra 2 acrescenta o prefixo 7100 a um MCDU recebido na faixa fornecida ao cliente
Regra 3 Converte qualquer nmero com qualquer quantidade de dgitos no nmero chave.

Observaes

a para o cliente;

Script CPE Cenrio VIPLINE Sin. ISDN entre PABX e CPE

hostname <nome_cliente_CNL>
!
card type e1 0 0
!
network-clock-participate wic 0
!
voice service voip
ip address trusted authenticate
ip address trusted list
ipv4 0.0.0.0 0.0.0.0
fax protocol t38 ls-redundancy 0 hs-redundancy 0 fallback pass-through g711alaw
sip
!
!
voice class codec 1
codec preference 1 g729r8
codec preference 2 g729br8
codec preference 3 g711alaw
!
isdn switch-type primary-net5
! Exemplo de n chave e faixa - 21594650 (4650 4699)
voice translation-rule 10
rule 1 /^\(215946[5-9][0-9]\)/ /\1/
rule 2 /^\(46[5-9][0-9]\)/ /2159\1/
rule 3 /^.*/ /21594650/
!
!
voice translation-profile EBT_BSOD
translate calling 10
!

!
voice-card 0
dsp services dspfarm
!
controller E1 0/0/0
clock source internal
pri-group timeslots 1-31

!
class-map match-any Voz_RealIp
match dscp cs3 ef
class-map match-any NetworkControl_RealIp
match dscp cs2 cs6 cs7
!
!
policy-map Voz_Ger
class Voz_RealIp
police rate <police_rate>
conform-action transmit
exceed-action drop
class NetworkControl_RealIp
bandwidth 63
queue-limit 32
class class-default
random-detect
policy-map Saida_Voz
class class-default
shape average <velocidade_ccto_VL>
service-policy Voz_Ger
!
PARA ACESSO ETHERNET

!
interface GigabitEthernet0/0
description <description encontrada no SAIP>
bandwidth <banda>

ip address <ip_wan_cliente> 255.255.255.252


speed 100
duplex full
service-policy output Saida_Voz
no shut
!
PARA ACESSO FRAME-RELAY - Dependendo da verso de IOS necessrio aplicar o QoS no modelo hierarquico.

!
map-class frame-relay FR_1500k
frame-relay cir 1500000
frame-relay bc 15000
frame-relay be 0
frame-relay mincir 1500000
service-policy output Saida_Voz
!
interface Serial0/0/0
description <description encontrada no SAIP>
bandwidth <banda>
no ip address

encapsulation frame-relay
frame-relay traffic-shaping
frame-relay lmi-type cisco
frame-relay intf-type dce
no shutdown
!
interface Serial0/0/0.1 point-to-point
description <description encontrada no SAIP>
bandwidth <banda>
ip address <ip_wan_cliente> 255.255.255.252
frame-relay interface-dlci 100
class FR_1500k
no shutdown
!
!
!
interface Serial0/0/0:15
no ip address
encapsulation hdlc
no logging event link-status
isdn bchan-number-order ascending
isdn switch-type primary-net5
isdn overlap-receiving T302 5000
isdn protocol-emulate network
isdn incoming-voice voice
no cdp enable
!
ip forward-protocol nd
ip route 0.0.0.0 0.0.0.0 <ip_wan_PE>
!
voice-port 0/0/0:15
input gain 3
output attenuation 3
no echo-cancel enable
no comfort-noise
cptone BR
translation-profile incoming EBT_BSOD
!
mgcp fax t38 ecm
!
dial-peer voice 100 voip
description LOCAL
destination-pattern [2-6].......
rtp payload-type cisco-codec-fax-ack 111

rtp payload-type cisco-codec-fax-ind 110


rtp payload-type nse 102
rtp payload-type nte 97
modem passthrough nse codec g711alaw
voice-class codec 1
session protocol sipv2
session target sip-server
incoming called-number .T
dtmf-relay rtp-nte
playout-delay mode fixed no-timestamps
fax protocol t38 ls-redundancy 0 hs-redundancy 0 fallback pass-through g711alaw
no vad
!
dial-peer voice 101 voip
description LONGA_DISTANCIA
destination-pattern 0[1-9].[1-9][1-9][2-9].......$
rtp payload-type cisco-codec-fax-ack 111
rtp payload-type cisco-codec-fax-ind 110
rtp payload-type nse 102
rtp payload-type nte 97
modem passthrough nse codec g711alaw
voice-class codec 1
session protocol sipv2
session target sip-server
dtmf-relay rtp-nte
playout-delay mode fixed no-timestamps
fax protocol t38 ls-redundancy 0 hs-redundancy 0 fallback pass-through g711alaw
no vad
!
dial-peer voice 102 voip
description A_COBRAR_LOCAL
destination-pattern 9090........$
rtp payload-type cisco-codec-fax-ack 111
rtp payload-type cisco-codec-fax-ind 110
rtp payload-type nse 102
rtp payload-type nte 97
modem passthrough nse codec g711alaw
voice-class codec 1
session protocol sipv2
session target sip-server
dtmf-relay rtp-nte
playout-delay mode fixed no-timestamps
fax protocol t38 ls-redundancy 0 hs-redundancy 0 fallback pass-through g711alaw
no vad
!
dial-peer voice 103 voip

description A_COBRAR_LONGA_DISTANCIA
destination-pattern 90[^0][^0]..........$
rtp payload-type cisco-codec-fax-ack 111
rtp payload-type cisco-codec-fax-ind 110
rtp payload-type nse 102
rtp payload-type nte 97
modem passthrough nse codec g711alaw
voice-class codec 1
session protocol sipv2
session target sip-server
dtmf-relay rtp-nte
playout-delay mode fixed no-timestamps
fax protocol t38 ls-redundancy 0 hs-redundancy 0 fallback pass-through g711alaw
no vad
!
dial-peer voice 104 voip
description ZERO_800
destination-pattern 0800......T
rtp payload-type cisco-codec-fax-ack 111
rtp payload-type cisco-codec-fax-ind 110
rtp payload-type nse 102
rtp payload-type nte 97
modem passthrough nse codec g711alaw
voice-class codec 1
session protocol sipv2
session target sip-server
dtmf-relay rtp-nte
playout-delay mode fixed no-timestamps
fax protocol t38 ls-redundancy 0 hs-redundancy 0 fallback pass-through g711alaw
no vad
!
dial-peer voice 105 voip
description ZERO_300
destination-pattern 0300......T
rtp payload-type cisco-codec-fax-ack 111
rtp payload-type cisco-codec-fax-ind 110
rtp payload-type nse 102
rtp payload-type nte 97
modem passthrough nse codec g711alaw
voice-class codec 1
session protocol sipv2
session target sip-server
dtmf-relay rtp-nte
playout-delay mode fixed no-timestamps
fax protocol t38 ls-redundancy 0 hs-redundancy 0 fallback pass-through g711alaw
no vad

!
dial-peer voice 106 voip
description INTERNACIONAL
destination-pattern 00.T
modem passthrough nse codec g711alaw
voice-class codec 1
session protocol sipv2
session target sip-server
dtmf-relay rtp-nte
fax protocol t38 ls-redundancy 0 hs-redundancy 0 fallback pass-through g711alaw
no vad
!
dial-peer voice 107 voip
description Servicos Publicos
destination-pattern 1..T
rtp payload-type cisco-codec-fax-ack 111
rtp payload-type cisco-codec-fax-ind 110
rtp payload-type nse 102
rtp payload-type nte 97
modem passthrough nse codec g711alaw
voice-class codec 1
session protocol sipv2
session target sip-server
dtmf-relay rtp-nte
playout-delay mode fixed no-timestamps
fax protocol pass-through g711alaw
no vad
!
dial-peer voice 108 voip
description LOCAL CELULAR
destination-pattern [7-9].......
rtp payload-type cisco-codec-fax-ack 111
rtp payload-type cisco-codec-fax-ind 110
rtp payload-type nse 102
rtp payload-type nte 97
modem passthrough nse codec g711alaw
voice-class codec 1
session protocol sipv2
session target sip-server
dtmf-relay rtp-nte
playout-delay mode fixed no-timestamps
fax protocol t38 ls-redundancy 0 hs-redundancy 0 fallback pass-through g711alaw
no vad
!
dial-peer voice 109 voip
description IG - Provedores

destination-pattern 1[5-9]......
rtp payload-type cisco-codec-fax-ack 111
rtp payload-type cisco-codec-fax-ind 110
rtp payload-type nse 101
rtp payload-type nte 97
modem passthrough nse codec g711alaw
voice-class codec 1
session protocol sipv2
session target sip-server
dtmf-relay rtp-nte
playout-delay mode fixed no-timestamps
fax protocol t38 ls-redundancy 0 hs-redundancy 0 fallback pass-through g711alaw
no vad
!
!
dial-peer voice 110 voip
description ZERO_500
destination-pattern 0500......T
rtp payload-type cisco-codec-fax-ack 111
rtp payload-type cisco-codec-fax-ind 110
rtp payload-type nse 102
rtp payload-type nte 97
modem passthrough nse codec g711alaw
voice-class codec 1
session protocol sipv2
session target sip-server
dtmf-relay rtp-nte
playout-delay mode fixed no-timestamps
fax protocol t38 ls-redundancy 0 hs-redundancy 0 fallback pass-through g711alaw
no vad
!
dial-peer voice 114 voip
description LONGA_DISTANCIA 9 digito SP
destination-pattern 0[1-9].[1-9][1-9]9........$
rtp payload-type cisco-codec-fax-ack 111
rtp payload-type cisco-codec-fax-ind 110
rtp payload-type nse 102
rtp payload-type nte 97
modem passthrough nse codec g711alaw
voice-class codec 1
session protocol sipv2
session target sip-server
dtmf-relay rtp-nte
playout-delay mode fixed no-timestamps
fax protocol t38 ls-redundancy 0 hs-redundancy 0 fallback pass-through g711alaw
no vad

!
dial-peer voice 115 voip
description LONGA_DISTANCIA servicos
destination-pattern 0[1-9].[1-9][1-9]1..T
rtp payload-type cisco-codec-fax-ack 111
rtp payload-type cisco-codec-fax-ind 110
rtp payload-type nse 102
rtp payload-type nte 97
modem passthrough nse codec g711alaw
voice-class codec 1
session protocol sipv2
session target sip-server
dtmf-relay rtp-nte
playout-delay mode fixed no-timestamps
fax protocol t38 ls-redundancy 0 hs-redundancy 0 fallback pass-through g711alaw
no vad
!
dial-peer voice 116 voip
description A_COBRAR_LOCAL 9 digito SP
destination-pattern 90909........$
rtp payload-type cisco-codec-fax-ack 111
rtp payload-type cisco-codec-fax-ind 110
rtp payload-type nse 102
rtp payload-type nte 97
modem passthrough nse codec g711alaw
voice-class codec 1
session protocol sipv2
session target sip-server
dtmf-relay rtp-nte
playout-delay mode fixed no-timestamps
fax protocol t38 ls-redundancy 0 hs-redundancy 0 fallback pass-through g711alaw
no vad
!
dial-peer voice 117 voip
description A_COBRAR_LONGA_DISTANCIA
destination-pattern 90[^0][^0][1-9][1-9]9........$
rtp payload-type cisco-codec-fax-ack 111
rtp payload-type cisco-codec-fax-ind 110
rtp payload-type nse 102
rtp payload-type nte 97
modem passthrough nse codec g711alaw
voice-class codec 1
session protocol sipv2
session target sip-server
dtmf-relay rtp-nte
playout-delay mode fixed no-timestamps

fax protocol t38 ls-redundancy 0 hs-redundancy 0 fallback pass-through g711alaw


no vad
!
!
dial-peer voice 118 voip
description Servicos Publicos
destination-pattern 19.
rtp payload-type cisco-codec-fax-ack 111
rtp payload-type cisco-codec-fax-ind 110
rtp payload-type nse 102
rtp payload-type nte 97
modem passthrough nse codec g711alaw
voice-class codec 1
session protocol sipv2
session target sip-server
dtmf-relay rtp-nte
playout-delay mode fixed no-timestamps
fax protocol pass-through g711alaw
no vad
!
dial-peer voice 119 voip
description LOCAL CELULAR 9 DIGITO
destination-pattern 9........$
rtp payload-type cisco-codec-fax-ack 111
rtp payload-type cisco-codec-fax-ind 110
rtp payload-type nse 102
rtp payload-type nte 97
modem passthrough nse codec g711alaw
voice-class codec 1
session protocol sipv2
session target sip-server
dtmf-relay rtp-nte
playout-delay mode fixed no-timestamps
fax protocol t38 ls-redundancy 0 hs-redundancy 0 fallback pass-through g711alaw
no vad
!
dial-peer voice 10 pots
description INBOUND - LOCAL ISDN
destination-pattern 215946[5-9][0-9] < exemplo numero chave do cliente - faixa de ramais MCDU 4650 4699>
progress_ind alert strip 8
direct-inward-dial
forward-digits 4
port 0/0/0:15
!
dial-peer voice 11 pots

description PABX - Chamada a cobrar


destination-pattern 90.T
forward-digits 4
progress_ind alert strip 8
direct-inward-dial
port 0/0/0:15
!
sip-ua
sip-server ipv4:<endereo_sip_interface_lado_acesso - SBC>
!

Regra 1 converte qualquer nmero com 5 ou mais dgitos no nmero chave;


Regra 2 acrescenta o prefixo 7100 a um nmero recebido na faixa fornecida ao cliente
Regra 3 converte qualquer nmero de quatro dgitos que no esteja na faixa do cliente no nmero cha

Regra 1 mantm os nmeros completos (prefixo + MCDU) recebidos na faixa fornecida para o cliente;
Regra 2 acrescenta o prefixo 7100 a um MCDU recebido na faixa fornecida ao cliente
Regra 3 Converte qualquer nmero com qualquer quantidade de dgitos no nmero chave.

Observaes

a para o cliente;

#
sysname YELLOW_VIAGENS
#
domain default enable system
#
telnet server enable
#
undo ip http enable
#
password-recovery enable
#
local-user EBT
password cipher PRO1AN
authorization-attribute level 3
service-type telnet
undo local-user admin
#
#
traffic classifier NetworkControl operator and
if-match dscp cs2 cs6 cs7
traffic classifier voz operator and
if-match dscp ef
traffic classifier class_default operator and
traffic classifier Sinaliz-SIP operator and
if-match dscp cs3
#
traffic behavior NetworkControl
queue af bandwidth pct 2
traffic behavior voz
queue ef bandwidth pct 93 cbs-ratio 25
traffic behavior class_default
gts cir 2600
remark dscp default
traffic behavior Sinaliz-SIP
queue af bandwidth pct 4
#
qos policy SHAPE-OUT
classifier voz behavior voz
classifier Sinaliz-SIP behavior Sinaliz-SIP
classifier class_default behavior class_default
classifier NetworkControl behavior NetworkControl
#
#
controller E1 1/0
timeslot-set 1 timeslot-list 1-15,17-31 signal r2
tdm-clock internal
idlecode ff
cable short
frame-format no-crc4
code hdb3
#
cas 1
mode brazil default-standard
re-answer enable

ani all
#
PARA ACESSO ETHERNET
#
interface Ethernet0/0
port link-mode route
description YELLOW | 2600K | BHE/VL/3132806888 | (BHE/VL/3132806888)
duplex full
speed 100
bandwidth 2600
ip address 189.52.113.34 255.255.255.252
qos max-bandwidth 2600
qos apply policy SHAPE-OUT outbound
#
PARA ACESSO FRAME-RELAY
#
fr class WAN_OUT
cir allow 2600000
cbs 26000
cir 2600000
apply policy SHAPE-OUT outbound
#
interface Serial2/0
description YELLOW | 2600K | BHE/VL/3132806888 | (BHE/VL/3132806888)
link-protocol fr nonstandard
fr interface-type dce
fr lmi type nonstandard
fr traffic-shaping
fr traffic-policing
bandwidth 2600
qos max-bandwidth 2600
#
interface Serial2/0.1 P2P
description YELLOW | 2600K | BHE/VL/3132806888 | (BHE/VL/3132806888)
ip address 189.52.113.34 255.255.255.252
qos reserved-bandwidth pct 99
fr dlci 100
fr-class WAN_OUT
#
#
#
#
#
#
voice-setup
cptone country-type BR
cptone tone-type dial-tone amplitude 1500
distinguish-localtalk
voip timer voip-to-pots 30
vqa dscp signal cs3
#
sip
proxy ipv4 189.52.61.117 port 5060

keepalive options interval 5


#
sip-server
#
call-rule-set
#
call-route
#
dial-program
default entity compression 2nd-level g729br8
default entity compression 3rd-level g711alaw
default entity compression 4th-level g729r8
default entity fax protocol standard-t38
default entity fax protocol standard-t38 hb-redundancy 0
default entity fax protocol standard-t38 lb-redundancy 0
default entity modem protocol pcm standard g711alaw
default entity payload-size g729 20
terminator #
number-match longest
number-priority peer enable
#
number-substitute 100
dot-match left-right
rule 1 ^328068..$ 328068..
rule 2 ^68..$ 328068..
rule 3 ^....$ 32806888
rule 4 ^........$ 32806888
#
#
entity 10 pots
line 1/0:1
send-number 4
description Ramais PABX
match-template 328068[0-9][0-9]
send-ring
#
entity 11 pots
line 1/0:1
send-number 4
description PABX - Chamada a cobrar
match-template 9090328068[0-9][0-9]
send-ring
#
entity 100 voip
address sip proxy
description LONGA_DISTANCIA
match-template 0[1-9].[1-9][1-9][2-9].......
#
entity 101 voip
address sip proxy
description LONGA_DISTANCIA_9
match-template 0[1-9].[1-9][1-9]9........
#
entity 102 voip
address sip proxy

description A_COBRAR_LOCAL
match-template 9090........
#
entity 103 voip
address sip proxy
description A_COBRAR_LONGA_DISTANCIA
match-template 90[1-9].[1-9][1-9][2-9].......
#
entity 104 voip
address sip proxy
description ZERO_800
match-template 0800......T
#
entity 105 voip
address sip proxy
description ZERO_300
match-template 0300......T
#
entity 106 voip
address sip proxy
description INTERNACIONAL
match-template 00.T
#
entity 107 voip
address sip proxy
description Servicos Publicos
match-template 1..T
#
entity 108 voip
address sip proxy
description LOCAL CELULAR
match-template [7-9].......
#
entity 109 voip
address sip proxy
description IG Provedores
match-template 1[5-9]......
#
entity 110 voip
address sip proxy
description ZERO_500
match-template 0500......T
#
entity 114 voip
address sip proxy
description A_COBRAR_LONGA_DISTANCIA_9
match-template 90[1-9].[1-9][1-9]9[7-9].......
#
entity 116 voip
address sip proxy
description A_COBRAR_LOCAL_9 digito SP
match-template 90909........
#
entity 117 voip
address sip proxy

description Celular_LOCAL_9 digito SP


match-template 9........
#
entity 118 voip
address sip proxy
description LOCAL
match-template [2-6].......
#
entity 119 voip
address sip proxy
description Longa_Distancia_Servicos_Publicos
match-template 0[1-9].[1-9][1-9]1..T
#
entity 120 voip
address sip proxy
description Servios_Publicos
match-template 19.
#
aaa-client
#
subscriber-line1/0:1
undo cng-on
echo-canceller enable
dtmf threshold digital 1
substitute calling 100
hunt-group enable
#
ip route-static 0.0.0.0 0.0.0.0 189.52.113.33
#
header motd %
||========================================||
SOMENTE USUARIOS AUTORIZADOS
AUTHORIZED USERS ONLY
OS ACESSOS SERAO MONITORADOS
||=======================================||
%
#
user-interface tty 12
user-interface aux 0
user-interface vty 0 4
authentication-mode scheme
#
return

! Hostname

! Slot onde a placa E1 esta instalada. Por padro usa-se o slto 3/0 e 3/1.
! Quantidades de canais.

! Sip server.

Regras de substituio. Para este caso o numero chave era 32806888, e a faixa de ramais eram de 6800 a 6899.
Quando no for possivel sumarizar, precisamos configurar linha a linha.

! Porta da E1

! Esta regra precisa englobar todos os numeros do cliente, caso necessrio criar mais de uma.

! Porta da E1

! Porta da E1

! Rota default, configurar o ip do PE Embratel

#
sysname YELLOW_VIAGENS
#
domain default enable system
#
telnet server enable
#
undo ip http enable
#
password-recovery enable
#
local-user EBT
password cipher PRO1AN
authorization-attribute level 3
service-type telnet
undo local-user admin
#
#
traffic classifier NetworkControl operator and
if-match dscp cs2 cs6 cs7
traffic classifier voz operator and
if-match dscp ef
traffic classifier class_default operator and
traffic classifier Sinaliz-SIP operator and
if-match dscp cs3
#
traffic behavior NetworkControl
queue af bandwidth pct 2
traffic behavior voz
queue ef bandwidth pct 93 cbs-ratio 25
traffic behavior class_default
gts cir 2600
remark dscp default
traffic behavior Sinaliz-SIP
queue af bandwidth pct 4
#
qos policy SHAPE-OUT
classifier voz behavior voz
classifier Sinaliz-SIP behavior Sinaliz-SIP
classifier class_default behavior class_default
classifier NetworkControl behavior NetworkControl
#
#
controller E1 1/0
pri-set timeslot-list 1-31
frame-format crc4
tdm-clock internal
PARA ACESSO ETHERNET
#
interface Ethernet0/0
port link-mode route
description YELLOW | 2600K | BHE/VL/3132806888 | (BHE/VL/3132806888)
duplex full

speed 100
bandwidth 2600
ip address 189.52.113.34 255.255.255.252
qos max-bandwidth 2600
qos apply policy SHAPE-OUT outbound
#
PARA ACESSO FRAME-RELAY
#
fr class WAN_OUT
cir allow 2600000
cbs 26000
cir 2600000
apply policy SHAPE-OUT outbound
#
interface Serial2/0
description YELLOW | 2600K | BHE/VL/3132806888 | (BHE/VL/3132806888)
link-protocol fr nonstandard
fr interface-type dce
fr lmi type nonstandard
fr traffic-shaping
fr traffic-policing
bandwidth 2600
qos max-bandwidth 2600
#
interface Serial2/0.1 P2P
description YELLOW | 2600K | BHE/VL/3132806888 | (BHE/VL/3132806888)
ip address 189.52.113.34 255.255.255.252
qos reserved-bandwidth pct 99
fr dlci 100
fr-class WAN_OUT
#
#
interface Serial1/0:15
isdn protocol-type dss1
isdn protocol-mode network
isdn overlap-sending
isdn l3-timer T302 5
#
voice-setup
cptone country-type BR
cptone tone-type dial-tone amplitude 1500
distinguish-localtalk
voip timer voip-to-pots 30
vqa dscp signal cs3
#
sip
proxy ipv4 189.52.61.117 port 5060
keepalive options interval 5
#
sip-server
#
call-rule-set
#
call-route

#
dial-program
default entity compression 2nd-level g729br8
default entity compression 3rd-level g711alaw
default entity compression 4th-level g729r8
default entity fax protocol standard-t38
default entity fax protocol standard-t38 hb-redundancy 0
default entity fax protocol standard-t38 lb-redundancy 0
default entity modem protocol pcm standard g711alaw
default entity payload-size g729 20
terminator #
number-match longest
number-priority peer enable
#
number-substitute 100
dot-match left-right
rule 1 ^328068..$ 328068..
rule 2 ^68..$ 328068..
rule 3 ^....$ 32806888
rule 4 ^........$ 32806888
#
#
entity 10 pots
line 1/0:15
send-number 4
description Ramais PABX
match-template 328068[0-9][0-9]
send-ring
#
entity 11 pots
line 1/0:15
send-number 4
description PABX - Chamada a cobrar
match-template 9090328068[0-9][0-9]
send-ring
#
entity 100 voip
address sip proxy
description LONGA_DISTANCIA
match-template 0[1-9].[1-9][1-9][2-9].......
#
entity 101 voip
address sip proxy
description LONGA_DISTANCIA_9
match-template 0[1-9].[1-9][1-9]9........
#
entity 102 voip
address sip proxy
description A_COBRAR_LOCAL
match-template 9090........
#
entity 103 voip
address sip proxy
description A_COBRAR_LONGA_DISTANCIA
match-template 90[1-9].[1-9][1-9][2-9].......

#
entity 104 voip
address sip proxy
description ZERO_800
match-template 0800......T
#
entity 105 voip
address sip proxy
description ZERO_300
match-template 0300......T
#
entity 106 voip
address sip proxy
description INTERNACIONAL
match-template 00.T
#
entity 107 voip
address sip proxy
description Servicos Publicos
match-template 1..T
#
entity 108 voip
address sip proxy
description LOCAL CELULAR
match-template [7-9].......
#
entity 109 voip
address sip proxy
description IG Provedores
match-template 1[5-9]......
#
entity 110 voip
address sip proxy
description ZERO_500
match-template 0500......T
#
entity 114 voip
address sip proxy
description A_COBRAR_LONGA_DISTANCIA_9
match-template 90[1-9].[1-9][1-9]9[7-9].......
#
entity 116 voip
address sip proxy
description A_COBRAR_LOCAL_9 digito SP
match-template 90909........
#
entity 117 voip
address sip proxy
description Celular_LOCAL_9 digito SP
match-template 9........
#
entity 118 voip
address sip proxy
description LOCAL
match-template [2-6].......

#
entity 119 voip
address sip proxy
description Longa_Distancia_Servicos_Publicos
match-template 0[1-9].[1-9][1-9]1..T
#
entity 120 voip
address sip proxy
description Servios_Publicos
match-template 19.
#
aaa-client
#
subscriber-line1/0:15
undo cng-on
echo-canceller enable
dtmf threshold digital 1
substitute calling 100
hunt-group enable
#
ip route-static 0.0.0.0 0.0.0.0 189.52.113.33
#
header motd %
||========================================||
SOMENTE USUARIOS AUTORIZADOS
AUTHORIZED USERS ONLY
OS ACESSOS SERAO MONITORADOS
||=======================================||
%
#
user-interface tty 12
user-interface aux 0
user-interface vty 0 4
authentication-mode scheme
#
return

! Hostname

! Valor da banda do circuito

! Slot onde a placa E1 esta instalada. Por padro usa-se o slto 3/0 e 3/1.
! Quantidades de canais.

! Descrio do circuito, encontrada no SAIP.

! Velocidade do circuito.
! IP de Wan.
! Valor da banda do circuito

! Slot onde a placa E1 esta instalada, seguido de :15.

! Sip server.

Regras de substituio. Para este caso o numero chave era 32806888, e a faixa de ramais eram de 6800 a 6899.
Quando no for possivel sumarizar, precisamos configurar linha a linha.

! Porta da E1

! Esta regra precisa englobar todos os numeros do cliente, caso necessrio criar mais de uma.

! Porta da E1

! Porta da E1

! Rota default, configurar o ip do PE Embratel

Script GW AG30 Cenrio VIPLINE Sin. R2 entre PABX e CPE


!
interface ethernet 1
description [DESCRIO ACESSO SAIP]
ip address [IP SERIAL USUARIO SAIP] 255.255.255.252
bandwidth [BANDWIDTH SAIP]
multicast
speed auto
no shutdown
!
no access-list sequence-numbers
ip domain lookup
!
no ip pmtu-discovery
no ip ftp server
ip ftp banner CPE
ip ftp passv 6000 6003
!
ip http server
ip telnet server
ipv6 hop-limit 64
ipv6 fragment time 60
!
ip route static inter-vrf
ip route 0.0.0.0/0 [IP BORDA EMBRATEL]
ipv6 route static inter-vrf
!
sip
user EX-USER
protocol udp port 5060
codec g729
codec fax g711u
no vad
dtmf inband
cid from uri
no prack
no compact-headers
account 1
user [1 NUMERO DA FAIXA DE RAMAIS - 8 DIGITOS] [1 NUMERO DA FAIXA DE RAMAIS - 8
DIGITOS]
no auth-user
display-name [1 NUMERO DA FAIXA DE RAMAIS - 8 DIGITOS]
contact [1 NUMERO DA FAIXA DE RAMAIS - 8 DIGITOS]

no restricted-id
allow-simult
server 1
!
UTILIZAR DA FORMA ABAIXO CASO EXISTA A NECESSIDADE DE CRIAR UM RANGE DE ACCOUNTS:
!
account range 1-50
set-range user 32114600-32114649 [1 NUMERO DA FAIXA DE RAMAIS - 8 DIGITOS] [ULTIMO
NUMERO DA FAIXA DE RAMAIS - 8 DIGITOS]
allow-simult
server 1
!
vsp 1

only-proxy local-ip
server [IP SIP ACESSO - SAIP]
no did display-name

no did contact
no did restricted-id
no expire-time
sip-port 5060
no proxy-server
cid from uri
dtmf outband
codec g729
codec fax t38
no vad
protocol udp
prack
no compact-headers
timeout 2
no 180-sdp
no remote-codec
no shutdown
!
no vsp 2
no vsp 3
no vsp 4
no vsp 5
no integrated-sip
rtp port-range 10000 12000 dscp ef-class
dscp ef-class
!
!
no aaa new-model
!
line console
!

line vty
password PRO1AN
!
!
!
no ntp authenticate
banner motd ^
!
||========================================||
SOMENTE USUARIOS AUTORIZADOS
AUTHORIZED USERS ONLY
OS ACESSOS SERAO MONITORADOS
||=======================================||
^
session-timeout 5
service password-encryption
hostname [HOSTNAME]
!
!
UTILIZAR DA FORMA PARA PABX R2

pbx
digital-line 1
type master r2 bra
digits 4
idc
timeout 4
line-signaling incoming digital outgoing digital
register-signaling incoming mfc outgoing mfc
channels [QUANTIDADE DE CANAIS]
no co number
no co ld-code
occupation decreasing
!
UTILIZAR DA FORMA PARA PABX ISDN

pbx
digital-line 1
type master isdn
digits 4
channels [QUANTIDADE DE CANAIS]
occupation increasing
!
group voip slot 0 type bidirectional
group voip slot 0 description VOZ-VOIP
group e1 slot 0 type bidirectional
group e1 slot 0 description VOZ
redirection input voip-operator groups 0 from * to * output e1 groups 0 from {From} to {To:-4}

redirection input e1 groups 0 from ^334400[0-5][0-9]$ to * output voip-operator groups 0 from {From} to {To}
redirection input e1 groups 0 from ^00[0-5][0-9]$ to * output voip-operator groups 0 from 3344{From} to {To}
redirection input e1 groups 0 from * to * output voip-operator groups 0 from [TRONCO CHAVE] to {To}
!
end

Modificar as regras abaixo conforme a necessidade de cada cliente

Mantm os nmeros completos (prefixo + MCDU) recebidos na faixa fornecida para o cliente;
Acrescenta o prefixo 3344 a um MCDU recebido na faixa fornecida ao cliente
Converte qualquer nmero com qualquer quantidade de dgitos no nmero chave.
ATENO: MANTER AS REGRAS SEM ADIO DE ESPAO, SEGUINDO O MODELO DO EXEMPLO.

Exemplo de n chave e faixa - 33440000 (0000 0059)

Das könnte Ihnen auch gefallen