FreeSWITCH - 我如何拨打电话,与对方通话,然后将他添加到会议中?
FreeSWITCH - how can i make the call, talk to the person and then add him to the conference?
我按照官方文档 (https://freeswitch.org/confluence/display/FREESWITCH/Conference+Add+Call+Example) 进行操作,但它对我不起作用。
当我给一个人打电话时,他没有加入会议,但我怎样才能让他加入会议,即使我挂断电话也能留下来?
例如我正在尝试如下:
1 - 我和我的其他同事需要 Whosebug 专家咨询
2 - 我和我的其他同事加入了一个会议室
3 - 现在我们需要 Whosebug 程序员给我们 30 分钟的讲座,所以我们打电话给他(我在这里作为管理员)
4 - 当我与 Whosebug 交谈时,会议中没有人听到 Whosebug 专家。
那么我怎样才能让他参加会议呢?
<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="@simple"/>
</condition>
</extension>
<extension name="Simple add-caller conf: moderator">
<condition field="destination_number" expression="^\*(46\d{2}$)">
<action application="answer"/>
<!-- 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__ XML default"/>
<action application="bind_digit_action" data="moderator,*2,exec:execute_extension,CANCEL_LAST_CALL__ XML default"/>
<action application="digit_action_set_realm" data="moderator"/>
<action application="conference" data="@simple+flags{moderator}"/>
</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 20 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="${target_num}"/>
</condition>
</extension>
<extension name="Remove last OB call added to conference">
<condition field="destination_number" expression="^CANCEL_LAST_CALL__(\d+)$">
<!-- remove a call from the conference -->
<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+"/>
<action application="set" data="res=${uuid_kill ${hash(select/domain-${domain_name}/last_user_${target_num})}}"/>
</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="^(\d{4})$" break="on-true">
<action application="set" data="new_uuid=${create_uuid foo}" inline="true"/>
<action application="hash" data="insert/domain-${domain_name}/last_user_/${new_uuid}" />
<action application="set" data="res=${bgapi originate {origination_uuid=${new_uuid}}user/ &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="^(\d{5})$" break="on-true">
<action application="set" data="new_uuid=${create_uuid foo}" inline="true"/>
<action application="hash" data="insert/domain-${domain_name}/last_user_/${new_uuid}" />
<action application="set" data="res=${bgapi originate {origination_uuid=${new_uuid}}sofia/gateway/voipbuster/ &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/ &conference(${conference_name})}"/>
-->
</condition>
<!-- ... otherwise inform moderator that the operation was not exactly successful -->
<condition field="destination_number" expression="^$">
<action application="playback" data="ivr/ivr-dude_you_suck.wav"/>
</condition>
</extension>
</include>
请参阅 mod_conference 文档中的 bgdial
和 dial
。
你在做什么,看起来还不错,需要调试。但是 conference dial
你会更容易。
您应该使用电话会议,这会让您 objective 轻松很多。
使用 Lua 由 XML 拨号方案调用的脚本:
function call_to_agent()
session:execute("conference_set_auto_outcall","user/[user_that_you_want]")
session:execute("conference","conference_name@default")
end
session:answer()
call_to_agent()
我按照官方文档 (https://freeswitch.org/confluence/display/FREESWITCH/Conference+Add+Call+Example) 进行操作,但它对我不起作用。
当我给一个人打电话时,他没有加入会议,但我怎样才能让他加入会议,即使我挂断电话也能留下来?
例如我正在尝试如下:
1 - 我和我的其他同事需要 Whosebug 专家咨询
2 - 我和我的其他同事加入了一个会议室
3 - 现在我们需要 Whosebug 程序员给我们 30 分钟的讲座,所以我们打电话给他(我在这里作为管理员)
4 - 当我与 Whosebug 交谈时,会议中没有人听到 Whosebug 专家。
那么我怎样才能让他参加会议呢?
<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="@simple"/>
</condition>
</extension>
<extension name="Simple add-caller conf: moderator">
<condition field="destination_number" expression="^\*(46\d{2}$)">
<action application="answer"/>
<!-- 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__ XML default"/>
<action application="bind_digit_action" data="moderator,*2,exec:execute_extension,CANCEL_LAST_CALL__ XML default"/>
<action application="digit_action_set_realm" data="moderator"/>
<action application="conference" data="@simple+flags{moderator}"/>
</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 20 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="${target_num}"/>
</condition>
</extension>
<extension name="Remove last OB call added to conference">
<condition field="destination_number" expression="^CANCEL_LAST_CALL__(\d+)$">
<!-- remove a call from the conference -->
<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+"/>
<action application="set" data="res=${uuid_kill ${hash(select/domain-${domain_name}/last_user_${target_num})}}"/>
</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="^(\d{4})$" break="on-true">
<action application="set" data="new_uuid=${create_uuid foo}" inline="true"/>
<action application="hash" data="insert/domain-${domain_name}/last_user_/${new_uuid}" />
<action application="set" data="res=${bgapi originate {origination_uuid=${new_uuid}}user/ &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="^(\d{5})$" break="on-true">
<action application="set" data="new_uuid=${create_uuid foo}" inline="true"/>
<action application="hash" data="insert/domain-${domain_name}/last_user_/${new_uuid}" />
<action application="set" data="res=${bgapi originate {origination_uuid=${new_uuid}}sofia/gateway/voipbuster/ &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/ &conference(${conference_name})}"/>
-->
</condition>
<!-- ... otherwise inform moderator that the operation was not exactly successful -->
<condition field="destination_number" expression="^$">
<action application="playback" data="ivr/ivr-dude_you_suck.wav"/>
</condition>
</extension>
</include>
请参阅 mod_conference 文档中的 bgdial
和 dial
。
你在做什么,看起来还不错,需要调试。但是 conference dial
你会更容易。
您应该使用电话会议,这会让您 objective 轻松很多。
使用 Lua 由 XML 拨号方案调用的脚本:
function call_to_agent()
session:execute("conference_set_auto_outcall","user/[user_that_you_want]")
session:execute("conference","conference_name@default")
end
session:answer()
call_to_agent()