<div dir="ltr">Like said before you need to look into logs to figure it out or paste the console logs here. </div><div class="gmail_extra"><br><div class="gmail_quote">On 23 September 2016 at 22:18, Caio Assis <span dir="ltr">&lt;<a href="mailto:caioebassis@hotmail.com" target="_blank">caioebassis@hotmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">




<div dir="ltr">
<div style="font-size:12pt;color:#000000;font-family:Calibri,Arial,Helvetica,sans-serif">
<p>Actually, i might have figured it out. What I intend to do is an IVR-like application. Which means I want this to happen</p>
<p>Call 1212</p>
<p>Application=&quot;read&quot; gets my input</p>
<p>if digit == 1 do this</p>
<p>if digit == 2 do that</p>
<p><br>
</p>
<p>Each option has it&#39;s own set of structions, so I think it should be within a condition. But I can&#39;t seem to validate the condition. Look at the following construction.</p>
<p><br>
</p>
<p></p>
<div>&lt;condition field=&quot;${dg}&quot; expression=&quot;^0$&quot;&gt;</div>
<div>                                &lt;action application=&quot;playback&quot; data=&quot;/home/beep.gsm&quot;/&gt;</div>
<div>                                &lt;anti-action application=&quot;playback&quot; data=&quot;/home/audio.gsm&quot;/&gt;</div>
<div>                                &lt;action application=&quot;hangup&quot;/&gt;</div>
<div><span style="font-size:12pt">&lt;/condition&gt;</span></div>
<br>
<p></p>
<p>${dg} is the variable that stores the input digit. So, if ${dg} == 0, play beep.gsm, else play audio.gsm. The expression is never true, but i put 0 always. Instead of playing beep.gsm, it plays audio.gsm. I got the same example from Freeswitch 1.2 book,
 Nested Conditions section.</p>
<br>
<br>
<div style="color:rgb(0,0,0)">
<hr style="display:inline-block;width:98%">
<div dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> <a href="mailto:freeswitch-users-bounces@lists.freeswitch.org" target="_blank">freeswitch-users-bounces@<wbr>lists.freeswitch.org</a> &lt;<a href="mailto:freeswitch-users-bounces@lists.freeswitch.org" target="_blank">freeswitch-users-bounces@<wbr>lists.freeswitch.org</a>&gt; on behalf of Michael Jerris &lt;<a href="mailto:mike@jerris.com" target="_blank">mike@jerris.com</a>&gt;<br>
<b>Sent:</b> Thursday, September 22, 2016 6:57 PM<br>
<b>To:</b> FreeSWITCH Users Help<br>
<b>Cc:</b> <a href="mailto:comercial@ypytecnologia.com.br" target="_blank">comercial@ypytecnologia.com.br</a><br>
<b>Subject:</b> Re: [Freeswitch-users] Playback within condition</font>
<div> </div>
</div>
<div>look at the log generated by calling this.  What order do the dial plan apps show up?  Does the playback show up?  what do the logs show it doing when it executes that playback?
<div><br>
<div>
<blockquote type="cite">
<div>On Sep 22, 2016, at 1:06 PM, Caio Assis &lt;<a href="mailto:caioebassis@hotmail.com" target="_blank">caioebassis@hotmail.com</a>&gt; wrote:</div>
<br>
<div>
<div style="font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;font-size:12pt;font-family:Calibri,Arial,Helvetica,sans-serif">
<div style="margin-top:0px;margin-bottom:0px">Hi.</div>
<div style="margin-top:0px;margin-bottom:0px"><br>
</div>
<div style="margin-top:0px;margin-bottom:0px">Here&#39;s what I&#39;m trying to do. I want to play a sound if a certain condition is true.</div>
<div style="margin-top:0px;margin-bottom:0px"><br>
</div>
<p style="margin-top:0px;margin-bottom:0px"></p>
<div>&lt;extension name=&quot;test&quot;&gt;</div>
<div>    &lt;condition field=&quot;destination_number&quot; expression=&quot;^1212$&quot;&gt;</div>
<div><span style="font-size:12pt">        &lt;condition field=&quot;${cond(${destination_<wbr>number} == 1212 ? 1212 : 0000)}&quot; expression=&quot;^1212$&quot;&gt;</span><br>
</div>
<div><span style="font-size:12pt">        &lt;!-- this second condition is just to ilustrate the nested condition--&gt;</span></div>
<div>                &lt;action application=&quot;log&quot; data=&quot;INFO LOG&quot;/&gt;</div>
<div>       <span style="font-size:12pt">           &lt;action application=&quot;playback&quot; data=&quot;sound1.gsm&quot;/&gt;</span></div>
<div>        &lt;/condition&gt;</div>
<div>
<div></div>
<div>        &lt;action application=&quot;playback&quot; data=&quot;sound2.gsm&quot;/&gt;</div>
<div>        &lt;action application=&quot;hangup&quot;/&gt;</div>
<div>    &lt;/condition&gt;</div>
<div>&lt;/extension&gt;</div>
<br>
</div>
<div>The sound 1 doesn&#39;t play, but I knew the condition was true because I can see the INFO LOG on the console. The sound 2, outside the condition, was played normally. Both PLAYBACK and READ applications don&#39;t work on nested conditions. Can anyone
 help me?</div>
</div>
</div>
</blockquote>
</div>
</div>
</div>
</div>
</div>
</div>

<br>______________________________<wbr>______________________________<wbr>_____________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" rel="noreferrer" target="_blank">http://www.<wbr>freeswitchsolutions.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" rel="noreferrer" target="_blank">http://confluence.freeswitch.<wbr>org</a><br>
<a href="http://www.cluecon.com" rel="noreferrer" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.<wbr>freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/<wbr>mailman/listinfo/freeswitch-<wbr>users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank">http://lists.<wbr>freeswitch.org/mailman/<wbr>options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br></blockquote></div><br></div>