Hello everyone,

I have recently setup an Asterisk box and have things running fairly
well, (I think). I'm now moving onto tweaking my dialplan somewhat and
have come across some examples which have caused me a bit of confusion.
I'm hoping some of you can clear this up for me.

Basically, my understanding of a context flow is as follows (from
http://www.voip-info.org/wiki-Asterisk+config+extensions.conf):
"when Asterisk transfers a call to an extension, it will look for a
command with priority 1. If there is not a line with a priority of 1,
then the extension will not match the dialed number. After executing the
priority 1 command, Asterisk will increment the priority to "2" unless
the command itself determines the next priority to be executed. If this
next priority is not defined in the extension, Asterisk finishes
processing for this extension, even if there exists another command with
a priority higher than the missing one."

I have added enum logic into my dialplan using the following chunk of
code (from https://www.e164.org/config.php?dp=NA):
[macro-enum-call]
exten => s,1,SetCallerID(16045551212)
exten => s,2,EnumLookup(${ARG2})
exten => s,53,Goto(${ARG1},${ARG2},1)
exten => s,103,Goto(${ARG1},${ARG2},1)
exten => s,3,GotoIf($[$[${ENUM:0:3} = SIP] | $[${ENUM:0:3} = IAX]]?4:5)
exten => s,4,Dial(${ENUM})
exten => s,5,Goto(${ARG1},${ARG2},1)
exten => s,105,Goto(${ARG1},${ARG2},1)

If my understanding of context flow is correct, then priority commands
53, 103 & 105 in the above example will never be called or executed.

Am I missing something? Why are they there?

Thanks in advance,
James Rothney

Reply via email to