Inbound routing on CID problem


I got a pretty straight forward setup with some time conditions & IVR menu’s. But I would like to add a few cid’s which bypass IVR/time conditions and go directly to a certain extension.

So, I use the cid check in the inbound route to route those calls, which works fine. But I got about 10 cid’s I want to thread like this. Is there no other wahy then making 10 inbound routes (1 per cid) or can I use a comma seperated list or similar to archieve this? I don’t think it’s possible through the webif, but maybe from the cli? Any suggestions?

kind regards & thx

I think it takes about 1 minute to make each route so in 10 minutes (or less) you would be done.

Sure, and that’s how I do it now but that wasn’t the question :wink:
What if I had 300 cid’s I wanted to route in a non-default way?

You can use regex’es in your inbound route if appropriate.

Yes, I’ve noticed that, but cid’s are really completely different, so impossible to find a good match wich doesn’t allow other cid’s too. Anyway, like I said, I already did them one by one, so for me the problem is solved. The question was more to have an answer on these scenario’s as it could come forward in future configurations.

kind regards

Inbound filtering is done the way you have discovered. Once the CID list grows, I know of two 3rd party modules that will query a database and direct calls accordingly:

Smartroutes Module:

SmartHomeRoutes Module:

Interesting, Thx for the tip/link!!!

dicko said:

You can use regex’es in your inbound route

This is news to me. Do you just mean that you can use Asterisk dialing patterns (N,X etc) or do you mean literally a regular expression? If the latter, do you have a link to a resource that explains how to do this?

pattern matching quite well explained in this not so distant resource.

to quote from mickecarlsson (who knows a little about FreePBX) :wink:

From the tooltip:

Define the expected DID Number if your trunk passes DID on incoming calls.
Leave this blank to match calls with any or no DID info.
You can also use a pattern match (eg _2[345]X) to match a range of numbers

Just a thought from a newbie

I had to recover CallerID from SIP Info header this worked for me
it should be possible to create context that changes SIP info CID to an Internal CID string and then route on that internal CID string remembering to add context created to your trunk context.