<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <p><tt>I have pushed a fix on "master" and "2.3". Please let me know
        if run into any more issues.</tt></p>
    <p><tt>Best regards,</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>

OpenSIPS Summit May 2017 Amsterdam
  <a class="moz-txt-link-freetext" href="http://www.opensips.org/events/Summit-2017Amsterdam.html">http://www.opensips.org/events/Summit-2017Amsterdam.html</a></pre>
    <div class="moz-cite-prefix">On 30.03.2017 13:32, Liviu Chircu
      wrote:<br>
    </div>
    <blockquote
      cite="mid:82da02a5-b2ca-4897-078b-4054a50efe95@opensips.org"
      type="cite">
      <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
      <p><tt>Hi, Kirill!<br>
        </tt></p>
      <p><tt>Thank you for the excellent report! A fix will be available
          asap!</tt></p>
      <p><tt>Best regards,</tt><br>
      </p>
      <pre class="moz-signature" cols="72">Liviu Chircu
OpenSIPS Developer
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a>

OpenSIPS Summit May 2017 Amsterdam
  <a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://www.opensips.org/events/Summit-2017Amsterdam.html">http://www.opensips.org/events/Summit-2017Amsterdam.html</a></pre>
      <div class="moz-cite-prefix">On 30.03.2017 10:20, Kirill Galinurov
        wrote:<br>
      </div>
      <blockquote
cite="mid:CAPDUut9qy5bGG163GXcsdbSDr+_e0uOKzi5hZtV560HRGY7ghA@mail.gmail.com"
        type="cite">
        <div dir="ltr">Hi all. We try test new mid-registar feature in
          opensips 2.3
          <div><br>
          </div>
          <div>
            <div>loadmodule "mid_registrar.so"</div>
            <div>modparam("mid_registrar", "mode", 1) /* 0 = mirror / 1
              = ct / 2 = AoR */</div>
            <div>modparam("mid_registrar", "outgoing_expires", 3600)</div>
            <div>modparam("mid_registrar", "insertion_mode", 0) /* 0 =
              contact; 1 = path */</div>
            <div>modparam("mid_registrar", "max_contacts", 1)</div>
            <div>modparam("mid_registrar", "retry_after", 30)</div>
            <div>modparam("mid_registrar", "contact_match_param", "rid")</div>
          </div>
          <div><br>
          </div>
          <div>
            <div>if (is_method("REGISTER")) {</div>
            <div>        mid_registrar_save("location");</div>
            <div>        switch ($retcode) {</div>
            <div>        case 1:</div>
            <div>                 xlog("L_INFO", "forwarding REGISTER to
              main registrar...\n");</div>
            <div>                $ru = "sip:<a moz-do-not-send="true"
                href="http://192.168.77.49:5060">192.168.77.49:5060</a>";</div>
            <div>                if (!t_relay()) {</div>
            <div>                        send_reply("500", "Server
              Internal Error 1");</div>
            <div>                }</div>
            <div><br>
            </div>
            <div>                break;</div>
            <div>        case 2:</div>
            <div>                 xlog("L_INFO", "REGISTER has been
              absorbed!\n");</div>
            <div>                break;</div>
            <div>        default:</div>
            <div>                xlog("L_ERR", "mid-registrar
              error!\n");</div>
            <div>                send_reply("500", "Server Internal
              Error 2");</div>
            <div>        }</div>
            <div><br>
            </div>
            <div>  exit;</div>
            <div>}</div>
            <div><br>
            </div>
            <div>if (is_method("INVITE") and $si == "192.168.77.49" and
              $sp == 5060) {</div>
            <div>                if (!mid_registrar_lookup("location"))
              {</div>
            <div>                        t_reply("404", "Not Found");</div>
            <div>                        exit;</div>
            <div>                }</div>
            <div><br>
            </div>
            <div>                if (!t_relay())</div>
            <div>                        send_reply("500", "Server
              Internal Error 3");</div>
            <div><br>
            </div>
            <div>            exit;</div>
            <div>        }</div>
          </div>
          <div>When we use rid parameter we have a error in Asterisk.</div>
          <div><br>
          </div>
          <div>Initial Register from Client to Opensips</div>
          <div><br>
          </div>
          <div>
            <div><i>REGISTER sip:192.168.10.200;transport=UDP SIP/2.0</i></div>
            <div><i>Via: SIP/2.0/UDP
                192.168.76.224:33593;branch=z9hG4bK-524287-1---52af00d0e9d590fd</i></div>
            <div><i>Max-Forwards: 70</i></div>
            <div><i>Contact:
                <a moz-do-not-send="true" class="moz-txt-link-rfc2396E"
href="mailto:sip:2101@192.168.76.224:33593;rinstance=a6bb1857f7e41f30;transport=UDP"><sip:2101@192.168.76.224:33593;rinstance=a6bb1857f7e41f30;transport=UDP></a></i></div>
            <div><i>To: <<a moz-do-not-send="true"
                  href="mailto:sip%3A2101@192.168.10.200">sip:2101@192.168.10.200</a>;transport=UDP></i></div>
            <div><i>From: <<a moz-do-not-send="true"
                  href="mailto:sip%3A2101@192.168.10.200">sip:2101@192.168.10.200</a>;transport=UDP>;tag=66282f00</i></div>
            <div><i>Call-ID: zHst9ROVeEmKYQVPUwDz8w..</i></div>
            <div><i>CSeq: 6 REGISTER</i></div>
            <div><i>Expires: 3600</i></div>
            <div><i>User-Agent: Z 3.15.40006 rv2.8.20</i></div>
            <div><i>Authorization: Digest
username="2101",realm="asterisk",nonce="1490856865/be28c84459a2237855ebfa2521ba0bb8",uri="sip:192.168.10.200;transport=UDP",response="753e7a589c04180fa63aecc08bb4b40a",cnonce="91b8e43b5c5c0bc2e45ec37f8ddf53d9",nc=00000003,qop=auth,algorithm=md5,opaque="488632b65bf44460"</i></div>
            <div><i>Allow-Events: presence, kpml, talk</i></div>
            <div><i>Content-Length: 0</i></div>
            <div><br>
            </div>
          </div>
          <div>From Opensips to Asterisk</div>
          <div>
            <div><br>
            </div>
            <div><i>REGISTER sip:<a moz-do-not-send="true"
                  href="http://192.168.77.49:5060">192.168.77.49:5060</a>
                SIP/2.0</i></div>
            <div><i>Via: SIP/2.0/UDP
                192.168.10.200:5060;branch=z9hG4bK8fa9.40aab787.0</i></div>
            <div><i>Via: SIP/2.0/UDP
                192.168.76.224:33593;branch=z9hG4bK-524287-1---52af00d0e9d590fd</i></div>
            <div><i>Max-Forwards: 69</i></div>
            <div><i>Contact:
                <a moz-do-not-send="true" class="moz-txt-link-rfc2396E"
href="mailto:sip:2101@192.168.10.200:5060;rinstance=a6bb1857f7e41f30;transport=UDP;rid=c2lwOjIxMDFAMTkyLjE2OC43Ni4yMjQ6MzM1OTM7cmluc3RhbmNlPWE2YmIxODU3ZjdlNDFmMzA7dHJhbnNwb3J0PVVEUA=="><sip:2101@192.168.10.200:5060;rinstance=a6bb1857f7e41f30;transport=UDP;rid=c2lwOjIxMDFAMTkyLjE2OC43Ni4yMjQ6MzM1OTM7cmluc3RhbmNlPWE2YmIxODU3ZjdlNDFmMzA7dHJhbnNwb3J0PVVEUA==></a></i></div>
            <div><i>To: <<a moz-do-not-send="true"
                  href="mailto:sip%3A2101@192.168.10.200">sip:2101@192.168.10.200</a>;transport=UDP></i></div>
            <div><i>From: <<a moz-do-not-send="true"
                  href="mailto:sip%3A2101@192.168.10.200">sip:2101@192.168.10.200</a>;transport=UDP>;tag=66282f00</i></div>
            <div><i>Call-ID: zHst9ROVeEmKYQVPUwDz8w..</i></div>
            <div><i>CSeq: 6 REGISTER</i></div>
            <div><i>Expires: 3600</i></div>
            <div><i>User-Agent: Z 3.15.40006 rv2.8.20</i></div>
            <div><i>Authorization: Digest
username="2101",realm="asterisk",nonce="1490856865/be28c84459a2237855ebfa2521ba0bb8",uri="sip:192.168.10.200;transport=UDP",response="753e7a589c04180fa63aecc08bb4b40a",cnonce="91b8e43b5c5c0bc2e45ec37f8ddf53d9",nc=00000003,qop=auth,algorithm=md5,opaque="488632b65bf44460"</i></div>
            <div><i>Allow-Events: presence, kpml, talk</i></div>
            <div><i>Content-Length: 0</i></div>
            <div><br>
            </div>
          </div>
          <div>Asterisk console log:</div>
          <div><br>
          </div>
          <div>
            <div><i>[2017-03-30 10:01:31] ERROR[20693]: pjproject:0
                <?>:   sip_transport. Error processing 658 bytes
                packet from UDP <a moz-do-not-send="true"
                  href="http://192.168.10.200:5060">192.168.10.200:5060</a>
                : PJSIP syntax error exception when parsing '' header on
                line 5 col 180:</i></div>
            <div><i>REGISTER sip:<a moz-do-not-send="true"
                  href="http://192.168.77.49:5060">192.168.77.49:5060</a>
                SIP/2.0</i></div>
            <div><i>Via: SIP/2.0/UDP
                192.168.10.200:5060;branch=z9hG4bK4e1d.2e61df17.0</i></div>
            <div><i>Via: SIP/2.0/UDP
                192.168.76.224:33593;branch=z9hG4bK-524287-1---51b24eac9ec64d78</i></div>
            <div><i>Max-Forwards: 69</i></div>
            <div><i>Contact:
                <a moz-do-not-send="true" class="moz-txt-link-rfc2396E"
href="mailto:sip:2101@192.168.10.200:5060;rinstance=a6bb1857f7e41f30;transport=UDP;rid=c2lwOjIxMDFAMTkyLjE2OC43Ni4yMjQ6MzM1OTM7cmluc3RhbmNlPWE2YmIxODU3ZjdlNDFmMzA7dHJhbnNwb3J0PVVEUA=="><sip:2101@192.168.10.200:5060;rinstance=a6bb1857f7e41f30;transport=UDP;rid=c2lwOjIxMDFAMTkyLjE2OC43Ni4yMjQ6MzM1OTM7cmluc3RhbmNlPWE2YmIxODU3ZjdlNDFmMzA7dHJhbnNwb3J0PVVEUA==></a></i></div>
            <div><i>To: <<a moz-do-not-send="true"
                  href="mailto:sip%3A2101@192.168.10.200">sip:2101@192.168.10.200</a>;transport=UDP></i></div>
            <div><i>From: <<a moz-do-not-send="true"
                  href="mailto:sip%3A2101@192.168.10.200">sip:2101@192.168.10.200</a>;transport=UDP>;tag=66282f00</i></div>
            <div><i>Call-ID: zHst9ROVeEmKYQVPUwDz8w..</i></div>
            <div><i>CSeq: 15 REGISTER</i></div>
            <div><i>Expires: 3600</i></div>
            <div><i>User-Agent: Z 3.15.40006 rv2.8.20</i></div>
            <div><i>Allow-Events: presence, kpml, talk</i></div>
            <div><i>Content-Length: 0</i></div>
          </div>
          <div><br>
          </div>
          <div>So the problem in rid parameter Contact field
 rid=c2lwOjIxMDFAMTkyLjE2OC43Ni4yMjQ6MzM1OTM7cmluc3RhbmNlPWE2YmIxODU3ZjdlNDFmMzA7dHJhbnNwb3J0PVVEUA==></div>
          <div>in ==> symbols.</div>
          <div><br>
          </div>
        </div>
        <br>
        <fieldset class="mimeAttachmentHeader"></fieldset>
        <br>
        <pre wrap="">_______________________________________________
Users mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a moz-do-not-send="true" 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>
      <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>