JIGASI SIP registration retry

jigasi

#1

We notice that sometimes Jigasi 1.0- 210 loses SIP registration to our SIP server (Freeswitch). The only way to force re-registration is to restart JIGASI server. Is there any way to refresh SIP registration from Jigasi?


#2

It should re-register itself. Do you have logs from such situation?


#3

Hi Damencho

we use jigasi 1.0-210

seems it try to register to server for 30 seconds, then stops trying.

This is log from jigasi :

2018-11-09 17:37:44.981 INFO: [23] impl.protocol.sip.SipLogger.logInfo().196 Info from the JAIN-SIP stack: value -1000 will be used for reliableConnectionKeepAliveTimeout stack property
2018-11-09 17:37:44.981 INFO: [23] impl.protocol.sip.SipLogger.logInfo().196 Info from the JAIN-SIP stack: Setting Stack Thread priority to 10
2018-11-09 17:37:44.997 WARNING: [23] impl.protocol.sip.SipLogger.logWarning().185 Warning from the JAIN-SIP stackusing default tls security policy
2018-11-09 17:37:45.008 WARNING: [23] impl.protocol.sip.SipLogger.logWarning().185 Warning from the JAIN-SIP stackUsing default keystore type jks
2018-11-09 17:37:45.008 WARNING: [23] impl.protocol.sip.SipLogger.logWarning().185 Warning from the JAIN-SIP stackTLS server settings will be inactive - TLS key store will use JVM defaults keyStoreType=jks javax.net.ssl.keyStore=null javax.net.ssl.keyStorePassword=null
2018-11-09 17:37:45.008 INFO: [23] impl.protocol.sip.SipLogger.logInfo().196 Info from the JAIN-SIP stack: javax.net.ssl.trustStorePassword is null, using the password passed through javax.net.ssl.keyStorePassword
2018-11-09 17:37:45.008 WARNING: [23] impl.protocol.sip.SipLogger.logWarning().185 Warning from the JAIN-SIP stackUsing default truststore type jks
2018-11-09 17:37:45.008 WARNING: [23] impl.protocol.sip.SipLogger.logWarning().185 Warning from the JAIN-SIP stackTLS trust settings will be inactive - TLS trust store will use JVM defaults. trustStoreType=jks javax.net.ssl.trustStore=null javax.net.ssl.trustStorePassword=null
2018-11-09 17:37:45.084 INFO: [23] impl.protocol.sip.SipLogger.logInfo().196 Info from the JAIN-SIP stack: the sip stack timer gov.nist.javax.sip.stack.timers.DefaultSipTimer has been started
2018-11-09 17:37:46.378 INFO: [43] org.jitsi.jigasi.SipGateway.registrationStateChanged().105 REG STATE CHANGE ProtocolProviderServiceSipImpl(videoconference@XXXXXXXXXXXXXX (SIP)) -> RegistrationStateChangeEvent[ oldState=Unregistered; newState=RegistrationState=Registering; reasonCode=-1; reason=null]
2018-11-09 17:38:18.457 INFO: [39] org.jitsi.jigasi.SipGateway.registrationStateChanged().105 REG STATE CHANGE ProtocolProviderServiceSipImpl(videoconference@XXXXXXXXXXXXXX (SIP)) -> RegistrationStateChangeEvent[ oldState=Registering; newState=RegistrationState=Connection Failed; reasonCode=-1; reason=A timeout occurred while trying to connect to the server.]
2018-11-09 17:38:18.460 INFO: [39] impl.protocol.sip.SipLogger.logInfo().196 Info from the JAIN-SIP stack: the sip stack timer gov.nist.javax.sip.stack.timers.DefaultSipTimer has been stopped
2018-11-09 17:38:19.461 INFO: [39] impl.protocol.sip.SipLogger.logInfo().196 Info from the JAIN-SIP stack: the sip stack timer gov.nist.javax.sip.stack.timers.DefaultSipTimer has been stopped

This is the tcpdump taken from the sip server, with sip profile blocked:

17:37:45.861430 IP JIGASI_IP.5060 > SIP_IP.5060: SIP: REGISTER sip:SIP_FQDN SIP/2.0
17:37:45.861561 IP SIP_IP > JIGASI_IP: ICMP SIP_IP udp port 5060 unreachable, length 556
17:37:46.363092 IP JIGASI_IP.5060 > SIP_IP.5060: SIP: REGISTER sip:SIP_FQDN SIP/2.0
17:37:46.363143 IP SIP_IP > JIGASI_IP: ICMP SIP_IP udp port 5060 unreachable, length 556
17:37:47.362951 IP JIGASI_IP.5060 > SIP_IP.5060: SIP: REGISTER sip:SIP_FQDN SIP/2.0
17:37:47.363069 IP SIP_IP > JIGASI_IP: ICMP SIP_IP udp port 5060 unreachable, length 556
17:37:49.363279 IP JIGASI_IP.5060 > SIP_IP.5060: SIP: REGISTER sip:SIP_FQDN SIP/2.0
17:37:49.363336 IP SIP_IP > JIGASI_IP: ICMP SIP_IP udp port 5060 unreachable, length 556
17:37:53.364060 IP JIGASI_IP.5060 > SIP_IP.5060: SIP: REGISTER sip:SIP_FQDN SIP/2.0
17:37:53.364127 IP SIP_IP > JIGASI_IP: ICMP SIP_IP udp port 5060 unreachable, length 556
17:37:57.365035 IP JIGASI_IP.5060 > SIP_IP.5060: SIP: REGISTER sip:SIP_FQDN SIP/2.0
17:37:57.365384 IP SIP_IP > JIGASI_IP: ICMP SIP_IP udp port 5060 unreachable, length 556
17:38:01.366206 IP JIGASI_IP.5060 > SIP_IP.5060: SIP: REGISTER sip:SIP_FQDN SIP/2.0
17:38:01.366271 IP SIP_IP > JIGASI_IP: ICMP SIP_IP udp port 5060 unreachable, length 556
17:38:05.367090 IP JIGASI_IP.5060 > SIP_IP.5060: SIP: REGISTER sip:SIP_FQDN SIP/2.0
17:38:05.367151 IP SIP_IP > JIGASI_IP: ICMP SIP_IP udp port 5060 unreachable, length 556
17:38:09.368459 IP JIGASI_IP.5060 > SIP_IP.5060: SIP: REGISTER sip:SIP_FQDN SIP/2.0
17:38:09.368561 IP SIP_IP > JIGASI_IP: ICMP SIP_IP udp port 5060 unreachable, length 556
17:38:13.369141 IP JIGASI_IP.5060 > SIP_IP.5060: SIP: REGISTER sip:SIP_FQDN SIP/2.0
17:38:13.369284 IP SIP_IP > JIGASI_IP: ICMP SIP_IP udp port 5060 unreachable, length 556
17:38:17.369278 IP JIGASI_IP.5060 > SIP_IP.5060: SIP: REGISTER sip:SIP_FQDN SIP/2.0
17:38:17.369342 IP SIP_IP > JIGASI_IP: ICMP SIP_IP udp port 5060 unreachable, length 556

If can help to have our jigasi configuration file, don’t hesitate to ask

Thank you for support


#4

I don’t see a problem here. It tries to connect, it cannot connect and it gives up. Apparently, udp port 5060 on SIP_IP is not reachable.


#5

The problem is that it doesn’t retry any more.

Could i configure a periodical retry timer when jigasi is unregistered? In example do one REGISETR REQ retry every 60 seconds?


#6

Well this is how it is suppose to work. Once there is a successful connection at least once, and network goes down it will retry with increasing timeout.
But the problem is that you cannot do initial successful registration, so if address or port is wrong, or padsword is wrong initial reg will fail and no other will succeed.
So fix the port or ip address for the sip server, so it can succeed at least once and it will reconnect.
There is also keepalive setring which by default is options messages, but it can be configured to be register. Normally re-register timeout is configured from server. The response of sip register message cobtains the time for the client to do the next registration.


#7

Hi, thank you fro the workaround, but i’ts important to save the following cases:

  1. If Jigasi fails to register for any reason (wrong SIP password, SIP server not responding at the moment,…) Jigasi will try to register after a TIMER1.

  2. The REGISTER message has an Expiry Time. The standard SIP client behaviour is to try to renew the registration when half the expiry time has passed.

This is the way most SIP phones /clients behaves. It’s very important for interop purposes and availability reasons that Jigasi follow those best practices, with correct SIP messages.

Do you agree?
Please refer to RFC or to major SIP phone producers (CISCO, YEALINK, POLYCOM) implementation.

Thank you.


#8

My question for you: was that protocol provider registered successfully at least once?

It is implemented to work as you describe. Here is the code, feel free to propose a change: