<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1027" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal">I have successfully used eavesdrop to allow a coach to help an agent during his call to a customer.
<o:p></o:p></p>
<p class="MsoNormal">At first coach hear the agent and the customer, and after pressing 2 on the coach phone can he give advice to the agent. Later he&#8217;d press 0 to just listen etc.<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">Now I&#8217;d like disable the dtmf control by setting a session variable
<br>
&nbsp;&nbsp;&nbsp;&nbsp;eavesdrop_enable_dtmf=false<o:p></o:p></p>
<p class="MsoNormal">and use the eavesdrop-command event mechanism outlined in this mail thread:
<a href="http://lists.freeswitch.org/pipermail/freeswitch-users/2009-October/048655.html">
http://lists.freeswitch.org/pipermail/freeswitch-users/2009-October/048655.html</a>.<o:p></o:p></p>
<p class="MsoNormal">I&#8217;m using the mod_erlang_event (could also use mod_event_socket) mechanism sendevent.
<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">The problem is that I don&#8217;t create proper events that reaches the correct session.
<o:p></o:p></p>
<p class="MsoNormal">I guess I need to properly name the event and provide the correct headers. Anybody has any ideas?<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">Currently I&#8217;m calling, using Erlang<o:p></o:p></p>
<p class="MsoNormal">&nbsp;&nbsp; freeswitch:sendevent(Node, &#8216;COMMAND&#8217;, [{&quot;eavesdrop-command&quot;, &#8220;2&#8221;}, {&quot;unique-id&quot;, CoachSessionUUID}])<o:p></o:p></p>
<p class="MsoNormal">(where CoachSessionUUID is the coach freeswitch session identifier).<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">Using mod_event_socket, this would correspond to <o:p></o:p></p>
<p class="MsoNormal">&nbsp;&nbsp;&nbsp;&nbsp;sendevent COMMAND<br>
&nbsp; &nbsp;&nbsp;eavesdrop-command: 2<o:p></o:p></p>
<p class="MsoNormal">&nbsp; &nbsp;&nbsp;unique-id: 533da8e2-0ef0-11e3-9642-d9e368e496c6<o:p></o:p></p>
<p class="MsoNormal">(where I&#8217;ve given a particular CoachSessionUUID)<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">I&#8217;ve also tried to use NOTIFY instead of COMMAND but with no success.<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">(using Freeswitch 1.2.10, but I don&#8217;t think the particular version matters)<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">Regards<o:p></o:p></p>
<p class="MsoNormal">/Ola<o:p></o:p></p>
</div>
</body>
</html>