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, "XML", "sales") <br>end<br> <br><br>now = os.date("%H:%M")<br>w = tonumber(os.date("%w"))<br><br>if w >= 1 and w <=5 then<br><br> if ( now >= "09:00" and now < "20:30" ) then<br>
do_transfer("sales_fifo_1")<br> elseif ( now >= "20:30" and now < "22:30" ) then<br> do_transfer("sales_fifo_2")<br> else<br> do_transfer("sales_fifo_cellphone")<br>
end<br><br>else<br><br> if ( now >= "10:00" and now < "19:00" ) then<br> do_transfer("sales_fifo_1")<br> elseif (now >= "20:00" and now < "22:30" ) then<br>
do_transfer("sales_fifo_2")<br> else<br> do_transfer("sales_fifo_cellphone")<br> end<br>end<br><br><br><div class="gmail_quote">2009/11/24 Adam Ford <span dir="ltr"><<a href="mailto:lists@redbonez.net">lists@redbonez.net</a>></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>