cancel
Showing results forĀ 
Search instead forĀ 
Did you mean:Ā 
cancel
1134
Views
15
Helpful
11
Replies

Help needed on IOS Voice translations

lowfell
Level 3
Level 3

I have an MGCP Gateway configured with the following translations that should only kick in with Fallback/STST.

They are as follows
!
voice translation-rule 1
rule 1 /^.*\(....$\)/ /\1/
!
voice translation-rule 2
rule 1 /^.*$/ /90\0/
!
!
voice translation-profile PSTN-Inbound-Translate
translate calling 2
translate called 1

 

The only dial peer i can see this used on is this one

dial-peer voice 1 pots
translation-profile incoming PSTN-Inbound-Translate
incoming called-number .
direct-inward-dial
!

 

 So i can see this translation
voice translation-rule 1
rule 1 /^.*\(....$\)/ /\1/
!

Question 1 This pattern related to CALLED which is the TO yes?. so if someone is trying to call 01234 456789  what is this translation pattern doing? on my gateway i only have an extension 456789 how does that translation STRIP  access code which in this case is 01234 ?

 

!
!
voice translation-rule 2
rule 1 /^.*$/ /90\0/

Question 2. This pattern is related to CALLING which is the FROM yes? So if someone is inside the Gateway and they are  coming FROM Extension 456789 and they want to call  say 01234 457788 how does this translation PREPEND the local access code which is 01234 to my extension 456789 . I can's see it from this translation? 

 

 

 

 

 

1 Accepted Solution

Accepted Solutions

Yes the number that will be sent out to the service provider would be 01274262XXX.



Response Signature


View solution in original post

11 Replies 11


@lowfell wrote:

voice translation-rule 1
rule 1 /^.*\(....$\)/ /\1/

Question 1 This pattern related to CALLED which is the TO yes?. so if someone is trying to call 01234 456789  what is this translation pattern doing? on my gateway i only have an extension 456789 how does that translation STRIP  access code which in this case is 01234 ?

The rule will use what is know as number slice to keep the last 4 digits in the number matched. This is done by the part in parenthesis, aka this part \(....$\). The parentheses are preceded by a \ as that is the escape character in IOS to stop if from looking at the ( and ) literally. This is carried over to the right hand side of the match rule with \1. To give a little more details on this a ^ = start of string and a $ = end of string.

For more details on how this works have a look at this link http://www.cisco.com/en/US/tech/tk652/tk90/technologies_tech_note09186a0080325e8e.shtml


@lowfell wrote:

voice translation-rule 2
rule 1 /^.*$/ /90\0/

Question 2. This pattern is related to CALLING which is the FROM yes? So if someone is inside the Gateway and they are  coming FROM Extension 456789 and they want to call  say 01234 457788 how does this translation PREPEND the local access code which is 01234 to my extension 456789 . I can's see it from this translation? 


This translate the matched number and carries it in it's entirety over to the right hand side by \0 and add 90 before the number.

It does not do what you ask about at all. Primary reason because it's not used in the outbound direction and that's what you ask about, but also since it does not add the access code that you ask about.


@lowfell wrote:

voice translation-profile PSTN-Inbound-Translate
translate calling 2
translate called 1


What the rules are used for it defined by this configuration, rule 2 is used for calling (from) and rule 1 is used for called (to) number.


@lowfell wrote:

dial-peer voice 1 pots
translation-profile incoming PSTN-Inbound-Translate
incoming called-number .
direct-inward-dial


This translation rule is used inbound from PSTN to manipulate both called and calling numbers as explained above.



Response Signature


Thanks again for your help sir. So, I understand your answer for Question one and thank you.

 

So for question two.

if I am an extension inside the gateway 456789 and i want to dial a local number 01234 456XXXX
Does the carrier automatically Prepend my extension with the local code of 1234 or do is this added on the gateway somewhere? A Local code must have to be added somewhere or otherwise it can't be routed correctly?

The carriers do not normally add anything, it's up to the sending part to send the call in the appropriate format. Again what you ask about is an outbound call and the translations you have asked about so far is used for inbound call from PSTN. What you need to have to make outbound calls to PSTN is another dial peer and the required translation set on it to modify the called and calling numbers to fit your need.

Maybe it would be easier if you post your entire configuration from the gateway instead of small snippets from it. If you need to hide sensitive information please do so, but try to keep the overall structure of the configuration intact. Once your done please post the configuration as an attached text file as that makes it much more readable then to post the text as is inline in a post.



Response Signature


Here is the config. so if i am an internal extension and i want to dial a local number or national or whatever, is their something on this gateway that prepends a local code, or is this provided by the carrier ? 

version 16.6
service timestamps debug datetime localtime
service timestamps log datetime localtime
service password-encryption
platform qfp utilization monitor load 80
no platform punt-keepalive disable-kernel-core
!
hostname XXXXX
!
boot-start-marker
boot-end-marker
!
!
vrf definition Mgmt-intf
!
address-family ipv4
exit-address-family
!
address-family ipv6
exit-address-family
!
logging buffered 1000000
logging rate-limit all 20 except informational
enable password XXXXXXXXXXXXX
!
aaa new-model
!
!
aaa authentication login default group tacacs+ line none
aaa authentication login no_tacacs line none
aaa authentication login YWS_TACACS_VTY group tacacs+ local
aaa authentication login YWS_TACACS_CON group tacacs+ local
aaa authentication enable default group tacacs+ enable
aaa authorization console
aaa authorization config-commands
aaa authorization exec default if-authenticated
aaa authorization exec _TACACS_CON group tacacs+ local if-authenticated
aaa authorization exec _TACACS_VTY group tacacs+ local if-authenticated
aaa authorization commands _TACACS_VTY group tacacs+ local if-authenticated
aaa authorization commands _TACACS_CON group tacacs+ local if-authenticated
aaa accounting exec default
action-type start-stop
group tacacs+
!
aaa accounting commands 1 default
action-type start-stop
group tacacs+
!
aaa accounting commands 15 default
action-type start-stop
group tacacs+
!
!
!
!
!
!
!
aaa session-id common
clock timezone gmt 0 0
clock summer-time BST recurring last Sun Mar 2:00 last Sun Oct 2:00
!
no ip domain lookup
ip domain name 
ip multicast-routing distributed
!
!
subscriber templating
!
!
multilink bundle-name authenticated
!
!
!
!
!
!
crypto pki trustpoint TP-self-signed-823228215
enrollment selfsigned
subject-name cn=IOS-Self-Signed-Certificate-823228215
revocation-check none
rsakeypair TP-self-signed-823228215
!
!
crypto pki certificate chain TP-self-signed-823228215
!
!
!
!
voice class custom-cptone gb-custom
dualtone disconnect
frequency 400 400
cadence 6000
!
!
!
!
voice translation-rule 1
rule 1 /^.*\(....$\)/ /\1/
!
voice translation-rule 2
rule 1 /^.*$/ /90\0/
!
!
voice translation-profile PSTN-Inbound-Translate
translate calling 2
translate called 1
!
!
!
!
application
global
service alternate Default
!
!
!
voice-card 0/1
no watchdog
!
license udi pid ISR4321/K9 sn 
license accept end user agreement
license boot suite AdvUCSuiteK9
diagnostic bootup level minimal
spanning-tree extend system-id
!
!
!
username admin password 7 
!
redundancy
mode none
!
!
!
!
class-map match-any AutoQoS-VoIP-RTP-Trust
match ip dscp ef
class-map match-any AutoQoS-VoIP-Control-Trust
match ip dscp cs3
match ip dscp af31
!
policy-map AutoQoS-Policy-Trust
class AutoQoS-VoIP-RTP-Trust
priority percent 70
set ip dscp ef
class AutoQoS-VoIP-Control-Trust
bandwidth percent 5
set ip dscp cs3
class class-default
fair-queue
set ip dscp default
!
!
!
!
!
!
interface GigabitEthernet0/0/0
description *** Link to LAN ***
backup delay 1 3
backup interface GigabitEthernet0/0/1
ip address 1.2.3.4 255.255.255.0
negotiation auto
!
interface GigabitEthernet0/0/1
description *** Link to LAN Backup ***
mac-address 
ip address 1.2.3.4 255.255.255.0
negotiation auto
service-policy output AutoQoS-Policy-Trust
!
interface Service-Engine0/1/0
!
interface GigabitEthernet0
vrf forwarding Mgmt-intf
no ip address
shutdown
negotiation auto
!
ip forward-protocol nd
no ip http server
ip http authentication local
no ip http secure-server
ip tftp source-interface GigabitEthernet0/0/0
ip route 0.0.0.0 0.0.0.0 10.42.X.X
!
ip ssh version 2
!
logging host
!
!
snmp-server group switch v3 priv
snmp-server group YWS_SNMP_GRP v3 priv
snmp-server location 
snmp-server contact 
snmp-server chassis-id 
snmp-server enable traps snmp authentication linkdown linkup coldstart warmstart
snmp-server enable traps tty
snmp-server enable traps license
snmp-server enable traps config-copy
snmp-server enable traps config
snmp-server enable traps entity
snmp-server enable traps cpu threshold
snmp-server enable traps flash insertion
snmp-server enable traps flash removal
snmp-server enable traps isdn layer2
snmp-server enable traps isdn chan-not-avail
snmp-server enable traps isdn ietf
snmp-server enable traps voice
snmp-server enable traps ccme
snmp-server enable traps srst

!
!
!
!
control-plane
!
!
voice-port 0/1/0
supervisory disconnect dualtone mid-call
no battery-reversal
no vad
no comfort-noise
cptone GB
timeouts call-disconnect 3
timeouts ringing infinity
timeouts wait-release 3
timing hookflash-out 50
timing guard-out 1000
timing sup-disconnect 85
connection plar opx 760228
impedance complex2
!
voice-port 0/1/1
!
voice-port 0/1/2
!
voice-port 0/1/3
!
mgcp
mgcp call-agent X.X.X.X 2427 service-type mgcp version 0.1
mgcp rtp unreachable timeout 1000 action notify
mgcp modem passthrough voip mode nse
mgcp package-capability rtp-package
mgcp package-capability sst-package
mgcp package-capability pre-package
no mgcp package-capability res-package
no mgcp timer receive-rtcp
mgcp sdp simple
mgcp fax t38 inhibit
mgcp behavior rsip-range tgcp-only
mgcp behavior comedia-role none
mgcp behavior comedia-check-media-src disable
mgcp behavior comedia-sdp-force disable
!
mgcp profile default
!
!
ccm-manager music-on-hold
!
ccm-manager fallback-mgcp
ccm-manager redundant-host x.x.x.x1 x.x.x.2
ccm-manager mgcp
no ccm-manager fax protocol cisco
ccm-manager config server 1.2.3.4
ccm-manager config
!
dial-peer cor custom
name local
name national
name international
name mobile
name premium
name services
name emergency
name directory
name therest
!
!
dial-peer cor list call-local
member local
!
dial-peer cor list call-national
member national
!
dial-peer cor list call-international
member international
!
dial-peer cor list call-mobile
member mobile
!
dial-peer cor list call-premium
member premium
!
dial-peer cor list call-services
member services
!
dial-peer cor list call-emergency
member emergency
!
dial-peer cor list call-directory
member directory
!
dial-peer cor list call-therest
member therest
!
dial-peer cor list group4
member local
member national
member mobile
member emergency
member therest
!
dial-peer cor list group3
member local
member national
member international
member mobile
member emergency
member therest
!
dial-peer cor list group2
member local
member national
member international
member mobile
member services
member emergency
member directory
member therest
!
dial-peer cor list group1
member local
member national
member international
member mobile
member premium
member services
member emergency
member directory
member therest
!
!
dial-peer voice 999000 pots
service mgcpapp
port 0/1/0
!
dial-peer voice 999001 pots
service mgcpapp
port 0/1/1
!
dial-peer voice 1 pots
translation-profile incoming PSTN-Inbound-Translate
incoming called-number .
direct-inward-dial
!
dial-peer voice 2 pots
corlist outgoing call-emergency
description *** Emergency ***
preference 1
destination-pattern 999
clid network-number 01234456789
port 0/1/0
prefix 999
!
dial-peer voice 3 pots
corlist outgoing call-emergency
description *** Emergency ***
preference 1
destination-pattern 9112
clid network-number 01234456789
port 0/1/0
prefix 112
!
dial-peer voice 4 pots
corlist outgoing call-local
description *** Local 6 digit ***
preference 1
destination-pattern 9[2-9].....
clid restrict
port 0/1/0
forward-digits 6
!
dial-peer voice 5 pots
corlist outgoing call-therest
description *** FreePhone ***
preference 1
destination-pattern 9080........
clid restrict
port 0/1/0
forward-digits 11
!
dial-peer voice 7 pots
corlist outgoing call-therest
description *** Reduced Rates ***
preference 1
destination-pattern 9084........
clid restrict
port 0/1/0
forward-digits 11
!
dial-peer voice 8 pots
corlist outgoing call-national
description *** ***
preference 1
destination-pattern 510[56]..
clid restrict
port 0/1/0
forward-digits 11
prefix 01132850
!
dial-peer voice 9 pots
corlist outgoing call-national
description *** National Rates ***
preference 1
destination-pattern 9087........
clid restrict
port 0/1/0
forward-digits 11
!
dial-peer voice 10 pots
corlist outgoing call-mobile
description *** Mobiles ***
preference 1
destination-pattern 907.........
clid restrict
port 0/1/0
forward-digits 11
!
dial-peer voice 11 pots
corlist outgoing call-international
description *** International ***
preference 1
destination-pattern 900T
clid restrict
port 0/1/0
!
dial-peer voice 12 pots
corlist outgoing call-premium
description *** Premium Rates ***
preference 1
destination-pattern 9090........
clid restrict
port 0/1/0
forward-digits 11
!
dial-peer voice 13 pots
corlist outgoing call-directory
description *** Directories ***
preference 1
destination-pattern 9118...
clid restrict
port 0/1/0
forward-digits 6
!
dial-peer voice 14 pots
corlist outgoing call-services
description *** Directories ***
preference 1
destination-pattern 9100
clid restrict
port 0/1/0
prefix 100
!
dial-peer voice 15 pots
corlist outgoing call-services
description *** Services ***
preference 1
destination-pattern 91471
clid restrict
port 0/1/0
prefix 1471
!
dial-peer voice 16 pots
corlist outgoing call-services
description *** Speaking Clock ***
preference 1
destination-pattern 9123
clid restrict
port 0/1/0
prefix 123
!
dial-peer voice 17 pots
corlist outgoing call-therest
description ****
preference 1
destination-pattern 908454647
clid restrict
port 0/1/0
prefix 08454647
!
dial-peer voice 18 pots
corlist outgoing call-therest
description *** The Rest ***
preference 1
destination-pattern 9.T
clid restrict
port 0/1/0
!
dial-peer voice 100 pots
corlist outgoing call-national
description *** OPERATOR***
preference 1
destination-pattern 100
clid restrict
port 0/1/0
prefix 0127469XXXX
!
dial-peer voice 102 pots
corlist outgoing call-national
description *** YW CALDERVALE ***
preference 1
destination-pattern 8316..
clid restrict
port 0/1/0
prefix 01924XXXX
!
dial-peer voice 103 pots
corlist outgoing call-national
description *** ***
preference 1
destination-pattern 702...
clid restrict
port 0/1/0
prefix 01274372
!
dial-peer voice 104 pots
corlist outgoing call-national
description *** ***
preference 1
destination-pattern 704...
clid restrict
port 0/1/0
prefix 01274374
!
dial-peer voice 105 pots
corlist outgoing call-national
description ***  ***
preference 1
destination-pattern 7173..
clid restrict
port 0/1/0
prefix 012267373
!
dial-peer voice 106 pots
corlist outgoing call-national
description ***  ***
preference 1
destination-pattern 7182..
clid restrict
port 0/1/0
prefix 011425182
!
dial-peer voice 107 pots
corlist outgoing call-national
description *** ***
preference 1
destination-pattern 7183..
clid restrict
port 0/1/0
prefix 011425183
!
dial-peer voice 109 pots
corlist outgoing call-national
description ***  ***
preference 1
destination-pattern 7340..
clid restrict
port 0/1/0
prefix 01677460XXX
!
dial-peer voice 110 pots
corlist outgoing call-national
description *** XXX ***
preference 1
destination-pattern 7469..
clid restrict
port 0/1/0
prefix 019045269
!
dial-peer voice 111 pots
corlist outgoing call-national
description ***  ***
preference 1
destination-pattern 5712..
clid restrict
port 0/1/0
prefix 012744212
!
dial-peer voice 112 pots
corlist outgoing call-national
description ***  ***
preference 1
destination-pattern 7456..
clid restrict
port 0/1/0
prefix 019047556
!
dial-peer voice 113 pots
corlist outgoing call-national
description *** YW ELVINGTON ***
preference 1
destination-pattern 7457..
clid restrict
port 0/1/0
prefix 019047557
!
dial-peer voice 114 pots
corlist outgoing call-national
description *** ***
preference 1
destination-pattern 752...
clid restrict
port 0/1/0
prefix 01274692
!
dial-peer voice 115 pots
corlist outgoing call-national
description *** YW ROCC ***
preference 1
destination-pattern 7530..
clid restrict
port 0/1/0
prefix 012747830
!
dial-peer voice 116 pots
corlist outgoing call-national
description ***  ***
preference 1
destination-pattern 7531..
clid restrict
port 0/1/0
prefix 012748031
!
dial-peer voice 117 pots
corlist outgoing call-national
description *** ***
preference 1
destination-pattern 754...
clid restrict
port 0/1/0
prefix 01274804
!
dial-peer voice 118 pots
corlist outgoing call-national
description *** 
preference 1
destination-pattern 761...
clid restrict
port 0/1/0
prefix 01484441
!
dial-peer voice 119 pots
corlist outgoing call-national
description *** ***
preference 1
destination-pattern 7713..
clid restrict
port 0/1/0
prefix 0113213
!
dial-peer voice 120 pots
corlist outgoing call-national
description ***  ***
preference 1
destination-pattern 772...
clid restrict
port 0/1/0
prefix 01132122
!
dial-peer voice 121 pots
corlist outgoing call-national
description *** ***
preference 1
destination-pattern 7750..
clid restrict
port 0/1/0
prefix 011339750
!
dial-peer voice 122 pots
corlist outgoing call-national
description *** ***
preference 1
destination-pattern 7759..
clid restrict
port 0/1/0
prefix 011339759
!
dial-peer voice 123 pots
corlist outgoing call-national
description *** ***
preference 1
destination-pattern 872...
clid restrict
port 0/1/0
prefix 01274262
!
dial-peer voice 124 pots
corlist outgoing call-national
description *** YW CHELLOW HEIGHTS ***
preference 1
destination-pattern 5831..
clid restrict
port 0/1/0
prefix 012745531
!
dial-peer voice 125 pots
corlist outgoing call-national
description *** YW***
preference 1
destination-pattern 5712..
clid restrict
prefix 012744212
!
dial-peer voice 108 pots
corlist outgoing call-national
description *** ***
preference 1
destination-pattern 7238..
clid restrict
port 0/1/0
prefix 014826238
!
dial-peer voice 150 pots
shutdown
!
dial-peer voice 1999 pots
incoming called-number .
!
dial-peer voice 999010 pots
service mgcpapp
port 0/1/0
!
!
dial-peer hunt 2
!
call-manager-fallback
max-conferences 6 gain -6
transfer-system full-consult
timeouts interdigit 6
ip source-address 1.2.3.4 port 2000
max-ephones 12
max-dn 24
system message primary Service Interruption
transfer-pattern T
keepalive 20
voicemail 290000
no huntstop
pickup 760228
alias 1 760228 to 760228
alias 2 760228 to 760229
alias 3 760228 to 760230
alias 4 760228 to 760231
alias 5 760228 to 760232
call-forward pattern T
call-forward busy 290000
call-forward noan 290000 timeout 15
time-zone 21
time-format 24
date-format dd-mm-yy
cor incoming group4 default
!

Based on your configuration these would be the dial peers that can be used for outbound call in SRST.

!
dial-peer voice 2 pots
 corlist outgoing call-emergency
 description *** Emergency ***
 preference 1
 destination-pattern 999
 clid network-number 01234456789
 port 0/1/0
 prefix 999
!
dial-peer voice 3 pots
 corlist outgoing call-emergency
 description *** Emergency ***
 preference 1
 destination-pattern 9112
 clid network-number 01234456789
 port 0/1/0
 prefix 112
!
dial-peer voice 4 pots
 corlist outgoing call-local
 description *** Local 6 digit ***
 preference 1
 destination-pattern 9[2-9].....
 clid restrict
 port 0/1/0
 forward-digits 6
!
dial-peer voice 5 pots
 corlist outgoing call-therest
 description *** FreePhone ***
 preference 1
 destination-pattern 9080........
 clid restrict
 port 0/1/0
 forward-digits 11
!
dial-peer voice 7 pots
 corlist outgoing call-therest
 description *** Reduced Rates ***
 preference 1
 destination-pattern 9084........
 clid restrict
 port 0/1/0
 forward-digits 11
!
dial-peer voice 8 pots
 corlist outgoing call-national
 description *** ***
 preference 1
 destination-pattern 510[56]..
 clid restrict
 port 0/1/0
 forward-digits 11
 prefix 01132850
!
dial-peer voice 9 pots
 corlist outgoing call-national
 description *** National Rates ***
 preference 1
 destination-pattern 9087........
 clid restrict
 port 0/1/0
 forward-digits 11
!
dial-peer voice 10 pots
 corlist outgoing call-mobile
 description *** Mobiles ***
 preference 1
 destination-pattern 907.........
 clid restrict
 port 0/1/0
 forward-digits 11
!
dial-peer voice 11 pots
 corlist outgoing call-international
 description *** International ***
 preference 1
 destination-pattern 900T
 clid restrict
 port 0/1/0
!
dial-peer voice 13 pots
 corlist outgoing call-directory
 description *** Directories ***
 preference 1
 destination-pattern 9118...
 clid restrict
 port 0/1/0
 forward-digits 6
!
dial-peer voice 14 pots
 corlist outgoing call-services
 description *** Directories ***
 preference 1
 destination-pattern 9100
 clid restrict
 port 0/1/0
 prefix 100
!
dial-peer voice 15 pots
 corlist outgoing call-services
 description *** Services ***
 preference 1
 destination-pattern 91471
 clid restrict
 port 0/1/0
 prefix 1471
!
dial-peer voice 16 pots
 corlist outgoing call-services
 description *** Speaking Clock ***
 preference 1
 destination-pattern 9123
 clid restrict
 port 0/1/0
 prefix 123
!
dial-peer voice 17 pots
 corlist outgoing call-therest
 description ****
 preference 1
 destination-pattern 908454647
 clid restrict
 port 0/1/0
 prefix 08454647
!
dial-peer voice 18 pots
 corlist outgoing call-therest
 description *** The Rest ***
 preference 1
 destination-pattern 9.T
 clid restrict
 port 0/1/0
!
dial-peer voice 100 pots
 corlist outgoing call-national
 description *** OPERATOR***
 preference 1
 destination-pattern 100
 clid restrict
 port 0/1/0
 prefix 0127469XXXX
!
dial-peer voice 102 pots
 corlist outgoing call-national
 description *** YW CALDERVALE ***
 preference 1
 destination-pattern 8316..
 clid restrict
 port 0/1/0
 prefix 01924XXXX
!
dial-peer voice 103 pots
 corlist outgoing call-national
 description *** ***
 preference 1
 destination-pattern 702...
 clid restrict
 port 0/1/0
 prefix 01274372
!
dial-peer voice 104 pots
 corlist outgoing call-national
 description *** ***
 preference 1
 destination-pattern 704...
 clid restrict
 port 0/1/0
 prefix 01274374
!
dial-peer voice 105 pots
 corlist outgoing call-national
 description ***  ***
 preference 1
 destination-pattern 7173..
 clid restrict
 port 0/1/0
 prefix 012267373
!
dial-peer voice 106 pots
 corlist outgoing call-national
 description ***  ***
 preference 1
 destination-pattern 7182..
 clid restrict
 port 0/1/0
 prefix 011425182
!
dial-peer voice 107 pots
 corlist outgoing call-national
 description *** ***
 preference 1
 destination-pattern 7183..
 clid restrict
 port 0/1/0
 prefix 011425183
!
dial-peer voice 109 pots
 corlist outgoing call-national
 description ***  ***
 preference 1
 destination-pattern 7340..
 clid restrict
 port 0/1/0
 prefix 01677460XXX
!
dial-peer voice 110 pots
 corlist outgoing call-national
 description *** XXX ***
 preference 1
 destination-pattern 7469..
 clid restrict
 port 0/1/0
 prefix 019045269
!
dial-peer voice 111 pots
 corlist outgoing call-national
 description ***  ***
 preference 1
 destination-pattern 5712..
 clid restrict
 port 0/1/0
 prefix 012744212
!
dial-peer voice 112 pots
 corlist outgoing call-national
 description ***  ***
 preference 1
 destination-pattern 7456..
 clid restrict
 port 0/1/0
 prefix 019047556
!
dial-peer voice 113 pots
 corlist outgoing call-national
 description *** YW ELVINGTON ***
 preference 1
 destination-pattern 7457..
 clid restrict
 port 0/1/0
 prefix 019047557
!
dial-peer voice 114 pots
 corlist outgoing call-national
 description *** ***
 preference 1
 destination-pattern 752...
 clid restrict
 port 0/1/0
 prefix 01274692
!
dial-peer voice 115 pots
 corlist outgoing call-national
 description *** YW ROCC ***
 preference 1
 destination-pattern 7530..
 clid restrict
 port 0/1/0
 prefix 012747830
!
dial-peer voice 116 pots
 corlist outgoing call-national
 description ***  ***
 preference 1
 destination-pattern 7531..
 clid restrict
 port 0/1/0
 prefix 012748031
!
dial-peer voice 117 pots
 corlist outgoing call-national
 description *** ***
 preference 1
 destination-pattern 754...
 clid restrict
 port 0/1/0
 prefix 01274804
!
dial-peer voice 118 pots
corlist outgoing call-national
description *** 
preference 1
destination-pattern 761...
clid restrict
port 0/1/0
prefix 01484441
!
dial-peer voice 119 pots
 corlist outgoing call-national
 description *** ***
 preference 1
 destination-pattern 7713..
 clid restrict
 port 0/1/0
 prefix 0113213
!
dial-peer voice 120 pots
 corlist outgoing call-national
 description ***  ***
 preference 1
 destination-pattern 772...
 clid restrict
 port 0/1/0
 prefix 01132122
!
dial-peer voice 121 pots
 corlist outgoing call-national
 description *** ***
 preference 1
 destination-pattern 7750..
 clid restrict
 port 0/1/0
 prefix 011339750
!
dial-peer voice 122 pots
 corlist outgoing call-national
 description *** ***
 preference 1
 destination-pattern 7759..
 clid restrict
 port 0/1/0
 prefix 011339759
!
dial-peer voice 123 pots
 corlist outgoing call-national
 description *** ***
 preference 1
 destination-pattern 872...
 clid restrict
 port 0/1/0
 prefix 01274262
!
dial-peer voice 124 pots
 corlist outgoing call-national
 description *** YW CHELLOW HEIGHTS ***
 preference 1
 destination-pattern 5831..
 clid restrict
 port 0/1/0
 prefix 012745531
!
dial-peer voice 108 pots
 corlist outgoing call-national
 description *** ***
 preference 1
 destination-pattern 7238..
 clid restrict
 port 0/1/0
 prefix 014826238
!

!
dial-peer cor list call-local
 member local
!
dial-peer cor list call-national
 member national
!
dial-peer cor list call-international
 member international
!
dial-peer cor list call-mobile
 member mobile
!
dial-peer cor list call-premium
 member premium
!
dial-peer cor list call-services
 member services
!
dial-peer cor list call-emergency
 member emergency
!
dial-peer cor list call-directory
 member directory
!
dial-peer cor list call-therest
 member therest
!
dial-peer cor list group4
 member local
 member national
 member mobile
 member emergency
 member therest
!

!
call-manager-fallback 
 cor incoming group4 default
!

What each of these do is pretty self explanatory as it states what it matches, what is prefixed or how many digits that are forwarded and all of them from what I can tell restrict clid, so there is no calling number that is sent to the service provider that you'd need to worry about. One key thing to keep in mind is that a POTS dial peer will per default always consume any explicitly matched digits, meaning that if you for example have this match statement "destination-pattern 900T" and no other configuration for number of forwarded digits or prefix 900 will be consumed by the dial peer and what follows after 900 will be what is sent to the service provider based on the "T" match.



Response Signature


I think I've  got it now so what we are saying in this dial peers is 

dial-peer voice 123 pots
 corlist outgoing call-national
 description *** ***
 preference 1
 destination-pattern 872...
 clid restrict
 port 0/1/0
 prefix 01274262

If I am dialling 872...  prefix MY calling number with 01274262 because this is a National calling code, yes?

Also, with this dial peer you are saying

dial-peer voice 4 pots
 corlist outgoing call-local
 description *** Local 6 digit ***
 preference 1
 destination-pattern 9[2-9].....
 clid restrict
 port 0/1/0
 forward-digits 6

If I'm dialling destination-pattern 9[2-9].....
then forward six digits  as this is a local number and the carries recognises this as local because local numbers are only six digits and there is no need for any prefix.

This is what we are saying, yes?
If this Is the case then what about this dialpeer here
dial-peer voice 10 pots
corlist outgoing call-mobile
description *** Mobiles ***
preference 1
destination-pattern 907.........
clid restrict
port 0/1/0
forward-digits 11

If i My extension is 123456 and i ring a mobile number surely there must be some kind of prefix somewhere added to my 123456, because 123456 could be number that exists in multiple locations where is this added if not in this dial peer?




Almost, for the first question the called number sent to the service provider would be 

01274262 + last three digits dialled as the explicit matched digits 872 will be consumed by the dial peer.

For any call you have this set, clid restrict. This means that you would not send or at least not show a calling number to the service provider.

If you want to send a proper formed calling number for outbound calls you would need to create a translation profile with the required rules in it to transform the calling number to the format that your service provider requires. To make it easier to apply I would recommend you to do that on the voice port(s) instead of on the dial peers, given that you donā€™t need different translations for various call scenarios, then youā€™d need to have multiple translations profiles and tie these to the dial peers.



Response Signature


So for the avoidance of doubt then, the number that would be dialled is 01274262XXX and NOT 01274262872XXX ?

Yes the number that will be sent out to the service provider would be 01274262XXX.



Response Signature


Hi, 

If I understood it correctly, you can use the following command in the IOS to test your translation rule. 

"test voice transaltion-rule <rule number> <number that you want to test>"

 

1. As you are passing only the last four digits, your outputs will be 6789. 

test voice translation-rule 1 01234456789
Matched with rule 1
Original number: 01234456789 Translated number: 6789
Original number type: none Translated number type: none
Original number plan: none Translated number plan: none

if you are looking to get 456789 then rule should ule 1 /^.*\(......$\)/ /\1/


2.  as per the current rule, it only prefixes 900 to the number. if you want to use the translation rule for this purpose, then 

voice translation-rule 2
rule 1 /^45\([1-9].+\)/ /0123445\1/

 

test voice translation-rule 183 456789  //Editing after the comments from @Roger Kallberg (+5 thanks for pointing this)

test voice translation-rule 2 456789
Matched with rule 1
Original number: 456789 Translated number: 01234456789
Original number type: none Translated number type: none
Original number plan: none Translated number plan: none

 

Regards,

Shalid 

****If this answered your question, please click "Accept as solution" || If you find this response useful, please mark it as "Helpful"****


@Shalid Kurunnan Chalil wrote:

If I understood it correctly, you can use the following command in the IOS to test your translation rule. 

"test voice transaltion-rule <rule number> <number that you want to test>"

Yes that how you can test the rules directly in the router.


@Shalid Kurunnan Chalil wrote:

test voice translation-rule 1 01234456789
if you are looking to get 456789 then rule should rule 1 /^.*\(......$\)/ /\1/


Yes that rule would keep the six last digits in the number matched.


@Shalid Kurunnan Chalil wrote:

2.  as per the current rule, it only prefixes 900 to the number. if you want to use the translation rule for this purpose, then 

voice translation-rule 2
rule 1 /^45\([1-9].+\)/ /01234 45\1/


This would match numbers that starts with 45 and the third digit is 1 to 9 (this is the same as a single . (dot) btw), and then any digit by the . (dot) and then one or more of the previous match aka one or more of what the . (dot) matches. Or as the link I sent explains it. "Any digit followed by one or more ocurrences. This is effectively anything, except null.". On the right hand side you have this /0123445\1/, this gives the resulting translation as below.

  • Drop the 45
  • Copy what is in-between the parentheses, for you [1-9].+, this is explained above what it means and carry this over to the right hand side with \1
  • On the right hand side you prefix 0123445 in-front of what is carried over with the \1

 


@Shalid Kurunnan Chalil wrote:

test voice translation-rule 183 456789


The test that you do would not match the rule above as the number does not start with 45.



Response Signature


Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: