chaddow Posted September 28, 2017 Report Share Posted September 28, 2017 Can someone help me with the correct expression to add to my dialplan? I'm trying to send anything in this regular expression ^1?(8(00|55|66|77|88)[2-9]\d{6})$ out a trunk that I have for outbound toll free. I'm running Version: 57.4 debian Thanks Quote Link to comment Share on other sites More sharing options...
Vodia PBX Posted September 28, 2017 Report Share Posted September 28, 2017 Try replacing \d with [0-9] Quote Link to comment Share on other sites More sharing options...
chaddow Posted September 29, 2017 Author Report Share Posted September 29, 2017 On 9/28/2017 at 7:04 AM, Vodia PBX said: Try replacing \d with [0-9] Change ^1?(8(00|55|66|77|88)[2-9]\d{6})$ to ^1?(8(00|55|66|77|88)[2-9][0-9]{6})$ ? Thanks Quote Link to comment Share on other sites More sharing options...
Vodia PBX Posted September 29, 2017 Report Share Posted September 29, 2017 Hopefully I did not get lost in the brackets, but that looks about right... Quote Link to comment Share on other sites More sharing options...
chaddow Posted September 29, 2017 Author Report Share Posted September 29, 2017 I added that regex to a Toll Free trunk with a pref of 81. It's in both pattern and replacement. but it doesn't see, to pick up the pattern because the call goes out the standard outbound trunk. The test call to an 800 number is going out the carrier outbound trunk with a pref of 100 that has pattern of * and replacement of * Quote Link to comment Share on other sites More sharing options...
chaddow Posted September 29, 2017 Author Report Share Posted September 29, 2017 Is there a a 1 line pattern match and replacement for Vodia that puts all of this in one line/one trunk? pref: 40, trunk: toll-free outbound , pattern: 800* , replacement: 800* pref: 44, trunk: toll-free outbound , pattern: 1800* , replacement: 1800* pref: 50, trunk: toll-free outbound , pattern: 888* , replacement: 888* pref: 55, trunk: toll-free outbound , pattern: 1888* , replacement: 1888* pref: 60, trunk: toll-free outbound , pattern: 877* , replacement: 877* pref: 65, trunk: toll-free outbound , pattern: 1877* , replacement: 1877* pref: 70, trunk: toll-free outbound , pattern: 866* , replacement: 866* pref: 75, trunk: toll-free outbound , pattern: 1866* , replacement: 1866* pref: 80, trunk: toll-free outbound , pattern: 855* , replacement: 855* pref: 85, trunk: toll-free outbound , pattern: 1855* , replacement: 1855* Thanks. Quote Link to comment Share on other sites More sharing options...
Vodia PBX Posted September 29, 2017 Report Share Posted September 29, 2017 Oh I was under the impression we were dealing with inbound (trunk settings). For "complex" patterns in the dial plan, you need to look at user@domain. So the pattern would be 1?(8(00|55|66|77|88)[2-9][0-9]{6})@.* Quote Link to comment Share on other sites More sharing options...
chaddow Posted September 29, 2017 Author Report Share Posted September 29, 2017 That isn;t picking up the call and sending it out the toll-free-outbound trunk that is selected. the call is going out the carrier-outbound trunk. pref: 25, trunk: toll-free-outbound, pattern: 1?(8(00|55|66|77|88)[2-9][0-9]{6})@.* , replacement: 1?(8(00|55|66|77|88)[2-9][0-9]{6})@.* pref: 100, trunk: carrier-international, pattern: 011* , replacement: 011* pref 1110, trunk: carrier-outbound, pattern: * , replacement: * Quote Link to comment Share on other sites More sharing options...
Vodia PBX Posted September 29, 2017 Report Share Posted September 29, 2017 I would fall back to good old simple patterns: Pattern: 800xxxxxxx|855xxxxxxx|866xxxxxxx|877xxxxxxx|888xxxxxxx Replacement: * If that does not work you can as well split it up to multiple lines. Quote Link to comment Share on other sites More sharing options...
chaddow Posted October 3, 2017 Author Report Share Posted October 3, 2017 Ok, thanks. This is working. 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.