<html><body><div style="font-family: arial, helvetica, sans-serif; font-size: 12pt; color: #000000"><div>You are facing the problem the wrong way.</div><div><br data-mce-bogus="1"></div><div>For working with softphones, that must be "wake up", your logic must be like this:</div><div><br data-mce-bogus="1"></div><div>...</div><div>if request goes to a push_client:</div><div>  hold_request()</div><div>  send_push_notification()</div><div>endif</div><div>...</div><div><br data-mce-bogus="1"></div><div>if request(REGISTER) and client is marked as push_client:</div><div>  if holded_requests():</div><div>     unhold_request():</div><div>  endif</div><div>endif</div><div>...</div><div><br data-mce-bogus="1"></div><div>All the workflow with push_clients, does nothing to do with SST or any other timer</div><div><br data-mce-bogus="1"></div><hr id="zwchr" data-marker="__DIVIDER__"><div data-marker="__HEADERS__"><b>From: </b>"Anuran Barman" <anuranbarman@gmail.com><br><b>To: </b>"Patrick Wakano" <pwakano@gmail.com><br><b>Cc: </b>"Kamailio (SER) - Users Mailing List" <sr-users@lists.kamailio.org><br><b>Sent: </b>Wednesday, December 18, 2019 6:30:16 AM<br><b>Subject: </b>Re: [SR-Users] How to reduce re-INVITE time in Kamailio<br></div><div><br></div><div data-marker="__QUOTED_TEXT__"><div dir="ltr">@<span style="color:rgb(32,33,36);font-size:0.875rem;font-weight:bold;letter-spacing:0.2px;font-family:Roboto,RobotoDraft,Helvetica,Arial,sans-serif;white-space:nowrap">Henning Westerholt</span><div><font color="#202124" face="Roboto, RobotoDraft, Helvetica, Arial, sans-serif"><span style="font-size:14px;letter-spacing:0.2px;white-space:nowrap">So I loaded the sst.so module and setup the params it said to set like below:</span></font></div><div><i><br></i></div><div><i>modparam("dialog", "timeout_avp", "$avp(i:10)")<br># Set the sst modules timeout_avp to be the same value<br>modparam("sst", "timeout_avp", "$avp(i:10)")<br>modparam("sst", "min_se", 10)</i><font color="#202124" face="Roboto, RobotoDraft, Helvetica, Arial, sans-serif"><span style="font-size:14px;letter-spacing:0.2px;white-space:nowrap"><br></span></font></div><div><i><br></i></div><div>and also set the flag in INVITE method in <b>request_route</b> {}</div><br><div><i>        # account only INVITEs<br>        if (is_method("INVITE")) {<br>                setflag(FLT_ACC); # do accounting<br>                setflag(5);<br>        }</i><br></div><br><div>and also set the  <b>t_set_retr</b> in <b>route</b>{}</div><br><div><i style=""><font style="background-color:rgb(255,255,255)" color="#000000">route {<br>        dlg_manage();<br>        t_set_retr(10, 0);<br>        if (is_method("BYE")) {<br>                $var(elapsed) = ( $Ts - $dlg(start_ts) );<br>                xlog ("L_INFO", "Completed $dlg(from_uri) to $dlg(to_uri) -<br>                $var(elapsed) duration");<br>        }<br>}</font></i><br></div><br><div>but still I am getting the INVITE after  57-59 seconds later. How do I do this?</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Dec 18, 2019 at 9:40 AM Anuran Barman <<a href="mailto:anuranbarman@gmail.com" target="_blank">anuranbarman@gmail.com</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 dir="auto">Thank you all for the detailed information. Let me try both changing the transmission time and also suspending the invite transaction. That NAT port close did not hit my mind. Thanks for putting light on that. </div></div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, 18 Dec 2019 at 9:35 AM, Patrick Wakano <<a href="mailto:pwakano@gmail.com" target="_blank">pwakano@gmail.com</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 dir="ltr"><div>As I understood Anuran is after the SIP retransmission timer.</div><div>From the description, I think the first INVITE, which I assume triggers the pushkit voip to IOS stuff, is missed, then (with default timer T1) after 500ms the first retransmission is done, then after another 500ms you get the 2nd, then after 1s the 3rd, after 2s the 4th, after 4s the 5th, after 8s the 6th and finally after 16s the 7th. This is probably why if you wait 10/15s it works, because probably the 5th or 6th retransmission hits your client. If you wait just 5s you can fall under one window without retransmission (if you miss the 5th you have to wait 8s for the next retransmission).</div><div>You can change the timer T1 in the TM module and hope the retransmissions do the job for you. It might work but doesn't look safe to me. I have no idea how this pushkit voip event works, but you may have problems of NAT ports being closed due to lack of SIP activity, then the INVITE will never reach your destination anyway.</div><div>The way to go seems what David has suggested about suspending the Invite transaction while your client start-up and register, but I don't know details about this....</div><br><div>Cheers,</div><div>Patrick Wakano</div><br><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, 18 Dec 2019 at 07:34, Henning Westerholt <<a href="mailto:hw@skalatan.de" target="_blank">hw@skalatan.de</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>
<p>As mentioned, it is more a User agent related topic. But there is a module that provide related functions in Kamailio:</p>
<p><a href="https://kamailio.org/docs/modules/stable/modules/sst.html" target="_blank">https://kamailio.org/docs/modules/stable/modules/sst.html</a></p>
<p>Cheers,</p>
<p>Henning<br>
</p>
<p><br>
</p>
<div>Am 17.12.19 um 19:51 schrieb Anuran Barman:<br>
</div>
<blockquote>
<div>
<div dir="auto">Thanks for the reply. Sharing doc links of Session timer settings related to Kamailio specifically will be greatly appreciated.</div>
</div>
<div><br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Wed, 18 Dec 2019 at 12:18 AM, Yuriy Gorlichenko <<a href="mailto:ovoshlook@gmail.com" target="_blank">ovoshlook@gmail.com</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 dir="auto">Session-Expires header ( Just remembered right name) will help you
<div dir="auto">See rfc 4028</div>
<div dir="auto"><a href="https://tools.ietf.org/html/rfc4028#page-6" target="_blank">https://tools.ietf.org/html/rfc4028#page-6</a><br>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Tue, 17 Dec 2019, 19:44 Yuriy Gorlichenko, <<a href="mailto:ovoshlook@gmail.com" rel="noreferrer" target="_blank">ovoshlook@gmail.com</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 dir="auto">Hi. It is no a kamailio question but sip question itself. You can manage how often te invite will be by using session-timers. It will help you to setup time range between reInvite ir whatever message you will use as keepalive</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Tue, 17 Dec 2019, 19:34 Anuran Barman, <<a href="mailto:anuranbarman@gmail.com" rel="noreferrer noreferrer" target="_blank">anuranbarman@gmail.com</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 dir="ltr">Hi, I am using Kamailio for my SIP Phone app. My main SIP client is the iOS app. Till now everything is working fine regarding the calling. But the problem is when the app is killed I am not able to pick up incoming call. The thing is, when app
 is killed I am sending PushKit VOIP message to my ios app to wake it up. App is waking up. But by the time app is waking up, the original INVITE message got missed up. So according to SIP protocol it will re-INVITE after some time. Currently if I keep my app
 open for 10-15 secs after it wakes up, I am able to get the re-INVITE and everything works fine just as it was supposed to. But waiting 10-15 sec on the app is not practical in any sense.
<div><br>
</div>
<div>So my question is there any way I can reduce the re-INVITE time to like 5/6 seconds so that as soon as the app open it will wait for 5/6 seconds (practical upto some extent) and it will get the call ? Or what kamailio is using as the interval time is a
 SIP standard and can not be changed? If possible to do so, how can I do that? Please help.</div>
</div>
_______________________________________________<br>
Kamailio (SER) - Users Mailing List<br>
<a href="mailto:sr-users@lists.kamailio.org" rel="noreferrer noreferrer noreferrer" target="_blank">sr-users@lists.kamailio.org</a><br>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer noreferrer noreferrer noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</blockquote>
</div>
</blockquote>
</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>
</div>
<br>
<fieldset></fieldset>
<pre>_______________________________________________
Kamailio (SER) - Users Mailing List
<a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
</blockquote>
<pre>-- 
Kamailio Merchandising - <a href="https://skalatan.de/merchandising/" target="_blank">https://skalatan.de/merchandising/</a>
Kamailio services - <a href="https://skalatan.de/services" target="_blank">https://skalatan.de/services</a>
Henning Westerholt - <a href="https://skalatan.de/blog/" target="_blank">https://skalatan.de/blog/</a></pre>
</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>
</blockquote></div></div>
</blockquote></div>
<br>_______________________________________________<br>Kamailio (SER) - Users Mailing List<br>sr-users@lists.kamailio.org<br>https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users<br></div></div></body></html>