Thanks Alex,
What you said is correct: I want to shorten the timeout for non-response to the OPTIONS keepalives in order to end calls with dead peers much more faster. Right now, no matter how often those keep-alives are sent, since the timeout is about 30s, I have to wait 30s when a peer does not respond. In the meantime, dialog module, if ka_timer is less than 30s, keeps sending more keepalives. So I thought that maybe we could set the ka_timer parameter to represent the fr timer for the OPTIONS, and the ka_interval to represent the interval between successfully responded keep-alives. So the final result would be:
User sets ka_timer to e.g. 5 secs and ka_interval to e.g 3 secs. then dialog module sends OPTIONS with timeout of 5 secs and waits for the fake 408 or 481 or a succesful 200 response, whichever hits first. If timer hits first we expire the dialog. If 200 response comes first, we send another OPTIONS again after 3 secs and so on. This way we can adjust it however we want, and no keep-alive is sent before the previous is expired or is successful.
The only way I can see this happening is the final response timer for those OPTIONS. So I am trying to find out how to do it, because from script I cant, since I have no control over the sending or creation of those keep alives because dialog module doesnt expose any parameter to adjust it. You are right it should be through a parameter, but I am new to kamailio internals and just beginning messing with the source code and for now I am just looking to succeed in reducing the timer.
Any advice on how to proceed?