El 09/04/14 16:17, Daniel-Constantin Mierla escribió:
The crash was not related to websocket at all, but to usage of uac_reg_lookup() when you don't set reg_db_url parameter for uac module.
So, my question is why are you using uac_reg_lookup()? Because it is useless if you dont set reg_db_url and you don't have records in uacreg database table. This function is related to the feature of kamailio to send register to another sip server with a contact address pointing back to kamailio.
To summarize on another words, the crash happened because the kamailio.cfg didn't have set the expected uac module parameters by uac_reg_lookup() function.
I was using uac_reg_lookup() without reg_db_url because it appeared to be performing the same job as a pair of uac_restore_from() and uac_restore_to(). I have made corresponding fixes in my configuration file.
However, the previously mentioned issue of abrupt disconnection persists. I get this in the logfiles:
Apr 9 17:22:23 elx3 /usr/sbin/kamailio[8573]: WARNING: websocket [ws_frame.c:868]: ws_keepalive(): forcibly closing connection
At the same time, I get the following sequence of javascript messages in the Firefox browser:
JsSIP | TRANSPORT | WebSocket disconnected (code: 1006) jssip-0.3.0.js (línea 610) JsSIP | TRANSPORT | WebSocket abrupt disconnection jssip-0.3.0.js (línea 613) JsSIP | UA | connection state set to 1 jssip-0.3.0.js (línea 5236) JsSIP | TRANSACTION | transport error occurred, deleting non-INVITE client transaction z9hG4bK3602966 jssip-0.3.0.js (línea 1839) JsSIP | EVENT EMITTER | emitting event registrationFailed jssip-0.3.0.js (línea 187)
SIP registration error: Connection Error
uf.js (línea 569)
The code in uf.js retries the connection, but eventually it times out again.