Olivier
2009-May-08 12:26 UTC
[asterisk-users] Can't GOSUB_RESULT with Dial U() option ...
Hello, I'm not understanding how to use GOSUB_RESULT in U() option from Dial app (I'm using 1.6.1) My extensions.ael is : context mylocal { 2 => { Dial(SIP/7530,,U(mynotify)); HangUp(); }; 3 => { Dial(SIP/7531); HangUp(); }; }; macro mynotify () { GOSUB_RESULT=ABORT; }; I thought that depending on value written into GOSUB_RESULT, call would either abort or continue as usual. In my experience, call is going on as if I haven't set anything in mynotify() routine. (Ultimately, I would also like to use GOTO result code). Am I missing something ? Cheers PS: As a reminder, here is an extract of Dial online doc : Online doc says : U(x[^arg]) - Execute via Gosub the routine 'x' for the *called* channel before connecting to the calling channel. Arguments can be specified to the Gosub using '^' as a delimiter. The Gosub routine can set the variable GOSUB_RESULT to specify the following actions after the Gosub returns. * ABORT Hangup both legs of the call. * CONGESTION Behave as if line congestion was encountered. * BUSY Behave as if a busy signal was encountered. * CONTINUE Hangup the called party and allow the calling party to continue dialplan execution at the next priority. * GOTO:<context>^<exten>^<priority> - Transfer the call to the specified priority. Optionally, an extension, or extension and priority can be specified. You cannot use any additional action post answer options in conjunction with this option. Also, pbx services are not run on the peer (called) channel, so you will not be able to set timeouts via the TIMEOUT() function in this routine. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20090508/a1988989/attachment-0001.htm