Explain Goto syntax

Hi.

I let all incoming calls land in an “incoming” context. This context does not include any other contexts for security reasons.

I haev 19 public numbers that I just want to send to the “local-users” context via Goto.
I want the “local-users” context to hold the exten with Dial commands.

The “local-users” includes incoming but if I add a DIAL command for the extensions in incoming I have to add time limits and Voicemail there as well which makes the set up in “local-uusers” unnecessary.
I would also have to include outgoing in the incoming context which is a security risk. (Anyone could call any public no.@my sip domain. My Asterisk would not find the no. and forward it to my PSTN trunk :frowning: )

So, I’d like to add in incoming:
exten => 1000,1,Goto(local-users,1000,1) but I can’t get the syntax correct.

Please advice.

Rgds

PAtrick Arkley
www.say-no.se

That is the correct syntax, just make sure that asterisk knows about that you can confirm it by going to the cli and typing “show dialplan local-users” if it says there is no existance of it then you have it in a file other than extensions.conf and you must # link that file.

Also make sure you have an extension 1000,1 in local-users. when you dial this you can watch to see if it jumps contexts correctly because it will tell you it went to an invalid extension if it was sent incorrectly, also if this public context is to bring in did’s to your phone extensions it would make more sense to map it in that way ie

exten => 7205551212,1,Goto(local-users,1000,1)

oh and as for the syntax:

-= Info about application ‘Goto’ =-

[Synopsis]:
Goto a particular priority, extension, or context

[Description]:
Goto([[context|]extension|]priority): Set the priority to the specified
value, optionally setting the extension and optionally the context as well.
The extension BYEXTENSION is special in that it uses the current extension,
thus permitting you to go to a different context, without specifying a
specific extension. Always returns 0, even if the given context, extension,
or priority is invalid.

BTW, in ast cli just type show application appname to get details about any command.

[quote=“savaticus”]That is the correct syntax, just make sure that asterisk knows about that you can confirm it by going to the cli and typing “show dialplan local-users” if it says there is no existance of it then you have it in a file other than extensions.conf and you must # link that file.

Also make sure you have an extension 1000,1 in local-users. when you dial this you can watch to see if it jumps contexts correctly because it will tell you it went to an invalid extension if it was sent incorrectly, also if this public context is to bring in did’s to your phone extensions it would make more sense to map it in that way ie

exten => 7205551212,1,Goto(local-users,1000,1)[/quote]

Thanks. I will test it.

Today the DID is not present. I only use ENUM to route the call over VOIP. The public no. is still routed over PSTN.

BTW: It works fine.