cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements

1472
Views
15
Helpful
4
Replies
Highlighted
Beginner

prefix number on voip dial peer

I need to append a string to my SIP provider in this form 1234*dialed number.  This is for outbound traffic.  I have tried the following with no luck.

I am looking for any number dialed by the pbx to be forwarded as a 10 digit number to the pstn with the prefix in front of it

voice translation-rule 1

rule 1 /1112223333/ /1234*1112224444/  (doesnt work)

also added to the dial peer and it still didnt work.

tech-prefix 1234

What is the easiest way to do this

Everyone's tags (1)
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Beginner

This should work:

This should work:

voice translation-rule 1

 rule 1 // /1234*/

voice translation-profile ADD1234*

 translate called 1

dial-peer voice 100 voip

 translation-profile outgoing ADD1234*

That rule syntax worked last time I tried to prepend something. If it somehow doesn't work for you, the alternative could be:

rule 1 /.*/ /1234*&/

Remember you can always test the rules with "test voice translation-rule" command before applying them to a dial-peer.

View solution in original post

4 REPLIES 4
Highlighted
Beginner

This should work:

This should work:

voice translation-rule 1

 rule 1 // /1234*/

voice translation-profile ADD1234*

 translate called 1

dial-peer voice 100 voip

 translation-profile outgoing ADD1234*

That rule syntax worked last time I tried to prepend something. If it somehow doesn't work for you, the alternative could be:

rule 1 /.*/ /1234*&/

Remember you can always test the rules with "test voice translation-rule" command before applying them to a dial-peer.

View solution in original post

Highlighted
Enthusiast

Another related question if i

Another related question if i may.

Can we use this method to only add a prefix if certain numbers hit the gateway?

For example,  we want a certain country code to include the local countries international dialing code.  So if we drop in a number to the gateway that is 886-xxx-xxx-xxx, can we use the 886 to prepend a 002(international access number) so that the actual dialed number would be 002-886-xxx-xxx-xxx? 

Highlighted
Beginner

You could use this syntax:

You could use this syntax:

rule 1 /^886.........$/ /002&/

Read it as 'if the number begins with 886 followed by exactly 9 digits, then prepend 002 to the entire matched string'.

Highlighted
Enthusiast

Thanks a ton!

Thanks a ton!

CreatePlease to create content
Content for Community-Ad
Future of Work Virtual Summit Day 5

Cisco COVID-19 Survey