"Connection Refused" error with MSS SIP servlet over WSS - restcomm

I would like to ask for help.
I am using the mss-4.0.21-wildfly-8.2.1.Final server and the SIP servlet B2B WebSocket sample with some small changes in order to use the Doubango sipML5 client for registering and making call.
When I use the ws protocol, my servlet works fine, I can register and make call with Doubango sipML5 client.
When I use the wss protocol, the register function works fine, but I get the error "Connection Refused" while trying to make call. I checked my servlet code and found that the "Connection Refused" error is at this line outRequest.send();. I think the problem is that my servlet cannot send the INVITE request to callee over wss because it is refused. Now I have no idea about how to solve this problem.
Thus, I would like to ask for any idea about this problem. Thank you very much!

Instead of using the Doubango sipML5, I use the Olympus which is the RestComm WebRTC Application, and everything works fine now.

Related

Accessing remote WCF function is not possible

Im trying to access a remote wcf function in a service from the test application (Client), while executing it says service expired.
I tried
1) disabling firewall,
2) checked with SSl certificates, but didn't helped me
Could anyone help me why im unable to call this wcf function running on remote machine.
First steps: enable logging.
See
https://learn.microsoft.com/en-us/dotnet/framework/wcf/diagnostics/configuring-message-logging
And:
https://learn.microsoft.com/en-us/dotnet/framework/wcf/diagnostics/tracing/recommended-settings-for-tracing-and-message-logging
To look at the logs, use this: https://learn.microsoft.com/en-us/dotnet/framework/wcf/diagnostics/viewing-message-logs
If the logs do not make sense, post back here.

WebSocket connection to failed ERR_SSL_PROTOCOL_ERROR

I have configured the Websocket on my live server and I'm using SSL on live server. When I used following code on my localhost, websockets were fine.
ws://localhost:8080/server.php
Once I moved the file to the live server I have changed the code to the following
wss://IP:PORT/server.php
I have created a seperate port for web socket and configured on firewall TCP IN and OUT. However, I'm receiving the following error on console
WebSocket connection to ............ failed: Error in connection establishment: net::ERR_SSL_PROTOCOL_ERROR
Can anyone suggest me some solutions to overcome this issue
Basically when you are using wss you are just serving the WebWocket over SSL/TLS.
Meanwhile using a simple ws does not require a particular setup, wss does. Indeed you have to create a secure connection using a valid SSL Certificate when opening the communication.
If you certificate is missing or invalid the connection cannot be enstabilished therefore an error will be raised while attempting to start the communication.
So you can't just switch from ws to wss but also have to make a proper implementation.
You can find more details here, hope that helps!
here is what I did, I never able to install ssl in local, so I started using the w3cwebsocket client
https://www.npmjs.com/package/websocket
and test it in console using
node index.js
var W3CWebSocket = require('websocket').w3cwebsocket; var client =
new W3CWebSocket('wss://127.0.0.1:7000/'); console.log(client)

IBM Worklight - How to disconnect a client?

I can find WL.Client.connect to connect a client - so far so good. How can I do the opposite however? (I have good reason to do this, rest assured.)
I think that for this purpose, what you'd actually need to do is to "restart the session" with the server. Try using WL.Client.ReloadApp.
What do you mean by disconnect? WL app does not maintain an open connection. HTTP connection is closed each time response is returned from a server. Do you mean WL.Client.logout() ?

Netty Websocket SSL client not working after a successful handshake

I want to create a secure websocket client-server communication using Netty framework. I looked at the netty examples and there is an example with websocket ssl server: https://github.com/netty/netty/tree/master/example/src/main/java/io/netty/example/http/websocketx/sslserver
and there is also another example with websocket client, but without ssl: https://github.com/netty/netty/tree/master/example/src/main/java/io/netty/example/http/websocketx/client
So I've put the SslHandler as the first hander in the ChannelPipelinehandle as suggested here: How can use netty websocket client with wss?
But it still does not work. Client successfully connects to server (handshake succeeds), but then when client sends a message to server (for example PingWebSocketFrame or any other WebSocketFrame) nothing happens. Server does not receive any message.
Do you have an idea what might be wrong?
EDIT: I use 4.0.0.CR5 and to be exact, server always receives something, but only first SSLHandler. Next handler in the pipeline (HttpRequestDecoder) then receives a message only sometimes, and when it does, it creates DefaultHttpRequest with this failure:
decodeResult: failure(java.lang.IllegalArgumentException: invalid version format: |￳LZSᄎ
Those weird characters should probably represent an HTTP version, but it looks like SSLHandler did not decode them correctly?
I had the same issue (you can see the stackoverflow post here).
The sample code on the client uses the channel.write() method, which seems not to forward the messages to the Websocket ssl server. By using the channel.writeAndFlush() instead, messages are correctly sent to the server.
All these were tested using the netty 4.0.9.Final version

WCF client connection problem

I am consuming a web service in .NET application with WCF client.
The Endpoint's address of the service is over port 4338, and it is over HTTPS, secured with WS-Security standard.
So the address is something like :
https://[servername]:4338/[servicename]/
I was not able to communicate to the service with just running the application.
it gave me the following error :
Could not connect to [servername]:4338
TCP error code 10060: A connection
attempt failed because the connected
party did not properly respond after a
period of time, or established
connection failed because connected
host has failed to respond
[servername]:4338
But when I run Fiddler to investigate the http communication, the application start to work, and I will be able to communicate to the service.
As well, I want to add that I have a different service on the same web server that hosts the first service, and that second service's address is hosted on port 8080, and I am able to communicate with it with WCF client (without running Fiddler).
So, I googled and I found that it might be related to the proxy settings. Do you know what the problem is, and how can I solve it?
Thanks
Fiddler acts as an Internet proxy server. In general, any symptom of the form: "it works when I use Fiddler" means "it works when there's a (different) proxy server".
Check your proxy server settings. In particular, as empi suggested, try it in a browser. If it works there, it could be due to the fact that the browser has the proxy settings configured, and that you do not have them configured for WCF.
If you have proxy set in Internet Explorer, it may cause the problem. What happens when you open https://[servername]:4338/[servicename]/ in Internet Explorer?
Thanks empi for the reply.
I found the answer.
Actually in our company we have a proxy settings through "Automatic configuration script"
and depends on the web sites we are targeting internally, the script will point us to the proper proxy.
So, from the script I got the proper proxy address.
and in my .NET application I added this code
WebRequest.DefaultWebProxy = new WebProxy("http://xx.xx.xx.xx:8080");
and that fixed the problem
So WCF client was not detecting the setting of the automatic script.
and this is the reason it worked when I run Fiddler, because Fiddler listen to the http communication, and send it again through the settings.