[Asterisk-Users] *** Asterisk Sunday News: Gone Fishing...

Tilghman Lesher tilghman at mail.jeffandtilghman.com
Sun May 30 20:20:41 MST 2004


On Sunday 30 May 2004 04:32, Olle E. Johansson wrote:
<snip>
> *** Asterisk: Gone fishing
> --------------------------
> Did you know that Asterisk have a scheduler that can automatically
> switch modes depending on the date and time? If you want your
> office extension to dial your cell phone on evenings and nights, or
> go directly to voicemail during weekends, this is what you need.
> Looking into the sample config in all Asterisk distributions, be it
> RPM, tar-ball or CVS, you'll find extensions.conf.sample
> ------
> ;
> ; Timing list for includes is
> ;
> ;   <time range>|<days of week>|<days of month>|<months>
> ;
> ;include => daytime|9:00-17:00|mon-fri|*|*

GotoIfTime() was created specifically because there were so many
people who were having problems with the include syntax.  It has
exactly the same format (even uses the same internal code), but the
mode is active (if the current time is X, go here) instead of passive
(if the current time is X, change the effective context to include Y).

It's arguable that GotoIfTime() makes the dialplan logic more clear
and should give the dialplan programmer more control than with include
syntax.

-- 
Tilghman



More information about the asterisk-users mailing list