Page 193 - Asterisk™: The Future of Telephony
P. 193

defined here, it will be required to enter all conferences using that room.) For our
               example, let’s set up a conference room at extension 600. First, we’ll set up the con-
               ference room in meetme.conf. We’ll call it 600, and we won’t assign a password at this
               time:

                   [rooms]
                   conf => 600
               Now that the configuration file is complete, we’ll need to restart Asterisk so that it can
               reread the meetme.conf file. Next, we’ll add support for the conference room to our
               dialplan with the MeetMe() application. MeetMe() takes three arguments: the name of
               the conference room (as defined in meetme.conf), a set of options, and the password
               the user must enter to join this conference. Let’s set up a simple conference using room
               600, the i option (which announces when people enter and exit the conference), and a
               password of 54321:
                   exten => 600,1,MeetMe(600,i,54321)
               That’s all there is to it! When callers enter extension 600, they will be prompted for the
               password. If they correctly enter 54321, they will be added to the conference. See Ap-
               pendix B for a list of all the options supported by the MeetMe() application.
               Another useful application is  MeetMeCount(). As its name suggests, this application
               counts  the  number  of  users  in  a  particular  conference  room.  It  takes  up  to  two
               arguments: the conference room in which to count the number of participants, and
               optionally a variable name to assign the count to. If the variable name is not passed as
               the second argument, the count is read to the caller:

                   exten => 601,1,Playback(conf-thereare)
                   exten => 601,n,MeetMeCount(600)
                   exten => 601,n,Playback(conf-peopleinconf)
               If you pass a variable as the second argument to MeetMeCount(), the count is assigned
               to the variable, and playback of the count is skipped. You might use this to limit the
               number of participants, like this:
                   ; limit the conference room to 10 participants
                   exten => 600,1,MeetMeCount(600,CONFCOUNT)
                   exten => 600,n,GotoIf($[${CONFCOUNT} <= 10]?meetme:conf_full,1)
                   exten => 600,n(meetme),MeetMe(600,i,54321)
                   exten => conf_full,1,Playback(conf-full)
               Isn’t Asterisk fun?

               Conclusion


               In this chapter, we’ve covered a few more of the many applications in the Asterisk
               dialplan, and hopefully we’ve given you the seeds from which you can explore the
               creation of your own dialplans. As with the previous chapter, we invite you to go back
               and reread any sections that require clarification.


                                                                            Conclusion | 165
   188   189   190   191   192   193   194   195   196   197   198