<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">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.<br><br></div>-MC<br><br></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">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">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>