<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p>Hello,</p>
<p>have you stored the transaction for the second account?</p>
<p>Cheers,<br>
Daniel<br>
</p>
<br>
<div class="moz-cite-prefix">On 20/01/2017 11:05, Tomas Zanet wrote:<br>
</div>
<blockquote
cite="mid:CA44A4830985A140A30A1E55D8CDFEEFD29EA9B9@CG004SERVER.camegroup.local"
type="cite">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from rtf -->
<style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
<font face="Calibri" size="2"><span style="font-size:11pt;">
<div>Hello, </div>
<div>I’m using Kamailio 4.4.4 with TSILO module in order to
support Push Notifications used by our voip app on Apple
ios10.</div>
<div>So far, everything works fine: Kamailio can get an
incoming call, suspend it, then send push notification with
an external script, receive a new app registration and then
call it after resuming the invite.</div>
<div>To do so, thanks to Mr, Cabiddu, I used all the functions
described here</div>
<div><a moz-do-not-send="true"
href="http://www.kamailio.org/events/2015-KamailioWorld/Day2/20-Federico.Cabiddu-Kamailio-In-A-Mobile-World.pdf">http://www.kamailio.org/events/2015-KamailioWorld/Day2/20-Federico.Cabiddu-Kamailio-In-A-Mobile-World.pdf</a></div>
<div> </div>
<div> </div>
<div>Right now, I would like to support serial forking calls
using push notification because it was already supported
with legacy voip.</div>
<div>To do so, I used failure_route function where, after
getting the call destinations and setting them into an avp,
I set the new SIP request uri $ru.</div>
<div>Here is my failure_route:</div>
<div>failure_route[MANAGE_FAILURE] </div>
<div> route(NATMANAGE);</div>
<div> if (t_is_canceled()) </div>
<div> exit;</div>
<div> </div>
<div> </div>
<div>#!ifdef WITH_BLOCK3XX</div>
<div> # block call redirect based on 3xx replies.</div>
<div> if (t_check_status("3[0-9][0-9]")) </div>
<div> t_reply("404","Not found");</div>
<div> exit;</div>
<div> </div>
<div>#!endif</div>
<div> </div>
<div> if (is_avp_set("$avp(group_members_db)")) </div>
<div> $ru
="sip:"+$avp(group_members_db)+"@"+$fd;</div>
<div> $avp(group_members_db) = $null;</div>
<div> route(LOCATION);</div>
<div> exit;</div>
<div> </div>
<div> </div>
<div> </div>
<div>I am troubleshooting this scenario and this is what I
see:</div>
<div>1) Kamailio receives incoming call</div>
<div>2) Suspend it</div>
<div>3) Send Push notification to account1</div>
<div>4) Kamailio receives account1 registration ->
INVRESUME route is now called</div>
<div>5) Then call account1</div>
<div>6) Nobody answers the call</div>
<div>7) failure_route[MANAGE_FAILURE] is now called -> set
$ru with next sipaccount: account2</div>
<div>8) suspend invite</div>
<div>9) send push notification to account2</div>
<div>10) account2 sends its sip registration -> INVRESUME
route is now called</div>
<div>11) Kamailio calls account1 instead of account2 ->
this is my issue</div>
<div> </div>
<div>On step 10: despite account2 is registered, I checked it
using “kamctl ul show”, the second call is forwarded
all'account1 and not to account2.</div>
<div>I also checked the TSILO logs and everything seems ok.
Here is the logs:</div>
<div>First call:</div>
<div> suspended transaction [53945:1648394094] asterisk
=> account1</div>
<div> htable key value [53945:1648394094]</div>
<div> resuming trasaction [53945:1648394094] account1
53945:1648394094)</div>
<div>second call:</div>
<div> suspended transaction [53945:1648394094] asterisk
=> account2</div>
<div> htable key value [53945:1648394094]</div>
<div> resuming trasaction [53945:1648394094] account2
53945:1648394094)</div>
<div> </div>
<div>In order to find out the issue I put some xlogs, printing
$ru value: what I see is the $ru value is set correctly on
failure_route but as soon as the t_continue is called, the
ru overwritten back to account1</div>
<div> </div>
<div>Can anyone address me to find out the solution? </div>
<div>Thanks in advance</div>
<div> </div>
<div>T.</div>
<div> </div>
<div> </div>
<div style="margin-top:6.7pt;margin-bottom:6.7pt;"><font
face="Times New Roman" size="3"><span
style="font-size:12pt;"><br>
<font face="arial" size="2"><span
style="font-size:10pt;"><b>Tomas Zanet<br>
</b></span></font><font face="arial" size="2"><span
style="font-size:10pt;">Software Design Department<br>
<a class="moz-txt-link-abbreviated" href="mailto:tzanet@came.com">tzanet@came.com</a><br>
</span></font></span></font></div>
<div style="margin-top:6.7pt;margin-bottom:6.7pt;"><font
face="Times New Roman" size="3"><span
style="font-size:12pt;"> </span></font></div>
<div> </div>
</span></font>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a>
<a class="moz-txt-link-freetext" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Daniel-Constantin Mierla
<a class="moz-txt-link-abbreviated" href="http://www.twitter.com/miconda">www.twitter.com/miconda</a> -- <a class="moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda">www.linkedin.com/in/miconda</a>
Kamailio Advanced Training - Mar 6-8 (Europe) and Mar 20-22 (USA) - <a class="moz-txt-link-abbreviated" href="http://www.asipto.com">www.asipto.com</a>
Kamailio World Conference - May 8-10, 2017 - <a class="moz-txt-link-abbreviated" href="http://www.kamailioworld.com">www.kamailioworld.com</a></pre>
</body>
</html>