<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <tt>Hi Xaled,<br>
      <br>
      <tt>The first param of setb<tt>flag is the inde<tt>x of th<tt>e <tt>add<tt>ed
                  branch<tt>, starting from 1. Each append_branch() will
                    add a new branch<tt>. And there is a single set of
                      branches<tt> per transaction, so they cannot mix.</tt></tt></tt></tt></tt></tt></tt></tt></tt><br>
      <br>
      <tt><tt>Regards,</tt></tt><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 Bootcamp 2017, Huston, US
  <a class="moz-txt-link-freetext" href="http://opensips.org/training/OpenSIPS_Bootcamp_2017.html">http://opensips.org/training/OpenSIPS_Bootcamp_2017.html</a>
</pre>
    <div class="moz-cite-prefix">On 05/22/2017 06:15 PM, xaled wrote:<br>
    </div>
    <blockquote cite="mid:00c101d2d30e$4e9d9a00$ebd8ce00$@web.de"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
      <meta name="Generator" content="Microsoft Word 15 (filtered
        medium)">
      <style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;
        color:black;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";
        color:black;}
tt
        {mso-style-priority:99;
        font-family:"Courier New";}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;
        color:black;}
span.EmailStyle20
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
span.EmailStyle21
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
      <div class="WordSection1">
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">Hello
            Bogdan,<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">thanks!<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"
            lang="EN-US">Following question – are the branch indexes and
            settings shared between the route? Wont the minor branch
            setting in route[a] for branch alice  affect the bob’s
            branch setting in route[b]<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"
            lang="EN-US"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"
            lang="EN-US">modparam("tm", "minor_branch_flag", 1)<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"
            lang="EN-US"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"
            lang="EN-US">route[a] {<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"
            lang="EN-US"><o:p> </o:p></span></p>
        <p class="MsoNormal" style="text-indent:35.4pt"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"
            lang="EN-US">append_branch(<a class="moz-txt-link-rfc2396E" href="sip:alice@test.com">"sip:alice@test.com"</a>);<o:p></o:p></span></p>
        <p class="MsoNormal" style="text-indent:35.4pt"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"
            lang="EN-US">setbflag(1,1);<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"
            lang="EN-US">}<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"
            lang="EN-US"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"
            lang="EN-US">route[b] {<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"
            lang="EN-US"><o:p> </o:p></span></p>
        <p class="MsoNormal" style="text-indent:35.4pt"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"
            lang="EN-US">append_branch(<a class="moz-txt-link-rfc2396E" href="sip:bob@test.com">"sip:bob@test.com"</a>);<o:p></o:p></span></p>
        <p class="MsoNormal" style="text-indent:35.4pt"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"
            lang="EN-US">append_branch(<a class="moz-txt-link-rfc2396E" href="sip:carol@test.com">"sip:carol@test.com"</a>);<o:p></o:p></span></p>
        <p class="MsoNormal" style="text-indent:35.4pt"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"
            lang="EN-US">setbflag(2,1);<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"
            lang="EN-US">}<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"
            lang="EN-US"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"
            lang="EN-US">Thanks,<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"
            lang="EN-US">xaled<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"
            lang="EN-US"><o:p> </o:p></span></p>
        <div>
          <div style="border:none;border-top:solid #E1E1E1
            1.0pt;padding:3.0pt 0cm 0cm 0cm">
            <p class="MsoNormal"><b><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext"
                  lang="EN-US">From:</span></b><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext"
                lang="EN-US"> Bogdan-Andrei Iancu
                [<a class="moz-txt-link-freetext" href="mailto:bogdan@opensips.org">mailto:bogdan@opensips.org</a>] <br>
                <b>Sent:</b> Montag, 22. Mai 2017 16:43<br>
                <b>To:</b> OpenSIPS users mailling list
                <a class="moz-txt-link-rfc2396E" href="mailto:users@lists.opensips.org"><users@lists.opensips.org></a>; xaled
                <a class="moz-txt-link-rfc2396E" href="mailto:xaled@web.de"><xaled@web.de></a><br>
                <b>Subject:</b> Re: [OpenSIPS-Users] identify branch by
                name in minor_branch_flag<o:p></o:p></span></p>
          </div>
        </div>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal"><tt><span style="font-size:10.0pt">Hello
              Xaled,</span></tt><span
            style="font-size:10.0pt;font-family:"Courier New""><br>
            <br>
            <tt>Any branch can be a minor branch, you just have to
              properly mark it via the branch flag you configured (via
              the minor_branch_flag param - see <a
                moz-do-not-send="true"
href="http://www.opensips.org/html/docs/modules/2.3.x/tm.html#idp5618944"><a class="moz-txt-link-freetext" href="http://www.opensips.org/html/docs/modules/2.3.x/tm.html#idp5618944">http://www.opensips.org/html/docs/modules/2.3.x/tm.html#idp5618944</a></a>
              )</tt><br>
            <br>
            <tt>You can set the corresponding branch flag via setbflag(
              <a moz-do-not-send="true"
                href="http://www.opensips.org/Documentation/Script-CoreFunctions-2-3">www.opensips.org/Documentation/Script-CoreFunctions-2-3</a>
              ) and check it via isbflagset(<a moz-do-not-send="true"
href="http://www.opensips.org/Documentation/Script-CoreFunctions-2-2#toc22">http://www.opensips.org/Documentation/Script-CoreFunctions-2-2#toc22</a>)</tt><br>
            <br>
            <tt>Regards,</tt><br>
            <br>
          </span><o:p></o:p></p>
        <pre>Bogdan-Andrei Iancu<o:p></o:p></pre>
        <pre>  OpenSIPS Founder and Developer<o:p></o:p></pre>
        <pre>  <a moz-do-not-send="true" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a><o:p></o:p></pre>
        <pre><o:p> </o:p></pre>
        <pre>OpenSIPS Summit May 2017 Amsterdam<o:p></o:p></pre>
        <pre>  <a moz-do-not-send="true" href="http://www.opensips.org/events/Summit-2017Amsterdam.html">http://www.opensips.org/events/Summit-2017Amsterdam.html</a><o:p></o:p></pre>
        <div>
          <p class="MsoNormal">On 05/20/2017 03:32 AM, xaled wrote:<o:p></o:p></p>
        </div>
        <blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
          <div>
            <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">Hi,</span><o:p></o:p></p>
            <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"> </span><o:p></o:p></p>
            <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"
                lang="EN-US">did I get it right that it is only possible
                to identify minor branches by index?</span><o:p></o:p></p>
            <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"
                lang="EN-US"> </span><o:p></o:p></p>
            <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"
                lang="EN-US">Using index I cannot have first branch to
                be minor in some scenarios and not minor in other.  </span><o:p></o:p></p>
            <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"
                lang="EN-US">It would be good to be able to identify
                multiple minor branches by names. Ether URI, or
                additional specific name parameter could be used for it.</span><o:p></o:p></p>
            <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"
                lang="EN-US"> </span><o:p></o:p></p>
            <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"
                lang="EN-US">Instead of:</span><o:p></o:p></p>
            <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"
                lang="EN-US">modparam("tm", "minor_branch_flag", 1)</span><o:p></o:p></p>
            <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"
                lang="EN-US"> </span><o:p></o:p></p>
            <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"
                lang="EN-US">something like:</span><o:p></o:p></p>
            <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"
                lang="EN-US">modparam("tm", "minor_branch_flag", “<a
                  moz-do-not-send="true"
                  href="sip:alice@test.com%E2%80%9D"><a class="moz-txt-link-freetext" href="sip:alice@test.com”">sip:alice@test.com”</a></a>)</span><o:p></o:p></p>
            <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"
                lang="EN-US"> </span><o:p></o:p></p>
            <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"
                lang="EN-US">route[1]{</span><o:p></o:p></p>
            <p class="MsoNormal" style="text-indent:35.4pt"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"
                lang="EN-US">append_branch(<a moz-do-not-send="true"
                  href="sip:alice@test.com">"sip:alice@test.com"</a>);</span><o:p></o:p></p>
            <p class="MsoNormal" style="text-indent:35.4pt"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"
                lang="EN-US">append_branch(<a moz-do-not-send="true"
                  href="sip:bob@test.com">"sip:bob@test.com"</a>);</span><o:p></o:p></p>
            <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"
                lang="EN-US">}</span><o:p></o:p></p>
            <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"
                lang="EN-US"> </span><o:p></o:p></p>
            <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"
                lang="EN-US">route[2]{</span><o:p></o:p></p>
            <p class="MsoNormal" style="text-indent:35.4pt"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"
                lang="EN-US">append_branch(<a moz-do-not-send="true"
                  href="sip:bob@test.com">"sip:bob@test.com"</a>);</span><o:p></o:p></p>
            <p class="MsoNormal" style="text-indent:35.4pt"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"
                lang="EN-US">append_branch(<a moz-do-not-send="true"
                  href="sip:alice@test.com">"sip:alice@test.com"</a>);</span><o:p></o:p></p>
            <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"
                lang="EN-US">}</span><o:p></o:p></p>
            <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"
                lang="EN-US"> </span><o:p></o:p></p>
            <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"
                lang="EN-US">$T_branch_idx could be extended to
                $T_branch_name.</span><o:p></o:p></p>
            <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"
                lang="EN-US"> </span><o:p></o:p></p>
            <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"
                lang="EN-US">Thanks,</span><o:p></o:p></p>
            <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"
                lang="EN-US">xaled</span><o:p></o:p></p>
            <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"
                lang="EN-US"> </span><o:p></o:p></p>
          </div>
          <p class="MsoNormal"><br>
            <br>
            <br>
            <o:p></o:p></p>
          <pre>_______________________________________________<o:p></o:p></pre>
          <pre>Users mailing list<o:p></o:p></pre>
          <pre><a moz-do-not-send="true" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><o:p></o:p></pre>
          <pre><a moz-do-not-send="true" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><o:p></o:p></pre>
        </blockquote>
        <p class="MsoNormal"><o:p> </o:p></p>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>