[Freeswitch-users] How to set PIN after conference created?
Michael Collins
msc at freeswitch.org
Tue Mar 29 19:37:03 MSD 2011
This is one of those cases where the devs tried very hard not to force
feed specific functionality onto the user. The bottom line here is
that the devs consider mod_conference's primary function to be that of
getting channels into a conference, muxing the audio, etc. Things like
PINs and security, etc. can all be handled in the dialplan. This is,
indeed, by design. Instead of forcing the security into mod_conference
itself we let the FS implementor decide how he/she wants to perform
security functions. One advantage to doing all the security in the
dialplan is that you have a lot of power and flexibility: you do
security however YOU feel is best.
I believe that if you start viewing PINs and security/privacy from the
perspective that they are functions of the dialplan instead of
functions of mod_conference then you will be able to solve your
problem much easier.
-MC
On Tue, Mar 29, 2011 at 4:17 AM, Duncan Pierce <duncan.pierce at gmail.com> wrote:
> Hi everyone,
> I'm new to FreeSWITCH. I've managed to set up many features quite easily but
> I'm struggling with mod_conference. I want to allow a user to create a
> conference and set its PIN by dialling a special number
> 81<conference_number>*<pin>:
> <extension name="initiate_conference">
> <condition field="destination_number" expression="^81(\d*)\*(\d*)$">
> <action application="log" data="INFO Creating conference $1 with PIN $2"/>
> <action application="answer"/>
> <action application="conference" data="$1 at default+$2"/>
> </condition>
> </extension>
> Other users can dial into the same conference using a different access
> number, but are challenged for the PIN set by the first user:
> <extension name="join_conference">
> <condition field="destination_number" expression="^82(\d*)$">
> <action application="answer"/>
> <action application="conference" data="$1"/>
> </condition>
> </extension>
> There is no <param name="pin" ...> set in <configuration
> name="conference.conf"><profiles><profile name="default">.
> I was expecting <action application="conference" data="$1 at default+$2"/> to
> create the conference and set its PIN, so that a subsequent <action
> application="conference" data="$1"/> would be challenged to provide the same
> PIN. Instead what happens is the first caller has the required PIN set for
> their call, but the second caller is not challenged to provide the PIN at
> all.
> Looking at the code in mod_conference.c on git checkout v1.0.6 I see there
> only 2 ways conference->pin can be set: via <param name="pin" .../> in the
> profile or via API 'conference $1 pin $2'. I was expecting there would be a
> third way: assigning conference->pin = dpin when creating a new conference.
> Although I find this a bit confusing it could be by design.
> I tried using the API to set the PIN after the conference has been created
> but I lack the knowledge to do this successfully. I've tried:
> * <action application="set" data="result=${conference($1 pin $2)}"/> after
> <action application="conference" data="$1 at default+$2"/> - no actions execute
> after the <action application="conference">
> * <action application="set" data="result=${conference($1 pin $2)}"/> before
> <action application="conference" data="$1 at default+$2"/> - unsurprisingly, it
> reports conference not found
> * <action application="export" data="nolocal:api_on_answer=conference $1 pin
> $2"/> - appears not to execute but it's difficult to be sure in this case
> Thanks in advance for any help you can provide!
> Best regards,
> Duncan
> _______________________________________________
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
>
More information about the FreeSWITCH-users
mailing list