[asterisk-users] Variable pollution? Stack overflow? WTF is going on here or... how can I TOTALLY clear a variable?

Jonathan H lardconcepts at gmail.com
Mon Oct 24 09:24:17 CDT 2016

The first time I run a loop, the AGI returns a list of files.

I append a path from a variable, and play out the files using SHIFT to
loop them.

The FIRST time I enter the system, this is what the complete list to
be looped looks like:


When the menu is re-played, this is what the list looks like:


Did you notice? "concessions/title,audio/" has become "concessions/io/phone"

Another reload:


Again, see that? This time something different:
"conditions/title,/audio" has become: "conditions/ti/phone"

Seems totally random each time. Now, remember I had the problem a few
days ago where a variable read from a FILE was getting corrupted?

Well, this is now a variable getting sent from a AGI.

Yes, I have tried to Set(myvar=) before each new loop, but it still does it.

It's driving me freakin' nuts and I've been trying to find a
workaround since Saturday. Any ideas?

Bug? Or something I'm doing wrong?

More information about the asterisk-users mailing list