<html><body bgcolor="#FFFFFF"><div>Strange, could you post the debug log of this so we can see how it's expanded?</div><div><br></div><div>Mike<br><br>On Jan 12, 2010, at 10:37 PM, Chia-Yen Wu <<a href="mailto:xanlich@gmail.com">xanlich@gmail.com</a>> wrote:<br><br></div><div></div><blockquote type="cite"><div><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); "><action application="set" data="var=1"/> </span></div><div><font class="Apple-style-span" color="#663366"><span class="Apple-style-span" style="color: rgb(80, 0, 80); "><action application="set" data="var=${expr(${var}+1)}"/></span></font></div>
<div><font class="Apple-style-span" color="#663366">fail: </font></div><div><font class="Apple-style-span" color="#663366"><action application="set" data="var1=1"/> </font></div><div><font class="Apple-style-span" color="#663366"><span class="Apple-style-span" style="color: rgb(80, 0, 80); "><action application="set" data="var1=${expr(${var1}+1)}"/></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"><<a href="mailto:mike@jerris.com"><a href="mailto:mike@jerris.com">mike@jerris.com</a></a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Remember you can'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 href="http://wiki.freeswitch.org/wiki/Dialplan_XML#Inline_Actions">http://wiki.freeswitch.org/wiki/Dialplan_XML#Inline_Actions</a></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>
> <action application="set" data="var=${expr(${var}+1)}"/><br>
><br>
> On Tuesday 12 January 2010, Chia-Yen Wu wrote:<br>
>> Hello everyone,<br>
>> Is there anyway to calculate number in dialplan.xml?<br>
>><br>
>> like example:<br>
>> <action application="set" data="var=1"/><br>
>> and with an action , I can do : var=var+1<br>
>><br>
>> I have tried mod_expr, but failed to catch the variable, like below:<br>
>> <action application="set" data="var=${expr($var+1)}"/><br>
><br>
<br>
<br>
_______________________________________________<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org"><a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a></a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank"><a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a></a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank"><a href="http://lists.freeswitch.org/mailman/options/freeswitch-users">http://lists.freeswitch.org/mailman/options/freeswitch-users</a></a><br>
<a href="http://www.freeswitch.org" target="_blank"><a href="http://www.freeswitch.org">http://www.freeswitch.org</a></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">FreeSWITCH-users@lists.freeswitch.org</a></span><br><span><a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a></span><br><span>UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users</span><br><span><a href="http://www.freeswitch.org">http://www.freeswitch.org</a></span><br></div></blockquote></body></html>