No SIP packets from virtual client machine - virtual-machine

Implementing a SIP call using asterisk server, but every time I have one client call another (virtual machines), Wireshark doesn't show any SIP packet requests even though the call is being placed?

1) check firewalls on both machine, try turn firewall off
2) check sip nat settings or assign public ips to hosts.
3) check network availible inside your virtulization environment(each host can ping other one).

Related

Video Conference MCU NAT Traversal not work

I have successfully compiled source code of doubango opentelepresence system (An open source video conference MCU) and successfully tested. I can make video calls through desktop version and using webrtc (sipml5 client) with Chrome and Firefox (with some modifications because the sipml5 was not compatible with newer versions).
Now my problem is with NAT traversal. I want to make video calls between clients behind NAT using turn server. The MCU server is behind NAT (SIP port is on public IP using port forwarding and tcp sip and ws connection is available). I have installed coturn Turn Server on a ubuntu system, and configured it using command line as like why the turn server does not support for the tcp connection. The turn server ports is open on public ip. I have also tested both udp and tcp but not successful.
On the mcu, ice, stun and turn is enabled. I have set turn server url and credentials correctly and the mcu can successfully communicate with turn server. Also webrtc on the browsers can successfully communicate with turn server (I say successful communication, because I can see candidates are being generated).
I have two major problems:
For some reasons related to firewall, I prefer to use only tcp relay. But in test environment, I have tested both with udp and tcp but not successful. It seems doubango opentelepresence does not support relayed tcp, because I cannot see any candidate with relayed tcp (there are udp relayed candidates).
What is wrong with my configuration which I was never successful on making a call. The ICE candidates are generated with public ip, but their state is always failed or frozen (what does frozen mean!). If you have any suggestions, let me know and try. I can test and report results here until reach a successful video call.
Yellow parts are public IP address (a valid IP address accessible on the internet for all clients).

Google compute engine connecting to local UDP port

I have a server listening on UDP port 22000 at a google compute engine.
I can connect from the internet, any machine no problem, but I cannot connect from the local machine.
The exact same code runs normally in any other (non-google) Linux machine.
My only changes to the default compute engine settings were to add a firewall rule allowing incoming UDP at port 22000.
Any help most welcome!
jaime
Solved!
Apparently in these machines / kernel UDP sockets need to have a name (bind) before sending - never needed in other machines where I installed the server.
So in the sequence:
socket()
settimeout(..)
setsockname( .. )
socksendto( .. )
sockrecvfrom( .. )
... I've always avoided the "setsockname" as per the Lua socket documentation (http://w3.impa.br/~diego/software/luasocket/udp.html#setsockname):
Note: This method can only be called before any datagram
is sent through the UDP object, and only once. Otherwise, the system
automatically binds the object to all local interfaces and chooses an
ephemeral port as soon as the first datagram is sent. After the local
address is set, either automatically by the system or explicitly by
setsockname, it cannot be changed.
... when sending was the first operation.
For some reason, here it is needed. To be specific, I've:
setsockname( '*', 0 ) - that is, bind to all local addresses, use an ephemereal port.

Is ICE Necessary for Client-Server WebRTC Applications?

I have a WebRTC MCU (kurento) running on a public IP address
serving some clients that only send or only receive audio
So every clients is directly connected with MCU (not with each other ) that has a public IP address .
Q1: Is there still a necessity to use STUN and TURN for NAT traversal ?? if so Why ??
Q2: Is there any hack in WebRTC in browser that would remove the need for STUN and TURN ?
In my opinion : most of client-server architectures do not have any difficulty with clients behind NAT .What's the difference here with webrtc?
Yes ICE is absolutely must for WebRTC.
Q1: Is there still a necessity to use STUN and TURN for NAT traversal
?? if so Why ??
For your scenario you don't need to use STUN or TURN. Let me explain why.
Every client that are in private network is under some kind of NAT which has a public IP address. Outside world doesn't know this client's private IP address and even if they knew they can't connect with the client without knowing that public IP address. STUN server is used to gather this public IP address.
So if your server wants to initiates the connection then it needs the client to send its NAT's public IP. Client will use STUN server to know its public IP and send it to the server. But if client initiates the connection then there is no need to know the NAT's public IP. Client can send packets to the public server to initiate the connection. Server can know the cilents public IP from the clients packet and then they can connect. So no need for STUN.
Your server is doing TURN's role in this scenario. So you don't need TURN server.
Q2: Is there any hack in WebRTC in browser that would remove the need for STUN and TURN ?
There is no hack. Depending on scenarios TURN/STUN is used. For your scenario you don't need. If you wanted to make client-client connection then you would have needed STUN server.
ICE is mandatory
but using any stun and turn server is not.
since you are connecting to a server on a public port, you NEVER need to use a TURN server, but depending the kind of NAT/Firewall your clients are behind, you might need a STUN server
you do not need to modify the browsers at all. The application decides wether to use a stun server or not. if you pass an empty "iceservers" parameter to your peerconnection object at creation, the ICE UA in your browser will only generate host (local) candidates.

Connecting to a remote machine through client-server

I have created a simple tcp client-server application in vb.net. Everything works fine when i set local host (127.0.0.1) as the ip address. I wish to make a connection to a remote machine (keeping client at my machine and server on the other - or vice versa).
EDIT:
ok, the code of interest is as follows:
the server:
Dim server As TcpListener = New TcpListener(IPAddress.Any, port)
the client:
Dim theip As IPAddress = IPAddress.Parse(TextBox1.Text)
client = New TcpClient(theip.ToString, port)
Now, what should i enter in "TextBox1.Text" if i have my client on a remote machine (connected over internet) and server at a different computer (whose external IP address is known)?
Can i enter the external IP address of the machine running the server directly in the text box? Also, do i need to take care of things like "port forwarding" / "let firewall allow the connection" and all? If yes, can you please guide me or link a tutorial so that my application does this automatically or is there an alternative approach to achieve this and so that port forward is not required? Thanks a lot!
You say the other machine has an external ip address. This implies it also has a local ip address; ie it is behind a NAT firewall or similar. In this case, you will have to configure the firewall to allow communication to take place, eg by setting up port forwarding.
Applications such as MSN Messenger, VOIP clients etc have elaborate mechanisms to negotiate this automatically, but they're often not very successful.

UDP configuration in webserver to accept connection from GPRS mobile device

Could someone please help me to configure UDP in web server to accept connection from GPRS mobile device. The GPRS mobile device will send data packets which i need to write as a file in web server to process a web page. Please help.
i need to know the following:
1) How to configure UDP in web server
2) How can a GPRS mobile device get connected to the server using UDP
3) Write the data packets to a txt file
Please help.
A "web server" usually means am "http-server", which is a process listening for incoming "http"-requests.
Now http is a protocol that is standardized to be accessed via TCP/IP port 80.
Therefore most webserver implementations will implement a TCP/IP server that listens to port 80 by default. Usually you can change the port if need be, but usually you cannot change the transport layer to e.g. UDP.
Therefore it might not really be possible to make your "web-server" react on UDP packets.
If, however, by "web server" you mean a host accesible on the internet (that eventually might happen to run an http-daemon), you might have more luck: simply run a small server-application on that machine that listens to incoming UDP traffic on a given port, and do "something" with it (e.g. forward it to an http-daemon to display the current location)
Answers to your 3 questions:
Creating a small application listening on UDP-traffic:
a trivial server could be:
`netcat -l -u -p 8888`
This will create a UDP-server listening on port 8888, using netcat.
Whatever client connects to your server, everything that the client sends to the server will be output via stdout, and you can talk back to the client via stdin.
You shouldn't use netcat in a production environment; but it is a good and simple tool to check whether a connetion can be established and whether the protocol works.
In production, you will probably want to use a "real" UDP-server, e.g. by writing your own in the language of your choice.
How to make your gprs device talk to your server? This is impossible to answer without knowing more about the device, it's OS and the software installed that produces the data and is supposed to send it to the.
netcat -l -u -p 8888 > myfile.txt