Hello,
I want to refine the instant message handling in our application. It works really fine in most cases. I use the msilo module to store offline messages if the user is not registered with sending PUSH notification. But, there is a situation when I have problems: When I send a message to a user whose phone is in airplane mode. In this case his location record exists but the communication on the socket is not possible and the client timed out the request.
Is it possible to check the socket towards the receiver user at the moment when the message arrives at Kamailio? I think if I would check that if the socket is not fine, I could send the message to the msilo directly and the client would not have wait for timeout to resend.
Thanks.
Peter
Hi,
any idea for the problem below?
Thanks.
Peter
From: sr-users [mailto:sr-users-bounces@lists.sip-router.org] On Behalf Of Péter Barabás Sent: Thursday, August 18, 2016 3:55 PM To: Kamailio (SER) - Users Mailing List sr-users@lists.sip-router.org Subject: [SR-Users] detect failed socket
Hello,
I want to refine the instant message handling in our application. It works really fine in most cases. I use the msilo module to store offline messages if the user is not registered with sending PUSH notification. But, there is a situation when I have problems: When I send a message to a user whose phone is in airplane mode. In this case his location record exists but the communication on the socket is not possible and the client timed out the request.
Is it possible to check the socket towards the receiver user at the moment when the message arrives at Kamailio? I think if I would check that if the socket is not fine, I could send the message to the msilo directly and the client would not have wait for timeout to resend.
Thanks.
Peter
Is it possible to check the socket towards the receiver user at the moment when the message arrives at Kamailio? I think if I would check that if the socket is not fine, I could send the message to the msilo directly and the client would not have wait for timeout to resend.
Hi,
one solution would be to use the handle_lost_tcp parameter from usrloc so that the record will be removed from it if the connection is closed:
http://kamailio.org/docs/modules/stable/modules/usrloc.html#usrloc.p.handle_...
Camille Oudot writes:
one solution would be to use the handle_lost_tcp parameter from usrloc so that the record will be removed from it if the connection is closed:
http://kamailio.org/docs/modules/stable/modules/usrloc.html#usrloc.p.handle_...
would it be big job to add support for this also in db-only mode?
-- juha
Thanks, but the problem, that there are situations when the socket seems not to be closed but the communication with the client cannot be possible. E.g. if the client is in airplane mode, Kamailio does not detect tcp lost, in the location table, the user exists with real connection_id, but I cannot call him or write a message.
I would be interested in if it is possible to detect such situations on Kamailio side when for example a message cannot be delivered because of such network conditions like airplane mode?
Peter
-----Original Message----- From: sr-users [mailto:sr-users-bounces@lists.sip-router.org] On Behalf Of Camille Oudot Sent: Monday, August 29, 2016 6:13 PM To: sr-users@lists.sip-router.org Subject: Re: [SR-Users] detect failed socket
Is it possible to check the socket towards the receiver user at the moment when the message arrives at Kamailio? I think if I would check that if the socket is not fine, I could send the message to the msilo directly and the client would not have wait for timeout to resend.
Hi,
one solution would be to use the handle_lost_tcp parameter from usrloc so that the record will be removed from it if the connection is closed:
http://kamailio.org/docs/modules/stable/modules/usrloc.html#usrloc.p.handle_...
-- Camille
_______________________________________________ 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
Hello,
On 01/09/16 17:57, Péter Barabás wrote:
Thanks, but the problem, that there are situations when the socket seems not to be closed but the communication with the client cannot be possible. E.g. if the client is in airplane mode, Kamailio does not detect tcp lost, in the location table, the user exists with real connection_id, but I cannot call him or write a message.
I would be interested in if it is possible to detect such situations on Kamailio side when for example a message cannot be delivered because of such network conditions like airplane mode?
You can use failure_route blocks to get a callback in the kamailio.cfg when a sip request is not forwarded successfully -- there you can take decisions like re-routining the request or close the tcp connection.
Cheers, Daniel
Peter
-----Original Message----- From: sr-users [mailto:sr-users-bounces@lists.sip-router.org] On Behalf Of Camille Oudot Sent: Monday, August 29, 2016 6:13 PM To: sr-users@lists.sip-router.org Subject: Re: [SR-Users] detect failed socket
Is it possible to check the socket towards the receiver user at the moment when the message arrives at Kamailio? I think if I would check that if the socket is not fine, I could send the message to the msilo directly and the client would not have wait for timeout to resend.
Hi,
one solution would be to use the handle_lost_tcp parameter from usrloc so that the record will be removed from it if the connection is closed:
http://kamailio.org/docs/modules/stable/modules/usrloc.html#usrloc.p.handle_...
-- Camille
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 _______________________________________________ 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
On Mon, Sep 05, 2016 at 09:19:59AM +0200, Daniel-Constantin Mierla wrote:
I would be interested in if it is possible to detect such situations on Kamailio side when for example a message cannot be delivered because of such network conditions like airplane mode?
You can use failure_route blocks to get a callback in the kamailio.cfg when a sip request is not forwarded successfully -- there you can take decisions like re-routining the request or close the tcp connection.
Just out of curiosity, but is kamailio notified (some event in the config) that a socket died when using tcp keepalives on the OS level?
Just out of curiosity, but is kamailio notified (some event in the config) that a socket died when using tcp keepalives on the OS level?
If the tcpops module is loaded, the tcp:closed event route will be called:
http://kamailio.org/docs/modules/devel/modules/tcpops.html#idp24759196
On Mon, Sep 05, 2016 at 11:30:33AM +0200, Camille Oudot wrote:
Just out of curiosity, but is kamailio notified (some event in the config) that a socket died when using tcp keepalives on the OS level?
If the tcpops module is loaded, the tcp:closed event route will be called:
http://kamailio.org/docs/modules/devel/modules/tcpops.html#idp24759196
Looks useful, thanks for the quick reply and working on this module :)
On 05/09/16 16:39, Daniel Tryba wrote:
On Mon, Sep 05, 2016 at 11:30:33AM +0200, Camille Oudot wrote:
Just out of curiosity, but is kamailio notified (some event in the config) that a socket died when using tcp keepalives on the OS level?
If the tcpops module is loaded, the tcp:closed event route will be called:
http://kamailio.org/docs/modules/devel/modules/tcpops.html#idp24759196
Looks useful, thanks for the quick reply and working on this module :)
This looks also like a bug/missing part in the docs -- the event_route blocks must be documented in a dedicated section (e.g., see dispatcher docs) ...
Cheers, Daniel