Armin Schindler
2005-Sep-21 08:27 UTC
[Asterisk-Users] Macro exists if an application returned -1
Hi all, I use asterisk cvs-head from last week and was wondering why my macros are not working like I expected. A macro will be aborted if one application returns error (-1), but some applications (like ChanIsAvail() in my case) do return -1. So when I want to use ChanIsAvail() in a macro, it does not work if the channel is not available, because the macro is not executed on n+101. The macro just aborts in that case. Is there any solution for using ChanIsAvail() in a macro? Thanks, Armin
Thorsten Lockert
2005-Sep-21 08:45 UTC
[Asterisk-Users] Macro exists if an application returned -1
On Sep 21, 2005, at 8:27 , Armin Schindler wrote:> Is there any solution for using ChanIsAvail() in a macro?Yes. Fix app_chanisavail.c such that it says "if (ast_goto_if_exists (..." instead of "if (!ast_goto_if_exists(...". Somone bungled the conversion to use "ast_goto_if_exists" -- this may or may not be incorrect in other places as well. Thorsten
Armin Schindler
2005-Sep-21 09:48 UTC
[Asterisk-Users] Macro exists if an application returned -1
On Wed, 21 Sep 2005, Thorsten Lockert wrote:> On Sep 21, 2005, at 8:27 , Armin Schindler wrote: > > Is there any solution for using ChanIsAvail() in a macro? > > Yes. Fix app_chanisavail.c such that it says "if (ast_goto_if_exists(..." > instead of "if (!ast_goto_if_exists(...". Somone bungled the conversion to > use "ast_goto_if_exists" -- this may or may not be incorrect in other places > as well.Ah yes, thanks ! Is this already known to developers or why is not fixed in CVS yet? Armin