Summary:ASTERISK-01766: [patch] Add an integrated user conference feature
Reporter:Steven Sokol (ssokol)Labels:
Date Opened:2004-06-04 19:52:21Date Closed:2011-06-07 14:04:48
Versions:Frequency of
Environment:Attachments:( 0) iax2_conf.tar.gz
Description:This set of patches adds integrated user conferencing to IAX2.  This allows for the development of IAX devices with support for traditional PBX-style conferencing.  (I have added such support to IAX Phone as a proof-of-concept).


The patch adds a new command, conference, to the IAX lexicon.  It also adds new IEs to allow the client to pass the IAX Call numbers for the calls to dump into the bridge.

The patch requires you to make a few changes.  You need to add an extension to your dial plan that points to the MeetMe application, and uses two variables to activate the proper bridge.  Here's the extension:

exten => 9999,1,MeetMe(${PCONF},${CONFPOPTIONS})

Here are the entries in iax.conf:


As you can imagine, the confcontext and confextension simply point out the exension and context to dial when a conference is desired.

confsuffix allows you to add a suffix to the IAX user name when creating the conference.  This makes it easy to prevent collisions between normal conferences and these personal conferences.  Currently you need to add a matching entry to meetme.conf in order to make conferencing work.  This may be nixed in the future in favor of using the 'd' option for dynamic conferences.

Entries in the meetme.conf would look like:

conf => 1000_pconf
conf => iaxuser1_pconf
conf => iaxuser2_pconf

The conference name that is invoked is based on the IAX user name.  The suffix ('_pconf' in this example) is appended from the confsuffix value.

When chan_iax2 gets the conference command and the associated call numbers, it simply sets the extension and context values to the values in the configuration, sets two variables (the var ${PCONF} becomes the conference name, and the var ${CONFOPTIONS} becomes the options associated with the user).

I will release an updated version of IAX Phone so people can try this.  The basic rule of thumb is:

1.  Make or have an active call.
2.  Place that call on hold and make a second call.
3.  Once that call is complete, press the CONF button to merge the calls.

From my limited testing, this does not appear to have any impact on existing IAX devices, including other, unaltered Asterisk systems.

Please take a look and let me know what you think of the concept.


Comments:By: Mark Spencer (markster) 2004-06-04 21:45:01

Why didn't you just use "TRANFER" to transfer the caller into a conference?  That requires no modification of the IAX protocol whatsoever.

By: Steven Sokol (ssokol) 2004-06-04 22:45:25

Because transferring each conference member in requires the user to remember their own private conference number.  This is simple and elegant, emulates the Conference function available on most business phone sets, and leverages the power of Asterisk.  Plus I have a client who is desparate to have it.

The only othe way I had to solve this was to add local conferencing on the client, and I just didn't feel like kludging that together.  I think this is a relatively innocuous change to IAX2. If you have a better implementation, please let me know.

I still want to hack MeetMe a bit.  The 'x' option does not seem to be working (or I don't properly understand it) as the owner is given 'x' status but the conference is not dropped when the owner exits as I understood it do.  I would also like to set it up so that the conference is destroyed automatically if the number of participants drops to 1 (i.e. both remote parties hang up).

By: Mark Spencer (markster) 2004-06-04 23:00:57

Transferring each conference member in would not necessarily require the user to remember their own private conference number, as you could use very simple extension logic to associate the called party with the call before the transfer, e.g.

exten => s,1,SetVar(IAXUSER=${MACRO_EXTEN})
exten => s,2,Dial(IAX2/${MACRO_EXTEN},20)
exten => s,3,Voicemail(u${MACRO_EXTEN})

By: Mark Spencer (markster) 2004-06-04 23:01:24

Adding new commands to iax2 must be done with care, lest it become SIP.

By: Steven Sokol (ssokol) 2004-06-05 21:44:56

True.  However I think a server-side conference feature is a low-impact, high-value addition.  I worked through several scenarios before I coded this patch.

Conference Through Transfer:
Too kludgy.  Each party has to be tossed into a meet-me one-at-a-time.  I tried it and it required too many steps for the average end-user to accomplish it successfully.  The conference feature on business phones is one of the most important and most-often bolluxed-up features in telephony.  How often do you hear "hold on, I'm going to try to conference __ on with us.  If I drop you, I'll call you right back."?

Conference Through Manager:
This works, and I wrote an extension to IAX Phone to do this.  However, it requires each client to have access to the manager interface. It also becomes more and more ugly the more simultaneous registrations a given phone establishes.  The phone has to keep track of the channel IDs for the connected (remote) devices, since IAX does not pass the names of the remote channels to the client.

Conference Through Added IAX Command:
While it does require the addition of code to both chan_iax2 and libiax2, this seems to be the best solution.  It reduces conferencing to a relatively simple operation that mimics the actions of a standard business phone set.

I won't claim that my implementation is the best solution, but I think that adding in the command is innocuous and is a far cry from the "add the kitchen sink" effect which has glued god-knows-what to SIP.

I suppose if you really object to it, I can come at the solution from another direction.  I just think that if this is a hack, anything else would have to qualify as a _slimy_ hack.

By: Mark Spencer (markster) 2004-06-05 22:38:10

Why would the user have to transfer each person into the conference?  Why not just code it as a "feature" where you press "conference" and it automatically transfers either one or all the parties into a pre-determined conference extension?

By: Mark Spencer (markster) 2004-06-06 12:44:00

It might be more effective to have some discussion on IRC when you get a chance.

By: Mark Spencer (markster) 2004-06-21 15:11:22

Is this ready to be closed?

By: Steven Sokol (ssokol) 2004-06-21 15:17:49

Yes.  Close it out.  I have found other ways to make this work.  (We still need to look at the Feature Button/Presence Indication stuff we talked about, but that can wait for AstriCon).