XML has basic conditioning, but lua rocks.<br><br>-- Time condition for sales 1<br>                     <br>--session:setAutoHangup(false)<br><br>function do_transfer(extn)<br>                         <br>        --print(extn) <br>
        session:transfer(extn, &quot;XML&quot;, &quot;sales&quot;) <br>end<br>          <br><br>now = os.date(&quot;%H:%M&quot;)<br>w = tonumber(os.date(&quot;%w&quot;))<br><br>if w &gt;= 1 and w &lt;=5 then<br><br>    if ( now &gt;= &quot;09:00&quot; and now &lt; &quot;20:30&quot; ) then<br>
                do_transfer(&quot;sales_fifo_1&quot;)<br>        elseif ( now &gt;= &quot;20:30&quot; and now &lt; &quot;22:30&quot; ) then<br>                do_transfer(&quot;sales_fifo_2&quot;)<br>        else<br>                do_transfer(&quot;sales_fifo_cellphone&quot;)<br>
        end<br><br>else<br><br>        if ( now &gt;= &quot;10:00&quot; and now &lt; &quot;19:00&quot; ) then<br>                do_transfer(&quot;sales_fifo_1&quot;)<br>        elseif (now &gt;= &quot;20:00&quot; and now &lt; &quot;22:30&quot; ) then<br>
                do_transfer(&quot;sales_fifo_2&quot;)<br>        else<br>                do_transfer(&quot;sales_fifo_cellphone&quot;)<br>        end<br>end<br><br><br><div class="gmail_quote">2009/11/24 Adam Ford <span dir="ltr">&lt;<a href="mailto:lists@redbonez.net">lists@redbonez.net</a>&gt;</span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">








<div link="blue" vlink="purple" lang="EN-US">

<div>

<p class="MsoNormal">Is there a standard module for FreeSWITCH out there that
people use for routing calls based on business hours and a holiday schedule? Or
is everyone just creating their own in the XML dialplan?(which seems pretty
simple) </p>

<p class="MsoNormal"> </p>

<p class="MsoNormal">I can’t seem to find anything on the wiki, but might
just be searching for the wrong thing.  I am relatively new at FreeSWITCH and
would rather follow what the community has decided is the best practice, instead
of trying to reinvent the wheel myself.</p>

<p class="MsoNormal"> </p>

<p class="MsoNormal">Thanks for any input,</p>

<p class="MsoNormal">-Adam</p>

<p class="MsoNormal"> </p>

</div>

</div>


<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>
<br></blockquote></div><br>