We have 200+ SIP DID’s. I need to have an outbound call use a specific provider area code DID based on the area code of the number being called. So a call to 212 will use the 212 number from our provider. And area code 541 will use the 541 area code number from our provider. Will the system work as I expect? I would expect to set up one trunk, and then the outbound routes needed. Do I need to set up 200+ outbound routes, or can I set up one? I do need to set up 200+ inbound routes since I prefix all numbers with a specific code.
Any help is apprciated…
You’re going to need to set up 200 outbound routes I think. They can use the same trunk but in order to get the DID to show the correct area code you’d need to enter a Route CID (with override extension checked) for each desired area code’s DID. You’d also want to set up a route where no area code is matched.
For the dial pattern you’d want something like [888NXXXXXX] for each area code. Don’t forget to set up an emergency CID as well. Don’t want 911 calls going to the wrong state.
You could do this with a bit of custom code. I recently posted to another forum how to dynamically change outgoing CID, you could adjust it to suit your situation:
Outside links are less than ideal, if you get it to work please post here for the benefit of others.
Option 1 - You can easily set this up using matching patterns, but (if I’m reading your original post correctly) you only need to set up routes for the number of Area Codes you are trying to hit. If the limiting factor is the call area code, just set up outbound routes using matches against 1999NXXXXXX or 999NXXXXXX (depending on your needs and your VOIP provider) and set the route area code to a number that’s appropriate to that area code.
Option 2 - Of course, the custom code solution could work as well - replacing the outbound caller ID in a custom context is a smart idea.
If you want to stay strictly within the FreePBX management environment, you can use option 1. If you’re more flexible, either option 1 or 2 should work for you. A lot depends on your environment.