[Freeswitch-users] mod_event_socket event with no eventname
Hector Geraldino
Hector.Geraldino at ipsoft.com
Sat Jan 5 03:28:36 MSK 2013
You must filter the events on each channel, so you don't receive events on the outbound thread that are being generated on the inbound call thread. To accomplish this you have several options: use myevents on the outbound socket, or add a filter based on the call uuid.
For the outbound call, you can have something like:
final org.freeswitch.esl.client.inbound.Client client = new org.freeswitch.esl.client.inbound.Client();
client.connect("localhost", 8021, "ClueCon", 2);
...
client.addEventFilter("Unique-ID", uuid);
For the inbound call, in the class that extends AbstractOutboundClientHandler you can have something like:
@Override
protected void handleConnectResponse(ChannelHandlerContext ctx, EslEvent event) {
String uuid = event.getEventHeaders().get(""Unique-ID");
sendSyncSingleLineCommand(channel, "filter Unique-ID " + uuid);
...
}
-----Original Message-----
From: freeswitch-users-bounces at lists.freeswitch.org [mailto:freeswitch-users-bounces at lists.freeswitch.org] On Behalf Of Gilbert Amar
Sent: Thursday, January 03, 2013 5:43 PM
To: 'FreeSWITCH Users Help'
Subject: [Freeswitch-users] mod_event_socket event with no eventname
Hello,
I am using mod_event_socket org.freeswitch.esl.client-0.9.2 and FreeSWITCH Version 1.2.5.3.
My app is build upon the Event Socket Outbound with :
Socket-Mode: async
Control: full
event plain ALL
I notice that I am receiving event like this
Content-Length: 143
Content-Type: text/event-plain
Command: sendmsg%20978b97b2-55a4-11e2-b38d-1f8230fa05b2
call-command: execute
execute-app-name: playback
execute-app-arg: phrase%3AAC_0002%3A
Please notice the missing Event-Name
The context : on an incoming call after playing some sound file I originate a new call and play a phrase to the outbound call.
Not only this seems wrong to me but I receive this on the two connection that are involve.
I attach the Wireshark pcap file.
Gilbert
Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users
mailing list