Home » Posts tagged 'web scheduling'

Tag Archives: web scheduling

The Most Versatile VoIP Provider: FREE PORTING

Introducing Telephone Reminders for Asterisk 1.4 with Phone and Web Scheduling

If you loved your ‘Speak and Spell’ when you were a kid, then prepare for a childhood flashback… except the Nerd Vittles version is more akin to ‘Spell and Speak.’ Today’s edition of Telephone Reminders for Asterisk® 1.4 not only lets you schedule reminders by phone using your own voice, but now you can use a clever (if we do say so) web interface as well. Just fill out a simple web form to set your reminder or recurring reminder in motion, and Telephone Reminders for Asterisk will swing into action with Flite or Cepstral’s Allison to deliver your typed message to the phone of your choice at the appointed time. It’s the perfect tool for bugging the hell out of your friends without ever picking up the phone. Wanna wake your worst enemy in the middle of the night with a nice reading of the Gettysburg Address? No problem. Actually, there is a slight problem. It’s against the law to make irritating phone calls. But it’ll be great for calling all those politicians back to thank them for the hundreds of telephone messages they delivered while you were eating dinner. And, yes, we’ve preserved all of the recurring reminder functionality that you’ve grown to love. So you can schedule one-time reminders, weekday reminders, daily reminders, weekly reminders, monthly reminders, and annual reminders. Wowee! Our special thanks to the PBX in a Flash Pioneers that really shook the bugs out of our beta release, most of which were thanks to the Deprecation Aficionados on the Asterisk Development Team. STOP DEPRECATING COMMANDS! It has no place in the business community. </rant>

To celebrate the FreePBX Training Seminar being held in our Hometown U.S.A. this week, we’ve even added a new FreePBX Interface to Telephone Reminders for those of you that like FreePBX as much as we do.

While the entire application has been designed for 15-second installation on PBX in a Flash systems, it’ll work equally well on any Asterisk 1.4 system with an Apache web server, PHP, FreePBX, and Flite or Cepstral support. But why make things difficult when PBX in a Flash is so easy to install? And, did we mention? It is and always will be free… with no tricks, ever. Visit pbxinaflash.com to download your copy today.

How It Works. The original functionality of the application has been preserved. Dial 1-2-3 on a phone connected to your Asterisk 1.4 system and enter your password. The default is 12345678. Then you can record a reminder message, specify the phone number to which the reminder should be delivered, schedule the date and time for delivery, and decide whether to enable recurring reminders of one of the flavors outlined above. The Web Interface to Telephone Reminders lets you do exactly the same thing using a web browser. The only difference is that, instead of recording your reminder message, you type it and let Flite or Allison record it for you before the telephone reminder message is delivered. The FreePBX Interface to Telephone Reminders provides you the same web interface inside the FreePBX shell by adding a Reminders option under the Third Party Addon section of the Tools tab. As was true in version 3, both the telephone and web interfaces can be customized to meet your needs. See our detailed tutorial for customization tips. You now can also specify whether to use Flite or Allison for your web reminders. So let’s get started.

Installing Cepstral. If you want a perfect text-to-speech system for applications such as this one, then look no further than Cepstral. And we strongly recommend using the Voice of Allison that we’ve all grown up with in the Asterisk community. It’s the best $30 you’ll ever spend. Just follow our Cepstral installation tutorial, and you’ll be up and running in about 10 minutes. If you’ve already installed Cepstral on your system, then log into your server as root and make this one simple addition so that the Web Interface to Telephone Reminders can find the Cepstral application when it’s time to generate your text-to-speech phone reminder.

ln -s /opt/swift/bin/swift /usr/bin/swift

A Hint for the Early Pioneers. For the many pioneers that helped us get the bugs out of the beta release, THANK YOU! The best way to make sure you have a clean install of today’s release of Telephone Reminders with all the bells and whistles is to delete what you’re using now and start over. We will not delete any scheduled reminders, and it’ll only take a few minutes. Here’s how to clean off the old version on your system. Log into your server as root. First, edit crontab: nano -w /etc/crontab. Look for the two lines that look something like what you see below. Delete the two lines using Ctrl-K. Then save your changes: Ctrl-X, Y, then Enter.

0 0 * * * root /var/lib/asterisk/agi-bin/run_recurring > /dev/null
3 0 * * * root /var/lib/asterisk/agi-bin/run_reminders > /dev/null

Second, edit the extensions_custom config file: nano -w /etc/asterisk/extensions_custom.conf. There are two sections of code that need to be removed. The first will be found near the top of the file in the [from-internal-custom] context. Use Ctrl-W to search for 123, and you should see a clump of code that looks like the following. Use Ctrl-K to delete each of the lines.

exten => 123,1,Answer
exten => 123,2,Wait(1)
exten => 123,3,Authenticate(12345678)
exten => 123,4,Goto(reminder,s,1)

The second section of code to be deleted will be near the bottom of the file. Use Ctrl-W to search for reminder. Delete each line of code including the context headings from the following contexts. Hint: It’s a big chunk of code!


Then save your changes: Ctrl-X, Y, then Enter.

Now let’s delete another group of files, and you’re all set. Just execute the following commands to delete the original files:

cd /var/lib/asterisk/agi-bin
rm checkdate.php
rm checktime.php
rm reminder.php
rm run_recurring
rm run_reminders
rm /var/www/html/reminders/index.php

If You’re Not Using PBX in a Flash. Only read this section if you’re not installing Telephone Reminders for Asterisk 1.4 on a PBX in a Flash system. It’s still possible to use this application without running it on a PBX in a Flash system. The major difference is that it is up to you to assure that the prerequisites are met and properly functioning. For those running trixbox 2.x systems, that is next to impossible until the trixbox developers decide to support Flite… unless you use the commercial Cepstral product. The good news is that Cepstral apparently works. The other good news is that the telephone module of Telephone Reminders does not require either Flite or Cepstral; however, the Web Interface does. As long as you’re willing to live without the Web Interface (i.e. version 3 functionality), keep reading. First, download both the install script and the payload file and manually determine what needs to be placed where. Our recommendation is to build a /root/reminders directory and execute the following commands to get all of the code:

mkdir /root/reminders
cd /root/reminders
wget http://bestof.nerdvittles.com/applications/reminders4/reminders.pbx
wget http://pbxinaflash.net/scripts/reminders.tgz
tar -zxvf reminders.tgz

Unless you’re using PBX in a Flash or trixbox, carefully read the Telephone Reminders 3.0 tutorial on our Best of Nerd Vittles site. Then review the reminders.pbx script and make any necessary placement adjustments. Next, review the directory tree created below /root/reminders and be sure to copy and create the files and directory structure into the appropriate locations on your system. Make certain that you set ownership and file permissions properly for your system. The following assumptions are made in our setup. The root of the web server is located in /var/www/html, and Apache runs as user asterisk. AGI and PHP scripts for Asterisk are stored in /var/lib/asterisk/agi-bin. Logs for this application are written to /var/log/asterisk. Finally, the PHP and Asterisk configuration files are housed in /etc/asterisk. We don’t provide support for any installs other than on PBX in a Flash systems. Life’s too short!

Installation on PBX in a Flash Systems. We’ve saved the best for last. The entire install on a PBX in a Flash system takes about as long as it will take you to cut-and-paste the following commands. 15 seconds should do it! The script reportedly works on trixbox ce systems as well although we have not tested it. Log into your server as root and issue the following commands:

cd /root
wget http://bestof.nerdvittles.com/applications/reminders4/reminders.pbx
chmod +x reminders.pbx
amportal restart
ln -s /opt/swift/bin/swift /usr/bin/swift

Test Run of Web Interface to Telephone Reminders. Assuming you have Cepstral running on your server, the web interface is ready to go since it comes configured to use Cepstral as the text-to-speech engine. We’ll show you how to change back to Flite in a minute. Using a web browser, go to the following site using the IP address of your Asterisk server: Fill in the blanks including a reminder message. If you enter a date and time in the past, the phone number you enter will start ringing as soon as you hit the Schedule Reminder button. That’s a good way to be sure everything is working without having to sit and wait for a return call.

When Things Go Wrong. Immediately after scheduling a reminder, be sure to check for the pending reminder by clicking Review Existing Reminders. You should see both a .call file and a .gsm with otherwise matching file names. If the .gsm file is missing, one of two things has happened. If you haven’t installed Cepstral and you haven’t changed the default TTS engine, then solve it by doing one or the other. If Cepstral is working on your system (swift "Hello world." at command prompt), then you may be missing the sox application. To install it, log in as root and type: yum install sox.

Test Run of Telephone Reminders for Asterisk. On PBX in a Flash systems, the application will run once you complete the install as outlined above. Dial 1-2-3 from a phone on your system and enter the default password of 12345678 when prompted. Record a message and press #. When prompted for the phone number to which the reminder should be delivered, press # to choose the number you are calling from. When prompted for the date to deliver the message, press # to choose today. When prompted for the time, enter a 4-digit time with a 2-digit hour and 2-digit minute. Military time (24 hour clock) is fine. Make sure the time is at least 5 minutes in the future, and make sure the time on your watch and server match! Accept the settings, hang up, and wait for your reminder call.

Configuring Telephone Reminders for Asterisk. The phone interface to Telephone Reminders and the web interface are two separate applications so you’ll need to configure both of them. Let’s start with the phone interface. At a minimum, you’ll want to change the default password to something more secure. Edit /etc/asterisk/extensions_custom.conf using either nano or the FreePBX Config Edit option in Tools. Search for 123 and change the password in line 3 which looks like this. If you want to change the phone number to dial to enter reminders, simply replace 123 on every line with the number you wish to use.

exten => 123,3,Authenticate(12345678)

Update: A user on the PBX in a Flash Forum has pointed out that you can substitute the line below for the "Authenticate" line above, and the system will accept the existing voicemail password associated with the phone making the call:

exten => 123,3,vmauthenticate(${CALLERID(number)})

In order to take advantage of the new number conflict checking mechanism in FreePBX 2.4, we also recommend you add a Misc Destination for Telephone Reminders under the Setup tab. The entries should look something like the following:

Description Reminders
Dial 123

Once you’ve made the entry, click the Submit button and then reload the Asterisk dialplan when prompted.

The other changes you can make are accomplished by setting variables in the reminders.php application which is stored in /var/lib/asterisk/agi-bin. For a complete list of the variables and what they mean, take a look at the Telephony Configuration section in our Best of Nerd Vittles article.

Configuring the Web Interface to Telephone Reminders. The variable settings for the web interface are identical to those above. In addition, the text-to-speech engine can be set to Flite (instead of Cepstral) by changing the value of $ttspick from 1 to 0. The file to edit is index.php in /var/www/html/reminders. For more details, take a look at the Web Interface Configuration topic in our Best of Nerd Vittles article. Some may also find it desirable to secure the web interface to Telephone Reminders with a password. Here’s how.

Installing the FreePBX Interface to Telephone Reminders. After installing Telephone Reminders, a new Module will be available for installation in FreePBX by accessing Tools->Module Admin. Scroll to the bottom of the listing and click on Reminders and then the Install button. Once the installation completes, reload the Asterisk dialplan when prompted. A new FreePBX interface to Telephone Reminders then will display in the Third Party AddOn listing under the Tools tab in FreePBX.

Special Thanks. We want to extend our special thanks to Sangoma for their generous, unsolicited contribution to the PBX in a Flash project. While everything we produce is freely given for all to use, projects such as Nerd Vittles and PBX in a Flash still require money to fund research and product development. On behalf of the entire PBX in a Flash Development Team, thank you. SANGOMA ROCKS!!

Best of Nerd Vittles Tutorial. For those of you that prefer to read manuals, we also have a new Telephone Reminders 4.0 tutorial on our Best of Nerd Vittles site.

Need More Help? That’s what the PBX in a Flash Forum is for! Even if you don’t need help, stop by and let us know what’s on your Wish List! And remember, the Donate button at the top of Nerd Vittles makes wishes come true. Enjoy!


Special Thanks to Our Generous Sponsors

FULL DISCLOSURE: ClearlyIP, Skyetel, Vitelity, DigitalOcean, Vultr, VoIP.ms, 3CX, Sangoma, TelecomsXchange and VitalPBX have provided financial support to Nerd Vittles and our open source projects through advertising, referral revenue, and/or merchandise. As an Amazon Associate and Best Buy Affiliate, we also earn from qualifying purchases. We’ve chosen these providers not the other way around. Our decisions are based upon their corporate reputation and the quality of their offerings and pricing. Our recommendations regarding technology are reached without regard to financial compensation except in situations in which comparable products at comparable pricing are available from multiple sources. In this limited case, we support our sponsors because our sponsors support us.

BOGO Bonaza: Enjoy state-of-the-art VoIP service with a $10 credit and half-price SIP service on up to $500 of Skyetel trunking with free number porting when you fund your Skyetel account. No limits on number of simultaneous calls. Quadruple data center redundancy. $25 monthly minimum spend required. Tutorial and sign up details are here.

The lynchpin of Incredible PBX 2020 and beyond is ClearlyIP components which bring management of FreePBX modules and SIP phone integration to a level never before available with any other Asterisk distribution. And now you can configure and reconfigure your new Incredible PBX phones from the convenience of the Incredible PBX GUI.

VitalPBX is perhaps the fastest-growing PBX offering based upon Asterisk with an installed presence in more than 100 countries worldwide. VitalPBX has generously provided a customized White Label version of Incredible PBX tailored for use with all Incredible PBX and VitalPBX custom applications. Follow this link for a free test drive!

Special Thanks to Vitelity. Vitelity is now Voyant Communications and has halted new registrations for the time being. Our special thanks to Vitelity for their unwavering financial support over many years and to the many Nerd Vittles readers who continue to enjoy the benefits of their service offerings. We will keep everyone posted on further developments.

Some Recent Nerd Vittles Articles of Interest…