Inbound route for group of numbers

Hi, in our previous pbx (based on we had the option to setup an inbound route for a group of numbers (so we had staff, top customers, and so on)

in freepbx it seems that we can make rules only for single numbers (or for regular expressions matched numbers), is it the only way?


What selection criteria distinguishes one “group of numbers” from any other “group of numbers?”


i mean:

i could have 3 lists:


each one has several numbers (cid) inside

If i receive a call from a number in the list of staff -> no IVR
if from friends -> custom IVR
if from customers -> standard IVR

at this moment i see only the opportunity of doing it 1 number per rule …


So there’s NO discriminating criteria, right?

You can use the mysql database interface.

CLI> database put MYGROUPS 4160000000 friends
CLI> database put MYGROUPS 4161111111 staff
CLI> database put MYGROUPS 4162222222 customers
CLI> database put MYGROUPS 4163333333 customers
CLI> database put MYGROUPS 4169999999 friends
exten => _.,1,NoOp()
exten => _.,n,GotoIf(${DB_EXISTS(MYGROUPS/${EXTEN})}?from-${DB(MYGROUPS/${EXTEN})},${EXTEN},1)
exten => _.,n,Goto(from-trunk,${EXTEN},1)





The above are fragments and will need refinements to fit your use/config; however, you should be able to see the idea and jest of it.


Ok, but this is a manual setting :wink: Nothing like a module for web interface? :wink:

I’m not a freepbx developer, so rolling a module is (presently) beyond my skills. I’m just another tadpole offering some measure of assistance.

Writing a generic can-be-used-by-all call flow/class routing isn’t trivial. I think if you look at what is being contemplated in freepbx 2.7 track and beyond is a re-think of the core “call routing” facility. (I’ve offered my SQL skills if SQL skills would be helpful.)

At the end of the day with anything asterisk, there has to be a “dial plan.” There is a third-party tool, called “visual dialplan,” that can help you “roll your own” dial plan fragments. I, personally, find it easier to write the code (but that’s me after doing the deep dive. I do still recall how I felt about dial plan coding before I took the plunge.)

Apstel may be gui enough for you.


You may also try googling “asterisk white listing.” There are some white list ideas/approaches that you could adapt.