<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    Hi Andrew,<br>
    <br>
    there is a very big possibility that your variable will NEVER be set
    as variables will be handled AFTER the dialplan is traversed. You
    might want to have a look at the "inline"-attribute. For more info,
    please see here:
    <a class="moz-txt-link-freetext" href="https://wiki.freeswitch.org/wiki/Dialplan_XML#Inline_Actions">https://wiki.freeswitch.org/wiki/Dialplan_XML#Inline_Actions</a><br>
    <br>
    <br>
    Bernhard<br>
    <br>
    <br>
    <div class="moz-cite-prefix">On 29.06.2014 20:19, Andrew wrote:<br>
    </div>
    <blockquote cite="mid:076301cf93c6$b7c914d0$275b3e70$@comcast.net"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=ISO-8859-1">
      <meta name="Generator" content="Microsoft Word 15 (filtered
        medium)">
      <style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:"Calibri Light";
        panose-1:2 15 3 2 2 2 4 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Verdana;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
h3
        {mso-style-priority:9;
        mso-style-link:"Heading 3 Char";
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:13.5pt;
        font-family:"Times New Roman","serif";
        font-weight:bold;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
span.Heading3Char
        {mso-style-name:"Heading 3 Char";
        mso-style-priority:9;
        mso-style-link:"Heading 3";
        font-family:"Calibri Light","sans-serif";
        color:#1F4D78;}
span.EmailStyle19
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.EmailStyle20
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.m1
        {mso-style-name:m1;
        color:blue;}
span.at1
        {mso-style-name:at1;
        color:red;}
span.av1
        {mso-style-name:av1;
        color:blue;}
span.b1
        {mso-style-name:b1;
        font-family:"Courier New";
        color:red;
        font-weight:bold;
        text-decoration:none none;}
span.t1
        {mso-style-name:t1;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
      <div class="WordSection1">
        <p class="MsoNormal" style="margin-left:.5in"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
        <p class="MsoNormal" style="margin-left:.5in"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">What
            I am trying to do is wait for the variable to be set.<o:p></o:p></span></p>
        <p class="MsoNormal" style="margin-left:.5in"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">But
            it seems that the variable is never set in this code.<o:p></o:p></span></p>
        <p class="MsoNormal" style="margin-left:.5in"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Anyone
            have an idea on how to wait for a variable to be set?<o:p></o:p></span></p>
        <p class="MsoNormal" style="margin-left:.5in"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
        <p class="MsoNormal"
          style="margin-left:.5in;text-indent:-24.0pt"><span
style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:blue">&lt;</span><span
style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;">extension
            <span style="color:red">name</span><span style="color:blue">="public_extensions"&gt;</span><o:p></o:p></span></p>
        <p class="MsoNormal"
          style="margin-left:.5in;text-indent:-24.0pt"><span
style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:blue">&lt;</span><span
style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;">condition
            <span style="color:red">field</span><span style="color:blue">="destination_number"</span>
            <span style="color:red">expression</span><span
              style="color:blue">="^.*$"&gt;</span><o:p></o:p></span></p>
        <p class="MsoNormal"
          style="margin-left:.5in;text-indent:-24.0pt"><b><span
              style="font-size:10.0pt;font-family:&quot;Courier
              New&quot;;color:red">&nbsp;</span></b><span
style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:blue">&lt;</span><span
style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;">action
            <span style="color:red">application</span><span
              style="color:blue">="set"</span> <span style="color:red">data</span><span
              style="color:blue">="hangup_after_bridge=true"/&gt;</span><o:p></o:p></span></p>
        <p class="MsoNormal"
          style="margin-left:.5in;text-indent:-24.0pt"><span
style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:blue">&lt;</span><span
style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;">condition
            <span style="color:red">field</span><span style="color:blue">="${my_dialstring}"</span>
            <span style="color:red">expression</span><span
              style="color:blue">="^$"&gt;</span><o:p></o:p></span></p>
        <p class="MsoNormal"
          style="margin-left:.5in;text-indent:-24.0pt"><b><span
              style="font-size:10.0pt;font-family:&quot;Courier
              New&quot;;color:red">&nbsp;</span></b><span
style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:blue">&lt;</span><span
style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;">action
            <span style="color:red">application</span><span
              style="color:blue">="sleep"</span> <span
              style="color:red">data</span><span style="color:blue">="20"/&gt;</span><o:p></o:p></span></p>
        <p class="MsoNormal"
          style="margin-left:.5in;text-indent:-12.0pt"><b><span
              style="font-size:10.0pt;font-family:&quot;Courier
              New&quot;;color:red">&nbsp;</span></b><span
style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:blue">&lt;/</span><span
style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;">condition<span
              style="color:blue">&gt;</span><o:p></o:p></span></p>
        <p class="MsoNormal"
          style="margin-left:.5in;text-indent:-24.0pt"><span
style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:blue">&lt;</span><span
style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;">condition
            <span style="color:red">field</span><span style="color:blue">="${my_dialstring}"</span>
            <span style="color:red">expression</span><span
              style="color:blue">="^$"&gt;</span><o:p></o:p></span></p>
        <p class="MsoNormal"
          style="margin-left:.5in;text-indent:-24.0pt"><b><span
              style="font-size:10.0pt;font-family:&quot;Courier
              New&quot;;color:red">&nbsp;</span></b><span
style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:blue">&lt;</span><span
style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;">action
            <span style="color:red">application</span><span
              style="color:blue">="sleep"</span> <span
              style="color:red">data</span><span style="color:blue">="500"/&gt;</span><o:p></o:p></span></p>
        <p class="MsoNormal"
          style="margin-left:.5in;text-indent:-12.0pt"><b><span
              style="font-size:10.0pt;font-family:&quot;Courier
              New&quot;;color:red">&nbsp;</span></b><span
style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:blue">&lt;/</span><span
style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;">condition<span
              style="color:blue">&gt;</span><o:p></o:p></span></p>
        <p class="MsoNormal"
          style="margin-left:.5in;text-indent:-24.0pt"><b><span
              style="font-size:10.0pt;font-family:&quot;Courier
              New&quot;;color:red">&nbsp;</span></b><span
style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:blue">&lt;</span><span
style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;">action
            <span style="color:red">application</span><span
              style="color:blue">="bridge"</span> <span
              style="color:red">data</span><span style="color:blue">="${my_dialstring}"/&gt;</span><o:p></o:p></span></p>
        <p class="MsoNormal"
          style="margin-left:.5in;text-indent:-12.0pt"><b><span
              style="font-size:10.0pt;font-family:&quot;Courier
              New&quot;;color:red">&nbsp;</span></b><span
style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:blue">&lt;/</span><span
style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;">condition<span
              style="color:blue">&gt;</span><o:p></o:p></span></p>
        <p class="MsoNormal"
          style="margin-left:.5in;text-indent:-12.0pt"><b><span
              style="font-size:10.0pt;font-family:&quot;Courier
              New&quot;;color:red">&nbsp;</span></b><span
style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:blue">&lt;/</span><span
style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;">extension<span
              style="color:blue">&gt;</span><o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
        <p class="MsoNormal"><a moz-do-not-send="true"
            name="_MailEndCompose"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></a></p>
        <div>
          <div style="border:none;border-top:solid #E1E1E1
            1.0pt;padding:3.0pt 0in 0in 0in">
            <p class="MsoNormal"><b><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;">From:</span></b><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;">
                <a class="moz-txt-link-abbreviated" href="mailto:freeswitch-users-bounces@lists.freeswitch.org">freeswitch-users-bounces@lists.freeswitch.org</a>
                [<a class="moz-txt-link-freetext" href="mailto:freeswitch-users-bounces@lists.freeswitch.org">mailto:freeswitch-users-bounces@lists.freeswitch.org</a>] <b>On
                  Behalf Of </b><a class="moz-txt-link-abbreviated" href="mailto:aademattia@comcast.net">aademattia@comcast.net</a><br>
                <b>Sent:</b> Saturday, June 28, 2014 2:09 PM<br>
                <b>To:</b> FreeSWITCH Users Help<br>
                <b>Subject:</b> Re: [Freeswitch-users] condition<o:p></o:p></span></p>
          </div>
        </div>
        <p class="MsoNormal"><o:p>&nbsp;</o:p></p>
        <div>
          <div>
            <p class="MsoNormal"><span
                style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;">I
                am trying to find out if the variable is not set. The
                problem is this condition fires if the variable is set
                or not set.&nbsp;If the variable is not set, I want it to
                sleep.&nbsp;<o:p></o:p></span></p>
          </div>
          <div>
            <p class="MsoNormal"><span
                style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;"><o:p>&nbsp;</o:p></span></p>
          </div>
          <div>
            <p class="MsoNormal"><span
                style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;"><o:p>&nbsp;</o:p></span></p>
          </div>
          <div>
            <p class="MsoNormal"><span
                style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;">Sent
                from my HTC<o:p></o:p></span></p>
          </div>
          <p class="MsoNormal"><span
              style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;"><o:p>&nbsp;</o:p></span></p>
          <div id="htc_header">
            <p class="MsoNormal"><span
                style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;">-----
                Reply message -----<br>
                From: "Ken Rice" &lt;<a moz-do-not-send="true"
                  href="mailto:krice@freeswitch.org">krice@freeswitch.org</a>&gt;<br>
                To: "FreeSWITCH Users Help" &lt;<a
                  moz-do-not-send="true"
                  href="mailto:freeswitch-users@lists.freeswitch.org">freeswitch-users@lists.freeswitch.org</a>&gt;<br>
                Subject: [Freeswitch-users] condition<br>
                Date: Sat, Jun 28, 2014 1:24 PM<o:p></o:p></span></p>
          </div>
        </div>
        <p class="MsoNormal"><o:p>&nbsp;</o:p></p>
        <div>
          <p class="MsoNormal" style="margin-bottom:12.0pt">thats tesing
            for an empty string... test to see if what you expect to be
            there and if not use anti-action to sleep<o:p></o:p></p>
          <div>
            <p class="MsoNormal">Ken<o:p></o:p></p>
          </div>
          <p class="MsoNormal">Sent from my iPad<o:p></o:p></p>
        </div>
        <div>
          <p class="MsoNormal" style="margin-bottom:12.0pt"><br>
            On Jun 28, 2014, at 11:15, "Andrew" &lt;<a
              moz-do-not-send="true"
              href="mailto:aademattia@comcast.net">aademattia@comcast.net</a>&gt;
            wrote:<o:p></o:p></p>
        </div>
        <blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
          <div>
            <div>
              <blockquote style="border:none;border-left:solid #CCCCCC
                1.0pt;padding:0in 0in 0in
0in;margin-left:4.8pt;margin-top:5.0pt;margin-right:0in;margin-bottom:5.0pt;padding:6..0pt">
                <p class="MsoNormal"
style="mso-margin-top-alt:0in;margin-right:0in;margin-bottom:12.0pt;margin-left:11.55pt"><span
                    style="color:#1F497D">Hi,</span><o:p></o:p></p>
                <p class="MsoNormal"
style="mso-margin-top-alt:0in;margin-right:0in;margin-bottom:12.0pt;margin-left:11.55pt"><span
                    style="color:#1F497D">I want to see if the variable
                    is set.&nbsp; If its not I want to sleep for 500 mill
                    sec.</span><o:p></o:p></p>
                <p class="MsoNormal" style="margin-bottom:12.0pt"><span
                    style="color:#1F497D">This does not seem to work. </span><o:p></o:p></p>
                <p class="MsoNormal"
style="mso-margin-top-alt:0in;margin-right:0in;margin-bottom:12.0pt;margin-left:11.55pt"><span
                    style="color:#1F497D">&nbsp;&lt;condition
                    field="${my_dialstring}" expression="^$"&gt;</span><o:p></o:p></p>
                <p class="MsoNormal"
style="mso-margin-top-alt:0in;margin-right:0in;margin-bottom:12.0pt;margin-left:11.55pt"><span
                    style="color:#1F497D">&lt;action application="sleep"
                    data="500"/&gt;</span><o:p></o:p></p>
                <p class="MsoNormal" style="margin-bottom:12.0pt"><span
                    style="color:#1F497D">&lt;/condition&gt;</span><o:p></o:p></p>
              </blockquote>
            </div>
          </div>
        </blockquote>
        <blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
          <div>
            <p class="MsoNormal">_________________________________________________________________________<br>
              Professional FreeSWITCH Consulting Services:<br>
              <a moz-do-not-send="true"
                href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
              <a moz-do-not-send="true"
                href="http://www.freeswitchsolutions.com">http://www.freeswitchsolutions.com</a><br>
              <br>
              FreeSWITCH-powered IP PBX: The CudaTel Communication
              Server<br>
              <a moz-do-not-send="true" href="http://www.cudatel.com">http://www.cudatel.com</a><br>
              <br>
              Official FreeSWITCH Sites<br>
              <a moz-do-not-send="true" href="http://www.freeswitch.org">http://www.freeswitch.org</a><br>
              <a moz-do-not-send="true"
                href="http://wiki.freeswitch.org">http://wiki.freeswitch.org</a><br>
              <a moz-do-not-send="true" href="http://www.cluecon.com">http://www.cluecon.com</a><br>
              <br>
              FreeSWITCH-users mailing list<br>
              <a moz-do-not-send="true"
                href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
              <a moz-do-not-send="true"
                href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
              UNSUBSCRIBE:<a class="moz-txt-link-freetext" href="http://">http://</a><a moz-do-not-send="true"
                href="http://lists.freeswitch.org/mailman/options/freeswitch-users">lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
              <a moz-do-not-send="true" href="http://www.freeswitch.org">http://www.freeswitch.org</a><o:p></o:p></p>
          </div>
        </blockquote>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
<a class="moz-txt-link-abbreviated" href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a>
<a class="moz-txt-link-freetext" href="http://www.freeswitchsolutions.com">http://www.freeswitchsolutions.com</a>

FreeSWITCH-powered IP PBX: The CudaTel Communication Server
<a class="moz-txt-link-freetext" href="http://www.cudatel.com">http://www.cudatel.com</a>

Official FreeSWITCH Sites
<a class="moz-txt-link-freetext" href="http://www.freeswitch.org">http://www.freeswitch.org</a>
<a class="moz-txt-link-freetext" href="http://wiki.freeswitch.org">http://wiki.freeswitch.org</a>
<a class="moz-txt-link-freetext" href="http://www.cluecon.com">http://www.cluecon.com</a>

FreeSWITCH-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a>
<a class="moz-txt-link-freetext" href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a>
UNSUBSCRIBE:<a class="moz-txt-link-freetext" href="http://lists.freeswitch.org/mailman/options/freeswitch-users">http://lists.freeswitch.org/mailman/options/freeswitch-users</a>
<a class="moz-txt-link-freetext" href="http://www.freeswitch.org">http://www.freeswitch.org</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>