Jump to content

is the wiki correct about [911|411] ?


ndemou

Recommended Posts

the wiki presents this regexp:

9[911|411]

and explains:

The first pattern matches the emergency number and the service number explicitly and sends it to the local gateway.

as far as I know (based on the linux grep/sed tools) the above is not correct as it will also match e.g. 914 and it should be corrected to

9(911|411)

Am I correct or are there any big differences in the regexp that pbxnsip uses compared to those that most linux utils understand?

_________

PS: I would love to see a text box and a [test] button on the dial plan page where I could type a number and after hitting "test" I could see bellow the log lines about rules it matched and the replacement made -- it would save me a lot of time!

Link to comment
Share on other sites

the wiki presents this regexp:

9[911|411]

and explains:

The first pattern matches the emergency number and the service number explicitly and sends it to the local gateway.

as far as I know (based on the linux grep/sed tools) the above is not correct as it will also match e.g. 914 and it should be corrected to

9(911|411)

Am I correct or are there any big differences in the regexp that pbxnsip uses compared to those that most linux utils understand?

_________

PS: I would love to see a text box and a [test] button on the dial plan page where I could type a number and after hitting "test" I could see bellow the log lines about rules it matched and the replacement made -- it would save me a lot of time!

 

The example 9[911|411] uses "simple" expressions, while 9(911|411)@.* would be a ERE expression. Both are bad examples, because in version 3 there should be no more 9 prefix for outbound calls (this just creates a mess with the address book).

 

Thinking about a version 4 dial plan I see more the problem that customers want to define by the number prefix which trunk the call should take. I have seem long long dial plans that scare me. Maybe we can just have something like a CSV list that defines which prefix gets routed on what trunk. Just thinking aloud here.

Link to comment
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.
Note: Your post will require moderator approval before it will be visible.

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.

×
×
  • Create New...