freeswitch实现监听、三方通话的两种方法

首先是使用freeswitch自带的监听和三方通话的功能,

模块:mod_dptools: eavesdrop

      mod_dptools: three_way

使用方法是针对已经建立通话的双方的其中之一的UUID,发送命令或者配置拨号计划来使用,例如:

已经通话的双方UUID是:

9d385df2-e8ce-4c06-a8d9-ab04477a5d27、91b54a88-5f40-4ded-a82a-9b6e7be36ac1

监听:expand originate 操作者contact&eavesdrop(9d385df2-e8ce-4c06-a8d9-ab04477a5d27)

操作者是新呼叫的,在呼叫contact之前可以添加普通呼叫的一些参数。

被监听方可添加的参数

<actionapplication="set"data="eavesdrop_require_group=<groupID>"/>

<actionapplication="set" data="eavesdrop_indicate_failed=/sounds/failed.wav"/>         <!-- used in 'eavesdrop all' case-->

扫描二维码关注公众号,回复: 101116 查看本文章

<actionapplication="set"data="eavesdrop_indicate_new=/sounds/new_chan_announce.wav"/><!-- used in 'eavesdrop all' case -->

<actionapplication="set"data="eavesdrop_indicate_idle=/sounds/idle.wav"/>             <!-- used in 'eavesdrop all'case -->

<actionapplication="set" data="eavesdrop_enable_dtmf=true"/><!-- false means no commands during eavesdrop -->

<actionapplication="set" data="eavesdrop_bridge_aleg=true"/><!-- enables listen to aleg -->

<actionapplication="set" data="eavesdrop_bridge_bleg=true"/><!-- enables listen to bleg -->

<actionapplication="set" data="eavesdrop_whisper_aleg=true"/><!-- enables whisper mode in aleg -->

<actionapplication="set" data="eavesdrop_whisper_bleg=true"/><!-- enables whisper mode in bleg -->

三方通话:expand originate 操作者contact& three_way(9d385df2-e8ce-4c06-a8d9-ab04477a5d27)

另外一种方法,是利用多人会议功能来实现监听和三方通话
具体命令就不贴了,思路就是已经有普通的通话双方,操作者发起监听,首先呼通操作者自己,并将自己拉进会议中,使用conference来进入会议,之后设置自己为禁言,这些操作成功之后,再将原有通话双方分别拉进会议,其实就是三人的会议,但是发起监听方被禁言,这样就形成了原有双方听不到发起监听者的声音。三方通话的时候只需要不禁言发起者就可以了,其他相同。

猜你喜欢

转载自blog.csdn.net/wh8_2011/article/details/80107708