[asterisk-dev] i extension does not match on initial context - bug or not?

Dmitry Andrianov dimas at dataart.com
Fri Jan 9 08:58:43 CST 2009

Well, @s and @i may be not enough too. After all, someone may decide to actually have at sign in his exceptions. And this applies to any "special character" you may invent. To me, better approach is tell PBX how to distinguish these "special" extensions from "ordinary" ones not by extension itself but by some additional attributes. This could be done in a lot of different ways. Couple of them:

1. Add "special" word in addition to "exten". So the dialplan will look like

exten => 100,1,Answer
exten => 100,n,Wait(1)
exten => i,1,Noop(we can even have regular i extension)
exten => i,2,Hangup
special => i,1,Noop(invalid extension)

The processing of this dialplan is exactly the same as for the regular one except for the fact that only second "i" extension has special attribute and when asterisk tries to pass control to "i" because a jump to invalid exten is attempted, it only looks for extensions with special flag.

2. Add "special" word to include statement so you will need to prepare separate context with:

exten => i,1,Noop(invalid extension)

and then include it into your context:

include special => myspecial

In any case it must be global option which turns new behavior on and off because it gonna take a whiiiile to convert thousands of dialplans to the new style.

Dmitry Andrianov

-----Original Message-----
From: asterisk-dev-bounces at lists.digium.com [mailto:asterisk-dev-bounces at lists.digium.com] On Behalf Of Klaus Darilion
Sent: Friday, January 09, 2009 2:41 PM
To: Asterisk Developers Mailing List
Subject: Re: [asterisk-dev] i extension does not match on initial context - bug or not?

Benny Amorsen schrieb:
> 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.

Yes, this should be splitted into separate name spaces. In config we
could use for example @i or @s to address the special extensions.


--Bandwidth and Colocation Provided by http://www.api-digital.com--

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:

More information about the asterisk-dev mailing list