Skip to main content

Invalid route on inbound DID

Posted by fuse3 on Mon, 09/19/2011

We are attempting to migrate to a new box and came to an issue with inbound calls. All inbound calls destined for user extensions would fail with "sent to invalid extension". All our hunt groups failed until we changed them to device based groups. We then tested and our DID's had the same issue.

Asterisk 1.8.6.0
TL STE 6.1.1.12
CentOS 5.6 64 bit

-- Executing [9165551212@from-outside:1] Wait("SIP/ACME3-00000002", "1") in new stack
-- Executing [9165551212@from-outside:2] Set("SIP/ACME3-00000002", "__INCOMINGCLI=9165555555") in new stack
-- Executing [9165551212@from-outside:3] Goto("SIP/ACME3-00000002", "from-outside-redir,9165551212,1") in new stack
-- Goto (from-outside-redir,9165551212,1)
-- Executing [9165551212@from-outside-redir:1] Set("SIP/ACME3-00000002", "DIALED_PUBLIC_NUMBER=9165551212") in new stack
-- Executing [9165551212@from-outside-redir:2] Set("SIP/ACME3-00000002", "DIALED_NUMBER=9165551212") in new stack
-- Executing [9165551212@from-outside-redir:3] GotoIfTime("SIP/ACME3-00000002", "*,*,*,*?from-outside-9165551212-tl-allhours,9165551212,1") in new stack
-- Goto (from-outside-9165551212-tl-allhours,9165551212,1)
-- Executing [9165551212@from-outside-9165551212-tl-allhours:1] Set("SIP/ACME3-00000002", "MOH=") in new stack
-- Executing [9165551212@from-outside-9165551212-tl-allhours:2] GotoIf("SIP/ACME3-00000002", "1?nomoh") in new stack
-- Goto (from-outside-9165551212-tl-allhours,9165551212,4)
-- Executing [9165551212@from-outside-9165551212-tl-allhours:4] Macro("SIP/ACME3-00000002", "tl-goto-userextension,1002") in new stack
-- Executing [s@macro-tl-goto-userextension:1] Set("SIP/ACME3-00000002", "CALLERID(name)=") in new stack
-- Executing [s@macro-tl-goto-userextension:2] Goto("SIP/ACME3-00000002", "local-extensions-,1002,1") in new stack
-- Goto (local-extensions-,1002,1)
== Channel 'SIP/ACME3-00000002' jumping out of macro 'tl-goto-userextension'
[Sep 19 16:56:32] WARNING[21651]: pbx.c:4972 __ast_pbx_run: Channel 'SIP/ACME3-00000002' sent into invalid extension '1002' in context 'local-extensions-', but no invalid handler


Submitted by fuse3 on Tue, 09/20/2011 Permalink

I pulled up my extensions.include and found:

[local-extensions]

exten => 1000,1,Macro(tl-userexten,SIP/1000,1000,)
exten => 1000,hint,SIP/1000
exten => 1002,1,Macro(tl-userexten,SIP/1002,1002,)
exten => 1002,hint,SIP/1002

And in my extensions.conf i found:

[from-outside-redir]

#include inbound.include
#include inbound_actions.include
#include extensions.include

Looks like all my other TL boxes with the exception this is running 1.8.6 instead of 1.6.X

Submitted by fuse3 on Wed, 09/21/2011 Permalink

I went to the script tl-goto-userextension and changed it from the default:

exten => s,1,Set(CALLERID(name)=${ARG2}${CALLERID(name)})
exten => s,n,Goto(local-extensions${TL_DASH}${tenant},${ARG1},1)

To the following:

exten => s,1,Set(CALLERID(name)=${ARG2}${CALLERID(name)})
exten => s,n,Goto(local-extensions,${ARG1},1)

I am now able to route calls to users extensions.

This is a STE box and the default does match my other STE boxes.

I'm sure this broke other things so let me know if there is a better way to resolve this.

Submitted by fuse3 on Wed, 09/21/2011 Permalink

Under Global Variables a variable was defined for TL_DASH with a value of -

This was a default load of 6.1.1.10 and then upgraded to 6.1.1.12

Here is what pointed me to the error:

sent into invalid extension '1002' in context 'local-extensions-', but no invalid handler

Note the local-extensions- instead of local-extensions

I removed the variable in question and everything is working as expected.

Submitted by eeman on Sun, 09/25/2011 Permalink

TL_DASH is never defined in STE, only MTE..if you define it in STE you will start having other problems showing

was this a new install? it should never be defined in STE, as you seem to have discovered.

I just checked /usr/libexec/webmin/asterisk/configs/asterisk/extensions.conf and don't see it defined in the STE configs that get placed on initial installation but I'm looking at a recent build.

Submitted by fuse3 on Sun, 09/25/2011 Permalink

I think the box was setup a couple builds ago as a "roll your own" STE.
I have removed the variables and life is good.