<div dir="ltr">Yell at me if you will, but I hate func_realtime - it's not very usable nor is it change-friendly (update your database and your dialplan completely breaks).<br><br>I'm getting a new 1.6 box built out and working, and wanted to emulate the functionality of APP_realtime somehow, so I started digging around in the func_realtime source - here's what I came up with:<br>
<br>For 1.6.0, look at line 86 of func_realtime.c<br><span><br></span><span>ast_str_append</span><span>(&</span>out<span>,</span> <span>0</span><span>,</span> <span>"%s%s%s%s"</span><span>,</span> var<span>-></span>name<span>,</span> args<span>.</span>delim2<span>,</span> var<span>-></span>value<span>,</span> args<span>.</span>delim1<span>);</span><br>
<br>I simply changed this to:<br><br>pbx_builtin_setvar_helper(chan, var->name, var->value);<br><br>Now when I call the realtime function, I get the channel variables populated instead of having to parse that godawful string to get at my data.<br>
<br>Again, yell at me if you will, but even Mark Spencer commented on how func_realtime wasn't all that great, but nobody seems to have done anything about it.<br><br>BTW - I don't code in C at all - this was just a bunch of searching and a lucky guess...<br>
</div>