I try to send keepalive requests (options) to clients at usrloc
I tried 4 mechanisms 1) nathelper
modparam("nathelper", "sipping_method", "OPTIONS") modparam("nathelper", "natping_interval", 15) modparam("nathelper", "ping_nated_only", 0) modparam("nathelper", "sipping_bflag", 7) modparam("nathelper", "sipping_from", "sip:pinger@mydomain")
but it didn't send keepalives to noone client
2)nat_traversal I tried to trigger keepalives with nat_keepalive() when REGISTER coming to my service
It works fine with UDP packets
modparam("nat_traversal", "keepalive_interval", 15) modparam("nat_traversal", "keepalive_method", "OPTIONS") modparam("nat_traversal", "keepalive_from", "sip:pinger@mydomain") modparam("nat_traversal", "keepalive_state_file", "/var/run/keepalive_state")
3)So I also tried to do it with WebSocket keepalive mechanism, but it still not work for (off course I checked only WS devices)
modparam("websocket", "keepalive_mechanism", 15) modparam("websocket", "keepalive_timeout", 15) modparam("websocket", "keepalive_interval", 15)
4) I tried to do it with tcpops
Only for ws and tcp (WS is use TCP as i know) tcp_keepalive_enable("15", "5", "15");
same result...
So I need mechanism to check all devices for keepalive. I think nathelper works with all protos (As I read at docs)
Can somebody explain to me what I doing wrong?
On Tuesday 30 June 2015 15:49:26 Yuriy Gorlichenko wrote:
- nathelper
modparam("nathelper", "sipping_method", "OPTIONS") modparam("nathelper", "natping_interval", 15) modparam("nathelper", "ping_nated_only", 0) modparam("nathelper", "sipping_bflag", 7) modparam("nathelper", "sipping_from", "sip:pinger@mydomain")
but it didn't send keepalives to noone client
This isn't enough, you need to set the sipping_bflag on REGISTER, eg: if (!save("location")) { sl_reply_error(); } else { setbflag(7); }
Did you do this and still got not OPTIONS send to the clients?
Now did this. Still no Options
if (!save("location")){ sl_reply_error(); } else { setbflag(7); ...
2015-06-30 17:05 GMT+03:00 Daniel Tryba d.tryba@pocos.nl:
On Tuesday 30 June 2015 15:49:26 Yuriy Gorlichenko wrote:
- nathelper
modparam("nathelper", "sipping_method", "OPTIONS") modparam("nathelper", "natping_interval", 15) modparam("nathelper", "ping_nated_only", 0) modparam("nathelper", "sipping_bflag", 7) modparam("nathelper", "sipping_from", "sip:pinger@mydomain")
but it didn't send keepalives to noone client
This isn't enough, you need to set the sipping_bflag on REGISTER, eg: if (!save("location")) { sl_reply_error(); } else { setbflag(7); }
Did you do this and still got not OPTIONS send to the clients?
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Le Tue, 30 Jun 2015 15:49:26 +0300, Yuriy Gorlichenko ovoshlook@gmail.com a écrit :
- I tried to do it with tcpops
Only for ws and tcp (WS is use TCP as i know) tcp_keepalive_enable("15", "5", "15");
same result...
Hi Yuriy,
the tcp_keepalive_enable() function will send keepalive packets at TCP level, not at application level (SIP OPTIONS). It can be used to check if the remote peer connection is still valid, and close the TCP connection on the server side if it is no more valid. If you enable the TCP keepalives, you should see these packets using tcpdump or wireshark.
Along with "handle_lost_tcp" option on usrloc, this can be used to maintain the usrloc table as consistent as possible.