Re: [asterisk-users] parse error in GosubIf
Tilghman, > exten => h,1,Set(MISSEDCAUSE=hungup) > exten => h,n,GosubIf($["${SENDNOTIFICATIONS}" = "1"]?notify) > exten => h,n,Hangup() > exten => h,n(notify),Macro(email-${MISSEDCAUSE}) > exten => h,n,Return() > > Don't leave the h extension; it's special. :-) Fantastic! That solved it. I also needed one more check on the hang-up to see if another "miss" status had already been set. I still need to do a lot of work on this but at least the triggers are working. The static example is here: http://pastebin.ca/740336 Thanks again for finding that, -Michael I. ___ --Bandwidth and Colocation Provided by http://www.api-digital.com-- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] parse error in GosubIf
On Wednesday 17 October 2007 14:57:41 Michael Iedema wrote: > exten => h,1,Set(MISSEDCAUSE=hungup) > exten => h,n,GosubIf($[${SENDNOTIFICATIONS} = 1]?notify,1) > exten => h,n,Hangup() > > exten => notify,1,Macro(email-${MISSEDCAUSE}) > exten => notify,n,Return() exten => h,1,Set(MISSEDCAUSE=hungup) exten => h,n,GosubIf($["${SENDNOTIFICATIONS}" = "1"]?notify) exten => h,n,Hangup() exten => h,n(notify),Macro(email-${MISSEDCAUSE}) exten => h,n,Return() Don't leave the h extension; it's special. :-) Also, I note that in your pastebin, you had a space before the word "exten", and " exten" != "exten" as far as the parser is concerned. -- Tilghman ___ --Bandwidth and Colocation Provided by http://www.api-digital.com-- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] parse error in GosubIf
On Wednesday 17 October 2007 23:41:28 Michael Iedema wrote: > On 10/17/07, Ira <[EMAIL PROTECTED]> wrote: > > At 12:57 PM 10/17/2007, you wrote: > > >If there's anyone who can shed some light on why my GosubIf condition > > >is throwing a parse error, I'd greatly appreciate your insight. This > > >was really frustrating and is probably a stupid mistake. > > > > exten => h,n,GosubIf($["${SENDNOTIFICATIONS}" = "1"]?notify,1) > > I just tried this again with quotes as many have suggested (thanks!) > but am still getting the same error. The first step in that > email-hungup macro is being executed and nothing else. > > Also, this: > > Oct 17 22:14:54 -- Executing [EMAIL PROTECTED]:2] GosubIf("Zap/3-1", > "1?notify|1") in new stack This means, the variable evaluates to 1 - only values are shown in log. Regards, Atis -- Atis Lezdins VoIP Developer, IQ Labs Inc. [EMAIL PROTECTED] Skype: atis.lezdins Cell Phone: +371 28806004 Work phone: +1 800 7502835 ___ --Bandwidth and Colocation Provided by http://www.api-digital.com-- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] parse error in GosubIf
On 10/17/07, Ira <[EMAIL PROTECTED]> wrote: > At 12:57 PM 10/17/2007, you wrote: > >If there's anyone who can shed some light on why my GosubIf condition > >is throwing a parse error, I'd greatly appreciate your insight. This > >was really frustrating and is probably a stupid mistake. > > exten => h,n,GosubIf($["${SENDNOTIFICATIONS}" = "1"]?notify,1) > I just tried this again with quotes as many have suggested (thanks!) but am still getting the same error. The first step in that email-hungup macro is being executed and nothing else. Also, this: Oct 17 22:14:54 -- Executing [EMAIL PROTECTED]:2] GosubIf("Zap/3-1", "1?notify|1") in new stack seems really weird to me...is that just how the log message is formatted? Are these variables even visible inside the macro? Can anyone tell this is my first foray into variables!? Thanks for the feedback everyone, -Michael ___ --Bandwidth and Colocation Provided by http://www.api-digital.com-- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] parse error in GosubIf
Michael Iedema wrote: > Greetings everyone, > > today I spent the last part of my day trying to find a parse error > inside this snip: > http://pastebin.ca/740081 > > If there's anyone who can shed some light on why my GosubIf condition > is throwing a parse error, I'd greatly appreciate your insight. This > was really frustrating and is probably a stupid mistake. ---cut--- exten => h,1,Set(MISSEDCAUSE=hungup) exten => h,n,GosubIf($[${SENDNOTIFICATIONS} = 1]?notify,1) exten => h,n,Hangup() ---cut--- ---cut--- Oct 17 20:08:13 -- Executing [EMAIL PROTECTED]:1] Set("Zap/4-1", "MISSEDCAUSE=hungup") in new stack Oct 17 20:08:13 ast_expr2.fl:398 in ast_yyerror: ast_yyerror(): syntax error: syntax error, unexpected '=', expecting $end; Input: = 1 ^ Oct 17 20:08:13 ast_expr2.fl:402 in ast_yyerror: If you have questions, please refer to doc/channelvariables.txt in the asterisk source. Oct 17 20:08:13 -- Executing [EMAIL PROTECTED]:2] GosubIf("Zap/4-1", "?notify|1") in new stack ---cut--- Just a wild guess: ${SENDNOTIFICATIONS} might be empty so what it tries to execute is GosubIf($[ = 1]?notify,1) (and then complains about the unexpected "=") Try GosubIf($["${SENDNOTIFICATIONS}" = "1"]?notify,1) Regards, Philipp Kempgen -- amooma GmbH - Bachstr. 126 - 56566 Neuwied - http://www.amooma.de Let's use IT to solve problems and not to create new ones. Asterisk? -> http://www.das-asterisk-buch.de Geschäftsführer: Stefan Wintermeyer Handelsregister: Neuwied B 14998 ___ --Bandwidth and Colocation Provided by http://www.api-digital.com-- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] parse error in GosubIf
At 12:57 PM 10/17/2007, you wrote: >If there's anyone who can shed some light on why my GosubIf condition >is throwing a parse error, I'd greatly appreciate your insight. This >was really frustrating and is probably a stupid mistake. exten => h,n,GosubIf($["${SENDNOTIFICATIONS}" = "1"]?notify,1) Should fix it. If SENDNOTIFICATIONS is empty, you'll get that error. Ira ___ --Bandwidth and Colocation Provided by http://www.api-digital.com-- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] parse error in GosubIf
Atis, > > Try removing spaces around = > Thanks for the tip! I'd tried that before but I tried again with another fail. I've posted all of the relevant bits from my dialplan as well as the log output. http://pastebin.ca/740270 It seems now that everything is working except the macro "email-hungup" is only executing the first step. Regards, -Michael ___ --Bandwidth and Colocation Provided by http://www.api-digital.com-- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] parse error in GosubIf
Am Mittwoch, den 17.10.2007, 21:57 +0200 schrieb Michael Iedema: > Greetings everyone, > > today I spent the last part of my day trying to find a parse error > inside this snip: > http://pastebin.ca/740081 > > If there's anyone who can shed some light on why my GosubIf condition > is throwing a parse error, I'd greatly appreciate your insight. This > was really frustrating and is probably a stupid mistake. Try changing the relevant line exten => h,n,GosubIf($[${SENDNOTIFICATIONS} = 1]?notify,1) to exten => h,n,GosubIf($["${SENDNOTIFICATIONS}" = "1"]?notify,1) BR Anselm ___ --Bandwidth and Colocation Provided by http://www.api-digital.com-- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] parse error in GosubIf
Michael Iedema wrote: > Greetings everyone, > > today I spent the last part of my day trying to find a parse error > You have: GosubIf($[${SENDNOTIFICATIONS} = 1]?notify,1) Mine uses Double Quotes as such: GosubIf($["${SENDNOTIFICATIONS}" = "1"]?notify,1) Doug -- Ben Franklin quote: "Those who would give up Essential Liberty to purchase a little Temporary Safety, deserve neither Liberty nor Safety." ___ --Bandwidth and Colocation Provided by http://www.api-digital.com-- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] parse error in GosubIf
On Wednesday 17 October 2007 22:57:41 Michael Iedema wrote: > Greetings everyone, > > today I spent the last part of my day trying to find a parse error > inside this snip: > http://pastebin.ca/740081 > > If there's anyone who can shed some light on why my GosubIf condition > is throwing a parse error, I'd greatly appreciate your insight. This > was really frustrating and is probably a stupid mistake. Try removing spaces around = Regards, Atis -- Atis Lezdins VoIP Developer, IQ Labs Inc. [EMAIL PROTECTED] Skype: atis.lezdins Cell Phone: +371 28806004 Work phone: +1 800 7502835 ___ --Bandwidth and Colocation Provided by http://www.api-digital.com-- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
[asterisk-users] parse error in GosubIf
Greetings everyone, today I spent the last part of my day trying to find a parse error inside this snip: http://pastebin.ca/740081 If there's anyone who can shed some light on why my GosubIf condition is throwing a parse error, I'd greatly appreciate your insight. This was really frustrating and is probably a stupid mistake. Regards, -Michael ___ --Bandwidth and Colocation Provided by http://www.api-digital.com-- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users