Like rupa said,<br>use anti-action?<br><br>Remember FreeSWITCH XML dialplan is not a programming language it&#39;s a pre-processor routing markup <br><br>Se potential use of anti-action below:<br><br> &lt;extension name=&quot;checkdigits&quot;&gt;<br>

      &lt;condition field=&quot;destination_number&quot; expression=&quot;^checkdigits$&quot;/&gt;<br>
       &lt;!--The next condition should be true if the variable $digits is not set/undefined --&gt;<br>
        &lt;condition field=&quot;${digits}&quot; expression=&quot;^[^.+]$&quot; /&gt;<br>
--        &lt;action application=&quot;read&quot; data=&quot;1 10 ivr/ivr-hello.wav digits 10000 #&quot;/&gt;<br>
           &lt;action application=&quot;phrase&quot; data=&quot;spell,${digits}&quot;/&gt;<br>
           &lt;action application=&quot;transfer&quot; data=&quot;checkdigits digits XML features&quot;/&gt;<br>          &lt;anti-action application=&quot;set&quot; data=&quot;not_true=true&quot;/&gt;<br>
      &lt;/condition&gt;<br>
<br>
      &lt;condition field=&quot;${pincode}&quot; expression=&quot;^${some_variable}$&quot;&gt;<br><div id=":8e" class="ii gt">
             &lt; SOME ACTIONS HERE &gt;<br>
      &lt;/condition&gt;<br>
 &lt;/extension&gt;<br><br></div><br><br><div class="gmail_quote">On Wed, Oct 21, 2009 at 5:51 PM, Mark Campbell-Smith <span dir="ltr">&lt;<a href="mailto:mcampbellsmith@gmail.com">mcampbellsmith@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;">Thanks Guys for your suggestions!  Very much appreciated.<br>
<br>
The reason I asked was that I want to check if a variable is set or<br>
not.  I don&#39;t think your suggestions will work because I actually have<br>
to check to see an undefined variable.  Any way to do this?<br>
<br>
I want to have the same extension for checking digits read from DTMF.<br>
The problem is that the digits are not set to the variable until the<br>
transfer statement, which means I would require 2 extensions.   It<br>
will make things simpler if I can have the same extension that reads<br>
the digits and then checks them.<br>
<br>
For example:<br>
<br>
 &lt;extension name=&quot;checkdigits&quot;&gt;<br>
      &lt;condition field=&quot;destination_number&quot; expression=&quot;^checkdigits$&quot;/&gt;<br>
       &lt;!--The next condition should be true if the variable $digits<br>
is not set/undefined --&gt;<br>
        &lt;condition field=&quot;${digits}&quot; expression=&quot;^[^.+]$&quot; /&gt;<br>
-----&lt;&lt;&lt;&lt; what should be here to check for undefined variable $digits<br>
?<br>
           &lt;action application=&quot;read&quot; data=&quot;1 10 ivr/ivr-hello.wav<br>
digits 10000 #&quot;/&gt;<br>
           &lt;action application=&quot;phrase&quot; data=&quot;spell,${digits}&quot;/&gt;<br>
           &lt;action application=&quot;transfer&quot; data=&quot;checkdigits digits XML<br>
features&quot;/&gt;<br>
      &lt;/condition&gt;<br>
<br>
      &lt;condition field=&quot;${pincode}&quot; expression=&quot;^${some_variable}$&quot;&gt;<br>
             &lt; SOME ACTIONS HERE &gt;<br>
      &lt;/condition&gt;<br>
 &lt;/extension&gt;<br>
<div><div></div><div class="h5"><br>
On Thu, Oct 22, 2009 at 4:44 AM, Michael Collins &lt;<a href="mailto:msc@freeswitch.org">msc@freeswitch.org</a>&gt; wrote:<br>
&gt;<br>
&gt;<br>
&gt; On Wed, Oct 21, 2009 at 8:07 AM, Rupa Schomaker &lt;<a href="mailto:rupa@rupa.com">rupa@rupa.com</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; You can also look at using anti-action rather than action after the<br>
&gt;&gt; condition.<br>
&gt;&gt;<br>
&gt;&gt; condition == if<br>
&gt;&gt; action == then<br>
&gt;&gt; anti-action == else<br>
&gt;<br>
&gt; Rupa &amp; Leon,<br>
&gt;<br>
&gt; Nice job of explaining the options. Sometimes we forget about the powerful<br>
&gt; constructs that are available in FreeSWITCH and PCRE. karma++ for both of<br>
&gt; you. :)<br>
&gt; -MC<br>
&gt;<br>
&gt;<br>
</div></div><div><div></div><div class="h5">&gt; _______________________________________________<br>
&gt; FreeSWITCH-users mailing list<br>
&gt; <a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
&gt; <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
&gt; UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
&gt; <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
&gt;<br>
&gt;<br>
<br>
_______________________________________________<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Anthony Minessale II<br><br>FreeSWITCH <a href="http://www.freeswitch.org/">http://www.freeswitch.org/</a><br>ClueCon <a href="http://www.cluecon.com/">http://www.cluecon.com/</a><br>
Twitter: <a href="http://twitter.com/FreeSWITCH_wire">http://twitter.com/FreeSWITCH_wire</a><br><br>AIM: anthm<br><a href="mailto:MSN%3Aanthony_minessale@hotmail.com">MSN:anthony_minessale@hotmail.com</a><br>GTALK/JABBER/<a href="mailto:PAYPAL%3Aanthony.minessale@gmail.com">PAYPAL:anthony.minessale@gmail.com</a><br>
IRC: <a href="http://irc.freenode.net">irc.freenode.net</a> #freeswitch<br><br>FreeSWITCH Developer Conference<br><a href="mailto:sip%3A888@conference.freeswitch.org">sip:888@conference.freeswitch.org</a><br><a href="http://iax:guest@conference.freeswitch.org/888">iax:guest@conference.freeswitch.org/888</a><br>
<a href="mailto:googletalk%3Aconf%2B888@conference.freeswitch.org">googletalk:conf+888@conference.freeswitch.org</a><br>pstn:213-799-1400<br>