<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <p><tt>From what I understand, your OpenSIPS ends up routing those
        mid-dialog requests to itself!  This is definitely bogus, unless
        there is some spiraling logic involved, which I doubt to be the
        case.  Can you upload text file or pcap with a network capture
        of your call attempt, so we can figure out what's broken over
        there?</tt><br>
    </p>
    <pre class="moz-signature" cols="72">Liviu Chircu
OpenSIPS Developer
<a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a></pre>
    <div class="moz-cite-prefix">On 24.04.2019 18:48, Mark Farmer wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAOvQDevzrJwivvncv-Ev+iWEs++TgxGP7PTJFDzJ2W7_r+mJiQ@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">
        <div dir="ltr">Hi, thanks for the reply.
          <div><br>
          </div>
          <div>I added the xlog which told me that it was trying to find
            permissions for itself - this is an mhomed server. That
            seems a bit odd to me but I added the permissions and the
            403 responses stopped. - Is this the correct thing to do?</div>
          <div><br>
          </div>
          <div>The issue I have now is that the RE-INVITES are not
            making it across the OpenSIPS server to the next hop which
            is an Asterisk server (via a different NIC). I think the
            issue is that Asterisk does not add a Record-Route header on
            the initial INVITE and so loose_route() doesn't know where
            to relay the message.</div>
          <div><br>
          </div>
          <div>This is my rr module config:</div>
          <div>
            <div>loadmodule "rr.so"</div>
            <div>modparam("rr", "append_fromtag", 1)</div>
            <div>modparam("rr", "enable_double_rr", 1)</div>
          </div>
          <div><br>
          </div>
          <div>Any ideas on how to get my RE_INVITES working please?</div>
          <div><br>
          </div>
          <div>Many thanks</div>
          <div>Mark.</div>
          <div><br>
          </div>
        </div>
      </div>
      <br>
      <div class="gmail_quote">
        <div dir="ltr" class="gmail_attr">On Tue, 23 Apr 2019 at 12:43,
          Liviu Chircu <<a href="mailto:liviu@opensips.org"
            moz-do-not-send="true">liviu@opensips.org</a>> wrote:<br>
        </div>
        <blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
          <div bgcolor="#FFFFFF">
            <p><tt>Hi, Mark!</tt></p>
            <p><tt>The best way to proceed is to add an xlog("checking
                $si:$sp\n") before check_source_address(), then some
                useful xlog() messages on each if branch, so we can
                confirm the theory that this is an OpenSIPS issue, and
                not a problem specific to your setup.</tt><br>
            </p>
            <pre class="gmail-m_4404457969367545211moz-signature" cols="72">Liviu Chircu
OpenSIPS Developer
<a class="gmail-m_4404457969367545211moz-txt-link-freetext" href="http://www.opensips-solutions.com" target="_blank" moz-do-not-send="true">http://www.opensips-solutions.com</a></pre>
            <div class="gmail-m_4404457969367545211moz-cite-prefix">On
              23.04.2019 14:18, Mark Farmer wrote:<br>
            </div>
            <blockquote type="cite">
              <div dir="ltr">Should've added I'm running OpenSIPS 2.4.4
                <div><br>
                </div>
                <div>Mark.</div>
                <div><br>
                </div>
              </div>
              <br>
              <div class="gmail_quote">
                <div dir="ltr" class="gmail_attr">On Tue, 23 Apr 2019 at
                  12:10, Mark Farmer <<a
                    href="mailto:farmorg@gmail.com" target="_blank"
                    moz-do-not-send="true">farmorg@gmail.com</a>>
                  wrote:<br>
                </div>
                <blockquote class="gmail_quote" style="margin:0px 0px
                  0px
0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
                  <div dir="ltr">
                    <div dir="ltr">Hi everyone,</div>
                    <div dir="ltr"><br>
                    </div>
                    <div>I'm seeing some odd behaviour in tha initial
                      requests are allowed but RE-INVITES are resulting
                      in 403. From my logging I can see the INVITE
                      coming in so I think it must be matching. Why
                      would it not obey and route the request?</div>
                    <div dir="ltr"><br>
                    </div>
                    <div dir="ltr">This is the bit of my request route
                      that identifies the source:
                      <div><br>
                      </div>
                      <div>
                        <div>if
                          (check_source_address("1","$avp(trunk_attrs)"))
                          {</div>
                        <div>                # request comes from trunks</div>
                        <div>                xlog ("MF - $rm FROM
                          $avp(trunk_attrs)");</div>
                        <div>                setflag(IS_TRUNK);</div>
                        <div>        } else {</div>
                        <div>               
                          send_reply("403","Forbidden");</div>
                        <div>                exit;</div>
                        <div>        }</div>
                        <div><br>
                        </div>
                        <div>Many thanks</div>
                        <div>Mark.</div>
                        <div><br>
                        </div>
                        -- <br>
                        <div dir="ltr"
class="gmail-m_4404457969367545211gmail-m_3258886063992212097gmail_signature">Mark
                          Farmer<br>
                          <a href="mailto:farmorg@gmail.com"
                            target="_blank" moz-do-not-send="true">farmorg@gmail.com</a></div>
                      </div>
                    </div>
                  </div>
                </blockquote>
              </div>
              <br clear="all">
              <div><br>
              </div>
              -- <br>
              <div dir="ltr"
                class="gmail-m_4404457969367545211gmail_signature">Mark
                Farmer<br>
                <a href="mailto:farmorg@gmail.com" target="_blank"
                  moz-do-not-send="true">farmorg@gmail.com</a></div>
              <br>
              <fieldset
                class="gmail-m_4404457969367545211mimeAttachmentHeader"></fieldset>
              <pre class="gmail-m_4404457969367545211moz-quote-pre">_______________________________________________
Users mailing list
<a class="gmail-m_4404457969367545211moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org" target="_blank" moz-do-not-send="true">Users@lists.opensips.org</a>
<a class="gmail-m_4404457969367545211moz-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-bin/mailman/listinfo/users</a>
</pre>
            </blockquote>
          </div>
          _______________________________________________<br>
          Users mailing list<br>
          <a href="mailto:Users@lists.opensips.org" target="_blank"
            moz-do-not-send="true">Users@lists.opensips.org</a><br>
          <a
            href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users"
            rel="noreferrer" target="_blank" moz-do-not-send="true">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
        </blockquote>
      </div>
      <br clear="all">
      <div><br>
      </div>
      -- <br>
      <div dir="ltr" class="gmail_signature">Mark Farmer<br>
        <a href="mailto:farmorg@gmail.com" target="_blank"
          moz-do-not-send="true">farmorg@gmail.com</a></div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-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>
  </body>
</html>