Jump to content
Vodia PBX forum
batotech

pattern / replacement

Recommended Posts

If I setup dial plan

Pattern

Replacement

9(\*)([0-9]*).*

 

\1\2

 

Please what is the meaning of this setup?  There is very little documentation on dial plans.

Share this post


Link to post
Share on other sites

The \* means match a * character. So this pattern would match e.g. 9*1234. 

Usually you don't need those complex (and powerful) "extended regular expression", simple expressions do 99 % of the job...

Share this post


Link to post
Share on other sites

I have looked through the dial plans section several times, and it really doesnt tell the story.

How do you change + to 011, and what does these replacements mean:

sip*1\@\d;user=phone

sip:\1@\r

sip:\1@\r;user=phone

Surely there must be an explanation somewhere of what this all means...please

 

 

Share this post


Link to post
Share on other sites

With the latest dial plan handling you can control how the PBX feeds numbers into the pattern matching. For example you can feed the numbers in E164 format if that makes your life easier. You could then match 011* and replace it with +* (not sure if that works) or sip:+\1@\d (this should work).

Share this post


Link to post
Share on other sites

Thanks for the reply but you have it backwards.

+44XXXXXXXXXX needs to be changed to 01144XXXXXXXXX (the XX are simply the number after the 44)

  • +1XXXXXXXXXX needs to be changed to 1XXXXXXXXXX

Thanks

Share this post


Link to post
Share on other sites

We should look on the process on how the dialed number gets from the original caller to the trunk. When the PBX feeds the number into the dial plan, it formats the number (by default) into the "human readable" country-code dependent format. In the US that would be 01144xxx. Then the replacement comes up with the destination number, which is then fed into to SIP trunk which may reformat the number once again. Keeping this in mind my approach would be to turn logging on and look at the numbers as they go through this process and then make adjustments to the dial plan and the presentation in the trunk.

Share this post


Link to post
Share on other sites

i am not sure what all this means. All i am trying to do is remove the + from a dialled number. From +1 to 1 and from +44 (for example) to 01144....from the dial plan. I dont think it can be done, and all i am asking is for a confirmation. If it can only be done from a trunk then again, i am all ears. This should be straightforward.

Thanks

Share this post


Link to post
Share on other sites

I think the only place where you will have to change anything is on your SIP trunk header. This is not a problem of the dial plan. E.g. there is a setting in the SIP trunk that tells the PBX to present the number in E164 format (which is without the leading +).

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...