On Wed, Nov 4, 2009 at 10:22 PM, Ahmed Munir <ahmedmunir...@gmail.com>wrote:
> 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> > > AND operations are very simple - just stack the conditions: <condition field="${Field1}" expression="expr1"/> <condition field="${Fiedl2}" expression="expr2"> <-- actions here --> </condition> note that you must close the first condition's tag! BTW, this is covered in the dialplan section of the wiki. :) -MC
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org