<div dir="ltr">Hi Daniel,<div><br></div><div>would it be inappropriate to increase the branch number to the maximum possible, by default?</div><div><br></div><div>Regards,</div><div>Carlos</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Sep 30, 2014 at 5:28 AM, Daniel-Constantin Mierla <span dir="ltr"><<a href="mailto:miconda@gmail.com" target="_blank">miconda@gmail.com</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">
    Hello,<div><div class="h5"><br>
    <br>
    <div>On 29/09/14 22:47, João Vitor Arruda
      wrote:<br>
    </div>
    <blockquote type="cite">
      <div dir="ltr">
        <div>Hi folks,</div>
        <div><br>
        </div>
        <div>I have a question related with the limited number of
          branches being 12 in config.h</div>
        <div><span style="white-space:pre-wrap"> </span>#define
          MAX_BRANCHES            12      /*!< maximum number of
          branches per transaction */</div>
        <div><br>
        </div>
        <div>I am trying to implement a Call Group that consists in
          trying each member of the group (that can result in a parallel
          forking when lookup() is used) in sequence (similar to serial
          forking).</div>
        <div><br>
        </div>
        <div>Currently I have written code that is similar to the one
          described here:</div>
        <div><br>
        </div>
        <div>                <a href="http://www.kamailio.org/dokuwiki/dokuphp/tutorials:avpops#serial_forking" target="_blank">http://www.kamailio.org/dokuwiki/dokuphp/tutorials:avpops#serial_forking</a></div>
        <div><br>
        </div>
        <div>The only difference is that for each member I call lookup()
          and then in the failure_route(), I pull the next member from
          the stack and call lookup() again.  The code works fine when
          used for groups with less than 12 members.  However, call
          groups with 12 or more members fails as I can never reach
          remaining extensions once MAX_BRANCHES limit is reached.</div>
        <div><br>
        </div>
        <div>I've tried another approach using the functions described
          here:</div>
        <div><br>
        </div>
        <div>                <a href="http://kamailio.org/docs/modules/4.1.x/modules/tm.html#tm.serial_forking" target="_blank">http://kamailio.org/docs/modules/4.1.x/modules/tm.html#tm.serial_forking</a></div>
        <div><br>
        </div>
        <div>but it too uses a new branch for every group member until
          the 12 limit is reached out.</div>
        <div><br>
        </div>
        <div>I also tried to use the functions "remove_branch(index)"
          and "clear_branches()" (both of which are poorly documented. 
          In fact the only reference I ever found for these functions
          was here: <a href="http://www.kamailio.org/wiki/features/new-in-3.2.x#functions" target="_blank">http://www.kamailio.org/wiki/features/new-in-3.2.x#functions</a>). 
          Unfortunately, I wasn't able to prevent the MAX_BRANCHES limit
          from being reached.</div>
        <div><br>
        </div>
        <div>Ultimately, my goal is to have a limitless Call Group.  Do
          you have any suggestions? (other than increasing the hard
          coded MAX_BRANCHES limit)</div>
      </div>
    </blockquote></div></div>
    the easiest is probably recompiling with more branches. There was
    someone saying that he is going to submit a patch on making the
    number of branches more dynamic, but I haven't seen it back.<br>
    <br>
    From routing point of view, you can try a workaround with:<br>
    - append 11 branches to the same sip address (see append_branch()
    function) and relay<br>
    - be sure you allow traffic from server itself<br>
    - now you get 12 INVITE coming back to kamailio, so you get 12
    INVITE requests and you can set 12 different destinations for each,
    ending up with 144 over-all branches in the group call<br>
    - if you need more, you can loop back again one or more of those
    INVITE requests with branches pointing to same SIP address<br>
    <br>
    Cheers,<br>
    Daniel<span class="HOEnZb"><font color="#888888"><br>
    <pre cols="72">-- 
Daniel-Constantin Mierla
<a href="http://twitter.com/#!/miconda" target="_blank">http://twitter.com/#!/miconda</a> - <a href="http://www.linkedin.com/in/miconda" target="_blank">http://www.linkedin.com/in/miconda</a></pre>
  </font></span></div>

<br>_______________________________________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr">Carlos<div><a href="http://caruizdiaz.com" target="_blank">http://caruizdiaz.com</a></div></div>
</div>