Brian West wrote:
The same would apply to the call_debug variable too but it works without $$ in the config as is..... And I'm pretty sure they work in either case but you're right it shouldn't have to eval it every time.
I did wonder if there might be some super special magic going on there.... I took a look in switch_xml.c and switch_core.c; now I understand. <X-pre-process cmd="set" data="foo=bar"/> does more than operate exclusively in the preprocessor, as I intuitively would have expected. Instead, it sets foo as a global runtime variable, which is then used by the preprocessor during expansion. When we lookup a channel variable in switch_channel.c, upon finding that there is no channel variable by the requested name, we fall back to using a global runtime variable by the same name, if one exists. Cheers, -- Travis