首先是使用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-->
<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)