[Asterisk-Dev] DIALSTATUS, Goto,
extension matching and loop detection
Karl Brose
khb at brose.com
Tue Dec 21 13:09:18 MST 2004
As always with *, you have to be very cautious of the "documentation"
out there.
You are right about placement of the underscore, it's the proper way.
As for loop detection, I think something was just added to the
development version within
the last few weeks.
Andrew Lindh wrote:
>This seems like a user-list question, but it's not...at least not all of it.
>
>
>Issue #1:
>
>I was working with the DIALSTATUS variable in the extension plan
>using the line after a dial:
> exten => s,n,Goto(s-${DIALSTATUS},1)
>
>I then have a normal line that works like:
> exten => s-BUSY,1,Busy()
>
>Then a match for all other dialstaus:
> exten => s-.,1,Congestion()
>
>But it does not work! No supprise I look at and agree that it should
>not work because it should be:
> exten => _s-.,1,Congestion()
>
>Without the underline it should only do exact matches. I looked at all
>the documentation and it all lists it WITHOUT the underline and says
>that "s-." would be a catchall for the dialstatus goto, but it does not work.
>Am I missing something here? The docs say that's what to use, but it does
>not work and should not work with out the underline.
>
>
>Issue #2:
>
>I also made a small config mistake and saw that there does not seem to be
>any loop detection with the goto. This could be a problem for a misconfigured
>system (not that certified experts should ever have that problem). A
>goal of a well programmed application is to protect users from their own
>mistakes.
>
>Simple example:
> [oops]
> exten => s,1,Goto(s,1)
>
>Not a good example (what fool would do that!), but you get the idea.
>There should be something in place to catch endless loops. May be
>something as simple as a count of how many commands (exten matches) or
>goto's a call can have before it is disconnected (or sent to the T extension).
>Sendmail programs do this now, it allows 30 hops before failing a message.
>A fixed number is not good because we can't know what everyone will do
>but a high default (100 or so) as a hard limit would break loops without
>doing true loop detection. It could just be "maxmatchcount=100"
>in the [general] section.
>
>
> -- Andrew
>
>
>
>
>_______________________________________________
>Asterisk-Dev mailing list
>Asterisk-Dev at lists.digium.com
>http://lists.digium.com/mailman/listinfo/asterisk-dev
>To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-dev
>
>
>
More information about the asterisk-dev
mailing list