<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <tt>Hi Tito,<br>
      <br>
      The resume route has no context of the transaction, nor message
      -> so the bflags are not available. Still, the event carries
      all the information about the new branch to be injected, so you
      can reach to the flags via the $avp(bflags) variables - this will
      keep the bitmask with all the bflags. Unfortunately it will be
      more or less useless as you do not know the index of the "DST_WS"
      flag :(...<br>
      <br>
      Nevertheless, the consistent approach on the matter will be to
      have the all the needed bflags already saved in the user location.<br>
      <br>
      Regards,<br>
    </tt>
    <pre class="moz-signature" cols="72">Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  <a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a>
OpenSIPS Summit 2018
  <a class="moz-txt-link-freetext" href="http://www.opensips.org/events/Summit-2018Amsterdam">http://www.opensips.org/events/Summit-2018Amsterdam</a>
</pre>
    <div class="moz-cite-prefix">On 05/02/2018 01:08 AM, Tito Cumpen
      wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CANZPVB6XA9OWODRfYNzhQri=Tt=JeFKBxN_xdbpKmLa-4zgYgQ@mail.gmail.com">
      <div dir="ltr">Any idea why the branch flags wouldn't be passed on
        to the branch route?
        <div><br>
        </div>
        <div>Thanks,</div>
        <div>Tito</div>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On Thu, Apr 19, 2018 at 2:02 PM, Tito
          Cumpen <span dir="ltr"><<a href="mailto:tito@xsvoce.com"
              target="_blank" moz-do-not-send="true">tito@xsvoce.com</a>></span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div dir="ltr">
              <div>Bogdan,</div>
              <div><br>
              </div>
              <div><br>
              </div>
              Once I declared the branch route it looks like it is going
              through the branch route logic.  The issue I have is
              parsing the exported $avp(uri) for transport=ws and then
              setting a branch flag that is kept from the event route
              <div><br>
              </div>
              <div>
                <div>route[fork_call]  {</div>
                <div>    xlog("user $avp(aor) registered the a new
                  contact $avp(uri), "</div>
                <div>        "injecting it in transaction \n");</div>
                <div>        </div>
                <div>        $var(uri) = $avp(uri);</div>
                <div>   #if transport is ws then ;</div>
                <div><span style="white-space:pre-wrap">  </span>   <span style="white-space:pre-wrap">                           </span>setbflag(DST_WS);
                  #this branch flag is not kept nor considered when
                  branch route is executed</div>
                <div><br>
                </div>
                <div>    t_inject_branches("event");</div>
                <div>    <span style="white-space:pre-wrap">    </span></div>
                <div>}</div>
              </div>
              <div><br>
              </div>
              <div>Thanks,</div>
              <div>Tito</div>
            </div>
            <div class="HOEnZb">
              <div class="h5">
                <div class="gmail_extra"><br>
                  <div class="gmail_quote">On Thu, Apr 19, 2018 at 3:23
                    AM, Bogdan-Andrei Iancu <span dir="ltr"><<a
                        href="mailto:bogdan@opensips.org"
                        target="_blank" moz-do-not-send="true">bogdan@opensips.org</a>></span>
                    wrote:<br>
                    <blockquote class="gmail_quote" style="margin:0 0 0
                      .8ex;border-left:1px #ccc solid;padding-left:1ex">
                      <div bgcolor="#FFFFFF" text="#000000"> <tt>Tito,<br>
                          <br>
                          Arming the branch route once, in the request
                          route, before the initial t_relay() should be
                          fine. Now, if you use any xlog() to check , is
                          the branch route triggered for the injected
                          branch ?<br>
                          <br>
                          Regards,<br>
                        </tt><span>
                          <pre class="m_-8719203841151150527m_5361345059415073310moz-signature" cols="72">Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  <a class="m_-8719203841151150527m_5361345059415073310moz-txt-link-freetext" href="http://www.opensips-solutions.com" target="_blank" moz-do-not-send="true">http://www.opensips-solutions.<wbr>com</a>
OpenSIPS Summit 2018
  <a class="m_-8719203841151150527m_5361345059415073310moz-txt-link-freetext" href="http://www.opensips.org/events/Summit-2018Amsterdam" target="_blank" moz-do-not-send="true">http://www.opensips.org/events<wbr>/Summit-2018Amsterdam</a>
</pre>
                        </span>
                        <div>
                          <div class="m_-8719203841151150527h5">
                            <div
                              class="m_-8719203841151150527m_5361345059415073310moz-cite-prefix">On
                              04/18/2018 08:35 PM, Tito Cumpen wrote:<br>
                            </div>
                            <blockquote type="cite">
                              <div dir="ltr">Bogdan,
                                <div><br>
                                </div>
                                <div>The branch route is defined in my
                                  my relay route. <a
                                    href="https://pastebin.com/MFcLxcDv"
                                    target="_blank"
                                    moz-do-not-send="true">https://pastebin.com/MF<wbr>cLxcDv</a>
                                  Should it be defined in the event
                                  route I figured since the original
                                  transaction used the relay route it
                                  would use the route defined there ?</div>
                                <div><br>
                                </div>
                                <div>Thanks,<br>
                                  Tito</div>
                                <div><br>
                                </div>
                                <div><br>
                                </div>
                                <div><br>
                                </div>
                                <div><br>
                                </div>
                              </div>
                              <div class="gmail_extra"><br>
                                <div class="gmail_quote">On Wed, Apr 18,
                                  2018 at 9:32 AM, Bogdan-Andrei Iancu <span
                                    dir="ltr"><<a
                                      href="mailto:bogdan@opensips.org"
                                      target="_blank"
                                      moz-do-not-send="true">bogdan@opensips.org</a>></span>
                                  wrote:<br>
                                  <blockquote class="gmail_quote"
                                    style="margin:0 0 0
                                    .8ex;border-left:1px #ccc
                                    solid;padding-left:1ex">
                                    <div bgcolor="#FFFFFF"
                                      text="#000000"> <tt>Hi Tito,<br>
                                        <br>
                                        I see no branch route in your
                                        script sample.<br>
                                        <br>
                                        Regards,<br>
                                      </tt>
                                      <pre class="m_-8719203841151150527m_5361345059415073310m_-6353185575792044713moz-signature" cols="72">Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  <a class="m_-8719203841151150527m_5361345059415073310m_-6353185575792044713moz-txt-link-freetext" href="http://www.opensips-solutions.com" target="_blank" moz-do-not-send="true">http://www.opensips-solutions.<wbr>com</a>
OpenSIPS Summit 2018
  <a class="m_-8719203841151150527m_5361345059415073310m_-6353185575792044713moz-txt-link-freetext" href="http://www.opensips.org/events/Summit-2018Amsterdam" target="_blank" moz-do-not-send="true">http://www.opensips.org/events<wbr>/Summit-2018Amsterdam</a>
</pre>
                                      <div>
                                        <div
                                          class="m_-8719203841151150527m_5361345059415073310h5">
                                          <div
class="m_-8719203841151150527m_5361345059415073310m_-6353185575792044713moz-cite-prefix">On
                                            04/16/2018 09:37 PM, Tito
                                            Cumpen wrote:<br>
                                          </div>
                                        </div>
                                      </div>
                                      <blockquote type="cite">
                                        <div>
                                          <div
                                            class="m_-8719203841151150527m_5361345059415073310h5">
                                            <div dir="ltr">Group,
                                              <div><br>
                                              </div>
                                              <div>I am having issues
                                                when injecting a new
                                                branch with rtpengine
                                                flags to a call request
                                                using the event routing
                                                module. It seems like
                                                when the branch is
                                                injected it either does
                                                not use any of the flags
                                                to aid with rtpengine
                                                media translation or
                                                does not run through the
                                                branch route block
                                                defined in my relay
                                                route at all.</div>
                                              <div><br>
                                              </div>
                                              <div><a
                                                  href="https://pastebin.com/u1EYzDe0"
                                                  target="_blank"
                                                  moz-do-not-send="true">https://pastebin.com/u1EYzDe0</a><br>
                                              </div>
                                              <div><br>
                                              </div>
                                              <div>above is the route
                                                that prepares injection
                                                and transport priorities
                                                along with the route
                                                that gets called upon a
                                                new registration. </div>
                                              <div><br>
                                              </div>
                                              <div>Thanks,<br>
                                                Tito</div>
                                            </div>
                                            <br>
                                            <fieldset
class="m_-8719203841151150527m_5361345059415073310m_-6353185575792044713mimeAttachmentHeader"></fieldset>
                                            <br>
                                          </div>
                                        </div>
                                        <pre>______________________________<wbr>_________________
Users mailing list
<a class="m_-8719203841151150527m_5361345059415073310m_-6353185575792044713moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org" target="_blank" moz-do-not-send="true">Users@lists.opensips.org</a>
<a class="m_-8719203841151150527m_5361345059415073310m_-6353185575792044713moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank" moz-do-not-send="true">http://lists.opensips.org/cgi-<wbr>bin/mailman/listinfo/users</a>
</pre>
                                      </blockquote>
                                      <br>
                                    </div>
                                  </blockquote>
                                </div>
                                <br>
                              </div>
                            </blockquote>
                            <br>
                          </div>
                        </div>
                      </div>
                    </blockquote>
                  </div>
                  <br>
                </div>
              </div>
            </div>
          </blockquote>
        </div>
        <br>
      </div>
    </blockquote>
    <br>
  </body>
</html>