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"><<a href="mailto:mike@jerris.com">mike@jerris.com</a>></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'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 <<a href="mailto:xanlich@gmail.com" target="_blank">xanlich@gmail.com</a>> 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)"><action application="set" data="var=1"/> </span></div><div><font color="#663366"><span style="color:rgb(80, 0, 80)"><action application="set" data="var=${expr(${var}+1)}"/></span></font></div>
<div><font color="#663366">fail: </font></div><div><font color="#663366"><action application="set" data="var1=1"/> </font></div><div><font color="#663366"><span style="color:rgb(80, 0, 80)"><action application="set" data="var1=${expr(${var1}+1)}"/></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"><<a href="mailto:mike@jerris.com" target="_blank"></a><a href="mailto:mike@jerris.com" target="_blank">mike@jerris.com</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><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>
> <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" 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>