I have successfully used eavesdrop to allow a coach to help an agent during his call to a customer.

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’d press 0 to just listen etc.

 

Now I’d like disable the dtmf control by setting a session variable
    eavesdrop_enable_dtmf=false

and use the eavesdrop-command event mechanism outlined in this mail thread: http://lists.freeswitch.org/pipermail/freeswitch-users/2009-October/048655.html.

I’m using the mod_erlang_event (could also use mod_event_socket) mechanism sendevent.

 

The problem is that I don’t create proper events that reaches the correct session.

I guess I need to properly name the event and provide the correct headers. Anybody has any ideas?

 

Currently I’m calling, using Erlang

   freeswitch:sendevent(Node, ‘COMMAND’, [{"eavesdrop-command", “2”}, {"unique-id", CoachSessionUUID}])

(where CoachSessionUUID is the coach freeswitch session identifier).

 

Using mod_event_socket, this would correspond to

    sendevent COMMAND
    eavesdrop-command: 2

    unique-id: 533da8e2-0ef0-11e3-9642-d9e368e496c6

(where I’ve given a particular CoachSessionUUID)

 

I’ve also tried to use NOTIFY instead of COMMAND but with no success.

 

(using Freeswitch 1.2.10, but I don’t think the particular version matters)

 

Regards

/Ola