I’m having some issues with incoming DIDs not matching a catch-all rule if there’s an extension with the same number. Incoming calls are being routed to that extension rather than matching the catch-all rule.
For example: I have internal extensions 201-209. I also have a PRI that sends DIDs in the 100-800 range. I do not actively use all of them so I have a catch-all rule to match so my operators can answer accordingly.
Some of the DIDs I’m not using fall into the same range as my extensions (203, 204 and 208, to be specific). Incoming calls on my PRI that match those DIDs are being routed to the extension rather than the catch-all queue. The other DIDs that have an inbound route AND are in the range of my extensions ring through properly to their respective queues.
The short fix is to add inbound routes for those DIDs, but I’m curious why this is happening in the first place.
I only have a few extensions that match a DID without an inbound route, so it’s not a big deal to just add the routes, but I must admit I’m a little surprised it doesn’t put the catch-all ahead of local.
is it possinle that the context for that trunk has been set to from-did-direct which does provide a one-to-one relatyionship between DID and endpoint ?
Time to look at the twisting and turning dialplan.
extensions.conf:
; from-pstn:
;
; Entry context for calls from the outside world to hit FreePBX
[from-pstn]
include => from-pstn-custom ; this context include remains for legacy reasons, but should not be used.
include => ext-did
include => ext-did-post-custom
include => from-did-direct
include => ext-did-catchall ; THIS MUST COME AFTER ext-did
catchall comes last, therefore anything before it will match first. Including [from-did-direct] which includes [ext-local]
[from-did-direct]
include => ext-findmefollow
include => ext-local
and in [ext-local] is where you will find your extension numbers.
Here’s the explanation in the comments of extensions.conf:
; forces ext-findmefollow to take precedence over ext-local. Also exposed to
; the public side to allow an extension number to be used as an external DID
; without requiring inbound routes to be created, common in many PRI installations
; where the last 4 digits are used as the extnension and DIDs are delivered in
; 4 digit formats.
@lgaetz suggestion, above, should help you avoid this!
System with an inbound route for 6006, an extension 6006, an _XXXX route and as well as catchall route:
uc-33435257*CLI> dialplan show [email protected]
[ Included context 'ext-did-0002' created by 'pbx_config' ]
'6006' => 1. Set(__DIRECTION=INBOUND) [extensions_additional.conf:2099]
*snip*
'_XXXX' => 1. Set(__DIRECTION=INBOUND) [extensions_additional.conf:1916]
*snip*
[ Included context 'ext-local' created by 'pbx_config' ]
'6006' => hint: PJSIP/6006&PJSIP/906006&Custom:DND6006,CustomPresence:6006
*snip*
[ Included context 'ext-did-catchall' created by 'pbx_config' ]
'_.' => 1. Set(__FROM_DID=${EXTEN}) [extensions_additional.conf:5003]
2. Noop(Received an unknown call with DID set to ${EXTEN})
Same as what Bill posted above, but you can see the from trunk context priorities are specific DID’s first, then then XXXX route, then ext-local extensions then the empty DID catchall.
Whoa! Slow your roll there, champ. No need to get all uppity.
Both Lorne and Bill provided information that pointed me in the right direction and I’ve marked the thread as solved. (You, on the other hand, have replied with snippy comments and a smarmy attitude.)
Be more like Lorne and Bill. Catch more flies with honey and all that.