[Freeswitch-users] Unable to get events from freeswitch using java ESL client
Yungwei Chen
yungwei at resolvity.com
Thu Jun 2 03:28:01 MSD 2011
Hi,
I am using org.freeswitch.esl.client-0.9.2 to ask freeswitch to make an outbound call in the following java class.
I want to be able to get notified when a call is not answered for whatever reason.
However, I don't get any events from freeswitch. What am I missing here?
Thanks.
public class esl implements IEslEventListener {
/**
* @param args
*/
public static void main(String[] args) {
esl e = new esl();
Client client = new Client();
EslMessage response = null;
try {
client.connect("192.168.6.18", 8021, "ClueCon", 10);
client.addEventListener(e);
response = client.sendSyncApiCommand("originate", "{ignore_early_media=true}sofia/gateway/broadvoice/1112223333 9886");
CommandResponse cr = client.close();
System.out.println("Done.");
} catch (InboundConnectionFailure ex) {
ex.printStackTrace();
}
}
@Override
public void backgroundJobResultReceived(EslEvent arg0) {
System.out.println("backgroundJobResultReceived");
}
@Override
public void eventReceived(EslEvent arg0) {
System.out.println(String.format("eventReceived, event name=%s", arg0.getEventName()));
}
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20110601/97f6e076/attachment.html
More information about the FreeSWITCH-users
mailing list