07-26-2022 03:36 PM
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
Solved! Go to Solution.
07-27-2022 05:02 AM
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.
07-27-2022 05:02 AM
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.
07-29-2022 11:48 PM
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.
08-01-2022 10:44 PM
@Roger Kallberg yes, that's true.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide