XML has basic conditioning, but lua rocks.
-- Time condition for sales 1
--session:setAutoHangup(false)
function do_transfer(extn)
--print(extn)
session:transfer(extn, "XML", "sales")
end
now = os.date("%H:%M")
w = tonumber(os.date("%w"))
if w >= 1 and w <=5 then
if ( now >= "09:00" and now < "20:30" ) then
do_transfer("sales_fifo_1")
elseif ( now >= "20:30" and now < "22:30" ) then
do_transfer("sales_fifo_2")
else
do_transfer("sales_fifo_cellphone")
end
else
if ( now >= "10:00" and now < "19:00" ) then
do_transfer("sales_fifo_1")
elseif (now >= "20:00" and now < "22:30" ) then
do_transfer("sales_fifo_2")
else
do_transfer("sales_fifo_cellphone")
end
end
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)
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.
Thanks for any input,
-Adam
_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org