Misc. Dialplan Tools eavesdrop
From FreeSWITCH Wiki
Contents |
[edit]
Description
Provides the ability to spy on a channel. It often referred to as call barge.
[edit]
Usage
eavesdrop [<uuid>|all]
[edit]
Variables
<action application="set" data="eavesdrop_require_group=<groupID>"/> <action application="set" data="eavesdrop_indicate_failed=/sounds/failed.wav"/> <action application="set" data="eavesdrop_indicate_new=/sounds/new_chan_announce.wav"/> <action application="set" data="eavesdrop_indicate_idle=/sounds/idle.wav"/>
DTMF signals during eavesdrop
- 2 to speak with the uuid
- 1 to speak with the other half
- 3 to engage a three way
- 0 to restore eavesdrop.
- * to next channel.
[edit]
Examples
[edit]
From the Dialplan
This is available in the default.xml dialplan. To use it from your phone dial 88[extension number]. For example to eavesdrop on extension 1001 dial 881001.
<extension name="global" continue="true">
<condition>
<action application="info"/>
<action application="db" data="insert/spymap/${caller_id_number}/${uuid}"/>
<action application="db" data="insert/last_dial/${caller_id_number}/${destination_number}"/>
<action application="db" data="insert/last_dial/global/${uuid}"/>
</condition>
</extension>
<extension name="eavesdrop">
<condition field="destination_number" expression="^88(.*)$|^\*0(.*)$">
<action application="answer"/>
<action application="eavesdrop" data="${db(select/spymap/$1)}"/>
</condition>
</extension>
[edit]
From the mod_event_socket
In this example you originate a call to extension 2001 and start spying the channel with UUID c7709e9c-1517-11dc-842a-d3a3942d3d63
api originate sofia/default/2001@yourvsp.com &eavesdrop(c7709e9c-1517-11dc-842a-d3a3942d3d63)
