cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
470
Views
0
Helpful
3
Replies

Doubt about translation rule

mnkojima
Level 1
Level 1

Hello

I have a voice gateway connected to PSTN and, before sending the digits to provider, I need to do a translation like that (it is a long distance call):

00 + <city code> + <subscriber number> => 0 + <provider code> + <city code> + <subscriber number>

Example (considering provider code = 12): 00 21 12345678 => 0 12 21 12345678

My configuration is:

voice translation-profile LD
 translate called 10

voice translation-rule 10
 rule 1 /^00\([^0][^0].*\)/ /012\1/

dial-peer voice 140 pots
 description ############ Long Distance Calls #########
 translation-profile outgoing LD
 preference 1
 destination-pattern 00[^0][^0][2-5].......
 progress_ind alert enable 8
 port 1/0/0:1
 prefix 0

What calls my attention is that this works only if command 'prefix 0' is present. I understand that this should not be necessary since I have a translation profile under the dial peer. Can anyone see what the issue is?

Thank you

Marcos

 

 

1 Accepted Solution

Accepted Solutions

b.winter
VIP
VIP

Hi,

POTS dial-peers automatically strip every leading zeroes. That's why in your case, you need the prefix command.

After the translation is done, your number looks like e.g. 0123456789. But as the POTS dial-peer strips all leading zeroes, you would send out 123456789.

I would recommend deleting the "prefix" command and use the command "no digit-strip" instead.

View solution in original post

3 Replies 3

b.winter
VIP
VIP

Hi,

POTS dial-peers automatically strip every leading zeroes. That's why in your case, you need the prefix command.

After the translation is done, your number looks like e.g. 0123456789. But as the POTS dial-peer strips all leading zeroes, you would send out 123456789.

I would recommend deleting the "prefix" command and use the command "no digit-strip" instead.

One small note on what you wrote @b.winter. A pots dial peer does not automatically remove all leading zeros, it removes any explicitly matched digits in the destination pattern. So it can be anything, not just zeros. The way to turn that off is by either using the command you suggested or by using forward-digit all.



Response Signature


@Roger Kallberg yes, that's true.