[Freeswitch-dev] Pin-less entry into conference

Robert Joly rjoly at nortel.com
Thu Sep 3 07:20:01 PDT 2009


Hi,
I work on a SIP PBX project that is using FreeSWITCH as a audio
conference server which is working great.  The audio conferencing is
very well integrated in out web-based configuration server and allows
the owner of the conference to control it (mute, unmute, isolate, ...)
from a browser.  One other neat thing a conference owner can do through
the browser is to invite additional parties to the conference by typing
in a SIP URI.  This causes our SIP PBX to do 3rd party call control to
refer the invited party to the proper conference.  This works very well
for conferences that do not require a PIN but breaks for conferences
that do.  In the latter case, when the invited party answers the call,
he hears "please enter your conference access number" out of context.
Given that this scenario is less that ideal I started looking for
solutions what would allow someone to join a 'PIN-guarded' conference
without being prompted for one.  I looked at a variety of dialplan-based
options without success and turned to another option which I
successfully prototyped.  The purpose of this post is to socialize the
solution I came up with to get feedback and to ultimately learn what
needs to be done to get this functionality committed in the code base.

The high-level solution I came up with consists the following:
1- add the conference PIN to the INVITE that is sent to FreeSWITCH;
2- have conference dialplan set a well-known dialplan variable with the
content of the PIN as extracted from the INVITE;
3- have mod_conference test the pin contained in the well-known dialplan
variable before deciding to prompt the user to enter a PIN.

The solution I prototyped supports two ways of adding the PIN to an
INVITE. First, the pin can be included as a well-known URL parameter
added to the INVITE, e.g. INVITE
sip:myconf at myfreeswitch.local;X-ConfPin=1234 SIP/2.0.  When the PIN is
passed as a URL parameter, the conference dialplan needs to be of the
following form to allow PIN-less entry:

  <extension name="700">
    <condition field="destination_number" expression="^700$">
      <action application="set" data="supplied_pin=${sip_req_params}"/>
      <action application="conference" data="myconf at 700+1234"/>
    </condition>
  </extension>

The other way of adding a PIN to an INVITE is to add a user-chosen
proprietary header containing the PIN to the INVITE, e.g.
X-My-Custom-Pin-Header: 1234.  When the PIN is passed as a header, the
conference dialplan needs to be of the following form to allow PIN-less
entry:

  <extension name="700">
    <condition field="destination_number" expression="^700$">
      <action application="set"
data="supplied_pin=${sip_h_X-My-Custom-Pin-Header}"/>
      <action application="conference" data="myconf at 700+1234"/>
    </condition>
  </extension>

Whichever method is taken, the end results are similar, i.e. the
'supplied-pin' dialplan variable is initialized with the conference PIN
passed in the INVITE.  All that is left to do is for the mod_conference
to look-up the variable and extract the PIN out of it if non-empty and
use it as though the user entered it from his keypad.  If the PIN is not
the correct one, the logic defaults to prompting the user.  The
mod_conference patch is attached to this post which essentially consists
in adding 10 lines of code (if you ignore the lines changed because of
indentation).

Does this approach sound reasonable to you?  If so, I'll open a tracker
describing the problem and solution and attach my patch to it so that it
can be committed.

Thank you very much in advance,
Robert
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mod_conference.patch
Type: application/octet-stream
Size: 5748 bytes
Desc: mod_conference.patch
Url : http://lists.freeswitch.org/pipermail/freeswitch-dev/attachments/20090903/dfbb3be5/attachment.obj 


More information about the FreeSWITCH-dev mailing list