Gary Hawkins
2008-Dec-05 20:28 UTC
[asterisk-users] Gosubs broken since r160626 (1.6.0 SVN) ?
Hi all, I've just upgraded to latest 1.6.0 SVN from a few days ago and my Gosubs have stopped working. This is from the verbose logs: -- Executing [03333407271 at incoming-aaisp:4] GotoIf("IAX2/aaisp-3802", "1?5:7") in new stack -- Goto (incoming-aaisp,03333407271,5) -- Executing [03333407271 at incoming-aaisp:5] Gosub("IAX2/aaisp-3802", "macro-announcement,s,1(anonymous_call_rejection,22)") in new stack == Spawn extension (incoming-aaisp, 03333407271, 6) exited non-zero on 'IAX2/aaisp-3802' -- Hungup 'IAX2/aaisp-3802' This was the original AEL2 code: 03333407271 => { Verbose("We got here"); AGI(caller_id_rewriter/caller_id_rewriter.py); Set(CALLERID(name)="1 ${CALLERID(name)}"); if ("${WITHHELD}" = "yes") { ¯o-announcement(anonymous_call_rejection,22); Hangup(22); } Dial(${ALLPHONES},20); if ("${DIALSTATUS}" = "BUSY") { VoiceMail(201,b); } else { VoiceMail(201,u); } Hangup(${HANGUPCAUSE}); } This was working on 1.6.0 SVN before r160626 and I have not changed any of the code. The Gosubs were generated by the AEL parser. In the AEL2 dialplan I am calling ¯o-announcement(anonymous_call_rejection,22); Has anyone seen similar problems to this? Thanks Gary H -- Gary Hawkins <gary.hawkins at garysoft.co.uk>
Mark Michelson
2008-Dec-05 22:56 UTC
[asterisk-users] Gosubs broken since r160626 (1.6.0 SVN) ?
Gary Hawkins wrote:> Hi all, > > I've just upgraded to latest 1.6.0 SVN from a few days ago and my Gosubs > have stopped working. > > This is from the verbose logs: > > -- Executing [03333407271 at incoming-aaisp:4] GotoIf("IAX2/aaisp-3802", > "1?5:7") in new stack > -- Goto (incoming-aaisp,03333407271,5) > -- Executing [03333407271 at incoming-aaisp:5] Gosub("IAX2/aaisp-3802", > "macro-announcement,s,1(anonymous_call_rejection,22)") in new stack > == Spawn extension (incoming-aaisp, 03333407271, 6) exited non-zero on > 'IAX2/aaisp-3802' > -- Hungup 'IAX2/aaisp-3802' > > This was the original AEL2 code: > > 03333407271 => { > Verbose("We got here"); > AGI(caller_id_rewriter/caller_id_rewriter.py); > Set(CALLERID(name)="1 ${CALLERID(name)}"); > if ("${WITHHELD}" = "yes") { > ¯o-announcement(anonymous_call_rejection,22); > Hangup(22); > } > Dial(${ALLPHONES},20); > if ("${DIALSTATUS}" = "BUSY") { > VoiceMail(201,b); > } > else > { > VoiceMail(201,u); > } > Hangup(${HANGUPCAUSE}); > } > > > This was working on 1.6.0 SVN before r160626 and I have not changed any > of the code. The Gosubs were generated by the AEL parser. In the AEL2 > dialplan I am calling > > ¯o-announcement(anonymous_call_rejection,22); > > Has anyone seen similar problems to this? > > > Thanks > Gary H >This appears to be a side-effect of a bug fix I made. To give some background, one of the changes in that commit was to check for the existence of the extension which you are trying to go to to execute the gosub. If it does not exist, then we back out with an error. Looking at the console output, there appears to be a problem with the AEL parser. It is attempting to send you to the macro-announcement context, extension s, priority 1, with label anonymous_call_rejection,22. I assume that anonymous_call_rejection and 22 were supposed to be arguments to the gosub, and not treated as a label. Since no extension exists with that label, that is why the gosub is now failing. This is definitely a bug and needs to be corrected before the next version of 1.6.0 is released. Mark Michelson