<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>Hello,</p>
    <p>I am not sure I understand what you are looking for? A variable
      that you can use as a key per branch? Or per call? Maybe you can
      give an example how you want to use it and expected behavior, then
      we may be able to give some hints about what can be used.</p>
    <p>Cheers,<br>
      Daniel<br>
    </p>
    <div class="moz-cite-prefix">On 18.03.19 11:43, Володимир Іванець
      wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAOQgkja3J5DTZMh-f6AVX2-x4giqLOMzX1Z1As=sM-6uKHMa0g@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">
        <div dir="ltr">
          <div dir="ltr">
            <div dir="ltr">
              <div dir="ltr">I found much better description of the
                problem here <a
href="https://lists.kamailio.org/pipermail/users/2008-August/019070.html"
                  moz-do-not-send="true">https://lists.kamailio.org/pipermail/users/2008-August/019070.html</a>.</div>
              <div>Also I figured that calling <b>reg_fetch_contacts</b> and
                saving appropriate <b>$(ulc(callee=>addr)[$var(i)])</b>
                in <i>event_route[tm:branch-failure:FAILURE]</i> will
                allow to match <i>t_on_reply("REPLY")</i> by <b>$T(ruid)</b>.</div>
            </div>
          </div>
        </div>
      </div>
      <br>
      <div class="gmail_quote">
        <div dir="ltr" class="gmail_attr">пт, 15 бер. 2019 о 17:10
          Володимир Іванець <<a
            href="mailto:volodyaivanets@gmail.com"
            moz-do-not-send="true">volodyaivanets@gmail.com</a>>
          пише:<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 dir="ltr">
              <div dir="ltr">
                <div dir="ltr">
                  <div dir="ltr">
                    <div dir="ltr">
                      <div dir="ltr">
                        <div dir="ltr">
                          <div dir="ltr">
                            <div dir="ltr">
                              <div dir="ltr">
                                <div dir="ltr">Hello!
                                  <div><br>
                                  </div>
                                  <div>I have Kamailio setup
                                    with registrar configured to allow
                                    multiple registrations. <i>branch_route[MANAGE_BRANCH]</i>
                                    contains <i>t_on_reply("REPLY")</i>
                                    and <i>t_on_branch_failure("FAILURE")</i>.</div>
                                  <div><br>
                                  </div>
                                  <div><i>event_route[tm:branch-failure:FAILURE]</i> is
                                    used to do some logic, store
                                    information in htable and in the end
                                    it calls <b>t_relay</b> function.
                                    This creates new branch.</div>
                                  <div><br>
                                  </div>
                                  <div>Replies for this branch go to<i> onreply_route[REPLY]</i>.
                                    The problem is that I can not find
                                    appropriate variable that would be
                                    available in both <b>event_route tm:branch-failure</b>
                                    and <b>onreply_route</b>. I need it
                                    to get saved data from htable.
                                    $T_reply_ruid is available in first
                                    one but not in second. $T_branch_idx
                                    obviously changes so it can not be
                                    used. Some registrations do not
                                    have <b>Received</b> value so source
                                    IP address and ports can not be
                                    used. <b>Address</b> value can be
                                    compared with <b>Contact</b> header
                                    from responce tacket but it is so
                                    long that it looks like it's not
                                    optimal way to do.</div>
                                  <div><br>
                                  </div>
                                  <div>What interesting is that
                                    $T_reply_ruid is accessible in
                                    original replies for branches that
                                    have not failed.</div>
                                  <div><br>
                                  </div>
                                  <div>Does anyone know what variable
                                    can be used in this case or how to
                                    make sure that $T_reply_ruid will be
                                    set?</div>
                                  <div><br>
                                  </div>
                                  <div>Thanks a lot!</div>
                                </div>
                              </div>
                            </div>
                          </div>
                        </div>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </blockquote>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
Kamailio (SER) - Users Mailing List
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.kamailio.org">sr-users@lists.kamailio.org</a>
<a class="moz-txt-link-freetext" href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
    </blockquote>
    <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla -- <a class="moz-txt-link-abbreviated" href="http://www.asipto.com">www.asipto.com</a>
<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 World Conference - May 6-8, 2019 -- <a class="moz-txt-link-abbreviated" href="http://www.kamailioworld.com">www.kamailioworld.com</a>
Kamailio Advanced Training - Mar 25-27, 2019, in Washington, DC, USA -- <a class="moz-txt-link-abbreviated" href="http://www.asipto.com">www.asipto.com</a></pre>
  </body>
</html>