<p dir="ltr">Hi Daniel,</p>
<p dir="ltr">You are right, it is not trivial to perform via config.</p>
<p dir="ltr">The patch was made quickly to illustrate a point, but I have reworked it now to include a parameter for enabling the check, as well as accounting for more than one Path header.</p>
<p dir="ltr">If you think it is worthwhile, I will post the full patch for review tomorrow.</p>
<p dir="ltr">Best regards,</p>
<p dir="ltr">Charles<br>
</p>
<div class="gmail_quote">On 8 Dec 2014 16:28, "Daniel-Constantin Mierla" <<a href="mailto:miconda@gmail.com">miconda@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    <br>
    <div>On 08/12/14 16:40, Charles Chance
      wrote:<br>
    </div>
    <blockquote type="cite">
      <div dir="ltr"><br>
        <div class="gmail_extra"><br>
          <div class="gmail_quote">On 8 December 2014 at 15:09, Olle E.
            Johansson <span dir="ltr"><<a href="mailto:oej@edvina.net" target="_blank">oej@edvina.net</a>></span>
            wrote:<br>
            <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
              <div style="word-wrap:break-word"><br>
                <div><span>
                    <div>On 08 Dec 2014, at 16:00, Charles Chance <<a href="mailto:charles.chance@sipcentric.com" target="_blank">charles.chance@sipcentric.com</a>>
                      wrote:</div>
                    <br>
                    <blockquote type="cite">
                      <div dir="ltr">
                        <div>Hi Olle,</div>
                        <div><br>
                        </div>
                        msg_apply_changes() is for getting the Path
                        saved the first place if adding/saving on the
                        same instance.
                        <div><br>
                        </div>
                        <div>My patch is for later on, to avoid looping
                          if lookup is performed on the same instance
                          that received the register.</div>
                        <div><br>
                        </div>
                        <div>Scenario is 2 x registrar/location servers,
                          both sharing common DB - no separate edge
                          proxies, but each adds itself as Path before
                          saving (which is where msg_apply_changes()
                          comes in).</div>
                      </div>
                    </blockquote>
                  </span>Can't you sort that out in the routing script?
                  I don't see why we need to add this in the code... </div>
                <div><br>
                </div>
                <div>If the topmost, leftmost routing header in the
                  outbound INVITE points to me, remove it and move on.</div>
                <div>You have the branch route for that kind of
                  manipulation.</div>
                <div><br>
                </div>
                <div>What am I missing?</div>
              </div>
            </blockquote>
          </div>
        </div>
      </div>
    </blockquote>
    <br>
    If I got it right upon quick read, this case is not trivial to
    handle via config file -- i.e., it is about saving registration with
    local address as a Path, the registration can be read by same proxy
    or another one (the other will have to send the register to this
    instance, this one will need to ignore the path).<br>
    <br>
    After lookup("location"), the first Path appears as outbound proxy
    address ($du / dst_uri), but it is also added in the lumps to be a
    Route header for outgoing INVITE. If there are more than on Path
    header, things can get quite complex to handle from config and might
    be easier to simplify by adding a module parameter to enable/disable
    the proposed patch.<br>
    <br>
    Cheers,<br>
    Daniel<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>
  </div>

<br>_______________________________________________<br>
sr-dev mailing list<br>
<a href="mailto:sr-dev@lists.sip-router.org">sr-dev@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev</a><br>
<br></blockquote></div>

<br>
<font face="Helvetica, Arial, sans-serif"><font size="2"><span style="font-size:10pt"><a href="http://www.sipcentric.com/" title="blocked::http://www.sipcentric.com/" target="_blank">www.sipcentric.com</a><br>
            <br>
            Follow us on twitter <a href="http://twitter.com/sipcentric" title="blocked::http://twitter.com/sipcentric" target="_blank">@sipcentric</a><br>
            <br>
            <font color="gray">Sipcentric Ltd.
                Company registered in England & Wales no. 7365592.</font> <font color="gray">Registered
                office: Faraday Wharf, Innovation Birmingham Campus, Holt Street, Birmingham Science Park, Birmingham B7 4BB.</font></span></font></font>