[Freeswitch-users] Calling more than 1 variable in condition

Ahmed Munir ahmedmunir007 at gmail.com
Wed Nov 4 22:22:08 PST 2009


Hi,

In my dial plan I've created a variable named SIP_CALL, PSTN_CALL. If
SIP_CALL = true, it dials out to sip call, when PSTN_CALL=true, it dials out
to landline call, as I provide sample below;

<condition field="${SIP_CALL}" expression="^true$">
     <action application="log" data="INFO SIP CALL"/>
     <action application="bridge" data="sofia/${domain}/$1"/>
</condition>

<condition field="${PSTN_CALL}" expression="^true$">
     <action application="log" data="INFO PSTN CALL"/>
     <action application="bridge" data="sofia/gateway/$1"/>
</condition>

The problem I'm facing is how can I apply condition when I've to call more
than 1 variables? Like if there are no records in SIP numbering plan table
and PSTN numbering plan table so it get the digits and  dial out the to
carrier (how to apply AND operation in condition?) i.e.

<condition field="*${SIP_CALL} and ${PSTN_CALL}*" expression="^false$">
     <action application="log" data="INFO GET DTMF"/>
     <action application="getdigits" data="values for getdigits"/>
      <action application="bridge" data="sofia/gateway/$1"/>
</condition>


Kindly advise for this issue.

-- 
Regards,

Ahmed Munir
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20091105/78020414/attachment-0002.html 


More information about the FreeSWITCH-users mailing list