Sunday, November 7, 2010

Asterisk cmd Konference

a high-performance Asterisk voice conferencing module, is a fork of app_conference and alternative to MeetMe focused on voice and with out the need for a timing source. (Dahdi / Zaptel)
App_konference is a channel-independent conference application. It features efficient audio mixing algorithms and comprises a set of enhancements needed to migrate a MeetMe application to AppConference. The goals of this
project are scalability and stability focused on voice.

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 Dahdi / Zaptel hardware is NOT present, including solving problems when using virtual hardware that cant support timing cards.

Starting with app_conference the project was forked as app_conference did not include the alterations that were submitted to their project, app_konference now contains bug fixes and performance enhancements over app_conference however as app_Konference is focused on voice the video component is deprecated.

app_konference is not in the Asterisk standard distribution and can be found at
http://sourceforge.net/projects/appkonference/ Konference(NAME,FLAGS,MAXUSERS,TYPE,SPY,VADSTART,VADCONTINUE,VIDEOSTART,VIDEOSTOP)
There is no configuration file. Conferences are created on-the-fly.

NAME: whatever you want to identify the conference
FLAGS: dialplan flags, see Flags.txt for a comprehensive list

MAXUSERS: limit conference participants to max_users
TYPE: conference type identifier
SPY: channel name to spy

VADSTART:  "probability" to use to detect start of speech.
VADCONTINUE: "probability" to use to detect continuation of speech. 
VIDEOSTART: length of speech before assuming that a member is speaking 
VIDEOSTOP: length of silence before assuming that a member has stopped speaking

Flags
Mute/no receive options:
'C' : member starts with video muted
'c' : member starts unable to receive video
'L' : member starts with audio muted
'l' : member starts unable to receive audio

Speex preprocessing options (right now only for Zaptel members):
'V' : enable speex preprocessing Voice Activity Detection 
'D' : enable speex preprocessing De-noise
'A' : enable speex preprocessing Automatic Gain Control
'T' : member connects through Zaptel, so speex preprocessing should be enabled

DTMF options:
'X' : enable DTMF switch: video can be switched by users using DTMF. Do not use with 'S'.
'R' : enable DTMF relay: DTMF tones generate a manager event
If neither 'X' nor 'R' are present, DTMF tones will be forwarded to all members in the conference

Moderator/video switch options:
'M' : member is a "moderator". When a moderator quits, all members are kicked and the conference is disabled.
'S' : member accepts VAD controlled video switching.  Do not use with 'X'.
'z' : member can "linger". When the member is currently transmitting video and becomes silent and nobody else is speaking, we stay on it.
'o' : enable special behavior when in 1 and 2 member situation (one on one video). The conference observes the 'o' status of the last 
      member to join it
'F' : force switch mode: if the member is talking, force a switch to it even when there is no video

Miscellaneous:
't' : member accepts text based control messages.  The messages are described in a separate document
'N' : Assume that the member starts off with camera disabled.
'x' : if a moderator leaves, all conferees are kicked and conference ends.
'a' : V + T
'H' : play music on hold if only one member in conference

Arguments

The parser is not perfect so it might not cope well with spurious spaces or other characters.
All arguments are optional; appkonference will use sane default values for missing arguments.

priority= : This argument is currently unused, it was intended to allow for prioritization of speakers. It might be reinstated in a future appconference revision

vad_prob_start= : Probability used to detect start of speech

vad_prob_continue= : Probability to detect continuation of speech

video_start_timeout= : Length of speech (in ms) before we say that a member is speaking (for video switching purposes)

video_stop_timeout= : Length of silence (in ms) before we say that a member has stopped speaking (for video switching purposes)

max_users= : Limit conference participants to max_users

type=: Type identifier

spy=: Channel name to spy

Dialplan Example
exten => _X.,n,konference(1234,RVxT,max_users=3)


A member in a conference can be referred to by its id or by its channel. Id
is a positive number assigned automatically when the member joins the
conference. Channel is Asterisk channel identifier. To obtain a list of
member ids and channels in a conference, do: CLI> konference list
Current command line used by app_konference: konference debug: enable debugging for a conference  usage: konference debug   off  konference end: stops a conference  usage: konference end  nohangup konference kick: kick member from a conference  usage: konference kick   konference kickchannel: kick channel from a conference  usage: konference kickchannel  konference list: list members of a conference. If no conference is specified, all conferences are listed  usage: konference list {conference_name} konference lock: locks incoming video to a member  usage: konference lock   konference lockchannel: locks incoming video to a channel  usage: konference lockchannel   konference mute: mute member in a conference  usage: konference mute   konference muteconference: mute all members in a conference  usage: konference muteconference  konference mutechannel: mute channel in a conference  usage: konference mutechannel  konference talkvolume: raise or lower the talker's volume  usage: konference talkvolume  (up|down) konference listenvolume: raise or lower the listener's volume  usage: konference listenervolume  (up|down) konference volume: raise or lower the conference volume  usage: konference volume  (up|down) konference play sound: play a sound to a conference member  usage: konference play sound  ()+ mute
 If mute is specified, all other audio is muted while the sound is played back. konference stop sound: stop playing sounds to a conference member  usage: konference stop sound  konference start moh: start music on hold for a conference member  usage: konference start moh  konference stop moh: stop music on hold for a conference member  usage: konference start moh  konference version: display konference version  usage: konference version
 
konference restart: kick all users in all conferences  usage: konference restart
 
konference set default: sets default video source  usage: konference set default  
 use a negative value for member if you want to clear the default konference set defaultchannel: sets default video source channel  usage: konference set defaultchannel   konference show stats: show conference stats  usage: konference show stats konference text: sends a text message to a member. Depends on the member's channel capabilities.  usage: konference text    konference textbroadcast: sends a text message to all members in a conference  usage: konference textbroadcast   konference textchannel: sends a text message to a channel  usage: konference textchannel    konference unlock: unlocks incoming video  usage: konference unlock  konference unmute: unmute member in a conference  usage: konference unmute   konference unmuteconference: unmute members in a conference  usage: konference unmuteconference  konference unmutechannel: unmute channel in a conference  usage: konference unmutechannel  konference video mute: mutes video from a member  usage: konference video mute   konference video mutechannel: mutes video from a channel  usage: konference video mutechannel   konference video unmute: unmutes video from a member  usage: konference video unmute   konference video unmutechannel: unmutes video from a channel  usage: konference video unmutechannel   konference viewchannel: switch video for a channel in a conference  usage: konference viewchannel    konference viewstream: switch video for a member a conference  usage: konference viewstream    konference drive: drive VAD video switching of destination member using audio from source member  usage: konference drive   destination member
 If destination member is missing or negative, break existing connection konference drivechannel: drive VAD video switching of destination channel using audio from source channel  usage: konference drivechannel   destination channel
 If destination channel is missing, break existing connection We get about 3 requests a week about adding DTMF handling to app_konference, this is not something that we intend to do.

This is easily solved by something we have dubbed "The Listener". The listener connects to Asterisk via the AMI and watches for certain events. one of the reasons to use the listener over building in DTMF tones is because of app_konference's channel independent structure.

We still have to order the packets correctly in the conference, to accomplish this a sound queue is setup for each conference member. So the listener now not only listens for events it also uses the app_konference command "play sound". If you download the source of the app_konference it has a good example of using a listener, ours is implemented in Perl.

People tell us all the time that putting DTMF in a separate daemon we take a performance hit, this is simply untrue. When we flipped the switch from Meetme to app_konference, using our listener our conferences were able to grow from 500 to 1,200 people and not a single person noticed a difference, other then they had more people on the call.


Naturally, app_konference is GPL. The SVN repository also includes parts of
libspeex, which is distributed under a BSD-style license. See LICENSE for more
details.

No comments:

Post a Comment