[asterisk-dev] i extension does not match on initial context - bug or not?
Klaus Darilion
klaus.mailinglists at pernau.at
Thu Jan 8 09:44:52 CST 2009
Hi Leif and Nir!
Thanks for the description.
So, as obviously I (and others) try to abuse the i extension as
catch-all, wouldn't it make sense to introduce a catch-all extension?
IMO _X. is not sufficient (what about dialing +431234 or *31#, ...) and
_. can not be used as it also matches the special extensions.
regards
Klaus
Leif Madsen schrieb:
> I do not believe this is a bug. The 'i' extension is used for invalid,
> but not a catch all.
>
> By using the Goto() and sending it to an invalid extension, then the 'i'
> is executed because a dialplan application in Asterisk tried to execute
> something that did not exist.
>
> The 'i' extension is more used to control errors with logic in your
> dialplan execution, and not so much as a 'catch-all' for when you dial
> an extension that does not exist.
>
> At least this is my understanding.
>
> Leif Madsen.
> http://www.leifmadsen.com
> http://www.asteriskdocs.org
>
> Klaus Darilion wrote:
>> Hi!
>>
>> I just stumbled about an already known problem:
>> http://www.voip-info.org/wiki/view/Asterisk+i+extension
>>
>> The i extension does not match in the initial context, e.g:
>>
>> context fromSipPhone {
>> 11 => {
>> Answer();
>> Wait(20);
>> }
>> i => {
>> Playback(pbx-invalid);
>> }
>> }
>>
>> In this example, if the SIP phone dials 22, the i extension is not executed.
>>
>> But in this example:
>>
>> context fromSipPhone {
>> _X. => goto fromSipPhoneWorkaround |${EXTEN}|1;
>> }
>>
>> context fromSipPhoneWorkaround {
>> 11 => {
>> Answer();
>> Wait(20);
>> }
>> i => {
>> Playback(pbx-invalid);
>> }
>> }
>>
>> Here, if the SIP phone dials 22, the i extension is executed.
>>
>> IMO this is inconsistent behavior - and I would consider this a bug.
>>
>> Thus - should I open a bug report or is there a certain reason for the
>> strange behavior?
>>
>> thanks
>> klaus
>>
>> _______________________________________________
>> --Bandwidth and Colocation Provided by http://www.api-digital.com--
>>
>> asterisk-dev mailing list
>> To UNSUBSCRIBE or update options visit:
>> http://lists.digium.com/mailman/listinfo/asterisk-dev
>
> _______________________________________________
> --Bandwidth and Colocation Provided by http://www.api-digital.com--
>
> asterisk-dev mailing list
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-dev
More information about the asterisk-dev
mailing list