I have now 100 DID numbers from my voip provider in format 123456xxx (xxx= 400 to 499)
Since pbx extensions numbers are indeed 4XX , is there a way to avoid the use of 100 inbound route and simply strip 123456 from incoming DID and redirect calls at extension number ?
You can create a custom destination like this and set it as the destination for your incoming route:
Your incoming route should look similar to this:
the context âfrom-did-directâ in extensions.conf was designed to handle that situation.
Interesting. How does one use that with 3-digit extensions and how can you get granularity to snip out certain DIDâs in the range to route them differently? FreePBX screen shots would be helpful. This question arises from time to time.
Vary the number of digits replace by Xs in the pattern, and the number of digits (-3 in the example) back from the end of ${FROM_DID}. I believe that incoming routes are handled on a best match basis, so full numbers will be preferred over ones ending in Xs. (I think it is outgoing routes that are first match, but for first match, you put the exceptions before the wildcard matches.)
It seems multiple inbound routes to be a more flexible solution in routing to different targets (bulk handler helps in this)
Iâm just asking myself if âgreatâ DID numbers (more and more hundreds of routes) would be resources-consuming anywayâŚ
You shouldnât need to âsnip outâ anuthing, use the extracted 3 digits as an extension or build an ivr, rg, queue or even a custom destination to match that number
OK. I think I like my method better but to each their own.
If the trunk is sent to [from-did-direct]
then normal inbound route processing (from-did) is bypassed and goes straight to the âext-localâ dialplan, it is a very efficient way to process calls and based on the good old Centrex âcommon blockâ concept
Use from-pstn
in your custom destination. Definitely donât use from-internal
.
Staying in the inbound context for inbound calls is important for a lot of FreePBX features.
I certainly never suggested using â from-internalâ (actually nobody mentioned that apart from you), If the OP uses âfrom-pstnâ then he will indeed need 100 inbound routes which he reasonably wanted to avoid
You will have to convince me which FreePBX features would be missed when in the âext-localâ context apart from âfollow-meâ which is why it is #included
in the [from-did-direct]
context, âext-localâ is after all a global super-set of where any successfully routed inbound call would end up, If you doubt that, you should try it first maybe or peruse dialplan show @ext-local