<br><br><div class="gmail_quote">On Wed, Nov 4, 2009 at 10:22 PM, Ahmed Munir <span dir="ltr">&lt;<a href="mailto:ahmedmunir007@gmail.com">ahmedmunir007@gmail.com</a>&gt;</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&#39;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>&lt;condition field=&quot;${SIP_CALL}&quot; expression=&quot;^true$&quot;&gt; <br>

     &lt;action application=&quot;log&quot; data=&quot;INFO SIP CALL&quot;/&gt;<br>     &lt;action application=&quot;bridge&quot; data=&quot;sofia/${domain}/$1&quot;/&gt;<br>&lt;/condition&gt;<br><br>&lt;condition field=&quot;${PSTN_CALL}&quot; expression=&quot;^true$&quot;&gt; <br>


     &lt;action application=&quot;log&quot; data=&quot;INFO PSTN CALL&quot;/&gt;<br>
     &lt;action application=&quot;bridge&quot; data=&quot;sofia/gateway/$1&quot;/&gt;<br>
&lt;/condition&gt;<br><br>The problem I&#39;m facing is how can I apply condition when I&#39;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>&lt;condition field=&quot;<u>${SIP_CALL} and ${PSTN_CALL}</u>&quot; expression=&quot;^false$&quot;&gt; <br>
     &lt;action application=&quot;log&quot; data=&quot;INFO GET DTMF&quot;/&gt;<br>
     &lt;action application=&quot;getdigits&quot; data=&quot;values for getdigits&quot;/&gt;<br>      &lt;action application=&quot;bridge&quot; data=&quot;sofia/gateway/$1&quot;/&gt;<br>
&lt;/condition&gt;<br clear="all"><br></blockquote><div>AND operations are very simple - just stack the conditions:<br>&lt;condition field=&quot;${Field1}&quot; expression=&quot;expr1&quot;/&gt;<br>&lt;condition field=&quot;${Fiedl2}&quot; expression=&quot;expr2&quot;&gt;<br>
  &lt;-- actions here --&gt;<br>&lt;/condition&gt;<br><br>note that you must close the first condition&#39;s tag! BTW, this is covered in the dialplan section of the wiki. :)<br>-MC<br></div></div><br>