[Freeswitch-users] How to set PIN after conference created?

Duncan Pierce duncan.pierce at gmail.com
Tue Mar 29 15:17:17 MSD 2011


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20110329/6fa07ee4/attachment.html 


More information about the FreeSWITCH-users mailing list