RestComm / jain-sip

Disclaimer: This repository is a git-svn mirror of the project found at http://java.net/projects/jsip whose original repository is developed collaboratively by the Advanced Networking Technologies Division at the National Institute of Standards and Technology (NIST) - an agency of the United States Department of Commerce and by a community of individual and enterprise contributors. TeleStax, Inc. will perform some productization work, new features experimentation branches, etc for its TelScale jSIP product that doesn't concern the community from the main repository hence this git repository.
http://www.restcomm.com/
141 stars 151 forks source link

JAIN SIP doesn't timeout in edge case #109

Open atsakiridis opened 8 years ago

atsakiridis commented 8 years ago

I see this weird behaviour when I try to use port 5060 with TLS enabled (which is wrong of course), but I would expect the REGISTER transaction to time out so that I get a chance to do something about it like showing an error, etc. If I do the opposite, use port 5061 with non-TLS, everything is ok and I get the time out as expected.

Here is the jain log for the bad scenario. And here for the good scenario.

Btw @jaimecasero if this is indeed a bug, I could help with the implementation if you could point me in the right direction to broaden my horizons ;)

jaimecasero commented 8 years ago

well, have you wait long enough to check any timeout exception?

The traces show the SSL handshake was started, and probably an IO operation is blocked waiting some condition. It woould be worth checking the connection timeout configuration. Could you check if this property is set "gov.nist.javax.sip.SSL_HANDSHAKE_TIMEOUT"?, by default is "-1", which means it wil wait forever. Set it to the max number of milliseconds to want to wait for the handshake to complete...