yes it was a bug,<br>it has been fixed in r13385<br><br>please report future bugs to <a href="http://jira.freeswitch.org">http://jira.freeswitch.org</a> not the mailing list.<br><br><br><div class="gmail_quote">On Tue, May 19, 2009 at 9:12 AM, Vladimir Klejch <span dir="ltr">&lt;<a href="mailto:klejch%2Bfreeswitch@netbox.cz">klejch+freeswitch@netbox.cz</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
Hi<br>
<br>
I think i found a bug on XML preprocessor in way of working with<br>
preprocessor varibles.<br>
<br>
I have problem with concatenation of preprocessor variables in XML config.<br>
<br>
Preprocessor is incorectly concatenatin two preprocessor variables, and<br>
building wrong config xml.<br>
<br>
Best to explain on example:<br>
<br>
in vars.xml:<br>
<br>
<br>
     &lt;X-PRE-PROCESS cmd=&quot;set&quot; data=&quot;bug_test_1=xpreprocessbug1&quot; /&gt;<br>
     &lt;X-PRE-PROCESS cmd=&quot;set&quot; data=&quot;bug_test_2=xpreprocessbug2&quot; /&gt;<br>
     &lt;X-PRE-PROCESS cmd=&quot;set&quot; data=&quot;bug_test_3=xpreprocessbug3&quot; /&gt;<br>
     &lt;X-PRE-PROCESS cmd=&quot;set&quot; data=&quot;bug_test_4=xpreprocessbug4&quot; /&gt;<br>
<br>
<br>
     &lt;X-PRE-PROCESS cmd=&quot;set&quot; data=&quot;bug_test_sum1=$${bug_test_1}$${bug_test_2}$${bug_test_3}$${bug_test_4}&quot; /&gt;<br>
     &lt;X-PRE-PROCESS cmd=&quot;set&quot; data=&quot;bug_test_sum2=$${bug_test_1}^$${bug_test_2}^$${bug_test_3}^$${bug_test_4}&quot; /&gt;<br>
<br>
<br>
then in dialplan:<br>
<br>
<br>
         &lt;extension name=&quot;x_preprocess_bug1&quot; continue=&quot;false&quot; &gt;<br>
                 &lt;condition field=&quot;destination_number&quot; expression=&quot;$${bug_test_sum1}&quot; &gt;<br>
                     &lt;action application=&quot;info&quot; /&gt;<br>
                 &lt;/condition&gt;<br>
         &lt;/extension&gt;<br>
<br>
         &lt;extension name=&quot;x_preprocess_bug2&quot; continue=&quot;false&quot; &gt;<br>
                 &lt;condition field=&quot;destination_number&quot; expression=&quot;$${bug_test_sum2}&quot; &gt;<br>
                     &lt;action application=&quot;info&quot; /&gt;<br>
                 &lt;/condition&gt;<br>
         &lt;/extension&gt;<br>
<br>
<br>
<br>
<br>
but in freeswitch.xml.fsxml:<br>
<br>
         &lt;extension name=&quot;x_preprocess_bug1&quot; continue=&quot;false&quot; &gt;<br>
                 &lt;condition field=&quot;destination_number&quot; expression=&quot;xpreprocessbug1$%{bug_test_2}xpreprocessbug3$%{bug_test_4}&quot; &gt;<br>
                     &lt;action application=&quot;info&quot; /&gt;<br>
                 &lt;/condition&gt;<br>
         &lt;/extension&gt;<br>
<br>
         &lt;extension name=&quot;x_preprocess_bug2&quot; continue=&quot;false&quot; &gt;<br>
                 &lt;condition field=&quot;destination_number&quot; expression=&quot;xpreprocessbug1^xpreprocessbug2^xpreprocessbug3^xpreprocessbug4&quot; &gt;<br>
                     &lt;action application=&quot;info&quot; /&gt;<br>
                 &lt;/condition&gt;<br>
         &lt;/extension&gt;<br>
<br>
<br>
<br>
The odd variables are wrong translated by preprocessor . The odd variable<br>
used as $${var} is translated corect to his content, but the even variable<br>
used as $${var} is mangled and in freeswitch.xml.fsxml is to seen %${var}<br>
form of prefious $${var}. This problem only ocur, if tvo variables are<br>
direcly concatenated w/o any char between them.<br>
<br>
config :<br>
<br>
&lt;X-PRE-PROCESS cmd=&quot;set&quot; data=&quot;bug_test_sum1=$${bug_test_1}$${bug_test_2}$${bug_test_3}$${bug_test_4}&quot; /&gt;<br>
<br>
is translated to string:<br>
<br>
&quot;xpreprocessbug1$%{bug_test_2}xpreprocessbug3$%{bug_test_4}&quot; , to see in<br>
extension name=&quot;x_preprocess_bug1&quot;.<br>
<br>
If there is a char between concatenated variables (in my test a ^ char),<br>
everything is OK, to see in extension name=&quot;x_preprocess_bug2&quot;.<br>
<br>
<br>
<br>
It&#39;s  this known problem or I&#39;m wrong understanding preprocessor usage ??<br>
<br>
<br>
<br>
<br>
        Thanks<br>
                        Kleo<br>
<br>
--<br>
        <a href="mailto:kleo%2Bfreeswitch@netbox.cz">kleo+freeswitch@netbox.cz</a><br>
<br>
<br>
_______________________________________________<br>
Freeswitch-users mailing list<br>
<a href="mailto:Freeswitch-users@lists.freeswitch.org">Freeswitch-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>Anthony Minessale II<br><br>FreeSWITCH <a href="http://www.freeswitch.org/">http://www.freeswitch.org/</a><br>ClueCon <a href="http://www.cluecon.com/">http://www.cluecon.com/</a><br>
<br>AIM: anthm<br><a href="mailto:MSN%3Aanthony_minessale@hotmail.com">MSN:anthony_minessale@hotmail.com</a><br>GTALK/JABBER/<a href="mailto:PAYPAL%3Aanthony.minessale@gmail.com">PAYPAL:anthony.minessale@gmail.com</a><br>
IRC: <a href="http://irc.freenode.net">irc.freenode.net</a> #freeswitch<br><br>FreeSWITCH Developer Conference<br><a href="mailto:sip%3A888@conference.freeswitch.org">sip:888@conference.freeswitch.org</a><br><a href="http://iax:guest@conference.freeswitch.org/888">iax:guest@conference.freeswitch.org/888</a><br>
<a href="mailto:googletalk%3Aconf%2B888@conference.freeswitch.org">googletalk:conf+888@conference.freeswitch.org</a><br>pstn:213-799-1400<br>