<div style="font-family: Arial; font-size: 14px;">Thanks :)</div><div style="font-family: Arial; font-size: 14px;"><br></div><div style="font-family: Arial; font-size: 14px;">So since changing i have</div><div style="font-family: Arial; font-size: 14px;"><br></div><div style="font-family: Arial; font-size: 14px;"><span>(opensips-cli): mi ul_dump </span><div><span>{</span></div><div><span>    "Domains": [</span></div><div><span>        {</span></div><div><span>            "name": "location",</span></div><div><span>            "hash_size": 512,</span></div><div><span>            "AORs": [</span></div><div><span>                {</span></div><div><span>                    "AOR": "<a target="_blank" rel="noreferrer nofollow noopener" href="mailto:200@sip-proxy.coltek.co.uk">200@sip-proxy.nutxase.com</a>",</span></div><div><span>                    "Contacts": [</span></div><div><span>                        {</span></div><div><span>                            "Contact": "sip:2379049w@776774e5077l.invalid;transport=wss",</span></div><div><span>                            "ContactID": "4067172675980653875",</span></div><div><span>                            "Expires": 598,</span></div><div><span>                            "Q": "",</span></div><div><span>                            "Callid": "43ri69xhn6rt4s2941n6hz",</span></div><div><span>                            "Cseq": 2,</span></div><div><span>                            "User-agent": "Foreground App",</span></div><div><span>                            "State": "CS_NEW",</span></div><div><span>                            "Flags": 0,</span></div><div><span>                            "Cflags": "",</span></div><div><span>                            "Socket": "wss:1.2.3.4:8089",</span></div><div><span>                            "Methods": 5503,</span></div><div><span>                            "SIP_instance": "<urn:uuid:c6df6860-fbbd-46a1-9b03-a1e9051c4f0c>"</span></div><div><span>                        }</span></div><div><span><br></span></div><div><span><span>if (is_method("REGISTER")) {</span><div><span>        $avp(attr) = "contact_info";</span></div><div><span>        fix_nated_register();</span></div><div><span>        mid_registrar_save("location", "p0v");</span></div><div><span>        switch ($retcode) {</span></div><div><span>        case 1:</span></div><div><span>            xlog("forwarding REGISTER to main registrar ($$ct=$ci)\n");</span></div><div><span>            $ru = "sip:1.2.3.4:5060";</span></div><span></span><br></span></div><div><span><br></span></div><div><span><span>if (!mid_registrar_lookup("location", "p0v")) {</span><div><span>            t_reply(404, "Not Found");</span></div><div><span>            exit;</span></div><div><span>        }</span></div><div><br></div><div><span>        t_relay();</span></div><span></span><br></span></div><div><span>                    <br></span></div><span></span><br></div><div style="font-family: Arial; font-size: 14px;"><br></div>
<div class="protonmail_signature_block" style="font-family: Arial; font-size: 14px;">
    <div class="protonmail_signature_block-user protonmail_signature_block-empty">
        
            </div>
    
            <div class="protonmail_signature_block-proton">
        Sent with <a target="_blank" href="https://proton.me/" rel="noopener noreferrer">Proton Mail</a> secure email.
    </div>
</div>
<div style="font-family: Arial; font-size: 14px;"><br></div><div class="protonmail_quote">
        ------- Original Message -------<br>
        On Monday, November 14th, 2022 at 3:50 PM, Bogdan-Andrei Iancu <bogdan@opensips.org> wrote:<br><br>
        <blockquote class="protonmail_quote" type="cite">
            
    <font face="monospace">well, first of all, this is wrong:<br>
          mid_registrar_save("location p0 v");<br>
      <br>
      it should be <br>
          mid_registrar_save("location", "p0v");<br>
      <br>
      Just read carefully the docs ;)<br>
      <br>
      secondly, after fixing both save and lookup in mid_reg functions,
      redo the scenario and post the ul_dump again (now having the
      fix_nated_registrar).<br>
      <br>
      Regards,<br>
    </font>
    <pre cols="72" class="moz-signature">Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  <a href="https://www.opensips-solutions.com" class="moz-txt-link-freetext" rel="noreferrer nofollow noopener" target="_blank">https://www.opensips-solutions.com</a>
OpenSIPS Bootcamp 5-16 Dec 2022, online
  <a href="https://www.opensips.org/training/OpenSIPS_eBootcamp_2022/" class="moz-txt-link-freetext" rel="noreferrer nofollow noopener" target="_blank">https://www.opensips.org/training/OpenSIPS_eBootcamp_2022/</a></pre>
    <div class="moz-cite-prefix">On 11/14/22 5:41 PM, nutxase wrote:<br>
    </div>
    <blockquote type="cite">
      
      <div style="font-family: Arial; font-size: 14px;">Unfortunately
        does not help</div>
      <div style="font-family: Arial; font-size: 14px;"><br>
      </div>
      <div style="font-family: Arial; font-size: 14px;">here is my
        settings</div>
      <div style="font-family: Arial; font-size: 14px;"><br>
      </div>
      <div style="font-family: Arial; font-size: 14px;"><span>modparam("mid_registrar",
          "mode", 1) /* 1 = mirror / 1 = ct / 2 = AoR */</span>
        <div><span>modparam("mid_registrar", "outgoing_expires",
            2592000)</span></div>
        <div><span>modparam("mid_registrar", "min_expires", 60)</span></div>
        <div><span>modparam("mid_registrar", "max_expires", 2592000)</span></div>
        <div><span>modparam("mid_registrar", "max_contacts", 16)</span></div>
        <div><span>modparam("mid_registrar", "pn_enable", true)</span></div>
        <div><span>modparam("mid_registrar", "pn_providers", "apns, fcm,
            webpush")</span></div>
        <div><span>modparam("mid_registrar", "pn_ct_match_params",
            "pn-provider, pn-prid")</span></div>
        <div><span>#modparam("mid_registrar", "at_escape_str", "")</span></div>
        <div><br>
        </div>
        <div><span>modparam("mid_registrar", "contact_id_param", "ctid")</span></div>
        <div><span>modparam("mid_registrar", "contact_id_insertion",
            "ct-param")</span></div>
        <span></span><br>
      </div>
      <div style="font-family: Arial; font-size: 14px;"><br>
      </div>
      <div style="font-family: Arial; font-size: 14px;"><span>if
          (is_method("REGISTER")) {</span>
        <div><span>        $avp(attr) = "contact_info";</span></div>
        <div><span>        fix_nated_register();</span></div>
        <div><span>        mid_registrar_save("location p0 v");</span></div>
        <div><span>        switch ($retcode) {</span></div>
        <div><span>        case 1:</span></div>
        <div><span>            xlog("forwarding REGISTER to main
            registrar ($$ct=$ci)\n");</span></div>
        <div><span>            $ru = <a class="moz-txt-link-rfc2396E" rel="noopener noreferrer" target="_blank">"sip:1.2.3.4:5060"</a>;</span></div>
        <span></span><br>
      </div>
      <div style="font-family: Arial; font-size: 14px;"><br>
      </div>
      <div style="font-family: Arial; font-size: 14px;">and asterisk
        shows registration as</div>
      <div style="font-family: Arial; font-size: 14px;"><br>
      </div>
      <div style="font-family: Arial; font-size: 14px;"><span>200/<a class="moz-txt-link-freetext" rel="noopener noreferrer" target="_blank">sip:7s8928pq@1.2.3.4:5060;ctid=406</a></span><br>
      </div>
      <div style="font-family: Arial; font-size: 14px;"><br>
      </div>
      <div style="font-family: Arial; font-size: 14px;"><br>
      </div>
      <div style="font-family: Arial;
        font-size: 14px;" class="protonmail_signature_block">
        <div class="protonmail_signature_block-user
          protonmail_signature_block-empty"> </div>
        <div class="protonmail_signature_block-proton"> Sent with <a rel="noreferrer nofollow noopener" href="https://proton.me/" target="_blank">Proton Mail</a> secure
          email. </div>
      </div>
      <div style="font-family: Arial; font-size: 14px;"><br>
      </div>
      <div class="protonmail_quote"> ------- Original Message -------<br>
        On Monday, November 14th, 2022 at 3:35 PM, Bogdan-Andrei Iancu
        <a href="mailto:bogdan@opensips.org" class="moz-txt-link-rfc2396E" rel="noreferrer nofollow noopener" target="_blank"><bogdan@opensips.org></a> wrote:<br>
        <br>
        <blockquote type="cite" class="protonmail_quote"> <font face="monospace">OK, try to do a fix_nated_registrar()
            (nathelper module) before mid_registrar_save();<br>
            <br>
            Regards,<br>
          </font>
          <pre class="moz-signature" cols="72">Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  <a target="_blank" rel="noreferrer nofollow noopener" class="moz-txt-link-freetext" href="https://www.opensips-solutions.com">https://www.opensips-solutions.com</a>
OpenSIPS Bootcamp 5-16 Dec 2022, online
  <a target="_blank" rel="noreferrer nofollow noopener" class="moz-txt-link-freetext" href="https://www.opensips.org/training/OpenSIPS_eBootcamp_2022/">https://www.opensips.org/training/OpenSIPS_eBootcamp_2022/</a></pre>
          <div class="moz-cite-prefix">On 11/14/22 5:30 PM, nutxase
            wrote:<br>
          </div>
          <blockquote type="cite">
            <div style="font-family: Arial; font-size: 14px;">Hi Bogdan</div>
            <div style="font-family: Arial; font-size: 14px;"><br>
            </div>
            <div style="font-family: Arial; font-size: 14px;">Thanks for
              the response</div>
            <div style="font-family: Arial; font-size: 14px;"><br>
            </div>
            <div style="font-family: Arial; font-size: 14px;">this is
              what i see</div>
            <div style="font-family: Arial; font-size: 14px;"><br>
            </div>
            <div style="font-family: Arial; font-size: 14px;"><span>(opensips-cli):
                mi ul_dump </span>
              <div><span>{</span></div>
              <div><span> "Domains": [</span></div>
              <div><span> {</span></div>
              <div><span> "name": "location",</span></div>
              <div><span> "hash_size": 512,</span></div>
              <div><span> "AORs": []</span></div>
              <div><span> },</span></div>
              <div><span> {</span></div>
              <div><span> "name": "location p0 v",</span></div>
              <div><span> "hash_size": 512,</span></div>
              <div><span> "AORs": [</span></div>
              <div><span> {</span></div>
              <div><span> "AOR": "<a target="_blank" rel="noreferrer nofollow noopener" href="mailto:200@sip-proxy.coltek.co.uk">200@s</a>ip-proxy.nutxase.com",</span></div>
              <div><span> "Contacts": [</span></div>
              <div><span> {</span></div>
              <div><span> "Contact": <a target="_blank" rel="noopener noreferrer" class="moz-txt-link-rfc2396E">"sip:6d13503u@ohw71q49582f.invalid;transport=wss"</a>,</span></div>
              <div><span> "ContactID": "4067172675980629310",</span></div>
              <div><span> "Expires": 598,</span></div>
              <div><span> "Q": "",</span></div>
              <div><span> "Callid": "q71r14q930a64a9xecw7o1",</span></div>
              <div><span> "Cseq": 2,</span></div>
              <div><span> "User-agent": "Foreground App",</span></div>
              <div><span> "State": "CS_NEW",</span></div>
              <div><span> "Flags": 0,</span></div>
              <div><span> "Cflags": "",</span></div>
              <div><span> "Socket": <a target="_blank" rel="noopener noreferrer" class="moz-txt-link-rfc2396E">"wss:1.2.3.4:8089"</a>,</span></div>
              <div><span> "Methods": 5503,</span></div>
              <div><span> "SIP_instance":
                  "<urn:uuid:d7501f60-7b98-47e3-8f4a-565b21fb2cfb>"</span></div>
              <div><span> }</span></div>
              <div><span> ]</span></div>
              <div><span> }</span></div>
              <div><span> ]</span></div>
              <div><span> }</span></div>
              <div><span> ]</span></div>
              <div><span>}</span></div>
              <span></span><br>
            </div>
            <div style="font-family: Arial; font-size: 14px;"><br>
            </div>
            <div class="protonmail_signature_block" style="font-family: Arial; font-size: 14px;">
              <div class="protonmail_signature_block-user
                protonmail_signature_block-empty"> </div>
              <div class="protonmail_signature_block-proton"> Sent with
                <a target="_blank" href="https://proton.me/" rel="noreferrer nofollow noopener">Proton Mail</a> secure email. </div>
            </div>
            <div style="font-family: Arial; font-size: 14px;"><br>
            </div>
            <div class="protonmail_quote"> ------- Original Message
              -------<br>
              On Monday, November 14th, 2022 at 3:22 PM, Bogdan-Andrei
              Iancu <a target="_blank" rel="noreferrer nofollow noopener" class="moz-txt-link-rfc2396E" href="mailto:bogdan@opensips.org"><bogdan@opensips.org></a>
              wrote:<br>
              <br>
              <blockquote class="protonmail_quote" type="cite"> <font face="monospace">Hi,<br>
                  <br>
                  Are you sure the lookup fails? as it looks to me the
                  lookup succeeds, but the the r_relay() fails.<br>
                  <br>
                  If you do a `opensips-cli -x mi ul_dump
                  <mid_registrar_domain>`, how is the registration
                  record looking like ?<br>
                  <br>
                  Regards,<br>
                </font>
                <pre cols="72" class="moz-signature">Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  <a href="https://www.opensips-solutions.com" class="moz-txt-link-freetext" rel="noreferrer nofollow noopener" target="_blank">https://www.opensips-solutions.com</a>
OpenSIPS Bootcamp 5-16 Dec 2022, online
  <a href="https://www.opensips.org/training/OpenSIPS_eBootcamp_2022/" class="moz-txt-link-freetext" rel="noreferrer nofollow noopener" target="_blank">https://www.opensips.org/training/OpenSIPS_eBootcamp_2022/</a></pre>
                <div class="moz-cite-prefix">On 11/10/22 7:12 PM,
                  nutxase via Users wrote:<br>
                </div>
                <blockquote type="cite">
                  <div style="font-family: Arial; font-size: 14px;">Hi
                    All</div>
                  <div style="font-family: Arial; font-size: 14px;"><br>
                  </div>
                  <div style="font-family: Arial; font-size: 14px;">I
                    have got my webrtc client working with mid_registrar
                    to asterisk</div>
                  <div style="font-family: Arial; font-size: 14px;">But
                    when asterisk sends incoming calls to the phone it
                    fails to lookup the location and i get</div>
                  <div style="font-family: Arial; font-size: 14px;"><br>
                  </div>
                  <div style="font-family: Arial; font-size: 14px;"><span>
                      CRITICAL:core:mk_proxy: could not resolve
                      hostname: "zeid6muzjbdj.invalid"</span>
                    <div><span>Nov 10 17:00:12 opensips01
                        /usr/sbin/opensips[19237]: ERROR:tm:uri2proxy:
                        bad host name in URI <a class="moz-txt-link-rfc2396E" rel="noopener noreferrer" target="_blank"><sip:16500355@zeid6muzjbdj.invalid;transport=wss></a></span></div>
                    <span></span><br>
                  </div>
                  <div style="font-family: Arial; font-size: 14px;">and
                    in sngrep i see 476 unroutable detination.</div>
                  <div style="font-family: Arial; font-size: 14px;"><br>
                  </div>
                  <div style="font-family: Arial; font-size: 14px;"><span>if
                      (is_method("INVITE|MESSAGE") && $si ==
                      "1.2.3.4" && $sp == 5060) {</span>
                    <div><span> xlog("looking up $ru!\n");</span></div>
                    <div><span> xlog("</span></div>
                    <div><span> if (!mid_registrar_lookup("location")) {</span></div>
                    <div><span> t_reply(404, "Not Found $ru\n");</span></div>
                    <div><span> exit;</span></div>
                    <div><span> }</span></div>
                    <div><br>
                    </div>
                    <div><span> t_relay();</span></div>
                    <div><br>
                    </div>
                    <div><span> exit;</span></div>
                    <div><span> }</span></div>
                    <span></span><br>
                  </div>
                  <div style="font-family: Arial; font-size: 14px;"><br>
                  </div>
                  <div style="font-family: Arial; font-size: 14px;">With
                    sip i dont have this issue only with wss</div>
                  <div style="font-family: Arial; font-size: 14px;"><br>
                  </div>
                  <div style="font-family: Arial; font-size: 14px;">any
                    ideas what to look at?</div>
                  <div style="font-family: Arial; font-size: 14px;"><br>
                  </div>
                  <div style="font-family: Arial; font-size: 14px;"><br>
                  </div>
                  <div class="protonmail_signature_block" style="font-family: Arial; font-size: 14px;">
                    <div class="protonmail_signature_block-user
                      protonmail_signature_block-empty"> </div>
                    <div class="protonmail_signature_block-proton"> Sent
                      with <a target="_blank" href="https://proton.me/" rel="noreferrer nofollow noopener">Proton Mail</a> secure
                      email. </div>
                  </div>
                  <br>
                  <fieldset class="mimeAttachmentHeader"></fieldset>
                  <pre class="moz-quote-pre">_______________________________________________
Users mailing list
<a href="mailto:Users@lists.opensips.org" class="moz-txt-link-abbreviated" rel="noreferrer nofollow noopener" target="_blank">Users@lists.opensips.org</a>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" class="moz-txt-link-freetext" rel="noreferrer nofollow noopener" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
                </blockquote>
                <br>
              </blockquote>
              <br>
            </div>
          </blockquote>
          <br>
        </blockquote>
        <br>
      </div>
    </blockquote>
    <br>
  


        </blockquote><br>
    </div>