I tried to develop socket program for asterisk connection.I able to run successfully from remote host in windows.But i didn't able run that same socket program in Linux machine..
This is My Socket code
]
Output:
i am getting this error
Response :Error
Message: Missing action in request
Thanks for your response.I changed my Socket program wr.print instead of wr.println.But am getting the same error message.Please give any solution to solve this problem.That is very helpful to do contious this process.
Just name for thread.I tried to develop socket program for asterisk connection.I able to run successfully from remote host in windows.But i didn't able run that same socket program in Linux machine..
Response :Error
Message: Missing action in request
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35442
9
posted
0
Just name for thread.
Well, it doesn't do anything, so you might as well delete it, lest someone looks at the code and assumes that it's doing something.
You're still using println with a Socket.
What's with the two newline characters after Timeout and Secret - are you sure that those do the right thing?
It's also a bit weird to do anything this involved in a servlet's init method; is this a load-on-startup servlet? If so, you should use a servlet context listener instead, and start whatever it's supposed to be doing in a separate thread (assuming that it's a long-running operation).
R Sugan
Ranch Hand
Joined: Mar 13, 2009
Posts: 48
posted
0
Hi,
Thanks for your response.I changed my code print instead of println.The two newline characters after Timeout and Secret this is correct way for sterisk api command.Am getting the same error....
Regards,
Suganya.
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35442
9
posted
0
If you're now using print instead of println, then you're in all likelihood missing some newline characters. That's why I asked you to post your current code.
Are you certain that it's OK to send two "Action" commands in a row?