andrewgroup Posted January 25, 2008 Report Share Posted January 25, 2008 We've read http://wiki.pbxnsip.com/index.php/Dial_Plan and based upon this and our own experiences trying to create seemingly easy dial plans I think it would go a long way towards full understanding with an explanation of how Dial Plans are processed. From a recent experience with a CS410 with the built-in PSTN gateway and a SIP trunk to a remote PBX it appears as if we could only get the plans pattern 8XXX blank replacement will go to the sip trunk we set this priority at 100 and the PSTN set at 100 also with Pattern * replacement * to dial out the PSTN. It would be very very helpful for an explanation of how the preferred number assignments on the trunk are processed and what happens when the assignment values are the same priority. I'd also like to see more examples of dial plans similar to a previous post about 7 digit dialing and replacing and inserting an area code... I chopped this from the 7 digit dialing post and I think I've restated how it works below The following dial plan 8([0-9]{7})@.* and the replacement was 1914\1@\r;user=phone I understand the pattern does several things. It looks for a dialed number pattern beginning with an 8 followed by 7 digits each of which can be a 0 through 9. I'm not sure I understand the @.* function as shown and I see the replacement is 1914 \1 (first match group would be the 7 digits dialed) and I don't understand the @\r;user=phone at the end of the replacement. We need a Holy Grail Examples document of Dial plan logic... Quote Link to comment Share on other sites More sharing options...
Vodia PBX Posted January 26, 2008 Report Share Posted January 26, 2008 The dial plan processing is based on the extended regular expressions (ERE). Because they are not very popular for regular people, there is a simplified interface on top of it that translates simple patterns into ERE. The ERE are a little bit difficult to read, even more difficult to write, but understandable. The latest version shows how this translation works. It just shows what it uses as ERE when simple pattern are used. That means sometimes it might be difficult to come up with the right pattern, but looking at the log with the translated ERE you can figure out what is wrong (if there is something wrong). I think that should solve many problems that we had ourselves trying to figure out what the dial plan is doing. Quote Link to comment Share on other sites More sharing options...
andrewgroup Posted January 26, 2008 Author Report Share Posted January 26, 2008 The dial plan processing is based on the extended regular expressions (ERE). Because they are not very popular for regular people. Being of Regular People descent, I agree. After working with some of our own dial plans and reading a variety of posts, the missing link in understanding dial plans, at least for me, is some basic concepts that I'll share to reinforce my own understanding and to help others of regular people descent. Dial plans are a filtering system where you define exact call patterns from most restrictive to least restrictive. this means tha a Pattern 911 is exactly defined as three digits containing the exact numbers. Whereas 9XX would be a three digit call where the first number is 9 followed by three more characters. Either pattern could be used to detect an emergency 911 call. something to consider for dial plans. In order for these restrictive filters to be processes properly, you must set the priority of each dial plan. The most restrictive such as 911 should be given the lowest numerical value, thus highest priority so that it is processed and checked against first. Quote Link to comment Share on other sites More sharing options...
Vodia PBX Posted January 27, 2008 Report Share Posted January 27, 2008 Plus we should mention that dial plans are used really only for outbound calls that will (well, most probably) run over a trunk. Dial plans are not used for inbound calls and they are not used for stuff like telling what ring melody to use when calling an extension. In most cases, dial plans should be something simple that most admin's don't hve to worry too much about. Quote Link to comment Share on other sites More sharing options...
andrewgroup Posted January 27, 2008 Author Report Share Posted January 27, 2008 In most cases, dial plans should be something simple that most admin's don't hve to worry too much about. Dial Plans are certainly something that must be worried about while first setting up a system since there is a certain amount of risk associated with not getting it right. IE. sending an E911 call out an ITSP long distance service. We had this happen to us after a system change, fortunately it was not a real emergency. I've seen several interesting posts about Dial Plans and it would be very helpful to pull together many examples of Dial Plans for specific purposes. The Dial plan below is a good example of a special purpose plan. I still don't fully understand this one. Knowing how it works in detail might solve my whole "Regular People" problem. The following dial plan 8([0-9]{7})@.* and the replacement was 1914\1@\r;user=phone Quote Link to comment Share on other sites More sharing options...
gotvoip Posted January 28, 2008 Report Share Posted January 28, 2008 In 1.x we only had ERE and we finally make it simple by putting an * in the pattern with nothing in the replacement and magically all calls would route out that trunk. If you have two trunks you can add 9* to route a call out trunk a and then everything else will go out trunk b. The preference is used as a priority and the lower the preference the higher it is displayed in the dial plan so it is a top down a approach. If you put * as a 10 you will never get to anything below it. If you want to use trunk failover you need to have the same pattern an change the prefernce so the primary trunk will be used first and then when it fails it goes back to the dial plan to find the backup trunk. What are you trying to do in the dial plan that you can't figure out? Quote Link to comment Share on other sites More sharing options...
andrewgroup Posted January 28, 2008 Author Report Share Posted January 28, 2008 What are you trying to do in the dial plan that you can't figure out? I think we are over the hump with the problem we had, but in the process of getting over the hump, I felt it was a good time to attempt to master some of the more advanced capabilities of what dial plans have to offer. I'm slowly pulling together some of the more complex dialplan examples for future reference. I posted that I still did not understand a previously suggested dial plan that was posted to solve a problem for a topic title 7 digit dialing. The solution was the following dial plan 8([0-9]{7})@.* and the replacement was 1914\1@\r;user=phone I get the Dial 8, I get the test for 7 Digits ranging from 0 through 9, I don't fully understand the translation of ht @.* in the pattern I get the replacemenet 1914, 1@ is the dialed 7 digit number, but what is the \r;user=phone doing in this dial plan? Quote Link to comment Share on other sites More sharing options...
Sota Solutions Posted January 28, 2008 Report Share Posted January 28, 2008 \1 is the 7 digit pattern taken from the left hand side. @ is literally the @ symbol. \r is the registrar or domain from the trunk settings. user=phone indicate that the user part of the URI we're calling is a phone number. In the example below I would actually use ^8([0-9]{7})@.* as otherwise potentially you could match on not just 81234567 but also longer numbers containing the pattern 8+7digits e.g. 12381234567. The ^ forces matching from the Left. Quote Link to comment Share on other sites More sharing options...
andrewgroup Posted January 28, 2008 Author Report Share Posted January 28, 2008 \1 is the 7 digit pattern taken from the left hand side.@ is literally the @ symbol. \r is the registrar or domain from the trunk settings. Thank you, and a follow up question. Since \r is the registrar within the trunk, what other references can be used within a dial plan? Cheers, Quote Link to comment Share on other sites More sharing options...
Vodia PBX Posted January 29, 2008 Report Share Posted January 29, 2008 \r = registrar \1 = Param1 (as in the registration tab for the extension) \2 = Param2 \3 = Param3 That's currently all. 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.