[Freeswitch-users] Inline and cond

Dome Charoenyost dome at tel.co.th
Sun Mar 14 05:37:04 PDT 2010


I try to use cond in my dialplan

     <condition field="destination_number" expression="^(1111)">
        <action application="answer"/>
        <action inline="true" application="set" data="b=25"/>
     </condition>
     <condition field="${cond(${b} > 12 ? YES : NO)}" expression="^YES$">
        <action application="log" data="ALERT ${b} is indeed greater than 12"/>
        <anti-action application="log" data="ALERT ${b} is not greater
than 12"/>
     </condition>

it's work but when use set b=${b1} it's not work

     <condition field="destination_number" expression="^(1111)">
        <action application="answer"/>
        <action inline="true" application="set" data="b1=25"/>
        <action inline="true" application="set" data="b=${b1}"/>
     </condition>
     <condition field="${cond(${b} > 12 ? YES : NO)}" expression="^YES$">
        <action application="log" data="ALERT ${b} is indeed greater than 12"/>
        <anti-action application="log" data="ALERT ${b} is not greater
than 12"/>
     </condition>

What's wrong ? inline or cond ?

Dome C.




More information about the FreeSWITCH-users mailing list