A good indicator of just how powerful and useful Asterisk can be is demonstrated by the amount of effort that is required to build a feature rich conference call application. What if I told you it can be done in 6 lines of code?
(Yes, extensions.conf is software – when you work with it, you are writing software code. See “When You Write extensions.conf, You Are Writing Software” by @jicksta in this post for more on this.)
Create a conference room by editing meetme.conf:
$ echo "conf => 1234,2345,5678" >> /etc/asterisk/meetme.conf
Or you can open the file with your favorite editor and add the new line at the bottom. This will create a conference numbered 1234, with a user PIN of 2345 and an administrator PIN of 5678. Next create a dialplan context and rule set for the conference room
[MyFirstConferenceRoom]<br /> exten => 9000,1,Answer()<br /> exten => 9000,n,Meetme(1234,ips)<br /> exten => 9000,n,Hangup()
The parameters passed into the Meetme() application are the number of our conference room (just created in meetme.conf) and a set of options. The i option enables an announcement each time someone enters or leaves the room. The p option allows a user to exit the conference by pressing the ‘#’ key. The s option allows a user (regular or admin) to hear a menu of options when the ‘*’ key is pressed.
Now, include the conference room context in your primary dialplan context:
include => MyFirstConferenceRoom
That’s it – to test it out, make sure you reload your dialplan, and then dial 9000.
You’ve got to love how easy it is to get conferency with Asterisk!