I'm trying to get a SIP servlet chat server working, together with the textclient found here.
When I use 2 clients to send messages to eachother (peer to peer), everything goes well. But when I use one or more clients together with my server, I have to wait exactly 32 seconds before the server picks up any new messages in the doMessage()
method.
I'm using Netbeans together with Sailfin as my SIP server. Is there some kind of limitation or configurable delay or timeout between requests or responses in Sailfin I'm looking over?
I can post the server code, if needed.
Thanks
Here is the code of the server, i'll try to make a wireshark trace later.
And the sip.xml
I also tried an empty servlet, just with a
doMessage()
method that just prints out "message received". Same 32 seconds delay...Wireshark gives me:
I send the message "test" to the server:
Server sends back:
Then my client again answers with an OK:
So far so good, everything works well. But now I send a second message to the server "test2" and I get this:
Client to server:
Then the server does respond with:
But then the communication stops... I get a 200 OK, but the
println()
in mydoMessage()
method is not passed.To answer my own question, if someone ever encounters the same problem, i found this is a bug in the textclient against the following section 8.1.1.7 of RFC 3261.
The following line in SipLayer.java
Will create every message with the "branch1" parameter. Making this parameter unique fixes the problem.
32 seconds is the normal timeout for transactions (denoted 64*T1 in RFC3261, where the default for T1 is 500ms.)
I have no direct idea for a solution to your problem, except that the timeout is very likely NOT a misconfiguration in SailFin. So please provide a wireshark trace and the server code!