DaveD Posted September 4, 2013 Report Share Posted September 4, 2013 I've been doing VoIP telephony for a while, andI thought I understood dial plans somewhat. ButI find the sections here on SnomONE dial plans close to indecipherable. There's no complete list of symbology and syntax; there are only hints and incomplete examples. Yes: there are some basic plans, which are obvious. But the more advanced plans talk about the usage and show formats, but don't explain what the resulting output is, so you can't infer much. Examples are both incomplete and not well explained. I have a need for a very common extension and NANPA handling dial plan syntax, but I can't figure it out. And the SnomONE syntax isn't exactly like any other; forexample it's not the same as Asterisk. (That's fine with me!) But without a syntax glossary, I'm just guessing. Dave Quote Link to comment Share on other sites More sharing options...
Vodia PBX Posted September 4, 2013 Report Share Posted September 4, 2013 Asterisk dial plans are completely different than snom ONE dial plan. In snom ONE, the dial plan is really just about finding the right trunk to terminate an outbound call. There is no programming language involved, just patterns. Check out http://wiki.snomone.com/index.php?title=Dial_Plan_Samples for some examples. Quote Link to comment Share on other sites More sharing options...
DaveD Posted September 4, 2013 Author Report Share Posted September 4, 2013 Thanks for your reply! I've looked at those samples for a long time; they're what I referred to in my post. Of coursethere's no programming language, but thereis syntax that isn't well explained. I'll wait for that solution you offered to send mefor a particular issue. But we need a document. Dave Quote Link to comment Share on other sites More sharing options...
Vodia support Posted September 4, 2013 Report Share Posted September 4, 2013 Hi, here is one example you can try. Pattern 8([0-9]{7})@.* Replacement sip:617\1@\d;user=phone http://www.regexbuddy.com is good tool to break down regular expression, I know they can be a bit complicated. Quote Link to comment Share on other sites More sharing options...
DaveD Posted September 4, 2013 Author Report Share Posted September 4, 2013 Thanks! Please explain what the pattern doesand the meaning of these symbols, so I canunderstand how to use the example invarious actual installations. While 'regexbuddy' may be a good tool, it costs $40.Vodia really needs to document the syntax ituses, so ordinary intelligent people can use it. Dave Quote Link to comment Share on other sites More sharing options...
Vodia support Posted September 4, 2013 Report Share Posted September 4, 2013 Pattern 8([0-9]{7})@.* User dials prefix 8 match any number between 0-9 the target digits is 7 example 12345678 Replacement sip:617\1@\d;user=phone It will be replace with 61712345678 replacement will match the 1st string which is indicated by the \1 which is 8([0-9]{7})@.* @\d is @nyc.mypbx.com which is the domain of the pbx in an invite the replacement part will look like this sip:16174442231@nyc.mypbx.com;user=phone The user=phone the recipient Here is an oldie http://kiwi.pbxnsip.com/index.php/Dial_Plan most of the example and explanation should get you by. Quote Link to comment Share on other sites More sharing options...
DaveD Posted September 4, 2013 Author Report Share Posted September 4, 2013 Thanks much for this! You provided some notes that try to make senseof the example. And to some degree, so did that'oldie' you quoted. But not all symbols are defined For my system, '\d' did not work--it was passed asa literal--I had to use '\r'. I thought I'd found all the on-line dialplan sections,but because there are four separate ones--eachslightly different--I missed this old one. And this oldone is the only one that attempts at a definition. Even here, there is no explicit definition of someof the symbols or some of the syntax. For example, those '\d' and '\r' switches are not defined. I also added a 10D version of this as: 8([0-9]{10})@.* >> sip:617\1@\r;user=phone For multiple trunks, I use selector prefix of 9, 8 and so on,as you'd expect. Note that these four examples: > prefix 9 with 7D allowed > prefix 9 with 10D allowed > prefix 8 with 7D allowed > prefix 8 with 10D allowed are all the common examples of trunk selector prefix neededin a NANPA environment, and they don't appear in completeform anywhere. Why not publish them in the WIKI? Not to be a total nag, but doesn't this show the need for a single well-compiled document thatshows all the syntax with examples fully explained? I'm a veteran tech writer, so perhaps I emphasizethis. But good documentation IMHO is part of thecore job--not an afterthought. Dave Quote Link to comment Share on other sites More sharing options...
Vodia support Posted September 5, 2013 Report Share Posted September 5, 2013 Thanks Dave we are actually working on a improved documentation system for version 5. It will be up on snomone.com, but no word on when it will go live. Quote Link to comment Share on other sites More sharing options...
DaveD Posted September 5, 2013 Author Report Share Posted September 5, 2013 Right: the manual dates from 2010. In the mean time, consider dropping this example into the WIKI; unfortunately, plain-text paste doesn't preserve tabs: <<<<< SnomONE simple dialplan for NANPA [North American] dialing, using 10-digit format, with prefix to select a trunk [DID] Assume you use a main trunk [Trunk 'A'] for most outgoingcalls, and two other trunks ['B' and 'C'] that you use asalternates. You also want to verify that the dialed string is exactly exactly 7 or 10 digits as required by NANPA format; any other length string is invalid and is rejected. International calls are an exception; they have variable length. If you dial a 7-digit call, your local three-digit area code must be added. In this example, we use area code 617. In this example, you can select one of the two alternate trunks using a prefix--either '9' or '8. SEQUENCE TRUNK DIAL PATTERN REPLACEMENT NOTE 100 N/A 211|311|411|911 not allowed 200 N/A 900xxxxxxx|976xxxxxxx not allowed 300 A 011* international 400 B 9([0-9]{7})@.* sip:617\1@\r;user=phone 500 C 8([0-9]{7})@.* sip:617\1@\r;user=phone 600 B 9([0-9]{10})@.* sip:\1@\r;user=phone 700 C 8([0-9]{10})@.* sip:\1@\r;user=phone 800 A xxxxxxx 617* NANPA 7D 900 A xxxxxxxxxx NANPA 10D NOTES > the sequence is crucial; for example, it's necessary to check for the '8' or '9' trunk prefix before strings without a prefix; otherwise it might be mistaken as the first digit of an actual phone number > 100: all the special-service [3-digit] numbers are disallowed > 200: the fee-based 900 and 976 exchanges are disallowed > 300: International calls start with '011'; here, only Trunk 'A' is used; the replacement string is simply 011 followed by any number of digits > 400: the pattern 9([0-9]{7})@.* selects outbound trunk 'B' and accepts exactly 7 digits (after the '9'); the replacement string is: sip:<outbound domain>617nnnnnnn;user=phone [the 'n's are 7 digits as dialed] > 700: the pattern 8([0-9]{10}@.* selects outbound trunk 'C' and accepts exactly 10 digits (after the '8'); the replacement string is: sip:<outbound domain>nnnnnnnnnn;user=phone [the 'n's are 10 digits as dialed] > calls that don't fit any dial pattern are rejected DaveD -- Sep13 >>>>> Quote Link to comment Share on other sites More sharing options...
DaveD Posted September 17, 2013 Author Report Share Posted September 17, 2013 Did you folks find any use for the document Icreated and provided above? I hoped you might find a place for it in the WIKI. Dave Quote Link to comment Share on other sites More sharing options...
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.