Asterisk cmd Conference
Synopsis
Simple Conference bridge; alternative to MeetMeAlso see the other page about this; app_conference (These two pages are now combined into this page. No need to visit the other page)
Availability
Conference is not in the Asterisk standard distribution and can be found athttp://sourceforge.net/projects/appconference/
Syntax
Conference(name/flags/priority)name is a unique identifier for the conference. It will be created dynamically if it does not exist.
flags is one or more of:
- M: Moderator (presently same as speaker)
- S: Speaker (listens too - do not specify both)
- L: Listener
- T: "Telephone caller" (just for stats?).
- V: Do VAD on this caller
- D: Use Denoise filter on this caller.
priority is not currently used.
Details
Conference is a good alternative to the standard MeetMe because it does not require a timing source to be available. Lack of timing can be a pain when no zaptel hardware is present.
Tip
Conference does not provide any feedback when users join or leave a conference. Here is one way to configure it to let people on the conference know when someone is joining or leaving. It's unfortunately a bit complicated.
In the dialplain:
; This should be the context from which users dial into the bridge
[somecontext]
; [...]
; This is the extension that people actually dial to get the bridge
exten => 999999,1,Goto(conf-conferencename,join,1)
; [...]
; Make as many of these contexts as you have seperate conference bridges
; change "conferencename" in each
[conf-conferencename]
exten => join,1,System(/opt/asterisk/bin/conference-announce conferencename in)
exten => join,2,Conference(conferencename/S/1)
exten => h,1,System(/opt/asterisk/bin/conference-announce conferencename out)
[confhelper]
; make one of these extensions per seperate conference bridge
exten => conf-conferencename,1,Conference(conferencename/S/1)
exten => in,1,Answer()
; if I use Playback here instead of BackGround, asterisk crashes
exten => in,2,BackGround(conf-announce)
exten => in,3,ResponseTimeout(5)
exten => in,4,Hangup()
exten => out,1,Answer()
exten => out,2,BackGround(conf-leave)
exten => out,3,ResponseTimeout(5)
exten => out,4,Hangup()
[somecontext]
; [...]
; This is the extension that people actually dial to get the bridge
exten => 999999,1,Goto(conf-conferencename,join,1)
; [...]
; Make as many of these contexts as you have seperate conference bridges
; change "conferencename" in each
[conf-conferencename]
exten => join,1,System(/opt/asterisk/bin/conference-announce conferencename in)
exten => join,2,Conference(conferencename/S/1)
exten => h,1,System(/opt/asterisk/bin/conference-announce conferencename out)
[confhelper]
; make one of these extensions per seperate conference bridge
exten => conf-conferencename,1,Conference(conferencename/S/1)
exten => in,1,Answer()
; if I use Playback here instead of BackGround, asterisk crashes
exten => in,2,BackGround(conf-announce)
exten => in,3,ResponseTimeout(5)
exten => in,4,Hangup()
exten => out,1,Answer()
exten => out,2,BackGround(conf-leave)
exten => out,3,ResponseTimeout(5)
exten => out,4,Hangup()
conference-announce is a Perl script that users the Asterisk Manager API to cause the conference to call the "in" or "out" extension in the "confhelper" context which play a sound file that indicates a user arriving or leaving.
app_conference
app_conference is a channel-independent conference application.
Design goals
It has several design goals which are different than meetme:- It does not require a zap channel for timing.
- It is very efficient when used with channels which support DTX (silence detection/discontinuous transmission).
- It can do VAD on channels which do not support DTX (although this is probably more expensive than just mixing them).
- It presents messages on the Monitor interface for determine which speakers are active.
I believe that people other than myself are using this, but my environment is pretty rigid, and cases outside of this aren't tested:
- Some callers come from the PSTN via IAX2 from a box with Zaptel cards, via uLaw.
- Other callers come from iaxclient based softphones using GSM via IAX2 (with DTX).
Mixing design
- Minimize encoding/decoding, minimize mixing.
- Minimize generational loss from trancoding.
- Usual cases are handled very efficiently:
- One speaker: That speaker's frame is sent directly to each participant which uses the same codec. It is trancoded _once_ for each additional codec type used by participants.
- Two speakers: Each speaker gets the other speaker's frames. The two speaker's frames are decoded and mixed, and then encoded _once_ for each codec type used by participants.
License
Naturally, app_conference is GPL. The CVS also includes parts of libspeex, which is distributed under it's a BSD-style license.Getting app_conference
app_conference is available from the 'AppConference' project on sourceforge:
- SVN browse: http://appconference.svn.sourceforge.net/viewvc/appconference/
- Project page: http://sourceforge.net/projects/appconference/
- Snapshot tarball 2005-12-21 tested with Asterisk 1.2.7.1: http://www.eflo.net/files/app_conference.tar.gz
- Snapshot tested with Asterisk 1.2.8 designed as meetme replacement for VICIDIAL Dialer but should work with most Asterisk installs: http://www.eflo.net/files/VD_app_conference_0.6.zip - see below for more info
Compiling app_conference
For default Asterisk installations, change these lines in Makefile:INSTALL_PREFIX := /usr (near top of Makefile)
install: all
for x in $(SHAREDOS); do $(INSTALL) -m 755 $$x $(INSTALL_MODULES_DIR) ; done
/usr/sbin/asterisk -rx "restart now" (near bottom of Makefile)
(Note: you will probably also have to make one or more of the chages listed below in the section:
Compile the current cvs version with asterisk 1.0.7)
Using app_conference
There is no configuration file. Conferences are created on-the-fly.Dialplan syntax: Conference(ConferenceName/Flags/Priority[/VADSTART/VADCONTINUE])
- ConferenceName: Whatever you want to name the conference
- Flags one of more of the following:
- M: Moderator (presently same as speaker)
- S: Speaker
- L: Listener
- T: "Telephone caller" (just for stats?).
- V: Do VAD on this caller
- D: Use Denoise filter on this caller.
- Priority: Currently ignored; was to be a "speaking priority" so a higher priority caller could "override" others.
- VADSTART: Optional: "probability" to use to detect start of speech.
- VADCONTINUE: Optional: "probability" to use to detect continuation of speech.
Features
app_conference doesn't have DTMF-activated features or anything like that.Doesn't need timers like meetme; I have compiled and now use this under the Xen virtual machine. See the forums at unixshell.com — Giles Morant.
Through the manager interface app_conference will report each user's DTMF digits dialed, and will thus allow you to e.g. programatically play sounds to users etc.
Benchmarking
It would be nice to have solid benchmarks to present, but a good size machine should be able to handle many callers when either (a) they are using DTX, or (b) they are listen-only. Probably hundreds.Discussion
The iaxclient-devel mailing list is probably as good a place as any to discuss.Compile the current cvs version with asterisk 1.0.7
(Note: This appears to already be fixed in the released app_conference v2.0.1)- modify the makefile to point to the include directory of asterisk header files
- modify member.c, around line 76-79 comment out the following:
ast_log( AST_CONF_DEBUG, "CHANNEL INFO, CHANNEL => %s, DNID => %s, CALLER_ID => %s, ANI => %s\n",
chan->name, chan->cid.cid_dnid, chan->cid.cid_num, chan->cid.cid_ani ) ;
- modify conference.c:
add include for asterisk/utils.h at the top of the file
- include <asterisk/utils.h>
around line 612 replace pthread_create with ast_pthread_create
- I also needed to modify cli.c
change "ast_copy_string" to "strncpy":
ast_copy_string(newsound->name, file, sizeof(newsound->name));
becomes:
strncpy(newsound->name, file, sizeof(newsound->name));
app_conference is brought to you by the letter q, and the number e
Setting up conferences
One thing I like about app_meetme is that I can define conferences and passwords. The same can be achieved with app_conference through the database and dialplan for realtime conference creation..
[conferences]
exten => s,1,Wait(1)
exten => s,2,DigitTimeout,5
exten => s,3,ResponseTimeout,8
exten => s,4,BackGround(enter-conf-call-number)
exten => s,5,Waitexten(20)
exten => s,6,Goto(s,4)
exten => _XXXX,1,DBget(pass=conferences/${EXTEN}) ; implied jump to 101 if it doesn't exist
exten => _XXXX,2,GotoIf($["xxx${pass}" = "xxxNONE"]?30) ; if no pass, jump directly to conf
exten => _XXXX,3,Read(secret,pls-enter-conf-password,10)
exten => _XXXX,4,GotoIf($["${pass}" != "${secret}"]?40:30)
exten => _XXXX,30,Conference(${EXTEN}/MTV)
exten => _XXXX,31,Hanugup
exten => _XXXX,40,Playback(conf-invalidpin)
exten => _XXXX,41,Hangup
exten => _XXXX,101,Playback(conf-invalid)
exten => _XXXX,102,Hangup
For example, to create conference 1234 with password 9,
database put conferences 1234 9
for a conference with no password,
database put conferences 1234 NONE
app conference with VICIDIAL
VICIDIAL and app_conference
(1.2 tree) EXPERIMENTAL!!!
app_conference offers the plusses of being able to do conferencing
without any zaptel hardware or timers as well as doing native codec
streaming, meaning no manditory downsampling to slin like meetme.
These two features alone mean a rather significant performance boost
to companies who only use VOIP for agents and trunks as well as not
requiring the cost of zaptel hardware or the nightmare of getting
ztdummy to work on some systems.
As of right now, I have a test system fully up and running using
app_conference with VICIDIAL on Asterisk 1.2.9.1. I have made several
modifications to the app_conference code to make it more of a drop-in
replacement for meetme so that it does not require any changes to the
VICIDIAL codebase. I have added entry and exit sounds(slightly
different from meetme's) as well as "only one in this conference"
message in addition to changing the default member type to speaker(S).
So far I have tested with IAX and SIP channels only and everything
works just like on meetme but I have not done any capacity testing or
tested it in production yet.
If you want to use app_conference instead of meetme for VICIDIAL then follow these instructions:
cd /usr/src/asterisk
wget http://www.eflo.net/files/VD_app_conference_0.6.zip
unzip VD_app_conference_0.6.zip
cd app_conference
make clean
make
make install
In your extensions.conf file you would replace these lines:
exten => 8600051,1,Meetme,8600051
exten => 8600052,1,Meetme,8600052
...
exten => 78600051,1,Meetme,8600051|q
exten => 78600052,1,Meetme,8600052|q
...
exten => 68600051,1,Meetme,8600051|mq
exten => 68600052,1,Meetme,8600052|mq
...
with these lines:
exten => 8600051,1,Conference(8600051)
exten => 8600052,1,Conference(8600052)
...
exten => 78600051,1,Conference(8600051|q)
exten => 78600052,1,Conference(8600052|q)
...
exten => 68600051,1,Conference(8600051|Lq)
exten => 68600052,1,Conference(8600052|Lq)
NOTES:
Here are the possible feature flags for this version of app_conference:
o M: Moderator (presently same as speaker) default
o S: Speaker
o L: Listener
o T: "Telephone caller" (just for stats?).
o V: Do VAD on this caller
o D: Use Denoise filter on this caller.
o d: Send manager events when DTMF is received.
o q: Do not play enter or exit sounds.
o i: use inband dtmf broadcast.
o t: use rfc dtmf signal broadcast.
Comments
333perfomance
Two things must be considered when comparing realization of these conference modules:
- the accuracy of timing used by module
- the complexity of algorithm in number of simultaneous participants in conference
of mixing signals from channels.
it seems that:
- meetme has linear complexity of mixing algorithm which is rather optimized,
while app_conference has a square complexity algorithm.
- the source of timing provided by ztdummy to meetme is more accurate and real time-like than that used by app_conference.
Performance of modules can be compared through the analysis of
rtp-jitter vs number of simultaneous call relation.
In the case of meetme one has linear growth of average jitter with the number of simultaneous connection
to server up to the hardware limit (which is equal to 250 sip-calls on my hardware), which lightly depends on distribution of users by conferences.
In the case of app_conference the speed of growth highly depends on the distribution of users by conferences
In two boundary cases: quasi-quadratic growth in one conference with many connections configuration
(about 20 sip-calls on the same hardware) and quasi-linear growth in one connection per conference configuration (about 120 sip-calls).
Beyond those numbers of simultaneous calls cpu-usage on server reaches it limit and server begins to drop the connections and network packets.
333How to add three people in conference
333don't get it to
333app_conference is incompatibe with current asterisk CVS