[asterisk-dev] i extension does not match on initial context - bug or not?
Benny Amorsen
benny+usenet at amorsen.dk
Fri Jan 9 04:51:26 CST 2009
Dmitry Andrianov <dimas at dataart.com> writes:
> There is NO functionality for catch-all currently exist. Extension can be alphanumeric so just [0-9*+] is not enough.
> The closest pattern would be "_." which matches anything at all but the problem with it is that it also matches "special" extensions like h, i, t, s.
It is a bit sad that the special extensions live in the same namespace
as normal extensions. The reasons are historical, of course, from when
Asterisk was mostly concerned with connecting to the PSTN, but these
days it is becoming a problem.
I am not sure what to do about it though. A start would be to forbid
patterns from matching the special extensions, so that you could use
_h to match h exactly, without matching hangup.
Another nice thing would be to get rid of some of the reasons why
people use e.g. h. My favourite would be to always record HANGUPCAUSE
in the CDR's, without having to use exten =>
h,1,Set(CDR(hangupcause)=${HANGUPCAUSE})
/Benny
More information about the asterisk-dev
mailing list