FAQ – Frequent Asterisk Questions – #4

Introduction

I’m a contributor at StackOverflow, answering questions concerning the Asterisk PBX system.  These types of questions, at their core, are part of my bread-and-butter work.  I’ve been working with Asterisk since 2004 and have personally deployed it successfully in 10 different countries under a wide variety of circumstances and use-cases.

Q: I have weekly conference calls for staff.  Can Asterisk call the conference participants and add them automatically at the start of the meeting?

For this to work, we need to solve a puzzle in three parts.  One of those things I tell my customers all the time is that if they can dream it up, we can get Asterisk to do it for them.  This is a classic example of what I mean.

First, you need to be able to host the conference itself.  Asterisk is a very capable conference bridge with a more than acceptable level of sophistication for running audio bridge conferences.  PIN protection, Host/ Moderator keys, call recording, transcoding, and several more features are there and work well.

Secondly, you need to be able to get place calls in an automated fashion.  Asterisk can do this easily.  There are about three different ways to handle this, but my preference is using special control files written to Asterisk’s “spool/outgoing” queue.  If you can create a formatted text file in /tmp and move it to the right place, this will “just work”.

Third, you need to be able to pass data into the call that Asterisk has made so that information such as the conference room number and attendee PIN are auto-provided.  Again, no problems here, Asterisk can do this using the concept of Channel Variables.

Here’s a “metacode” explanation of one way you could do it:

  1. Create a database of some kind with the phone numbers in it that are to be called.
  2. Create a Ruby/ PHP/ Perl (whatever you prefer) script that will read the database and generate an Asterisk Call File with the following info:
    1. a custom channel variable that ID’s the conference ID for the caller
    2. a custom channel variable that ID’s the conference password for the caller
    3. the context is specific for “invited callers”
    4. Please note: The call file must be created in a temporary location, and then “moved” to the outgoing spool directory.
  3. Use a CROND job to run the script at 6pm.
  4. For each call file in the spool directory, the system executes the call and puts it into the “invited_callers” context.
  5. On pick-up, plays a “press 5 to join the conference” type message.
  6. On a DTMF 5, the call is connected to the conference via the ID and password contained in the channel variables.

I’ve done this for a customer in the past who ran a 500 line meeting manager system for companies in Mexico. It’s a “non-trivial” piece of work, but any capable Asterisk Admin could do it for you.

Recommended Reading:

Conclusion

So, that’s another concept that I deal with regularly.  I’ll try to put a few more up next week.  If there is anything you’d like to see in particular, let me know in the comments below!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.