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 more expensive than just mixing them, but less expensive then
	encoding; therefore it might still be a win). 
    * 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 speex
     	(was GSM) via IAX2 (with DTX). 
    * Some conferences have a single SIP channel which listens in GSM.


Mixing design

    * Minimize encoding/decoding, minimize mixing.
    * Minimize generational loss from trancoding.
    * Usual cases are handled very efficiently:
          o 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.
          o 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 'iaxclient' project on sourceforge:

    * CVS browse: http://iaxclient.cvs.sourceforge.net/iaxclient/app_conference/
    * Project page: http://sourceforge.net/projects/iaxclient/


Compiling app_conference

    * just like any other asterisk application.
    * Some makefile fiddling may be necessary 


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:
          o M: Moderator (presently same as speaker)
          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.
    * 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 / CLI/Manager Commands

    * conference debug <conference_name> [ on | off ]  
	enable debugging for a conference

    * conference show stats  show conference stats

    * conference play sound <channel-id> <sound-file> [mute]
	play a sound to a conference member, optionally muting them.

Manager Events
app_conference generates several detailed manager events so that applications
interfacing with the manager API can monitor conferences:

    * ConferenceState:  sent as members begin/end speaking.
	Channel: The channel
	State: "speaking" or "silent"

    * ConferenceDTMF: sent when conference members send DTMF to the conference
	Channel: The channel
	Key: The DTMF key send [0-9*#]

    * ConferenceSoundComplete: send when the conference has finished playing 
		a sound to a user	
	Channel: The channel
	Sound: The first 255 bytes of the file requested in conference play 
		sound CLI/Mgr command.	


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.  It's used often with hundreds of
simultaneous callers.

Discussion
The iaxclient-devel mailing list is probably as good a place as any to discuss.


---

app_conference is brought to you by the letter q, and the number e


Matt Florell Changes for VD_app_conference tarball version. In order to use this
as seemlessly as possible for VICIDIAL it was necessary to modify the code. This
module can now be used in place of using meetme for VICIDIAL. This is 
experimental, please test thoroughly before putting it in production.

CHANGES MADE FOR VICIDIAL:

- Default to member type of S instead of L
- Commented out many repetative NOTICEs and ERRORs 
- Added entry and exit sounds except for Local/786 and Local/8500998 (VDsilent and DTMFapp)
- Added conf-onlyperson mesage to first conference participant
- Included enter.gsm and leave.gsm files as well as DTMF wav and gsm sounds
- Removed restart from "make install" and added audio file copying
- If no 'd' option is set and DTMF frames are detected, the DTMF audio will be played to the member
- Added 'q' flag to prevent playing of entry/exit sounds
- Added 'i' flag to enable playing of DTMF sounds inband to all members
- Added 't' flag to enable sending of RFC DTMF signals to all members
- Changed delimiter to pipe | from slash / to be more compliant with meetme standards


NOTE TO 64-BIT LINUX USERS:
If you have problems with 64-bit Linux please use the included 64_Makefile instead of the default one.

COMPILE NOTES:

Some Makefile alterations may be necessary for your system:

From Alek Barkley:
I am running FC4 with latest updates ( 2.6.16 kernel )
My CPU is AMD K6 and GCC 4.0.2.

I edited Makefile in app_conference distribution.
To enter CPU architecture in my case -march=k6
========================================================
PROC = k6
# this is fun for x86
#CFLAGS += -march=pentium3 -msse -mfpmath=sse,387
CFLAGS += -march=k6
===========================================================


VD_app_conference CHANGELOG
- Release 0.4 - First VICIDIAL-centric release
- Release 0.5 - Fixed the dtmf broadcast logic and a star/hash bug
              - Added 64-bit makefile thanks to Jon Hood
- Release 0.6 - Added Makefile notes and changed some Makefile flags
