I had written a patch to add an "else" argument to gotoiftime (like the "goto" command) http://bugs.digium.com/view.php?id=5223&nbn=11
But the feedback was split on the need for this/the way to do it. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Adam Moffett Sent: November 2, 2005 12:40 PM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [Asterisk-Users] Time based call direction I just went through the same thing. I settled on the GoToIfTime application. One strange thing about GoToIfTime is that it doesn't allow an "else" argument, so you'll need a sequence of if's to get things done. try something along these lines: [yourcontext] ;lunchtime exten => s,1,GoToIfTime(12:00-13:00?yourcontext|LUNCH|1) ;after work exten => s,2,GoToIfTime(17:00-23:59?yourcontext|CLOSED|1) ;before work exten => s,3,GoToIfTime(00:00-07:59?yourcontext|CLOSED|1) ;if we got this far, must be we're open exten => s,4,GoTo(yourcontext|OPEN|1) ;;Handle lunchtime calls exten => LUNCH,1,[do something] exten => CLOSED,1,[do soemthing else] exten => OPEN,1,[do yet another thing] Rene Nelson wrote: > I would like to manipulate phone call direction to voicemail for > lunch, after hours etc, but am unsure how to do this. Could someone > point me to a howto or quickly explain the concept? > > Thanks > > Neri > >----------------------------------------------------------------------- >- > >_______________________________________________ >--Bandwidth and Colocation sponsored by Easynews.com -- > >Asterisk-Users mailing list >[email protected] >http://lists.digium.com/mailman/listinfo/asterisk-users >To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users > _______________________________________________ --Bandwidth and Colocation sponsored by Easynews.com -- Asterisk-Users mailing list [email protected] http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users _______________________________________________ --Bandwidth and Colocation sponsored by Easynews.com -- Asterisk-Users mailing list [email protected] http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
