<div dir="ltr">Hi,<div>it's hard to track the actual state of the client in mobile scenarios. You can achieve a better precision if you use tcp (tls) and Kamailio's tcpops functionalities to track socket status and trigger deletion of the usrloc entry, but even this is not 100% reliable. The simplest solution, imho, is to relay the INVITE to the contacts you have in your usrloc table AND send the push notification request as well. As you said, if the client is already registered the push won't trigger a new registration but the client will receive the INVITE on the "straight" path. On the other hand ,if it is not the push will trigger a REGISTER and the first branch you sent out will either be cancelled if the new branch triggered by registration is answered, either it will timeout as in a normal scenario.</div><div>Hope this helps.</div><div><br></div><div>Cheers,</div><div><br></div><div>Federico</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Apr 17, 2020 at 8:46 AM Hubert Odziemczyk <<a href="mailto:hubert.odziemczyk@cern.ch">hubert.odziemczyk@cern.ch</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">




<div>
<div style="direction:ltr;font-family:Tahoma;color:rgb(0,0,0);font-size:10pt">
<div><font size="3">Hello!</font></div>
<div><font size="3"><br>
</font></div>
<div><font size="3">We are trying to setup a call-flow with TSILO and Push Notifications for solution with a mobile SIP client (Linphone), based on presentation by </font><span style="font-size:medium">Federico Cabiddu</span><span style="font-size:medium"> (</span><span style="font-size:medium"><a href="http://www.kamailio.org/events/2015-KamailioWorld/Day2/20-" target="_blank">http://www.kamailio.org/events/2015-KamailioWorld/Day2/20-</a></span><span style="font-size:medium">Federico.Cabiddu-Kamailio-In-A-Mobile-World.pdf).</span></div>
<div><span style="font-size:medium"><br>
</span></div>
<div><span style="font-size:medium">We have an issue with "managing" state of the client (active or not) when there is a call coming. </span><span style="font-size:medium">To be more specific, lookup in location table doesn't always give a proper answer,
 as contact expiration is different from actual lifetime of the app (which also differs between iOS and Android).</span></div>
<div><font size="3">One of proposed solutions is setting Expires=1 for REGISTER and then always rely on Push Notifications, but this scenario seems to be unreliable with some clients that are in foreground, as Push Notification doesn't trigger REGISTER again.</font></div>
<div><font size="3"><br>
</font></div>
<div><font size="3">Question is: did you perceive similar problems? What are your solutions to deal with them?</font></div>
<div><font size="3"><br>
</font></div>
<div><font size="3">Thank you in advance!</font></div>
<div><font size="3"><br>
</font></div>
<div><font size="3">Best regards,</font></div>
<div><font size="3">Hubert</font></div>
</div>
</div>

_______________________________________________<br>
Kamailio (SER) - Users Mailing List<br>
<a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a><br>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</blockquote></div>