<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Hi Mathieu,</div><div><br></div><div>Is there any update on this issue ? I stumbled onto it just now.</div><div><br></div><div>I'm doing something like this:</div><div><br></div><div>1 - inbound context: set a-leg identity_id as channel variable identity_id</div><div>2 - lookup context: set b-leg identity_id as channel variable nolocal:identity_id</div><div>3 - outbound context: use nolocal:identity_id in condition to do some actions and eventually bridge</div><div>4 - generate separate a- and b-leg xml cdr's</div><div><br></div><div><div>My xml cdr parser breaks on the nolocal: prefix on some variables in the a-leg cdr. (4)</div><div><br></div><div>One other issue I'm having is that it seems I can't use nolocal: channel variables in xml dialplan conditions. (3) This is probably because the colon is used in for example ${foo:5} to get the 5 first characters, so I can't do something like this:</div></div><div><br></div><div>&lt;extension name="foo"&gt;</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>&lt;condition field="${nolocal:identity_id}" expression="bar"&gt;</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>&lt;action etc....</div><div><br></div><div>Is there any solution to doing this ?</div><div><br></div><div>Thanks a lot,</div><div><br></div><div>Leon</div><div><br></div><div><br></div><div><br></div><br><div><div>On Jun 23, 2010, at 5:49 AM, Mathieu Rene wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">That is completely unrelated. I added that function so one can all switch_channel_export_variable() instead of switch_channel_set_variable() followed by getting "exports" and appending the name of the new variable.<div><br></div><div>As for nolocal, it actually saves the variable with a prefix so it has no effect on the A-leg, what would be the proper fix for the xml without completely wiping the entry away? Its sometimes useful to know something was exported for the B-leg. Can we escape the : ?</div><div><br><div> <span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div><span class="Apple-style-span" style="font-size: 12px; "><div>Mathieu Rene</div><div>Avant-Garde Solutions Inc</div><div>Office: + 1 (514) 664-1044 x100</div><div>Cell: +1 (514) 664-1044 x200</div><div><a href="mailto:mrene@avgs.ca">mrene@avgs.ca</a></div><div><br></div><div><br></div></span></div></span><br class="Apple-interchange-newline"> </div> <br><div><div>On 2010-06-22, at 7:27 PM, Rupa Schomaker wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>commit 2c830f84aa8e5a5b05c55c5f02ae0025c4986bd2</div><div>Author: Mathieu Rene &lt;<a href="mailto:mrene@avgs.ca">mrene@avgs.ca</a>&gt;</div><div>Date: &nbsp; Wed Apr 7 15:02:00 2010 -0400</div><div><br></div><div>&nbsp;&nbsp; &nbsp;remove switch_channel_export_variable's nolocal argument, more confusing than anything else</div> <div><br></div><br><div class="gmail_quote">On Tue, Jun 22, 2010 at 5:26 PM, Dino Korah <span dir="ltr">&lt;<a href="mailto:dckorah@gmail.com">dckorah@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"> <div>Thanks Brian,</div><div><br></div><div>Then by the looks, there is something broken.</div><div><br></div><div>When a variable (say MyAppName) is exported as "nolocal", it appears in A leg CDR as "&lt;nolocal:MyAppName&gt;HelloWorldApp&lt;/nolocal:MyAppName&gt;", which then breaks the XML (those strict parsers).</div> <div><br></div><div>In the line I pointed earlier; as I understand, if the variable being exported from dial_plan is set "nolocal" should be ignored for A.</div><div><br></div><div>I can fix and checkin or send a patch; but not sure if it will break anything else.</div> <div><br></div><font color="#888888"><div>"dk"</div></font><div><div></div><div class="h5"><br> <br><br><div class="gmail_quote">On 22 June 2010 17:25, Brian West <span dir="ltr">&lt;<a href="mailto:brian@freeswitch.org" target="_blank">brian@freeswitch.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> nolocal is just like setting inside {} so its not on the A leg but only on the B leg.<br> <br> /b<br> <div><div></div><div><br> On Jun 16, 2010, at 4:49 AM, Dino Korah wrote:<br> <br> &gt; Guys,<br> &gt;<br> &gt; When I export a variable as nolocal, is it intended to prefix "nolocal:" for that variable on A, when that appears in the CDR?<br> &gt;<br> &gt; Or is it a glitch?<br> &gt;<br> &gt; Ref: src/mod/applications/mod_dptools/mod_dptools.c line 889<br> &gt;<br> &gt; Here if you check, the export seems to ignore the local variable altogether.<br> &gt;<br> &gt; I am quite new to freeswitch; any help much appreciated.<br> &gt;<br> &gt; Many thanks,<br> &gt; "dk"<br> <br> <br> </div></div>_______________________________________________<br> FreeSWITCH-dev mailing list<br> <a href="mailto:FreeSWITCH-dev@lists.freeswitch.org" target="_blank">FreeSWITCH-dev@lists.freeswitch.org</a><br> <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev</a><br> UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-dev</a><br> <a href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org</a><br> </blockquote></div><br> </div></div><br>_______________________________________________<br> FreeSWITCH-dev mailing list<br> <a href="mailto:FreeSWITCH-dev@lists.freeswitch.org">FreeSWITCH-dev@lists.freeswitch.org</a><br> <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev</a><br> UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-dev</a><br> <a href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org</a><br> <br></blockquote></div><br><br clear="all"><br>-- <br>-Rupa<br> _______________________________________________<br>FreeSWITCH-dev mailing list<br><a href="mailto:FreeSWITCH-dev@lists.freeswitch.org">FreeSWITCH-dev@lists.freeswitch.org</a><br><a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev">http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev</a><br>UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev<br>http://www.freeswitch.org<br></blockquote></div><br></div></div>_______________________________________________<br>FreeSWITCH-dev mailing list<br><a href="mailto:FreeSWITCH-dev@lists.freeswitch.org">FreeSWITCH-dev@lists.freeswitch.org</a><br>http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev<br>UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev<br>http://www.freeswitch.org<br></blockquote></div><br></body></html>