See which inbound route was used

Is there a way to see which inbound route was used? I have an extension that does not have an inbound route (explicit or pattern) but the call (from outside the PBX) is connecting to the extension regardless. Is there a way to see which route was used? I am not expecting this behavior. When I look at the log I see:

[2022-03-23 16:56:37] VERBOSE[4319][C-00001ece] pbx.c: Executing [[email protected]:1] Goto("SIP/AVAYA-1-00003711", "from-pstn,5555555555") in new stack	
[2022-03-23 16:56:37] VERBOSE[4319][C-00001ece] pbx.c: Executing [[email protected]:1] GotoIf("SIP/AVAYA-1-00003711", "0?ext-local,*5555555555,1") in new stack	
[2022-03-23 16:56:37] VERBOSE[4319][C-00001ece] pbx.c: Executing [[email protected]:2] GotoIf("SIP/AVAYA-1-00003711", "0?ext-local,5555555555,1:followme-check,5555555555,1") in new stack
[2022-03-23 16:56:37] VERBOSE[4319][C-00001ece] pbx.c: Executing [[email protected]:1] Gosub("SIP/AVAYA-1-00003711", "followme-sub,5555555555,1()") in new stack

I know extension to extension calls work, but I was not expecting this, but then I dont normally use the extensions module (mostly custom dialplan). Maybe if an extension is defined in the GUI, it doesn’t need an inbound route if it is dialed directly?

My trunk context is from-pstn-e164-us

Do you have an IVR with direct dial enabled? It is quite common that calls get connected to endpoints with a short extension number because of that.

Nope, I am calling “5555555555” from a cellphone. Avaya session manager sends that call to FreePBX, but there is no inbound route that matches. I would expect an asterisk failure message (meaning that I hit the PBX, but no matching route), but instead it connects to the matching 5555555555 extension.

I have been playing around a little more, and on this box at least, it does appear if I define an extension in the extensions module, I can reach it without a matching inbound route.

Calling 5555555555:
Cellphone>PSTN>Avaya Session Manager>FreePBX(with no matching route)>5555555555 extension

Calling 6666666666 (not defined in extensions module or inbound routes):
Cellphone>PSTN>Avaya Session Manager>FreePBX(with no matching route)>Failure Message

Calling 6666666666 (Now defined in extensions module but still no matching inbound route):
Cellphone>PSTN>Avaya Session Manager>FreePBX(with no matching route)>6666666666 extension

I have had others try and the same thing is happening. I am just starting to use regular extensions. Typically we have calls go to FreePBX for specialty treatments (call back, etc.), and I have needed a defined route for those custom extensions.

Unfortunately I don’t have any other idea. I’ve not worked with Avaya session manager yet, maybe it’s because of that, I don’t know. But if you’re not on a production system or you are really brave, you could remove all the inbound routes and see what happens.

Edit: If you are going to try that, you might want to export your DID settings via bulk handler before.

This is correct.

There is a comment in the /etc/asterisk/extensions.conf file explaining the logic:

([from-did-direct] is included in the [from-pstn] context which is goto’ed by the [from-pstn-e164-us] context)

; from-did-direct:
;
; 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.

1 Like

Thanks @billsimon, we are moving to more of the transaction happening in Asterisk (vs. Avaya) so some of it is newer to me. Should’ve just followed the contexts from the beginning.

These types of questions can be divined by using “dialplan show” at the asterisk console. So for this example:

dialplan show [email protected]

Would show you if that was a valid dial string, and if there were multiple contexts, the order in which they are used

8 find myself doing this a lot, for some things it’s easier to see what happens instead of actually dialing.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.