Sorry, my bad, I finally found out that I got an incorrect condition and the stage goes wrong.<div>Everything is working fine now, thanks for help!<div><br><br><div class="gmail_quote">2010/1/13 Michael Jerris <span dir="ltr">&lt;<a href="mailto:mike@jerris.com">mike@jerris.com</a>&gt;</span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div bgcolor="#FFFFFF"><div>Strange, could you post the debug log of this so we can see how it&#39;s expanded?</div><div>
<br></div><div>Mike<div><div></div><div class="h5"><br><br>On Jan 12, 2010, at 10:37 PM, Chia-Yen Wu &lt;<a href="mailto:xanlich@gmail.com" target="_blank">xanlich@gmail.com</a>&gt; wrote:<br><br></div></div></div><div><div>
</div><div class="h5"><div></div><blockquote type="cite"><div><span style="font-family:arial, sans-serif;font-size:13px;border-collapse:collapse;color:rgb(80, 0, 80)"><div>Thanks for reply, I have tried the new one and did transfer back</div>
<div>but it still dont work, when I was posting this question again with my test commands.</div>
<div>suddenly I found out what the problem it is.</div><div><br></div><div>the variable cannot with number in it, like:</div><div><br></div><div><span style="color:rgb(102, 51, 102)">work: </span></div>
<div><span style="color:rgb(102, 51, 102)">&lt;action application=&quot;set&quot; data=&quot;var=1&quot;/&gt;  </span></div><div><font color="#663366"><span style="color:rgb(80, 0, 80)">&lt;action application=&quot;set&quot; data=&quot;var=${expr(${var}+1)}&quot;/&gt;</span></font></div>

<div><font color="#663366">fail:    </font></div><div><font color="#663366">&lt;action application=&quot;set&quot; data=&quot;var1=1&quot;/&gt; </font></div><div><font color="#663366"><span style="color:rgb(80, 0, 80)">&lt;action application=&quot;set&quot; data=&quot;var1=${expr(${var1}+1)}&quot;/&gt;</span></font></div>

<div><span style="font-size:small"><br></span></div></span><div><br><div class="gmail_quote">2010/1/13 Michael Jerris <span dir="ltr">&lt;<a href="mailto:mike@jerris.com" target="_blank"></a><a href="mailto:mike@jerris.com" target="_blank">mike@jerris.com</a>&gt;</span><br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Remember you can&#39;t do conditions on these vars being set unless you transfer back into the dialplan as these actions are not run immediately, but rather after dialplan parse, unless you use <a href="http://wiki.freeswitch.org/wiki/Dialplan_XML#Inline_Actions" target="_blank"></a><a href="http://wiki.freeswitch.org/wiki/Dialplan_XML#Inline_Actions" target="_blank">http://wiki.freeswitch.org/wiki/Dialplan_XML#Inline_Actions</a><br>


<br>
Mie<br>
<div><div></div><div><br>
On Jan 12, 2010, at 12:39 PM, Sergey Okhapkin wrote:<br>
<br>
&gt; &lt;action application=&quot;set&quot; data=&quot;var=${expr(${var}+1)}&quot;/&gt;<br>
&gt;<br>
&gt; On Tuesday 12 January 2010, Chia-Yen Wu wrote:<br>
&gt;&gt; Hello everyone,<br>
&gt;&gt; Is there anyway to calculate number in dialplan.xml?<br>
&gt;&gt;<br>
&gt;&gt; like example:<br>
&gt;&gt; &lt;action application=&quot;set&quot; data=&quot;var=1&quot;/&gt;<br>
&gt;&gt; and with an action , I can do : var=var+1<br>
&gt;&gt;<br>
&gt;&gt; I have tried mod_expr, but failed to catch the variable, like below:<br>
&gt;&gt; &lt;action application=&quot;set&quot; data=&quot;var=${expr($var+1)}&quot;/&gt;<br>
&gt;<br>
<br>
<br>
_______________________________________________<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank"></a><a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank"></a><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"></a><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"></a><a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
</div></div></blockquote></div><br></div>
</div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>FreeSWITCH-users mailing list</span><br><span><a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a></span><br>
<span><a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a></span><br><span>UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a></span><br>
<span><a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a></span><br></div></blockquote></div></div></div><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>
<br></blockquote></div><br></div></div>