VoIPowering Your Office with Asterisk: Conferencing´┐ŻEasy and Cheap

By Carla Schroder | Sep 11, 2006 | Print this Page
http://www.enterprisenetworkingplanet.com/unified_communications/VoIPowering-Your-Office-with-Asterisk-Conferencing151Easy-and-Cheap-3631256.htm

Conference calling is huge pain on traditional PBX systems—if you can even figure out how to make it work. Commercial conferencing services are easy, but expensive. Once again Asterisk comes to the rescue with a cheap and easy way to set up conferencing. It takes two steps:

  1. Create a conference "room"
  2. Add the "room" to your dialplan

MeetMe
Conference rooms are set up in /etc/asterisk/meetme.conf. All conference rooms must be listed under the [rooms] header. The syntax is conf => conference_number[,pin][,adminpin]. This example sets up conference number 2500, with a PIN of 1234:

[rooms]
conf => 2500,1234
If you set up several conference rooms, you can comment them to help remember what they are for:
[rooms]
;dev team
conf => 2500,1234

;document team
conf => 2501,5678
There's not much point in setting an administrator PIN, since there are no special administrator powers yet.

There are a few option flags:

m - Caller can listen but not speak.

t - Calller can talk but not hear. I'm not certain of the value of this, but perhaps someone will find it useful.

p - Caller exits the conference by pressing #, the pound key. (Hanging up works, too.)

Two additional options are not yet implemented:

s - Asterisk plays a menu to the user when * is pressed.

a - Gives the user administrative rights on the conference.

Configuring the dialplan
Now we return to our old friend /etc/asterisk.extensions.conf to put our new conference rooms into service. This example creates a separate context for each room:

[dev_team_conference]
exten => 300,1,MeetMe,2500(1234)

[doc_team_conference]
exten => 301,1,MeetMe,2501(5678)
It doesn't get any simpler. Callers with access to this context dial extension 300 or 301, enter the PIN when prompted, and zap! they're in the conference. The MeetMe application plays a nice chime to let everyone know a new person has arrived.

You could also lump all your conference rooms together in a single context. Or you can add a conference room extension to existing contexts like this:

[local-users]
exten => 250,1,Dial(SIP/alrac,10,r)
exten => 250,2,VoiceMail(u250@local-vm-users)
exten => 250,dial+101,VoiceMail(b250@local-vm-users)

exten => 300,1,MeetMe,2500(1234)
Or add a whole context:
include => doc_team_conference

Suppose the purpose of a conference is to give all callers the pleasure of listening to a stirring inspirational speech by the boss, without going to the hassle of actually speaking themselves. Just add the m option as follows:

[dev_team_conference]
exten => 300,1,MeetMe,2500|m|1234
New callers can hear how many people are already in the conference with the MeetMeCount application:
[dev_team_conference]
exten => 300,1,Playback(there_are)
exten => 300,2,MeetMeCount,2500
exten => 300,3,Playback(callers)
exten => 300,4,MeetMe,2500
You'll need to record two voice greetings that say "There are" and "callers present in the conference".

After editing extensions.conf, remember to reload the new configuration. For the least disruption, open an Asterisk console and run this command:

# asterisk -r
asterisk1*CLI> extensions reload
You'll see a bale of output confirming every item in your extensions.conf.

Changes to meetme.conf don't have to be reloaded.

Conferencing on the fly
The foregoing is a nice setup when you have users that teleconference on a regular basis. But when you're setting up a one-time conference, you might not want to hassle with extensions.conf, and you don't have to. First you need a conference room already defined, and some kind of a generic conferencing context:

;meetme.conf
[rooms]
;general-purpose conference room
conf => 3500,1234

;extensions.conf
;generic conference room
[gen_conference]
Then you can set up new conferences at the Asterisk CLI like this:
asterisk1*CLI> add extension 400,1,Dial,3500 into gen_conference
Extension '400,1,Dial,3500' added into 'gen_conference' context
    -- Added extension '400' priority 1 to gen_conference
If there are more lines to add, type away. The new extension will vanish after a restart, or you can delete it this way:
asterisk1*CLI>remove extension 400@gen_conference
Whole extension 400@gen_conference removed
On a multi-line extension, you can specify single lines to remove by naming the priority:
asterisk1*CLI>remove extension 400@gen_conference 2
Extension 400@gen_conference with priority 2 removed

Learning Asterisk applications and commands
In this series we have barely scratched the surface of what you can do from the Asterisk command line. These two commands are the most important:

asterisk1*CLI>help
asterisk1*CLI>show applications
help displays all the Asterisk commands. To learn more about any command, enter it on the Asterisk CLI with no options:
asterisk1*CLI>add extension
Usage: add extension ,,, into 
       [replace]

       This command will add new extension into . If there is an
       existence of extension with the same priority and last 'replace'
       arguments is given here we simply replace this extension.

Example: add extension 6123,1,Dial,IAX/216.207.245.56/6123 into local
         Now, you can dial 6123 and talk to Markster :)
Some commands take no arguments and will execute immediately, like the shutdown commands.

Resources
Digium Support Center
Asterisk support resources
Index to the entire Asterisk series