<div dir="ltr">
<div>Hi 
Federico,</div><div><br></div><div>Indeed I had a messed up config at that point. I cleaned it up, but still had the same problem.</div><div><br></div><div>Full log in attachment.</div><div><br></div><div>Here is some part of it:</div><div><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><font size="1">45(51) DEBUG: {1 21 REGISTER 6z~FzexPro} tsilo [ts_append.c:72]: ts_append(): transaction 16864:783220347 found for <a href="mailto:sip%3A1443452187102-0af7c6035717-0001@voipstaging.myappapp.net" target="_blank">sip:1443452187102-0af7c6035717-0001@voipstaging.myappapp.net</a>, going to append branches<br>45(51) DEBUG: {1 21 REGISTER 6z~FzexPro} tm [t_lookup.c:1612]: t_lookup_ident_filter(): transaction found<br>45(51) DEBUG: {1 21 REGISTER 6z~FzexPro} registrar [lookup.c:306]: lookup_helper(): contact for [1443452187102-0af7c6035717-0001] found by address<br>45(51)
 DEBUG: {1 21 REGISTER 6z~FzexPro} tm [t_append_branches.c:77]: 
t_append_branches(): transaction 16864:783220347 in status 180<br>45(51) DEBUG: {1 21 REGISTER 6z~FzexPro} tm [t_append_branches.c:99]: t_append_branches(): Call <a href="mailto:3ed4a6c3051ea46b50487a0d1b5b25ec@10.10.0.0" target="_blank">3ed4a6c3051ea46b50487a0d1b5b25ec@10.10.0.0</a>: 1 (0) outgoing branches<br>45(51) DEBUG: {1 21 REGISTER 6z~FzexPro} tm [t_append_branches.c:163]: t_append_branches(): Call <a href="mailto:3ed4a6c3051ea46b50487a0d1b5b25ec@10.10.0.0" target="_blank">3ed4a6c3051ea46b50487a0d1b5b25ec@10.10.0.0</a>: 1 (0) outgoing branches after clear_branches()<br>45(51) ERROR: {1 21 REGISTER 6z~FzexPro} tm [t_append_branches.c:172]: <b>t_append_branches(): failure to add branches (-1)</b><br>45(51) INFO: {1 21 REGISTER 6z~FzexPro} <script>: tsilo appending branch <a href="mailto:sip%3A1443452187102-0af7c6035717-0001@voipstaging.myappapp.net" target="_blank">sip:1443452187102-0af7c6035717-0001@voipstaging.myappapp.net</a></font></div></blockquote><div><br></div><div>Here Kamailio snippets of config:</div><div>...........................................................<br></div><div style="margin-left:40px"><font size="1">route[CONTINUE] {<br>        if (!is_method("REGISTER"))<br>                return;<br>        $var(pjoin) = 0;<br>        lock("$tU");<br>        $var(pjoin) = $sht(pmap=>join::$tU);<br>        $var(pstored) = $sht(pmap=>stored::$tU);<br>        xlog("L_INFO", "===== Stored 1 not stored 0 $var(pstored) [$sht(pmap=>stored::$tU)] \n");<br>        $sht(pmap=>join::$tU) = $null;<br>        unlock("$tU");<br>        if($var(pjoin)==0) {<br>                if ($var(pstored)) {<br>                        if($expires(min)>0) {<br>                                ts_append("location", "sip:$<a href="mailto:tU@voipstaging.onoffapp.net" target="_blank">tU@voipstaging.onoffapp.net</a>");<br>                                xlog("L_INFO","tsilo appending branch $tu \n");<br>                        }<br>                }<br>                return;<br>        }<br>        $var(id_index) = $(var(pjoin){s.select,0,:}{<a href="http://s.int" target="_blank">s.int</a>});<br>        $var(id_label) = $(var(pjoin){s.select,1,:}{<a href="http://s.int" target="_blank">s.int</a>});<br>        xlog("L_INFO", "===== resuming suspended trasaction [$var(id_index):$var(id_label)] $tU ($var(pjoin)) \n");<br>        t_continue("$var(id_index)", "$var(id_label)", "LOCATION");<br>}</font><br></div><div><font size="1">
</font><div>...........................................................<br></div>

</div><div><font size="1">        if (is_method("INVITE")) {<br>                ts_store();<br>                $sht(pmap=>stored::$rU) = 1;<br>                xlog("L_ERR" ,"stored transaction [$T(id_index):$T(id_label)] $fU => $rU\n");<br>        }<br></font></div><div>
<div>...........................................................<font color="#888888"><br></font></div><div><font color="#888888"><br></font></div></div>

<div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Jurijs<br></div></div></div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Oct 28, 2020 at 9:09 AM Federico Cabiddu <<a href="mailto:federico.cabiddu@gmail.com">federico.cabiddu@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 Jurijs,<div>I had a look at the logs and there is something strange: I see the ts_append logs before the registrar module ones (the save function). </div><div>Are you sure you are calling ts_append after calling save()?</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 Tue, Oct 27, 2020 at 10:26 AM Jurijs Ivolga <<a href="mailto:jurijs.ivolga@gmail.com" target="_blank">jurijs.ivolga@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>Hi Daniel-Constantin,</div><div><br></div><div>Debug log is intachment. Do you see any hints?</div><div><br></div><div>I think this is relative part:</div><div><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>2020-10-27T08:24:36.198Z,"79(85) DEBUG: {1 21 REGISTER G~qt15Oz7~} tsilo [ts_append.c:72]: ts_append(): transaction 21280:984985415 found for <a href="mailto:sip%3A1443452187102-0af7c6035717-0001@voipstaging.myapp.net" target="_blank">sip:1443452187102-0af7c6035717-0001@voipstaging.myapp.net</a>, going to append branches"<br>2020-10-27T08:24:36.198Z,79(85) DEBUG: {1 21 REGISTER G~qt15Oz7~} registrar [lookup.c:306]: lookup_helper(): contact for [1443452187102-0af7c6035717-0001] found by address<br>2020-10-27T08:24:36.198Z,79(85) DEBUG: {1 21 REGISTER G~qt15Oz7~} tm [t_lookup.c:1612]: t_lookup_ident_filter(): transaction found<br>2020-10-27T08:24:36.199Z,79(85) DEBUG: {1 21 REGISTER G~qt15Oz7~} tm [t_append_branches.c:77]: t_append_branches(): transaction 21280:984985415 in status 180<br>2020-10-27T08:24:36.199Z,79(85) DEBUG: {1 21 REGISTER G~qt15Oz7~} tm [t_append_branches.c:99]: t_append_branches(): Call <a href="mailto:88cc06a544ba41a8aee5035c437baabf@0.0.0.0" target="_blank">88cc06a544ba41a8aee5035c437baabf@0.0.0.0</a>: 1 (0) outgoing branches<br>2020-10-27T08:24:36.205Z,79(85) DEBUG: {1 21 REGISTER G~qt15Oz7~} tm [t_append_branches.c:163]: t_append_branches(): Call <a href="mailto:88cc06a544ba41a8aee5035c437baabf@0.0.0.0" target="_blank">88cc06a544ba41a8aee5035c437baabf@0.0.0.0</a>: 1 (0) outgoing branches after clear_branches()<br>2020-10-27T08:24:36.206Z,"79(85) DEBUG: {1 21 REGISTER G~qt15Oz7~} tsilo [ts_append.c:72]: ts_append(): transaction 38832:1600293484 found for <a href="mailto:sip%3A1443452187102-0af7c6035717-0001@voipstaging.myapp.net" target="_blank">sip:1443452187102-0af7c6035717-0001@voipstaging.myapp.net</a>, going to append branches"<br>2020-10-27T08:24:36.206Z,79(85) ERROR: {1 21 REGISTER G~qt15Oz7~} tm [t_append_branches.c:172]:<b> t_append_branches(): failure to add branches (-1)</b><br>2020-10-27T08:24:36.207Z,79(85) DEBUG: {1 21 REGISTER G~qt15Oz7~} registrar [lookup.c:306]: lookup_helper(): contact for [1443452187102-0af7c6035717-0001] found by address<br>2020-10-27T08:24:36.207Z,79(85) DEBUG: {1 21 REGISTER G~qt15Oz7~} tm [t_append_branches.c:77]: t_append_branches(): transaction 38832:1600293484 in status 180<br>2020-10-27T08:24:36.207Z,79(85) DEBUG: {1 21 REGISTER G~qt15Oz7~} tm [t_lookup.c:1612]: t_lookup_ident_filter(): transaction found<br>2020-10-27T08:24:36.208Z,79(85) ERROR: {1 21 REGISTER G~qt15Oz7~} tm [t_append_branches.c:172]: t_append_branches(): failure to add branches (-1)<br>2020-10-27T08:24:36.208Z,79(85) DEBUG: {1 21 REGISTER G~qt15Oz7~} tm [t_append_branches.c:99]: t_append_branches(): Call aac9c351-92d0-1239-0599-024233fefdc7: 2 (0) outgoing branches<br>2020-10-27T08:24:36.208Z,79(85) DEBUG: {1 21 REGISTER G~qt15Oz7~} tm [t_append_branches.c:163]: t_append_branches(): Call aac9c351-92d0-1239-0599-024233fefdc7: 2 (0) outgoing branches after clear_branches()<br>2020-10-27T08:24:36.209Z,79(85) INFO: {1 21 REGISTER G~qt15Oz7~} <script>: tsilo appending branch <a href="mailto:sip%3A1443452187102-0af7c6035717-0001@voipstaging.myapp.net" target="_blank">sip:1443452187102-0af7c6035717-0001@voipstaging.myapp.net</a><br>2020-10-27T08:24:36.217Z,79(85) DEBUG: {1 21 REGISTER G~qt15Oz7~} <core> [core/strutils.c:215]: unescape_user(): unescaped string is <sip:192.168.173.107:55982;transport=tls><br>2020-10-27T08:24:36.218Z,79(85) DEBUG: {1 21 REGISTER G~qt15Oz7~} registrar [path.c:116]: build_path_vector(): path is <<sip:<a href="http://ingress1dev.myapp.net" target="_blank">ingress1dev.myapp.net</a>;lr;received=sip:192.168.173.107:55982%3Btransport%3Dtls>><br>2020-10-27T08:24:36.218Z,79(85) DEBUG: {1 21 REGISTER G~qt15Oz7~} registrar [path.c:108]: build_path_vector(): received is <sip:192.168.173.107:55982;transport=tls><br>2020-10-27T08:24:36.218Z,79(85) DEBUG: {1 21 REGISTER G~qt15Oz7~} registrar [save.c:314]: pack_ci(): set instance[<urn:uuid:2a56856a-fae5-00f6-8f3b-2d9283f533be>]<br>2020-10-27T08:24:36.219Z,79(85) DEBUG: {1 21 REGISTER G~qt15Oz7~} <core> [sruid.c:182]: sruid_next(): new sruid is [uloc-5f97d8f4-55-1] (1 / 18)<br>2020-10-27T08:24:36.219Z,79(85) DEBUG: {1 21 REGISTER G~qt15Oz7~} registrar [save.c:410]: pack_ci(): generated ruid is: uloc-5f97d8f4-55-1<br>2020-10-27T08:24:36.220Z,79(85) DEBUG: {1 21 REGISTER G~qt15Oz7~} registrar [save.c:410]: pack_ci(): generated ruid is: uloc-5f97d8f4-55-2<br>2020-10-27T08:24:36.220Z,79(85) DEBUG: {1 21 REGISTER G~qt15Oz7~} <core> [sruid.c:182]: sruid_next(): new sruid is [uloc-5f97d8f4-55-2] (2 / 18)<br>2020-10-27T08:24:36.220Z,"79(85) DEBUG: {1 21 REGISTER G~qt15Oz7~} registrar [reply.c:377]: build_contact(): created Contact HF: Contact: <sip:1443452187102-0af7c6035717-0001@192.168.173.107:55982;transport=tls>;q=1;expires=120;received=""sip:192.168.173.107:55982;transport=tls"";+sip.instance=""<urn:uuid:2a56856a-fae5-00f6-8f3b-2d9283f533be>"""<br>2020-10-27T08:24:36.227Z,79(85) DEBUG: {1 21 REGISTER G~qt15Oz7~} cfgutils [cfgutils.c:724]: cfg_lock_helper(): cfg_lock mode 0 on 54 (1443452187102-0af7c6035717-0001)<br>2020-10-27T08:24:36.228Z,79(85) DEBUG: {1 21 REGISTER G~qt15Oz7~} htable [ht_var.c:89]: pv_set_ht_cell(): set value for $sht(pmap=>join::1443452187102-0af7c6035717-0001)<br>2020-10-27T08:24:36.228Z,79(85) DEBUG: {1 21 REGISTER G~qt15Oz7~} cfgutils [cfgutils.c:724]: cfg_lock_helper(): cfg_lock mode 1 on 54 (1443452187102-0af7c6035717-0001)<br>2020-10-27T08:24:36.228Z,79(85) DEBUG: {1 21 REGISTER G~qt15Oz7~} <core> [core/receive.c:437]: receive_msg(): request-route executed in: 2293 usec</div></blockquote><div><div><br></div><div><div><div dir="ltr"><div dir="ltr">Jurijs<br></div></div></div><br></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Oct 27, 2020 at 10:20 AM Daniel-Constantin Mierla <<a href="mailto:miconda@gmail.com" target="_blank">miconda@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>
    <p>Hello,</p>
    <p>if you get it always, then run with debug=3 and send all the
      debug messages here, there should be more hints about why a branch
      is not added.</p>
    <p>Cheers,<br>
      Daniel<br>
    </p>
    <div>On 27.10.20 08:40, Jurijs Ivolga wrote:<br>
    </div>
    <blockquote type="cite">
      
      <div dir="ltr">
        <div>Hi,</div>
        <div><br>
        </div>
        <div>I have several Kamailio proxies - loadbalancer which is
          used as TLS offload and Authorization server and behind
          registrar servers.</div>
        <div><br>
        </div>
        <div>In this case I can't make tsilo work on the registrar
          server.<br>
        </div>
        <div><br>
        </div>
        <div>I'm always getting: "tm [t_append_branches.c:172]:
          t_append_branches(): failure to add branches (-1)"</div>
        <div><br>
        </div>
        <div>If I use just one Kamailio which is used as Authorization
          and Registrar server then tsilo works as expected.</div>
        <div><br>
        </div>
        <div>Looks like kamailio where I run ts_append tries to connect
          to UAC directly and not through Loadbalancer.<br>
        </div>
        <div><br>
        </div>
        <div>Any ideas? How can I troubleshoot this?<br>
        </div>
        <div><br>
        </div>
        <div>Thank you!<br>
        </div>
        <div><br>
        </div>
        <div>
          <div dir="ltr">
            <div dir="ltr">Jurijs<br>
            </div>
          </div>
        </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 cols="72">-- 
Daniel-Constantin Mierla -- <a href="http://www.asipto.com" target="_blank">www.asipto.com</a>
<a href="http://www.twitter.com/miconda" target="_blank">www.twitter.com/miconda</a> -- <a href="http://www.linkedin.com/in/miconda" target="_blank">www.linkedin.com/in/miconda</a>
Funding: <a href="https://www.paypal.me/dcmierla" target="_blank">https://www.paypal.me/dcmierla</a></pre>
  </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>
_______________________________________________<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>