<br><br><div class="gmail_quote">On Wed, Nov 4, 2009 at 10:22 PM, Ahmed Munir <span dir="ltr"><<a href="mailto:ahmedmunir007@gmail.com">ahmedmunir007@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi,<br><br>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;<br><br><condition field="${SIP_CALL}" expression="^true$"> <br>
<action application="log" data="INFO SIP CALL"/><br> <action application="bridge" data="sofia/${domain}/$1"/><br></condition><br><br><condition field="${PSTN_CALL}" expression="^true$"> <br>
<action application="log" data="INFO PSTN CALL"/><br>
<action application="bridge" data="sofia/gateway/$1"/><br>
</condition><br><br>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. <br>
<br><condition field="<u>${SIP_CALL} and ${PSTN_CALL}</u>" expression="^false$"> <br>
<action application="log" data="INFO GET DTMF"/><br>
<action application="getdigits" data="values for getdigits"/><br> <action application="bridge" data="sofia/gateway/$1"/><br>
</condition><br clear="all"><br></blockquote><div>AND operations are very simple - just stack the conditions:<br><condition field="${Field1}" expression="expr1"/><br><condition field="${Fiedl2}" expression="expr2"><br>
<-- actions here --><br></condition><br><br>note that you must close the first condition's tag! BTW, this is covered in the dialplan section of the wiki. :)<br>-MC<br></div></div><br>