christer Posted October 11, 2007 Report Share Posted October 11, 2007 I have to dial 8 to get an outside line, so when I dial a local number I would dial 82441000. I have a dial plan replacement rule as follow pattern: xxxxxxxx replacement 1914* The problem is that I the 8 (for an outside line) is getting inserted after the 1914. How do I get rid of the 8 in the replacement? Quote Link to comment Share on other sites More sharing options...
Vodia PBX Posted October 11, 2007 Report Share Posted October 11, 2007 Why don't you use 8* as pattern? Quote Link to comment Share on other sites More sharing options...
christer Posted October 11, 2007 Author Report Share Posted October 11, 2007 Why don't you use 8* as pattern? You are missing the point or I wasn't clear enough, I am trying to insert 1914 and replace the 8 at the same time. So when I dial 8 and then local number (for example 2441000), I want the 8 to be replaced (or removed) and then 1914 inserted - So when I dial 82441000 on my phone, I want the PBXNSIP to dial 19142441000. Quote Link to comment Share on other sites More sharing options...
Vodia PBX Posted October 12, 2007 Report Share Posted October 12, 2007 You are missing the point or I wasn't clear enough, I am trying to insert 1914 and replace the 8 at the same time. So when I dial 8 and then local number (for example 2441000), I want the 8 to be replaced (or removed) and then 1914 inserted - So when I dial 82441000 on my phone, I want the PBXNSIP to dial 19142441000. Oh, okay. Simple patterns might not be suitable here. I you use the ERE pattern 8([0-9]{7})@.* and the replacement 1914\1@\r;user=phone then it should work. ERE are not beautiful, but powerful ;-) Quote Link to comment Share on other sites More sharing options...
christer Posted October 12, 2007 Author Report Share Posted October 12, 2007 Oh, okay. Simple patterns might not be suitable here. I you use the ERE pattern 8([0-9]{7})@.* and the replacement 1914\1@\r;user=phone then it should work. ERE are not beautiful, but powerful ;-) Thank you that solved the problem. I appareciate the help. Thanks. Quote Link to comment Share on other sites More sharing options...
andrewgroup Posted January 25, 2008 Report Share Posted January 25, 2008 Thank you that solved the problem. I appareciate the help. Thanks. we've been looking at forums posts about dial plans and after reading your post and the solution, I'm curious about something. If using PBXnSIP what do you have to dial 9 for an outside line? What type of gateway are you using? Have you taken what you've learned and created improved dial plans? Would you mind posting some in the best practices forums? Cheers. 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.