qickrooms / red5phone

Automatically exported from code.google.com/p/red5phone
0 stars 0 forks source link

NullPointerException at TcpServer in org.zoolu.net. #20

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I don't realy know what happens. I thought the zoolu lib is stable? But my
red5 throws an error, here it is:

Exception in thread "Thread-32" java.lang.NullPointerException
        at org.zoolu.net.TcpServer.toString(TcpServer.java:148)
        at java.lang.String.valueOf(String.java:2827)
        at java.lang.StringBuilder.append(StringBuilder.java:115)
        at
org.zoolu.sip.provider.SipProvider.onServerTerminated(SipProvider.java:1059)
        at org.zoolu.net.TcpServer.run(TcpServer.java:141)

Original issue reported on code.google.com by michaelpalmer04 on 27 Jan 2009 at 10:48

GoogleCodeExporter commented 9 years ago
Btw the error appears after closeing the connection to the sip server. I think 
it is
the cancel or the bye command!?

Original comment by michaelpalmer04 on 27 Jan 2009 at 10:49

GoogleCodeExporter commented 9 years ago
no I don't think so. I see this error happen often. From my point of view as 
soon as
this Message is shown the server throws a:
503 Service Unavailable
This Error means: 
http://www.rfc-ref.org/RFC-TEXTS/3261/chapter21.html#sub5sub4

So somehow you might be right the connection is close. 

This definitely one not amusing bug.

Original comment by seba.wag...@gmail.com on 28 Jan 2009 at 9:33

GoogleCodeExporter commented 9 years ago
It is!
Because of this bug, i can't hangup a (not answerd) call. The sip server rings 
up
till the petitioned cancel the call.

Original comment by michaelpalmer04 on 28 Jan 2009 at 11:40

GoogleCodeExporter commented 9 years ago
Do you remember me? ;)
Whats about that issue?

Original comment by michaelpalmer04 on 3 Feb 2009 at 3:34

GoogleCodeExporter commented 9 years ago
No, but I don't know how to fix this issue yet.

Original comment by seba.wag...@gmail.com on 3 Feb 2009 at 3:41

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
hi
this problem is when closing the application.
it is happened when you call to sipprovider.halt(). 
if you use UDP sip session (the most common) it close the udp socket and than 
try to 
look for TCP_SOCKET. as there is no any tcp session it return NULL but the code 
not 
handle nul.
change the last lines in TcpServer.java
to be like this:
/** Gets a String representation of the Object */
   public String toString()
   { if (server_socket!=null) return "tcp:"+server_socket.getInetAddress()
+":"+server_socket.getLocalPort();
    else return null;
   }

Original comment by lior.her...@gmail.com on 7 Feb 2009 at 4:11

GoogleCodeExporter commented 9 years ago
this bug need to be fixed with the bug of handling Cancel message in mjsip.
the 503 from Asterisk is because the Cancel message from Mjsip is with wrong 
Cseq 
header.

Mjsip does not handle 503 error and close the application. 
see my comment in the issui number 21 for how fix the Cancel message problem.

Original comment by lior.her...@gmail.com on 7 Feb 2009 at 4:22