[Asterisk-Users] Time based call direction

Adam Moffett adam at plexicomm.net
Wed Nov 2 10:39:41 MST 2005


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
>Asterisk-Users at lists.digium.com
>http://lists.digium.com/mailman/listinfo/asterisk-users
>To UNSUBSCRIBE or update options visit:
>   http://lists.digium.com/mailman/listinfo/asterisk-users
>



More information about the asterisk-users mailing list