<br><br><div class="gmail_quote">On Mon, Mar 15, 2010 at 12:47 PM, Klaus Darilion <span dir="ltr"><<a href="mailto:klaus.mailinglists@pernau.at">klaus.mailinglists@pernau.at</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<br>
<br>
Am 15.03.2010 13:48, schrieb Kevin P. Fleming:<br>
<div class="im">> Klaus Darilion wrote:<br>
>> Hi!<br>
>><br>
>> I just updated from 1.4 to 1.6.2.6 and Asterisk complains about my AEL<br>
>> dialplan:<br>
>><br>
>> application call to Gosub affects flow of control, and needs to<br>
>> be re-written using AEL if, while, goto, etc. keywords instead<br>
>><br>
>> What is the suggested replacement for an explicit Gosub() call? I use it<br>
>> like this:<br>
>><br>
>> ...<br>
>> Gosub(blacklist,${exten},1);<br>
>> ...<br>
>><br>
>> context blacklist {<br>
>> _+43900! => Hangup();<br>
>> _+43910! => Hangup();<br>
>> _+X. => return;<br>
>><br>
>> }<br></div></blockquote><div><br>How about:<br><br> ....<br> &blacklist(${exten}); <br> ....<br><br>macro blacklist(the_exten)<br>{<br> switch(the_exten)<br> {<br> pattern +4390[01]: Hangup();<br>
default: return;<br> }<br>}<br><br>You could use something like the above.<br><br>Basically, you are using the pattern matching capability to<br>end the call for certain extensions... so the above should<br>come close. If you really, really want to keep your gosub call,<br>
then you can, you'll just have to ignore the warnings, iirc.<br><br>murf<br><br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div class="im">
><br>
> In 1.6, AEL macro() is implemented using Gosub(), so you can use it as a<br>
> direct replacement. This is listed in the CHANGES file.<br>
<br>
</div>Hi Kevin!<br>
<br>
I know that AEL macro does not use Macro() anymore, but Gosub(). But<br>
does that imply the other way round too?<br>
<br>
Using an AEL macro (which is implemented as Gosub) instead of a Gosub<br>
does not work as the target is a context, not a macro which is<br>
implemented as pseudo context with an 's' extension.<br>
<br>
I do not see a way to implement the above dialplan using an AEL macro.<br>
Do I miss something?<br>
<br>
regards<br>
<font color="#888888">Klaus<br>
</font><div><div></div><div class="h5"><br>
--<br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
New to Asterisk? Join us for a live introductory webinar every Thurs:<br>
<a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a><br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Steve Murphy<br>ParseTree Corp<br><br>