Kamailio takes care of sending in-dialog keep-alives using OPTIONS when dlg_set_attribute ka-src and ka-dst is used. It also sends OPTIONS to correct address if a client sends Re-Invite indicating a network change, which is a common case with mobile clients (switching between mobile-data and Wifi) fixed in #273 The problem is that it ends the dialog on missing even one keep-alive response. Missing a response is possible when the client is handling the network change and keep-alive is sent around that time.
Thus, having a configurable counter after which you expect to end the dialog might be helpful. For eg. you decide to end the dialog after we miss 3 responses for keep-alives in a row.
Something like dlg_set_attribute(ka-src, 3) where 3 indicates the number of responses that can be missed before ending the dialog.
--- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/438
Any chance of handling this or making this configurable in the near future. Thanks !!
--- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/438#issuecomment-202789223
Are you using TCP or UDP? Are you sure we only send ONE request? It's one transaction, but normally over UDP we retransmit a number of times before giving up - it's part of the transaction setup in SIP.
--- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/438#issuecomment-204267285
I use it over UDP and the SIP transaction setup does the job perfectly. The problem is when you use it over mobile networks and do network switching (eg. from WiFi to LTE) and at that instance when an OPTIONS message goes out; it goes out to the WiFi IP Address from where the request is bound to timeout as we have already switched or in process of switching to LTE. The kamailio will then try to close this call as no response was received. Thus, the suggestion was to have some configurable number of consecutive timeouts before sending out the BYE.
--- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/438#issuecomment-204268737
Ok, in Kamailio lingo - you want a configurable number of in-dialog transactions to fail before terminating the dialog, not just one. Just as a note, RFC-compliance says "one failed in-dialog transaction" causes dialog to fail. I think adding a config option for this - if possible - makes sense.
--- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/438#issuecomment-204269968
Yes. A configurable option to decide on how many timeouts should the dialog end, will do the trick. Thanks. It would be great if this is possible.
--- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/438#issuecomment-204324840
Can you try with master branch? I added the feature with commit e8cd0ebbcc00ef7d5fba4771e9b2c1c5ad1f9a92.
--- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/438#issuecomment-205201103
the ka_failed_limit should be a modparam in the dialog module?
--- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/438#issuecomment-205201517
Hi. Just tested and this helps and works as required. Just to be technically correct, the implementation disconnects the call when kamailio misses the keep-alive response to the number defined in the modparam in the entire call. But to better meet the use-case it should disconnect the call when the server misses the response consecutively. Meaning if I defined 3, the server should miss 3 responses consecutively to terminate the dialog and not in the entire call !! Let me know if I dont make a lot of sense here. However, the commit does help. Thanks.
--- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/438#issuecomment-205244787
Will get that, too -- was in the plan to reset if there is a response, but forgot about it.
--- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/438#issuecomment-205658878
Great. That'll be perfect.
--- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/438#issuecomment-205661512
Closed #438.