login | register
Sun 07 of Sep, 2008 [10:36 UTC]

voip-info.org

Discuss [4] History

Asterisk tips wake-up

Created by: JustRumours,Last modification on Wed 04 of May, 2005 [02:20 UTC] by adonay

Wake-up call


Contributed by Rob Fugina

Still looking for comments/help with a re-implementation. What is published here is the latest version — the one I'm running myself at home.

All the code is GPL.

Feedback is appreciated, both positive and negative. Success stories are especially welcome. Email preferred.

Rob
robf at geekthing dot com

Requirements:

  • Asterisk
  • Additional sounds from asterisk-sounds package in CVS
  • Perl
  • Perl module Date::Manip (available on CPAN)
  • Perl module Asterisk::AGI (see Asterisk perl library)
  • tarball referenced below — run 'make install'.
  • Dialplan entry to call AGI(wakeup.agi)
  • Crontab entry to run the provided run_wakeups script
  • Customize to your environment — see below

Examples:

Example dialplan entry:
exten => 999,1,AGI(wakeup.agi)

If you want wakup.agi in a non-standard place, you'll have to specify the full path in the dialplan:
exten => 999,1,AGI(/full/path/to/wakeup.agi)

Example crontab entry: (/etc/crontab, root's crontab, or whatever user Asterisk is running as)
* * * * * root /var/spool/asterisk/wakeups/run_wakeups

How It Works

Operation is simple: An AGI is used to schedule a wakeup call in the first place. A call file is created in the wakeups spool that will later be moved into Asterisk's outgoing call spool to make the wakeup call. Another AGI is called directly for the wakeup call itself, and may schedule a future wakeup call based on a selected snooze time.

Where To Get It

The scripts, additional sound files, etc, are available at http://www.geekthing.com/~robf/asterisk/.

Customizing For Your Environment:

The following items are the most likely things you will have to change to suit your particular needs.

  • callerid for wakeup service — change in wakeup.agi
  • local context name for wakeup call to use — change in wakeup.agi and snooze.agi
  • spool directory locations — change in wakeup.agi, snooze.agi, and run_wakeups

Different Versions of Asterisk

There are some differences between stable and development branches of Asterisk in terms of how callerid information is presented to an AGI script. I believe the current version of asterisk-wakeup takes this into account, and should work with either the 1.0 branch or CVS HEAD. Let me know if this is not the case...

Future Directions

I'd like to rewrite the two AGI scripts as regular Asterisk applications (in C). Don't know when I'll have the time...


Go back to Asterisk tips and tricks


Comments

Comments Filter
222

333Re: Robust Reminder Call System for Asterisk

by catsmuvva, Wednesday 16 of July, 2008 [13:09:38 UTC]
The url is now http://www.cats-muvva.net/software/asterisk/. My domain expired and some b*stards are squatting on the old one so I cannot re-register it. So, soddem!
222

333wake up doesnt work

by bhattact, Wednesday 27 of February, 2008 [14:03:48 UTC]
your right from 2006 the snooze is broken it might be the file might not be the right format or its a problem with the perl

I made a different version for reminders but it would be nice to get the original version working.
222

333Robust Reminder Call System for Asterisk

by catsmuvva, Saturday 16 of June, 2007 [15:29:14 UTC]
If you want a daemon-based solution, look at this http://www.catsmuvva.net/software/asterisk/. It's extremely robust and can manage a heavy load.
222

333snooze problem

by gmalsack, Sunday 05 of February, 2006 [20:04:25 UTC]
just setup this wakeup call program. works well, simple, clean, logical, however one little problem. when the snooze application calls you to alert you of your wake up call, the stream for the wakeup-menu2 is played, the asterisk cli debugger says it's playing, but the audio is not heard. If I place that audio file in any other playback prompt, the audio is heard, thus I know it's not a file problem. I am ok with perl so I can tell what the perl app is doing, and everything there looks ok. not real sure about asterisk. wondering if there is a problem with this event making a call to an extension and not really sending the audio.