ndemou Posted April 2, 2009 Report Posted April 2, 2009 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! Quote
Vodia PBX Posted April 2, 2009 Report Posted April 2, 2009 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. Quote
ndemou Posted April 3, 2009 Author Report Posted April 3, 2009 The example 9[911|411] uses "simple" expressions, while 9(911|411)@.* would be a ERE expression. [...] mea culpa -- I have never noticed the [xxx|yyy] syntax in the simple expressions Quote
Recommended Posts
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.