[asterisk-users] Gosub behavior change <=1.6.0.5 to 1.6.0.6

Tilghman Lesher tilghman at mail.jeffandtilghman.com
Tue Feb 24 16:53:50 CST 2009


On Tuesday 24 February 2009 13:44:25 Barry L. Kline wrote:
> Here's one that may be of interest to any upgraders.  If you rely on the
> behavior of gosub you may want to make note of this change.
>
> I have an incoming call context:
>
> exten => _XXXX,n,GoSub(incoming,${EXTEN},1(${EXTEN}));
>
> that is supposed to gosub into the incoming extension at priority 1.
> Versions before 1.6.0.6 would drop into the incoming,i,1 priority if the
> requested extension wasn't present in the incoming context.
>
> When I upgraded to 1.6.0.6 this behavior changed and I would simply get
> an error on the console that a matching extension was not found, and the
> dialplan would simply stop.  It was easy enough to add:
>
> [incoming]
> exten => _XXXX,1,Goto(i,1)
>
> to restore the previous behavior (I'm looking at four-digits from a PRI)
> which I should probably have done anyway.
>
> I don't know if this is a bug or WAD but just wanted to mention it.

It was a bug.  Gosub/Goto should NEVER go to the "i" extension, unless that
target is explicitly given.  The use of the "i" extension for invalid
extensions is limited to WaitExten/Background.

-- 
Tilghman



More information about the asterisk-users mailing list