<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>Hi Marcos,</p>
    <p>as you correctly observed, the issue with this is just that the
      response is wrong. The permanent registration is still correctly
      inserted into the DB (a row in kamailio.location with the domain
      being NULL) and correctly handled by kamailio.</p>
    <p>This response issue has been fixed and the response improved in
      mr5.5. It will therefore be available in the next mr5.5.6.
      Nonetheless you can continue to work with mr5.5.4/mr5.5.5 and just
      ignore the return code.</p>
    <p>Newer supported versions (mr6.x) are not affected.</p>
    <p>Best, Gerhard<br>
    </p>
    <br>
    <div class="moz-cite-prefix">On 2018-06-11 08:40, Marcos Gil wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAHeDJYc6tkQa_=kMXxFO6OJqqMQXHv7=k-+ThHLwOZ=6mHta3w@mail.gmail.com">
      <div dir="ltr">
        <div>Hi,<br>
          <br>
          This bug (TT#35954) is fixed in version 5.5.5 that tomorrow is
          released?<br>
          <br>
        </div>
        BR.<br>
        <div><br>
          <div class="gmail_quote">
            <div dir="ltr">---------- Forwarded message ---------<br>
              From: Alex Lutay <<a href="mailto:alutay@sipwise.com"
                target="_blank" moz-do-not-send="true">alutay@sipwise.com</a>><br>
              Date: mar., 24 abr. 2018 a las 10:24<br>
              Subject: Re: [Spce-user] API - Method
              "POST/subscriberregistrations" <a class="moz-txt-link-freetext" href="sip:provider">sip:provider</a> CE - 5.5.4<br>
              To: <<a href="mailto:spce-user@lists.sipwise.com"
                target="_blank" moz-do-not-send="true">spce-user@lists.sipwise.com</a>><br>
            </div>
            <br>
            <br>
            Hi,<br>
            <br>
            Thank you for the excellent bug report!<br>
            <br>
            I have reproduced it locally and reported internally as
            TT#35954<br>
            I hope it will be fixed in the following mr5.5 build(s).<br>
            <br>
            P.S. As I can see, ngcp-panel is trying to generate email
            notification<br>
            if ignore_auth_realm is enabled and is trying to use some
            improperly<br>
            generated template path/name in this case.<br>
            <br>
            So far location record should be inserted properly on this
            stage.<br>
            <br>
            Thank you for the bug report here!<br>
            <br>
            On 04/23/2018 03:57 AM, Marcos Gil wrote:<br>
            > I have a issue with API - Method
            "POST/subscriberregistrations"<br>
            > <a class="moz-txt-link-freetext" href="sip:provider">sip:provider</a> CE - 5.5.4. When I configure parameter
            "ignore_auth_realm:<br>
            > yes" (config.yml) I receive a response code 500 
             "HTTP/1.1 500 Internal<br>
            > Server Error" but I see that it inserts the data into
            the table<br>
            > kamailio.location with domain ="null".<br>
            >  <br>
            > Do I need to make any additional configuration?<br>
            > <br>
            > <br>
            > Example 1: Error<br>
            > <br>
            > <br>
            > ignore_auth_realm: yes<br>
            > <br>
            > <br>
            > Example command:<br>
            > <br>
            > curl -i -X POST -H 'Connection: close' -H
            'Content-Type:<br>
            > application/json' -k --user user:passwd<br>
            > '<a
              href="https://192.168.11.48:1443/api/subscriberregistrations/"
              rel="noreferrer" target="_blank" moz-do-not-send="true">https://192.168.11.48:1443/api/subscriberregistrations/</a>'
            --data-binary<br>
            > '{"contact" : "<a
              href="http://sip:LAB919999999@192.168.11.250:5034"
              rel="noreferrer" target="_blank" moz-do-not-send="true">sip:LAB919999999@192.168.11.250:5034</a><br>
            > <<a
              href="http://sip:LAB919999999@192.168.11.250:5034"
              rel="noreferrer" target="_blank" moz-do-not-send="true">http://sip:LAB919999999@192.168.11.250:5034</a>>",
            "expires" : "1970-01-01<br>
            > 01:00:00", "q" : 1, "subscriber_id" : 3}'<br>
            > <br>
            > <br>
            > Response:<br>
            > <br>
            > HTTP/1.1 500 Internal Server Error<br>
            > Server: nginx<br>
            > Date: Sun, 22 Apr 2018 23:14:41 GMT<br>
            > Content-Type: application/json<br>
            > Content-Length: 49<br>
            > Connection: close<br>
            > Set-Cookie:
            ngcp_panel_session=768e80baefd5c826c4c0d826bf77a2aafbdc9f26;<br>
            > path=/; expires=Mon, 23-Apr-2018 00:14:40 GMT; HttpOnly<br>
            > X-Catalyst: 5.90114<br>
            > <br>
            > {"message":"Internal Server Error","code":"500"}<br>
            > <br>
            > <br>
            > <br>
            > Api:<br>
            > <br>
            > <br>
            > Apr 23 01:14:41 sp554 ngcp-panel: INFO:
            IP=192.168.11.250<br>
            > CALLED=API[POST]/api/subscriberregistrations/
            TX=1527E515EFA67A08<br>
            > USER=user DATA={} MSG="" LOG="{"contact" :<br>
            > "<a href="http://sip:LAB919999999@192.168.11.250:5034"
              rel="noreferrer" target="_blank" moz-do-not-send="true">sip:LAB919999999@192.168.11.250:5034</a><br>
            > <<a
              href="http://sip:LAB919999999@192.168.11.250:5034"
              rel="noreferrer" target="_blank" moz-do-not-send="true">http://sip:LAB919999999@192.168.11.250:5034</a>>",
            "expires" : "1970-01-01<br>
            > 01:00:00", "q" : 1, "subscriber_id" : 3}"<br>
            > <br>
            > *Apr 23 01:14:41 sp554 ngcp-panel: ERROR:
            IP=192.168.11.250<br>
            > CALLED=API[POST 200]/api/subscriberregistrations/
            TX=1527E515EFA67A08<br>
            > USER=user DATA={} MSG="" LOG="Couldn't render template<br>
            > "api/subscriberregistrations/POST.tt: file error -<br>
            > api/subscriberregistrations/POST.tt: not found""*<br>
            > <br>
            > Apr 23 01:14:41 sp554 ngcp-panel: INFO:
            IP=192.168.11.250<br>
            > CALLED=API[POST 500]/api/subscriberregistrations/
            TX=1527E515EFA67A08<br>
            > USER=user DATA={} MSG="" LOG="{"message":"Internal
            Server<br>
            > Error","code":"500"}"<br>
            > <br>
            > <br>
            > MYSQL:<br>
            > <br>
            >    id: 20<br>
            >    username: lab919999999sip<br>
            >    domain: NULL<br>
            >    contact: <a
              href="http://sip:LAB919999999@192.168.11.250:5034"
              rel="noreferrer" target="_blank" moz-do-not-send="true">sip:LAB919999999@192.168.11.250:5034</a><br>
            > <<a
              href="http://sip:LAB919999999@192.168.11.250:5034"
              rel="noreferrer" target="_blank" moz-do-not-send="true">http://sip:LAB919999999@192.168.11.250:5034</a>><br>
            >    received: NULL<br>
            >    path: <a class="moz-txt-link-rfc2396E" href="sip:127.0.0.1:5060;lr"><sip:127.0.0.1:5060;lr></a><br>
            >    expires: 1970-01-01 01:00:00<br>
            >    q: 1.00<br>
            >    callid: <a class="moz-txt-link-abbreviated" href="mailto:dfjrewr12386fd6-343@kamailio.mi">dfjrewr12386fd6-343@kamailio.mi</a><br>
            >    cseq: 1<br>
            >    last_modified: 1970-01-01 01:00:00<br>
            >    flags: 0<br>
            >    cflags: 0<br>
            >    user_agent: SIP Router MI Server<br>
            >    socket: NULL<br>
            >    methods: 0<br>
            >    ruid: ulcx-5add110a-26b0-1<br>
            >    reg_id: 0<br>
            >    instance: NULL<br>
            >    server_id: 0<br>
            >    connection_id: 0<br>
            >    keepalive: 0<br>
            >    partition: 34<br>
            > <br>
            >
--------------------------------------------------------------------------------------------------------<br>
            > <br>
            > Example 2: OK<br>
            > <br>
            > ignore_auth_realm: no<br>
            > <br>
            > <br>
            > Example command:<br>
            > <br>
            > curl -i -X POST -H 'Connection: close' -H
            'Content-Type:<br>
            > application/json' -k --user user:passwd<br>
            > '<a
              href="https://192.168.11.48:1443/api/subscriberregistrations/"
              rel="noreferrer" target="_blank" moz-do-not-send="true">https://192.168.11.48:1443/api/subscriberregistrations/</a>'
            --data-binary<br>
            > '{"contact" : "<a
              href="http://sip:LAB919999999@192.168.11.250:5034"
              rel="noreferrer" target="_blank" moz-do-not-send="true">sip:LAB919999999@192.168.11.250:5034</a><br>
            > <<a
              href="http://sip:LAB919999999@192.168.11.250:5034"
              rel="noreferrer" target="_blank" moz-do-not-send="true">http://sip:LAB919999999@192.168.11.250:5034</a>>",
            "expires" : "1970-01-01<br>
            > 01:00:00", "q" : 1, "subscriber_id" : 3}'<br>
            > <br>
            > <br>
            > Response:<br>
            > <br>
            > HTTP/1.1 201 Created<br>
            > Server: nginx<br>
            > Date: Sun, 22 Apr 2018 23:22:53 GMT<br>
            > Content-Length: 0<br>
            > Connection: close<br>
            > Location: /api/subscriberregistrations/21<br>
            > Set-Cookie:
            ngcp_panel_session=49b7a09a5529ad62d37720e11b62b036feaa68bd;<br>
            > path=/; expires=Mon, 23-Apr-2018 00:22:52 GMT; HttpOnly<br>
            > X-Catalyst: 5.90114<br>
            > Strict-Transport-Security: max-age=15768000<br>
            > <br>
            > <br>
            > Api:<br>
            > <br>
            > Apr 23 01:22:53 sp554 ngcp-panel: INFO:
            IP=192.168.11.250<br>
            > CALLED=API[POST]/api/subscriberregistrations/
            TX=1527E5886C7D7AF0<br>
            > USER=user DATA={} MSG="" LOG="{"contact" :<br>
            > "<a href="http://sip:LAB919999999@192.168.11.250:5034"
              rel="noreferrer" target="_blank" moz-do-not-send="true">sip:LAB919999999@192.168.11.250:5034</a><br>
            > <<a
              href="http://sip:LAB919999999@192.168.11.250:5034"
              rel="noreferrer" target="_blank" moz-do-not-send="true">http://sip:LAB919999999@192.168.11.250:5034</a>>",
            "expires" : "1970-01-01<br>
            > 01:00:00", "q" : 1, "subscriber_id" : 3}"<br>
            > Apr 23 01:22:53 sp554 ngcp-panel: INFO:
            IP=192.168.11.250<br>
            > CALLED=API[POST 201]/api/subscriberregistrations/
            TX=1527E5886C7D7AF0<br>
            > USER=user DATA={} MSG="" LOG=""<br>
            > <br>
            > <br>
            > <br>
            > MYSQL<br>
            > <br>
            >    id: 21<br>
            >    username: lab919999999sip<br>
            >    domain: 192.168.11.48<br>
            >    contact: <a
              href="http://sip:LAB919999999@192.168.11.250:5034"
              rel="noreferrer" target="_blank" moz-do-not-send="true">sip:LAB919999999@192.168.11.250:5034</a><br>
            > <<a
              href="http://sip:LAB919999999@192.168.11.250:5034"
              rel="noreferrer" target="_blank" moz-do-not-send="true">http://sip:LAB919999999@192.168.11.250:5034</a>><br>
            >    received: NULL<br>
            >    path: <a class="moz-txt-link-rfc2396E" href="sip:127.0.0.1:5060;lr"><sip:127.0.0.1:5060;lr></a><br>
            >    expires: 1970-01-01 01:00:00<br>
            >    q: 1.00<br>
            >    callid: <a class="moz-txt-link-abbreviated" href="mailto:dfjrewr12386fd6-343@kamailio.mi">dfjrewr12386fd6-343@kamailio.mi</a><br>
            >    cseq: 1<br>
            >    last_modified: 1970-01-01 01:00:00<br>
            >    flags: 0<br>
            >    cflags: 0<br>
            >    user_agent: SIP Router MI Server<br>
            >    socket: NULL<br>
            >    methods: 0<br>
            >    ruid: ulcx-5add1936-454-1<br>
            >    reg_id: 0<br>
            >    instance: NULL<br>
            >    server_id: 0<br>
            >    connection_id: 0<br>
            >    keepalive: 0<br>
            >    partition: 58<br>
            > <br>
            > <br>
            > <br>
            > Thanks a lot!<br>
            > <br>
            > Regards<br>
            > <br>
            > <br>
            > <br>
            > _______________________________________________<br>
            > Spce-user mailing list<br>
            > <a href="mailto:Spce-user@lists.sipwise.com"
              target="_blank" moz-do-not-send="true">Spce-user@lists.sipwise.com</a><br>
            > <a href="https://lists.sipwise.com/listinfo/spce-user"
              rel="noreferrer" target="_blank" moz-do-not-send="true">https://lists.sipwise.com/listinfo/spce-user</a><br>
            > <br>
            <br>
            -- <br>
            Alex Lutay<br>
            <br>
            _______________________________________________<br>
            Spce-user mailing list<br>
            <a href="mailto:Spce-user@lists.sipwise.com" target="_blank"
              moz-do-not-send="true">Spce-user@lists.sipwise.com</a><br>
            <a href="https://lists.sipwise.com/listinfo/spce-user"
              rel="noreferrer" target="_blank" moz-do-not-send="true">https://lists.sipwise.com/listinfo/spce-user</a><br>
          </div>
        </div>
      </div>
      <!--'"--><br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Spce-user mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Spce-user@lists.sipwise.com">Spce-user@lists.sipwise.com</a>
<a class="moz-txt-link-freetext" href="https://lists.sipwise.com/listinfo/spce-user">https://lists.sipwise.com/listinfo/spce-user</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>