Looking for Weather Related Scripts

Hello All,
I have been successfully running an asterisk system at my library now for a couple of weeks, and this week we ended up not opening due to weather.

First is there any way that I can enable my boss to turn on a ‘we are closed’ message by calling in ( it would either play at the beginning of the menu system, or temporarily replace it altogether. ) If he could record the message by calling in and dialing a ‘hidden’ extension, that would be great.

Is there any script out there that could be used to auto-dial a list of our employees to automatically alert them to the fact that they do not have to come to work? The closest thing I have found is this:
voip-info.org/wiki/view/Aste … er+message
which would be a starting point but not a solution on its own.


You can create an “extension” password protected that would set a variable to set if you are closed or open. When calls come in you can check that variable to see if you are open or not. I actually recently set this up for a client if they were on vacation or not. It also checks the times to see when they are open.


exten => s,1,GotoIf($[${DB(vacation/selected)} = yes]?4:6)
exten => s,4,Goto(vacation,s,1)
exten => s,6,GotoIfTime(08:30-14:30|sun-thu|*|*?day_main,s,1)
exten => s,7,Goto(closed,s,1)

Set the variable

exten => *3,1,Answer
exten => *3,2,Authenticate(1234)
exten => *3,3,Set(DB(vacation/selected)=no)
exten => *3,4,Playback(thank-you-for-calling)
exten => *3,5,Congestion          

exten => *4,1,Answer 
exten => *4,2,Authenticate(1234)
exten => *4,3,Set(DB(vacation/selected)=yes)
exten => *4,4,Playback(thank-you-for-calling)
exten => *4,5,Congestion

I was too lazy to check what the current state was so I just set *3 to set vacation is off and *4 that vacation is on.

Also for calling people call files will work for a few calls but after that Asterisk can get a bit screwy. I wrote a php script that works with mysql to connect to the AMI to send out calls. PM me if you need it (you need a bit of php + mysql experience to work with it).