Conferencing with Asterisk


Conferencing with MeetMe( )
Last but not least, let’s cover setting up an audio conference bridge with the MeetMe( )
application.* This application allows multiple callers to converse together, as if they
were all in the same physical location. Some of the main features include:
• The ability to create password-protected conferences
• Conference administration (mute conference, lock conference, kick participants)
• The option of muting all but one participant (useful for company announcements,
broadcasts, etc.)
• Static or dynamic conference creation

Let’s walk through setting up a basic conference room. The configuration options for
the MeetMe conferencing system are found in meetme.conf. Inside the configuration file,
you define conference rooms and optional numeric passwords. (If a password is 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 conference 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 re-read 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
Appendix 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,2,MeetMeCount(600)
exten => 601,3,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,2,GotoIf($[${CONFCOUNT} <= 10]?3:100)
exten => 600,3,MeetMe(600,i,54321)
exten => 600,100,Playback(conf-full)


Handy Asterisk Features
Now that we’ve gone over some more of the basics, let’s look at a few popular functions
that have been incorporated into Asterisk.
Zapateller( )
Zapateller( ) is a simple Asterisk application that plays a special information tone at
the beginning of a call, which causes auto-dialers (usually used by telemarketers) to
think the line has been disconnected. Not only will they hang up, but their systems
will flag your number as out of service, which could help you avoid all kinds of telemarketing
calls. To use this functionality within your dialplan, simply call the
Zapateller( ) application.
We’ll also use the optional nocallerid option so that the tone will be played only
when there is no Caller ID information on the incoming call. For example, you might
use Zapateller( ) in the s extension of your [incoming] context, like this:
[incomimg]

exten => s,1,Zapateller(nocallerid)
exten => s,2,Playback(enter-ext-of-person)


Call Parking
Another handy feature is called “call parking.” Call parking allows you to place a call
on hold in a “parking lot,” so it can be taken off hold from another extension.
Parameters for call parking (such as the extensions to use, the number of spaces, andso on) are all controlled within the features.conf configuration file. The [general]
section of the features.conf file contains four settings related to call parking:
parkext
This is the parking lot extension. Transfer a call to this extension, and the system
will tell you which parking position the call is in. By default, the parking
extension is 700.
parkpos
This option defines the number of parking slots. For example, setting it to 701-
720 creates 20 parking positions, numbered 701 through 720.
context
This is the name of the parking context. To be able to park calls, you must
include this context.
parkingtime
If set, this option controls how long (in seconds) a call can stay in the parking
lot. If the call isn’t picked up within the specified time, the extension that parked
the call will be called


What Are STDIN, STDOUT, and STDERR?

STDIN, STDOUT, and STDERR are channels by which programs in Unix-like environments
receive information from and send information to external programs. STDIN, or
“standard input,” is the information that is sent to the program, either from the keyboard
or from another program. In our case, information coming from Asterisk itself
comes in on the program’s STDIN file handle. STDOUT, or “standard output,” is the file
handle that the AGI script uses to pass information back to Asterisk. Finally, the AGI
script can use the STDERR (“standard error”) file handle to write error messages to the
Asterisk console.
Let’s sum up these three communications concepts:
• An AGI script reads from STDIN to get information from Asterisk.
• An AGI script writes data to STDOUT to send information to Asterisk.
• An AGI script may write data to STDERR to send debug information to the
Asterisk console.


AGI( ), EAGI( ), DeadAGI( ), and FastAGI( )

In addition to the AGI( ) application, there are several other AGI applications suited to
different circumstances. While they won’t be covered in this chapter, they should be
quite simple to figure out once you understand the basics of AGI scripting.
The EAGI( ) (enhanced AGI) application acts just like AGI( ), but allows your AGI script
to read the inbound audio stream on file descriptor number three.
The DeadAGI( ) application is also just like AGI( ), but it works correctly on a channel
that is dead (i.e., a channel that has been hung up). As this implies, the regular AGI( )
application doesn’t work on dead channels.
The FastAGI( ) application allows the AGI script to be called across the network, so
that multiple Asterisk servers can call AGI scripts from a central location.

Comments

Popular posts from this blog

Error : DependencyManagement.dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: com.adobe.aem:uber-jar:jar:apis -> version 6.3.0 vs 6.4.0

Operators in Asterisk with Linux

ERROR Exception while handling event Sitecore.Eventing.Remote.PublishEndRemoteEventException: System.AggregateExceptionMessage: One or more exceptions occurred while processing the subscribers to the 'publish:end:remote'