<div dir="ltr">Worth noting you don't need nested conditions to do this - search for Time-of-day-tod on <a href="https://freeswitch.org/confluence/display/FREESWITCH/XML+Dialplan">https://freeswitch.org/confluence/display/FREESWITCH/XML+Dialplan</a></div><div class="gmail_extra"><br><div class="gmail_quote">On 12 November 2014 13:54, Steven Ayre <span dir="ltr"><<a href="mailto:steveayre@gmail.com" target="_blank">steveayre@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><font face="arial, sans-serif">require_nested d</font>efaults to true so shouldn't be required.<div><br></div><div>Frank, collect a debug-level log of the call. It'll show the parsing of the dialplan, and might shed light on what's happening.</div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On 12 November 2014 01:29, Michael Collins <span dir="ltr"><<a href="mailto:msc@freeswitch.org" target="_blank">msc@freeswitch.org</a>></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><div><div>I haven't used nested conditions since I was raised in an era when you couldn't nest them. ;)<br><br></div>This page mentions the "require-nested" attribute:<br><a href="https://freeswitch.org/confluence/display/FREESWITCH/XML+Dialplan#XMLDialplan-Conditions" target="_blank">https://freeswitch.org/confluence/display/FREESWITCH/XML+Dialplan#XMLDialplan-Conditions</a><br><br></div>I didn't see that in your dialplan, so that might be a good place to start.<span><font color="#888888"><br><br></font></span></div><span><font color="#888888">-MC<br><br></font></span></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Nov 11, 2014 at 1:08 PM, Frank Myhr <span dir="ltr"><<a href="mailto:fmyhr@fhmtech.com" target="_blank">fmyhr@fhmtech.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
I have the following extension in a context that gets parsed several times during a call due to transfers and execute_extension. I'm finding<br>
that one of the inner actions (the correct one, based on time of day) gets executed even when the outer condition is false. Might not have<br>
noticed, except my original version of this extension actually played the greeting files, rather than just exporting the correct one in a<br>
variable. Callers were getting greeted multiple times, which was not the intention.<br>
<br>
For now I've sidestepped the audible problem by playing ${greeting} in another extension that does execute_extension on this one. But the<br>
greeting is still getting set multiple times per call.<br>
<br>
Would appreciate any clues as to why an inner action gets executed even though the outer condition is false.<br>
<br>
Thanks!<br>
Frank<br>
<br>
<br>
<extension name="set_greeting_tod"><br>
<condition field="destination_number" expression="^set_greeting_tod$"><br>
<br>
<condition minute-of-day="1-359" break="on-true"><!-- 12am - 5:59am --><br>
<action application="export" data="greeting=ivr/ivr-hello.wav"/><br>
</condition><br>
<br>
<condition minute-of-day="360-690" break="on-true"><!-- 6am - 11:30am --><br>
<action application="export" data="greeting=ivr/ivr-good_morning.wav"/><br>
</condition><br>
<br>
<condition minute-of-day="691-780" break="on-true"><!-- 11:31am - 1pm --><br>
<action application="export" data="greeting=ivr/ivr-hello.wav"/><br>
</condition><br>
<br>
<condition minute-of-day="781-1020" break="on-true"><!-- 1:01pm - 5pm --><br>
<action application="export" data="greeting=ivr/ivr-good_afternoon.wav"/><br>
</condition><br>
<br>
<condition minute-of-day="1021-1380" break="on-true"><!-- 5:01pm - 11pm --><br>
<action application="export" data="greeting=ivr/ivr-good_evening.wav"/><br>
</condition><br>
<br>
<condition minute-of-day="1381-1440"><!-- 11:01pm - 11:59pm --><br>
<action application="export" data="greeting=ivr/ivr-hello.wav"/><br>
</condition><br>
</condition><br>
</extension><br>
<br>
_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" target="_blank">http://confluence.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">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>
</blockquote></div><br></div>
</div></div><br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" target="_blank">http://confluence.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">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></blockquote></div><br></div>
</div></div></blockquote></div><br></div>