<html><head><title>ESL usage in java</title>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
</head>
<body>
<br><br>
<span style=" font-family:'Courier New'; font-size: 9pt;">> You have incorrect syntax <br>
><br>
> You should avoid trying to do raw commands over the socket and use one of the existing esl client libs. <br>
><br>
> The wire format of the command you are trying to do is exactly <br>
><br>
> sendmsg <uuid>\n <br>
> call-command: hangup\n <br>
> hangup-cause: 501\n <br>
> \n <br>
><br>
> You are encapsulating it in an event which is incorrect.<br>
<br>
Concerning FS-6576, Anthony what "esl client libs" you talking about ?<br>
I use esl.jar library generated by make javamod in ibs/esl as described in </span><a style=" font-family:'Courier New'; font-size: 9pt;" href="https://wiki.freeswitch.org/wiki/Event_Socket_Library#Java_Example">https://wiki.freeswitch.org/wiki/Event_Socket_Library#Installation</a><br>
<span style=" font-family:'Courier New'; font-size: 9pt;">There is SWIG generated function <br>
public int sendMSG(org.freeswitch.esl.ESLevent p0, java.lang.String p1) { /* compiled code */ }<br>
It wants ESLevent in input.<br>
What is wrong with this library or my code?<br>
<br>
<br>
ESLevent outevt = new ESLevent("plain",null);<br>
String msg = "sendmsg " + channel_uuid +"\n" +<br>
"call-command: hangup\n" +<br>
"hangup-cause: 501\n\n";<br>
<br>
outevt.addBody(msg);<br>
int val = con.sendMSG(outevt, channel_uuid);<br>
<br>
<br>
<span style=" font-family:'arial'; font-size: 8pt; color: #c0c0c0;"><i>-- <br>
С уважением,<br>
daemonserj </i></span></span><a style=" font-family:'arial';" href="mailto:daemonserj@gmail.com">mailto:daemonserj@gmail.com</a></body></html>