[Asterisk-Users] Pager Reminder Script

Tom Rymes trymes at rymesheating.com
Wed Aug 10 12:31:09 MST 2005


I was about to re-invent this particular wheel when I stumbled across
this post in the archives:

<Begin Quote>
Since the list community has done so much for me in my humble asterisk 
beginnings I have put together a simple little script written in php
that 
serves as a paging reminder script.  If anyone is interested in a copy
of 
it contact me off list and I'll forward you a copy.

The basics of the script are as follows:  It queries an asterisk inbox
of 
your choosing for the existence of a file that has been there longer
than 
the time set in the script (you are free to set this time to whatever
you 
like).  If it finds the existence of the file it emails a reminder to
the 
email/pagers/text message device of your choosing.  If the time exceeds
a 
second time set by you in the script, it will email a second 
pager(s)/email(s)/text messenger(s) with a different message.  The logic

is very simple: you install the script where you want it installed, have

cron run it at whatever interval you choose and you never have to worry 
about it again.

In my case, we have an incidence where someone is oncall 24 hours a day.

This person is assigned an alpha-numeric pager, when an initial call is 
received to the oncall mailbox, asterisk sends a message to the pager.  
Our employee has 20 minutes to answer the page, we have cron set up to
run 
the script every 5 minutes.  If the script finds that a msg0000.gsm is
in 
the mailbox and the timestamp on the message is equal or greater to 20 
minutes, it sends out a reminder page to the pager.  Since cron runs
every 
5 minutes it sends in this message every 5 minutes until the message 
equals 40 minutes old.  At that point it sends the employee a message
that 
the supervisor is being notified and at the same time it sends a page to

the oncall supervisor's pager.  It doesn't matter if there is more than 
one message in the mailbox because when the employee calls to get the 
first one they will see the pressence of the others.  And even if the 
employee forgets to delete the message, asterisk automatically moves the

message to the old mail folder once it has been listened to.  For
anybody 
who wants the script, just mail me.  Also feel free to modify it any way

you see fit.
AJ
<End Quote>

AJ, Are you still on the list? Can I get a copy of this script? Could
you post it to the wiki?

Thank you,

Tom






More information about the asterisk-users mailing list