<p>Hello,</p>
<p>I'm testing kamailio with a SIP client with presence support, when I get a connection drop from a client (i.e when the client lost the access to the Internet connection) I do not receive the change in the status to offline immediately, I just received when the timeout from the presentity database finishes.</p>
<p>I know that I'm able to change the expiry parameter from the presentity table, but that increases my battery consumption and the data exchange, the same happens if I reduce the publish interval on the client side.</p>
<p>The connection with the server are connected with the TLS or TCP.</p>
<p><a href="https://github.com/miconda" class="user-mention">@miconda</a> Suggested that a solution could be:</p>
<p>"For TCP/TLS, what can work, it's to use tcpops module which can execute an event route when a tcp/tls connection is dropped. If you track the association of connection id with the call-id of the presence publish, then you may be able to do some tricks and lower the expires of the published presence state. I haven't had the time to see what's possible there, but could worth investing.</p>
<p>An alternative would be to enhance presence module to behave as registrar/usrloc (which can delete contact records on connection drop) to expire documents when tcp/tls connection is closed (not sure if anyone already added it)."</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/kamailio/kamailio/issues/915">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AF36ZakHErBHUsTMwMPZTCFi7H68MP1Kks5rPWxPgaJpZM4LcMVy">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AF36ZV0l7nKoi8jKixUzIPxclh972Qw2ks5rPWxPgaJpZM4LcMVy.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/kamailio/kamailio/issues/915"></link>
  <meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>

<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/kamailio/kamailio","title":"kamailio/kamailio","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/kamailio/kamailio"}},"updates":{"snippets":[{"icon":"DESCRIPTION","message":"Presentity tabla, faster update when drop TCP/TLS connection (#915)"}],"action":{"name":"View Issue","url":"https://github.com/kamailio/kamailio/issues/915"}}}</script>