Social security for getting on a large amount Beat The Cycle Of Debt Beat The Cycle Of Debt for an approved in addition questions.

Appointment Reminder Calls – With Asterisk VoIP

Posted: July 21st, 2010 | Author: | Filed under: Asterisk VoIP, Linux, Tech | Tags: , , , , , , , , | 8 Comments »

A while back I had a meeting with a friend in Orlando, FL. He came up with the idea to provide an appointment reminder service to companies that would benefit from such a service. Doctor’s offices, Dentists, Mechanics, Repairmen, etc. I drew up the logistics of the program and began working on it in the fall of 2008. Since then we have had customers use the software to easily call their customers and remind them of appointments and also use the software for call blasting. Call blasting is a feature to call an unlimited amount of numbers and playback a message. Since I have experience in the Asterisk VoIP platform I programmed the system to allow for options and the customer to enter in input with their keypad.

The purpose of this article is to detail the logistics and share it with the Asterisk community.

Basic overview:
There are a few different ways to originate calls with Asterisk.
-From the Asterisk CLI directly with the “originate” command
-From the AMI (Asterisk Manager Interface)
-From .call files placed in /var/spool/asterisk/outgoing

I went with .call files because of a few reasons:
-I can generate all of the call files ahead of time because they are read based on the timestamp of the file (less load)
-It is straightforward and easy to follow, and also leaves behind the .call file that is archived after the call is finished
-Asterisk will parse and execute based on timestamp, so to burst 100 calls would require much less overhead than through AMI/CLI

There are some negative effects to the .call files too:
-Changes made need to remove and add another .call file (If the customer changes their appointment time after the file was generated)
-The lowest interval to generate calls is every minute, so we can burst to 400 calls/minute (also more difficult to throttle calls)

Now you know how the calls are originating on the system, let’s move on to the database and interface.
I hired someone to program the interface in AJAX and PHP. That way it is secure and saved a lot of time if I were to attempt it myself. The interface is very clean and easy to use for customers. They also have the ability to import 1,000 records at a time via CSV files. Feel free to demo the interface via the link on for “Demo the Interface”.
The interface stores the call data in MySQL which is then scanned hourly to process and create all of the .call files according to their timestamp. We only care about the calls that will be made by the system in the next hour, so those are the only .call files that are generated. The script is a PHP script that connects to the database with the query of calls to be made, strips them down, then does a loop to create the .call file, set the timestamp based on the variable, then move the .call file to /var/spool/asterisk/outgoing.

The .call files include 1 custom variable that is comma-delimited so we can parse out the appointment time, AM/PM, and any other custom variables.
The other important lines in the .call file point to the context in the Asterisk dialplan that the customer’s announcement and options are defined.

Now you may ask yourself, It will be a pain to manually add customer’s options and dialplan for every sign up, right? It was at first, but I created several automated scripts to generate the dialplan for the customer and “dialplan reload” when complete.

The rest of the accounting/etc is accomplished via bash cleanup scripts that write to the database and provide reporting/etc.
The same system can be used for call-blasting to a large group of number for a survey, snow day announcement, marketing message.

Please let me know if you have any questions or advice/constructive-criticism for me regarding the program.
And feel free to try out the demo interface and hear a reminder call!


8 Comments on “Appointment Reminder Calls – With Asterisk VoIP”

  1. 1 Robin said at 4:04 am on July 26th, 2010:

    Sounds great !!

    Good work.

  2. 2 Tanvir said at 4:19 am on August 17th, 2010:

    Hi Gregg,

    First of all really appreciate your effort on asterisk.

    I have two questions regarding asterisk.

    1.Is it possible to loop through a folder and play all files?

    2.Is it possible to get file attributes of .wav file in asterisk e.g. created date time, modified date time but not through the AGI?

    Thanks in advance


  3. 3 Tom Grant said at 9:27 am on September 10th, 2010:

    Hi Gregg!

    I just stumbled across this post while researching appointment reminders & asterisk. Are your scripts available for sale?

    I’m looking into implementing this with a client’s practice management software. I’d need to develop the software to select each day’s appointment data, format it appropriately, then pass it to the asterisk server.

    If I had the basis for a framework to handle processing, it would save a LOT of research.

    Let me know!

    Thanks in advance!

  4. 4 Techman said at 4:30 pm on December 31st, 2010:


    I have developed an extended version of these scripts and would be happy to work with you on implementation if you are still looking?

  5. 5 Justin said at 11:05 am on December 22nd, 2011:

    Hi Gregg,

    I work for a rural hospital/clinic and we are considering an asterisk-based phone system, and we could benefit greatly from a script like this. Would you be interested in providing your services?

  6. 6 Rajesh said at 8:00 pm on July 8th, 2012:

    I know this is old post but I am interested in this solution. Would you be available to help Techman

  7. 7 Gregg said at 1:37 pm on July 9th, 2012:

    Hi Rajesh, I sent you an email.

  8. 8 Jason Boss said at 2:04 pm on September 12th, 2012:

    hey mate…do you have this asterisk call blast work for sell or somewhere we can install? I have a customer looking for something like this and nothing seems to be just out there to plug and play. These guys are some big MMA fighter guys just in case your an MMA fan I could get you some schwagg for helpin out.

    thanks a ton!


Leave a Reply

  • *