<span class="Apple-style-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 class="Apple-style-span" style="color: rgb(102, 51, 102); ">work: </span></div>
<div><span class="Apple-style-span" style="color: rgb(102, 51, 102); ">&lt;action application=&quot;set&quot; data=&quot;var=1&quot;/&gt;  </span></div><div><font class="Apple-style-span" color="#663366"><span class="Apple-style-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 class="Apple-style-span" color="#663366">fail:    </font></div><div><font class="Apple-style-span" color="#663366">&lt;action application=&quot;set&quot; data=&quot;var1=1&quot;/&gt; </font></div><div><font class="Apple-style-span" color="#663366"><span class="Apple-style-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 class="Apple-style-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">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">http://wiki.freeswitch.org/wiki/Dialplan_XML#Inline_Actions</a><br>

<br>
Mie<br>
<div><div></div><div class="h5"><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">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>
</div></div></blockquote></div><br></div>