cphtdk Posted July 26, 2011 Report Share Posted July 26, 2011 Hi, I would like to specify a specific trunk for mobile phones. The mobilephone prefixes are as follows: 020xxxxxx 030xxxxxx 031xxxxxx 040xxxxxx 041xxxxxx 042xxxxxx 050xxxxxx 051xxxxxx 052xxxxxx 053xxxxxx 060xxxxxx 061xxxxxx 071xxxxxx 081xxxxxx 091xxxxxx In Asterisk this would actually be the dialplan, but i cannot figure it out in Snom. Would there be an easy way to do this? The 2 range I can get working with 0([2][0-9]{7})@.* but why whould the 30/31 range not be matched by 0([3][0-1]{7})@.* I don't get it.... Brgds Thomas Jensen Quote Link to comment Share on other sites More sharing options...
Vodia support Posted July 26, 2011 Report Share Posted July 26, 2011 What's the scenario here? just curious to know what your trying to do. Quote Link to comment Share on other sites More sharing options...
pbx support Posted July 26, 2011 Report Share Posted July 26, 2011 You can use Pattern: ^0([2-9][0-3][0-9]{6})@.* Replacement: sip:0\1@\r;user=phone The above is very specific to your example. It translates to "start matching from the beginning of the dialed number, first digit 0, second digit anything between 2-9, 3rd digit anything between 0-3, then followed by 6 digits between 0-9" Quote Link to comment Share on other sites More sharing options...
cphtdk Posted August 18, 2011 Author Report Share Posted August 18, 2011 What's the scenario here? just curious to know what your trying to do. Hi, I'm trying to split mobile calls from landline calls. /Thomas Quote Link to comment Share on other sites More sharing options...
cphtdk Posted August 18, 2011 Author Report Share Posted August 18, 2011 You can use Pattern: ^0([2-9][0-3][0-9]{6})@.* Replacement: sip:0\1@\r;user=phone The above is very specific to your example. It translates to "start matching from the beginning of the dialed number, first digit 0, second digit anything between 2-9, 3rd digit anything between 0-3, then followed by 6 digits between 0-9" Thank you for the hint. I ended up adding all these lines to cover all of the above prefixes: ^0([2][0-9]{7})@.* ^0([3-6][0-1][0-9]{6})@.* ^0([4-5][3][0-9]{6})@.* ^0([5][3][0-9]{6})@.* ^0([7-9][1][0-9]{6})@.* Quite a complicated setup... /Thomas Quote Link to comment Share on other sites More sharing options...
pbx support Posted August 18, 2011 Report Share Posted August 18, 2011 Thanks for the observing the flexibility 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.