<div dir="ltr">Steven,<div><br></div><div>Nice one - I had actually worked it out shortly after posting to the list, and I would&#39;ve replied if the list had sent me a copy of my own email (and/or if gmail hadn&#39;t eaten it).</div><div><br></div><div>Many thanks for the alternative syntax of doing everything in one extension - that could be useful in another application.</div><div><br></div><div>Cheers,</div><div>Gavin.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On 16 October 2014 12:58, Steven Ayre <span dir="ltr">&lt;<a href="mailto:steveayre@gmail.com" target="_blank">steveayre@gmail.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">You have recursion.<div><br></div><div>expression is a regular expression. You need ^ and $ to match the start and end of the string, without them it&#39;ll match the expression appearing anywhere in the string. As a result...</div><div><span class=""><div><br></div><div><div style="font-family:arial,sans-serif;font-size:13px">    &lt;extension name=&quot;DDI_9600&quot; continue=&quot;true&quot;&gt;</div><div style="font-family:arial,sans-serif;font-size:13px">      &lt;condition field=&quot;destination_number&quot; expression=&quot;441614249600&quot;&gt;</div><div style="font-family:arial,sans-serif;font-size:13px">        &lt;action application=&quot;execute_extension&quot; data=&quot;441614249600_${office_status}&quot;/&gt;</div><div style="font-family:arial,sans-serif;font-size:13px">      &lt;/condition&gt;</div><div style="font-family:arial,sans-serif;font-size:13px">    &lt;/extension&gt;</div></div><div style="font-family:arial,sans-serif;font-size:13px"><br></div></span><div style="font-family:arial,sans-serif;font-size:13px">This executes itself again and again and again... it never reaches the next extension.</div></div><div style="font-family:arial,sans-serif;font-size:13px"><div><br></div><div>These conditions would avoid the issue:</div><div>      &lt;condition field=&quot;destination_number&quot; expression=&quot;^441614249600$&quot;&gt;</div><div>      &lt;condition field=&quot;destination_number&quot; expression=&quot;^441614249600_open$&quot;&gt;</div><div>      &lt;condition field=&quot;destination_number&quot; expression=&quot;^441614249600_closed$&quot;&gt;</div><div><br></div></div><div style="font-family:arial,sans-serif;font-size:13px">As an alternative implementation you could also do this in a single extension:</div><div style="font-family:arial,sans-serif;font-size:13px"><div>   &lt;extension name=&quot;DDI_9600&quot;&gt;</div><div>      &lt;condition field=&quot;destination_number&quot; expression=&quot;^441614249600$&quot;/&gt;</div><div>      &lt;condition field=&quot;${office_status}&quot; expression=&quot;^open$&quot;&gt;</div><div>       &lt;!-- open --&gt;</div><span class=""><div>       &lt;action application=&quot;set&quot; data=&quot;domain_name=$${domain}&quot;/&gt;</div><div>       &lt;action application=&quot;set&quot; data=&quot;effective_caller_id_name=${cidlookup(${caller_id_number})}&quot;/&gt;</div><div>       &lt;action application=&quot;ivr&quot; data=&quot;bashton_9600_open&quot;/&gt;</div></span><div>       &lt;!-- closed --&gt;</div><div>       &lt;anti-action application=&quot;set&quot; data=&quot;domain_name=$${domain}&quot;/&gt;<br></div><div>       &lt;anti-action application=&quot;set&quot; data=&quot;effective_caller_id_name=${cidlookup(${caller_id_number})}&quot;/&gt;</div><div>       &lt;anti-action application=&quot;ivr&quot; data=&quot;bashton_9600_closed&quot;/&gt;</div><div>      &lt;/condition&gt;<br></div><div>    &lt;/extension&gt;</div><div><br></div><div>Note this only works because you&#39;re setting inline=&quot;true&quot; when setting ${office_status}.</div><div><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On 16 October 2014 09:09, Gavin Hamill <span dir="ltr">&lt;<a href="mailto:gavin@bashton.com" target="_blank">gavin@bashton.com</a>&gt;</span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr"><div>Hi all,</div><div><br></div><div>I&#39;m using FS 1.4.12 on CentOS 6.5 and I think I&#39;m running into an issue with &#39;dialplan parsed all at once&#39; when trying to implement the example based on </div><div><a href="https://wiki.freeswitch.org/wiki/Time_of_Day_Routing#Example_for_office_open_09:00-16:00" target="_blank">https://wiki.freeswitch.org/wiki/Time_of_Day_Routing#Example_for_office_open_09:00-16:00</a> :<br></div><div><br></div><div>When I dial our main &#39;9600&#39; external DID, the call is answered and routed exactly as I want, however, there is a lot of ugly logging going on and I suspect that the desired behaviour is by chance rather than design. I&#39;d love to hear some feedback on how to best implement the logic of &#39;Office open Mon-Fri 8am-6pm&#39;:</div><div><br></div><div> </div><div>2014-10-16 08:49:48.515467 [NOTICE] switch_channel.c:1055 New Channel sofia/external/<a href="mailto:nobody@87.238.73.162" target="_blank">nobody@87.238.73.162</a> [ee5fb654-31c0-4c89-977e-b85ad4a0cb23]</div><div>2014-10-16 08:49:48.515467 [NOTICE] switch_core_session.c:2987 Execute execute_extension(441614249600_${office_status})</div><div>2014-10-16 08:49:48.515467 [NOTICE] switch_core_session.c:2987 Execute execute_extension(441614249600_${office_status})<br></div><div>[.. 17 times in total...]</div><div>2014-10-16 08:49:48.515467 [NOTICE] switch_core_session.c:2987 Execute execute_extension(441614249600_${office_status})</div><div>2014-10-16 08:49:48.515467 [ERR] switch_core_session.c:2918 Error sofia/external/<a href="mailto:nobody@87.238.73.162" target="_blank">nobody@87.238.73.162</a> too many stacked extensions</div><div>2014-10-16 08:49:48.515467 [NOTICE] switch_core_session.c:2987 Execute set(domain_name=<a href="http://freeswitch.bashton.eu" target="_blank">freeswitch.bashton.eu</a>)</div><div>2014-10-16 08:49:48.515467 [NOTICE] switch_core_session.c:2987 Execute set(effective_caller_id_name=${cidlookup(${caller_id_number})})</div><div>2014-10-16 08:49:48.515467 [NOTICE] switch_core_session.c:2987 Execute ivr(bashton_9600_open)</div><div>2014-10-16 08:49:48.515467 [NOTICE] mod_sofia.c:2243 Pre-Answer sofia/external/<a href="mailto:nobody@87.238.73.162" target="_blank">nobody@87.238.73.162</a>!</div><div><br></div><div><div>    &lt;extension name=&quot;are_we_open&quot; continue=&quot;true&quot;&gt;</div><div>      &lt;condition wday=&quot;2-6&quot; hour=&quot;8-18&quot; break=&quot;never&quot;&gt;</div><div>        &lt;action application=&quot;set&quot; data=&quot;office_status=open&quot; inline=&quot;true&quot;/&gt;</div><div>        &lt;anti-action application=&quot;set&quot; data=&quot;office_status=closed&quot; inline=&quot;true&quot;/&gt;</div><div>      &lt;/condition&gt;</div><div>    &lt;/extension&gt;</div><div><br></div><div>    &lt;extension name=&quot;DDI_9600&quot; continue=&quot;true&quot;&gt;</div><div>      &lt;condition field=&quot;destination_number&quot; expression=&quot;441614249600&quot;&gt;</div><div>        &lt;action application=&quot;execute_extension&quot; data=&quot;441614249600_${office_status}&quot;/&gt;</div><div>      &lt;/condition&gt;</div><div>    &lt;/extension&gt;</div><div><br></div><div>    &lt;extension name=&quot;DDI_9600_open&quot;&gt;</div><div>      &lt;condition field=&quot;destination_number&quot; expression=&quot;441614249600_open&quot;&gt;</div><div>       &lt;action application=&quot;set&quot; data=&quot;domain_name=$${domain}&quot;/&gt;</div><div>       &lt;action application=&quot;set&quot; data=&quot;effective_caller_id_name=${cidlookup(${caller_id_number})}&quot;/&gt;</div><div>       &lt;action application=&quot;ivr&quot; data=&quot;bashton_9600_open&quot;/&gt;</div><div>      &lt;/condition&gt;<br></div><div>    &lt;/extension&gt;</div><div><br></div><div>    &lt;extension name=&quot;DDI_9600_closed&quot;&gt;</div><div>      &lt;condition field=&quot;destination_number&quot; expression=&quot;441614249600_closed&quot;&gt;</div><div>       &lt;action application=&quot;set&quot; data=&quot;domain_name=$${domain}&quot;/&gt;</div><div>       &lt;action application=&quot;set&quot; data=&quot;effective_caller_id_name=${cidlookup(${caller_id_number})}&quot;/&gt;</div><div>       &lt;action application=&quot;ivr&quot; data=&quot;bashton_9600_closed&quot;/&gt;</div><div>      &lt;/condition&gt;<br></div><div>    &lt;/extension&gt;</div><div><br></div></div><div>Suggestions would be most welcome! :)</div><div><br></div><div>Cheers,</div><div>Gavin.</div><div><br></div><div><br></div></div>
<br></div></div>_________________________________________________________________________<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-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.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>
<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-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.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>