Outbound route prefix

Status
Not open for further replies.

Mikeme

Member
Apr 26, 2021
171
4
18
38
hi guy's
something not going well with prefix for dial out digits..
I'm trying to set when calling *xxxxx(up to 5 digit after the star key) then system will strip the first digit and then send to gateway "1222" and the rest of the number (1222+xxxxx)

there is an option to add digits at the beginning "Prefix" but can't see where to strip the first (star key) digit.

any idea?
 

ad5ou

Active Member
Jun 12, 2018
886
197
43
The built in shortcuts can help with such a dial plan. There are already options for "9"+how ever many digits so you can see how it is done.
You have to escape the "*" but otherwise is exactly the same as 9+5 digits. Just select the shortcut and edit out the 9 for your preferred digit(s)
1633095613758.png
makes a dial plan ending with something like sofia/gateway/mygateway/1234$1

The regex above matches *xxxxx and captures just the 5 digits after the star in capture group 1 (the $1 in bridge statement) and strips the "*"
The prefix field then adds the digits before the captured numbers.
 

Attachments

  • 1633095365037.png
    1633095365037.png
    8.8 KB · Views: 21
Status
Not open for further replies.