<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><br><div><div>On 08 Dec 2014, at 16:00, Charles Chance <<a href="mailto:charles.chance@sipcentric.com">charles.chance@sipcentric.com</a>> wrote:</div><br class="Apple-interchange-newline"><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>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>/O<br><blockquote type="cite"><div dir="ltr"><div><br></div><div>Cheers,</div><div>Charles</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 8 December 2014 at 14:46, 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 class=""><div>On 08 Dec 2014, at 15:42, 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">Hi All,<div><br></div><div>Can anyone see a problem with doing (something like) the following, to handle the situation like <a href="http://lists.sip-router.org/pipermail/sr-users/2014-October/085251.html" target="_blank">http://lists.sip-router.org/pipermail/sr-users/2014-October/085251.html</a>?</div><div><br></div><div>Admittedly, it is probably a less common use case, but it has been raised several times on the list so I believe it is a genuine one.<br></div></div></blockquote></span>Did you try Daniel's advice?</div><div><br></div><div>"See msg_apply_changes() from textopsx to get the path header visible."</div><div><br>Did that not work?</div><div><br></div><div>/O<br><br><blockquote type="cite"><div><div class="h5"><div dir="ltr"><div><br></div><div><br></div><div><div>diff --git a/modules/registrar/lookup.c b/modules/registrar/lookup.c</div><div>index 794d968..66730b4 100644</div><div>--- a/modules/registrar/lookup.c</div><div>+++ b/modules/registrar/lookup.c</div><div>@@ -41,6 +41,7 @@</div><div> #include "../../action.h"</div><div> #include "../../mod_fix.h"</div><div> #include "../../parser/parse_rr.h"</div><div>+#include "../../forward.h"</div><div> #include "../usrloc/usrloc.h"</div><div> #include "common.h"</div><div> #include "regtime.h"</div><div>@@ -121,6 +122,7 @@ int lookup_helper(struct sip_msg* _m, udomain_t* _d, str* _uri, int _mode)</div><div>        sr_xavp_t *list=NULL;</div><div>        str xname = {"ruid", 4};</div><div>        sr_xval_t xval;</div><div>+       sip_uri_t path_uri;</div><div> </div><div>        ret = -1;</div><div> </div><div>@@ -265,6 +267,14 @@ int lookup_helper(struct sip_msg* _m, udomain_t* _d, str* _uri, int _mode)</div><div>                                ret = -3;</div><div>                                goto done;</div><div>                        }</div><div>+                       if (parse_uri(path_dst.s, path_dst.len, &path_uri) < 0){</div><div>+                               LM_ERR("failed to parse the Path URI\n");</div><div>+                               ret = -3;</div><div>+                               goto done;</div><div>+                       }</div><div>+               }</div><div>+               /* Only use path-uri if non-local */</div><div>+               if (path_uri.host.s && !check_self(&(path_uri.host), 0, 0)) {</div><div>                        if (set_path_vector(_m, &ptr->path) < 0) {</div><div>                                LM_ERR("failed to set path vector\n");</div><div>                                ret = -3;</div></div><div><br></div><div><br></div><div><br></div><div>The above needs to be repeated in lookup_branches function of same file, but I wanted to check others' opinions first.<br></div><div><br></div><div>Best regards,<br></div><div><div><br></div><div>Charles</div><div><br></div>
</div></div>

<br>
</div></div><font face="Helvetica, Arial, sans-serif"><font><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>_______________________________________________<br>sr-dev mailing list<br><a href="mailto:sr-dev@lists.sip-router.org" target="_blank">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></blockquote></div><br></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><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><font face="arial, helvetica, sans-serif"><b><font>Charles Chance</font></b><br><font>Managing Director</font></font><br><div><font face="arial, helvetica, sans-serif"><br></font></div><div><font face="arial, helvetica, sans-serif">t. 0121 285 4400    m. 07932 063 891</font></div></div></div>
</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>_______________________________________________<br>sr-dev mailing list<br><a href="mailto:sr-dev@lists.sip-router.org">sr-dev@lists.sip-router.org</a><br>http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev<br></blockquote></div><br></body></html>