<p dir="ltr">Hi,<br>
looks like in your script, in the SENDPUSH route, you set the luaret var to 0 then you check if it's value is != 1, in which case you reply 501, Unknown Destination. Since you never change the var value you are always hitting this case.</p>
<p dir="ltr">Regards,</p>
<p dir="ltr">Federico</p>
<div class="gmail_extra"><br><div class="gmail_quote">On 24 Jul 2016 14:25, "Nahum Nir" <<a href="mailto:hello.shalom.hi@gmail.com">hello.shalom.hi@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello Fredrico,<div><br></div><div>Please see the attached cfg. I tried to add the fragments you published and to add a suspension at SENDPUSH but I am getting Desitnation Unknow.</div><div><br></div><div>Thank you so much,</div><div>Nir</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jul 21, 2016 at 10:03 PM, Federico Cabiddu <span dir="ltr"><<a href="mailto:federico.cabiddu@gmail.com" target="_blank">federico.cabiddu@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">Hi Nir,<br>
all you should do upon receiving B's REGISTER, after saving the contact (by calling save function) is either resume the transaction, perform a lookup and relay or call ts_append (if you already relayed the INVITE). If you get "unavailable" (I guess that this means that you are receiving a 404) probably the user is not being found in the location. Check if you are doing these steps in your config and if it doesn't work try to send the relevant part of the config and the kamailio's logs. I'm currently away and almost without network but I'll try to have a look as soon as possible.</p>
<p dir="ltr">Regards,</p>
<p dir="ltr">Federico</p><div><div>
<div class="gmail_extra"><br><div class="gmail_quote">On 21 Jul 2016 16:09, "Nahum Nir" <<a href="mailto:hello.shalom.hi@gmail.com" target="_blank">hello.shalom.hi@gmail.com</a>> wrote:<br type="attribution"><blockquote style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Thanks,<div><br></div><div>I was able to suspend the transaction and wait for the register but the client that sends the INVITE get unavailable right after the other side joins.</div><div>Here is my debug flow:</div><div>Client A sends the INVITES.</div><div><br></div><div>Use case 1: Client B register one time. Then I turn off the WiFi in client B so it will not recieve the push notification. Client A sends the INVITE, server sends the PUSH and Client A is waiting for 5 seconds.</div><div><br></div><div>Use case 3: Same as before but now client B get the push. This time client A that sends the INVITE gets from the server unavailable as soon as client B register.</div><div><br></div><div>I did as you suggested and suspend the trunsaction before sending the push. Probably a second suspend is needed when client B sends the REGISTER?</div><div><br></div><div>Thanks and regards,</div><div>Nir</div></div><div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jul 20, 2016 at 4:06 PM, Federico Cabiddu <span dir="ltr"><<a href="mailto:federico.cabiddu@gmail.com" target="_blank">federico.cabiddu@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">Hi,<br>
to set the timeout for a specific transaction you can use tm module function t_set_fr (<a href="http://www.kamailio.org/docs/modules/devel/modules/tm.html#tm.f.t_set_fr" target="_blank">http://www.kamailio.org/docs/modules/devel/modules/tm.html#tm.f.t_set_fr</a>).<br>
For example you could call it before suspending the transaction setting a short timeout and then call it again in the reply route when receiving the first provisional response from the client.</p>
<p dir="ltr">Regards,</p>
<p dir="ltr">Federico</p>
<div class="gmail_quote"><div><div>On 20 Jul 2016 2:50 pm, "Nahum Nir" <<a href="mailto:hello.shalom.hi@gmail.com" target="_blank">hello.shalom.hi@gmail.com</a>> wrote:<br type="attribution"></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div dir="ltr">Hello,<div><br></div><div>How can I chage the timer waiting for the client to send the register. i.e. how much time to wait for the push?</div><div><br></div><div>Thanks,</div><div>Nir</div><div><br></div></div>
<br></div></div>_______________________________________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
<br></blockquote></div>
<br>_______________________________________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
<br></blockquote></div><br></div>
</div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</blockquote></div></div>