Route incoming calls by area code


#1

I would like to be able to setup an incoming route that will send ALL calls from a number of area codes to a destination. I see that I can do something like 1989xxxxxxx to send all 989 Area code calls but how can I use multiple AC in the same route?

Thanks for any ideas


#2

Asterisk’ regexes are a little ‘ir-reg-ular’ but if 1[989|231|810]NXXXXXX doesn’t work, you will have to go with one per area code.


#3

Thanks Dicko I kinda thought there might be something like that to try. I willl give it a try and if it doesn’t work I guess it’s individual routes I go then

Thanks again


#4

Ha I just realized that I won’t be able to use that at all. I wanted to force ALL Michigan calls to a DID to go to an ivr and all others to go to another IVR. But I can’t have two routes for the same DID. I will have to figure out a plan B I guess


(Lorne Gaetz) #5

For complex logic, consider offloading the logic of call routing from Asterisk to an external script or API and then use Dynamic Routes to branch the call based on the lookup result from the Caller ID number.


(Andrew) #6

Yes you can as long as the Caller ID Number field is different.


#7

OK My statement was based on having ANY in the CID but this won’t be the case. Correct me if I am wrong. I would need what dicko suggested in one route CID field and the Opposite in the CID field in another route. That one woul dinclude all the other AC codes.