Matching a pattern

I’d like to have certain extensions using a certain trunk. I notice i can use the callerID pattern match to seperate out extensions such as 20XX and 21XX.
Trouble is i’d like to seperate our extensions in the following way;

1000 to 1050
1051 to 2000
2001 to 2050

Is this possible?

The quickest and most cost-effective way I know of:

https://wiki.freepbx.org/display/FPG/Class+of+Service-Admin+Guide

I’ve had a go…

10[0-5][0-1]
10[5-9][0-1]
11[0-5][0-1]
11[5-9][0-1]
Is this correct?

No, [0-1] is 0 or 1 that’s it. You need [0-9] or X (which is 0-9), however, you’ll have collisions. The pattern matching will catch “cross-over” based on your ranges.

Little addon:

1000 to 1050 -> 10[0-5]X will match 1000 to 1059
1051 to 2000 -> [12]0[567890]X will match 1050 to 2009 and 2050-2099
2001 to 2050 -> 20[0-5]X will match 2001 to 2059

No, you have a problem with 1050 and 2000, Think about the numbers in a range.

1000 to 1049
1050 to 1999
2000 to 2049

Is MUCH easyier to manage

1 Like

So using the both examples from the replies it would be;

1000 - 1049 10[01234]X
1050 - 1099 10[56789]X
1100 - 1149 11[01234]X
1150 - 1199 11[56789]X

Or to simplfy;

1000 - 1049 10[0-4]X
1050 - 1099 10[5-9]X
1100 - 1149 11[0-4]X
1150 - 1199 11[5-9]X
3 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.