Okay, I did something 100% in dialplan with some conference.conf.xml additions. It's an example of how crazy powerful the dialplan really is. First, you need to add these to your conference.conf.xml:
<group name="plain">
<control action="mute" digits="0"/>
<control action="energy up" digits="9"/>
<control action="energy equ" digits="8"/>
<control action="energy dn" digits="7"/>
<control action="vol talk up" digits="3"/>
<control action="vol talk zero" digits="2"/>
<control action="vol talk dn" digits="1"/>
<control action="vol listen up" digits="6"/>
<control action="vol listen zero" digits="5"/>
<control action="vol listen dn" digits="4"/>
</group>
...
</caller-controls>
And add a new conference profile:
<profiles>
...
<profile name="simple">
<param name="domain" value="$${domain}"/>
<param name="rate" value="16000"/>
<param name="interval" value="10"/>
<param name="energy-level" value="300"/>
<param name="sound-prefix" value="$${sounds_dir}/en/us/callie"/>
<param name="muted-sound" value="conference/conf-muted.wav"/>
<param name="unmuted-sound" value="conference/conf-unmuted.wav"/>
<param name="alone-sound" value="conference/conf-alone.wav"/>
<param name="moh-sound" value="$${hold_music}"/>
<param name="enter-sound" value="tone_stream://%(200,0,500,600,700)"/>
<param name="exit-sound" value="tone_stream://%(500,0,300,200,100,50,25)"/>
<param name="kicked-sound" value="conference/conf-kicked.wav"/>
<param name="locked-sound" value="conference/conf-locked.wav"/>
<param name="is-locked-sound" value="conference/conf-is-locked.wav"/>
<param name="is-unlocked-sound" value="conference/conf-is-unlocked.wav"/>
<param name="pin-sound" value="conference/conf-pin.wav"/>
<param name="bad-pin-sound" value="conference/conf-bad-pin.wav"/>
<param name="caller-id-name" value="$${outbound_caller_name}"/>
<param name="caller-id-number" value="$${outbound_caller_id}"/>
<param name="caller-controls" value="plain"/>
<param name="comfort-noise" value="true"/>
</profile>
...
</profiles>
Add these extensions to your dialplan. I just put them in conf/dialplan/default/01_Conf_Add_Caller.xml:
<include>
<!-- Sample dialplan for sending member or moderator to a conference where he/she can add/remove calls -->
<!-- Dial 46xx for member, *46xx for moderator -->
<extension name="Simple add-caller conf: member">
<condition field="destination_number" expression="^(46\d{2})$">
<action application="answer"/>
<action application="conference" data="$1@simple"/>
</condition>
</extension>
<extension name="Simple add-caller conf: moderator">
<condition field="destination_number" expression="^\*(46\d{2}$)">
<!-- set up a few bind_digit_action (BDA) bindings for the moderator -->
<action application="bind_digit_action" data="moderator,*1,exec:execute_extension,ASK_FOR_NUMBER__$1 XML default"/>
<action application="bind_digit_action" data="moderator,*2,exec:execute_extension,CANCEL_LAST_CALL__$1 XML default"/>
<action application="digit_action_set_realm" data="moderator"/>
<action application="conference" data="$1@simple"/>
</condition>
</extension>
<extension name="Add new OB call to conference">
<condition field="destination_number" expression="^ASK_FOR_NUMBER__(\d+)$">
<!-- ask caller for a number + #, collect into ${target_num} variable -->
<action application="play_and_get_digits" data="4 11 1 5000 # ivr/ivr-enter_destination_telephone_number.wav ivr/ivr-that_was_an_invalid_entry.wav target_num \d+"/>
<!-- add this call to the conference -->
<action application="execute_extension" data="ADD_CALL_TO_CONF__${target_num}"/>
</condition>
</extension>
<extension name="Remove last OB call added to conference">
<condition field="destination_number" expression="^CANCEL_LAST_CALL__(\d+)$">
<!-- remove this call from the conference -->
<action application="set" data="res=${uuid_kill ${new_uuid}}"/>
</condition>
</extension>
<extension name="add that call">
<!-- if we have a four-digit number then attempt to dial it as a user ... -->
<condition field="destination_number" expression="^ADD_CALL_TO_CONF__(\d\d\d\d)$" break="on-true">
<action application="set" data="new_uuid=${create_uuid foo}" inline="true"/>
<action application="set" data="res=${bgapi originate {origination_uuid=${new_uuid}}user/$1 &conference(${conference_name})}"/>
</condition>
<!-- if we have a five+ digit number then attempt to dial it as a gw connection ... -->
<condition field="destination_number" expression="^ADD_CALL_TO_CONF__(\d\d\d\d)$" break="on-true">
<action application="set" data="new_uuid=${create_uuid foo}" inline="true"/>
<action application="set" data="res=${bgapi originate {origination_uuid=${new_uuid}}sofia/gateway/mygw/$1 &conference(${conference_name})}"/>
<!-- Alternatively, you can just use loopback, but that creates three call legs instead of one, so be warned -->
<!--
<action application="set" data="res=${bgapi originate {origination_uuid=${new_uuid}}loopback/$1 &conference(${conference_name})}"/>
-->
</condition>
<!-- ... otherwise inform moderator that the operation was not exactly successful -->
<condition field="destination_number" expression="^ADD_CALL_TO_CONF__$">
<action application="playback" data="ivr/ivr-dude_you_suck.wav"/>
</condition>
</extension>
</include>
How it works:
Moderator dials *46xx to go into a conference. ("Normal" users dial 46xx and they cannot add a new call.) Moderator dials *1 and gets a dialog asking to enter the destination number and # key. Moderator keys in a phone number (or extension number) and presses #. System makes call and drops it into the conference. As a bonus feature I added *2 which will disconnect the most recently added phone call.
I did this mostly as a proof of concept, but there's no reason you can't take this code and put it into production. In fact, you could add a PIN or user id (or both) checker so that just anyone can't add a call to a conference. If you guys actually like this then I'll add it to the wiki or something so everyone else can reference it.
Enjoy,
MC
2011/5/16 fieldpeak
<fieldpeak@gmail.com>
Hi Gurus,
Is there anybody can help this issue? thanks!
Regards,
Charles
在 2011年5月14日 下午3:54,fieldpeak
<fieldpeak@gmail.com>写道:
Hi Michael,
Thanks for your detailed suggestion.
i test it as below steps, it works fine, however, there is a limiation that i have to fill fixed callee number in conference.conf.xml (data="execute_extension 5001"), while actually i what to dial arbitrary number after "*" dynamically(e.g *1234, *2345), i can think out it could realize by a IVR script like "data="execute_extension IVR_scripts" and after IVR give some voice prompt (pls input the callee number) then ... however, considering simplicity, can i convey the DTMF into the dialplan (just directly press *1234, and then 1234 ring...)? could you please provide any hints or any suggestion... Thanks a lot!
1. in conference.conf.xml, set as below,
<control action="execute_application" digits="*" data="execute_extension 5001"/>
2. in dial plan,
<!-- for confernce named conf100 -->
<extension name="conf100" >
<condition field="destination_number" expression="^666$">
<action application="answer"/>
<action application="set" data="conference_user_list=|"/>
<action application="conference" data="conf100@default"/>
</condition>
</extension>
and
<!-- for dial out 5001 from the conference conf100 -->
<extension name="5_to_conf_out" >
<condition field="destination_number" expression="^(5\d+)$">
<!-- <action application="conference" data="conf100 dial sofia/internal/5001@192.168.200.201 100 Conference_Caller_Name"/> -->
<!-- <action application="bridge" data="sofia/internal/$1@192.168.200.201"/> -->
<action application="set" data="api_result=${conference(conf100 dial sofia/internal/$1@192.168.200.201 100 Conference_Caller_Name)}"/>
</condition>
</extension>
3. register a extension 3001, call 666 and join a conference, and then press "*", the FS will call 5001 on a IAD.
then 5001 and 3001 join the same conference.
conference Your-Conf-Name dial
user/1002
发件人:
fieldpeak
发送时间:
2011-05-12 11:11:41
收件人:
FreeSWITCH-users
抄送:
主题: [Freeswitch-users]
call somebody into conference after conferenceestablished
Hi Gurus,
i dial 666 and enter a
conference, then i need call some body's phone number to join him into this
conference...
is there anyone can advise how can realize this scenario?
thanks.
Regards,
Charles
_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org