Inbound routes vs from-did-direct priority

I’m setting up an install that will handle 200 numbers in the range of 500-699
These will go to extensions i will setup when a new tenant comes, in the building they will get a random number (the building phone number starts with 500 and ends with 699, for example +XXXXXXXX554 will direct to extension 554)

I found a few threads talking about this and i will add to extensions_custom.conf the following:

[from-sip-provider]
exten => _XXXXXXXXXXX,1,Goto(from-did-direct,${EXTEN:-3},1)

Now i want to know if the inbound routes will have priority. I have 1 number (500) that needs to go to the reception. I found a very old thread (2008) that says it was resolved but not how and if thats still the case
Thread in case: Direct DID's vs. Inbound Routing

you don’t need an interim [from-sip-provider] if you use a properly configured [from-did-direct]. nnnnnn500 sent to a predefined ivr, 501-699 to extant extensions 501-699

Is there anywhere i can find docs about this? I tried the wiki but i’m prob looking in the wrong way and couldnt find it

it is fully explained in extensions.conf,

If you use from-did-direct context for your trunk, then it will bypass inbound routes always. If a call comes in without a matching extension, the call will fail.

If you use from-trunk, then the call will match against both local extensions and inbound routes. In the use case where the DID exists for BOTH a local extension and an inbound route, then the inbound route takes precidence.

I think i will switch to bulk import DID since it suits my needs better, already had the request for some tenants to use a group call for multiple phones.
So its going to be mixed anyway.

Exporting the few inboud rules i made (DID) showed me the syntax i need to use for making a CSV to import. That way i’ll have a clear list of inbound routes that should be easy to adjust when needed without getting into conf files.

Also, Excel is a pain in the ass with CSV files. :sob:Took me a while to get it to behave (removing the + from numbers, semicolon cuz i’m not in the US… the list goes on).

cidnum,extension,destination,description
,+31234567890,"ext-group,500,1",Reception
,+31234567540,"from-did-direct,601,1",Kantoor 601
,+31234567640,"from-did-direct,640,1",Kantoor 640
,+31234567561,"from-did-direct,561,1",Kantoor 561
,+31234567522,"ext-group,800,1",Group 800

Trying to wrap my head around this, going from full GUI usage to this requires some reading on my part :smile:

There are other benefits to using inbound routes. The Allowlist, Blacklist, CID Lookup, CID Superfecta, Fax Detection, prob others … all require an inbound route for them to work.