<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    Hi SparkleZou,<br>
    <br>
    The issue here is how the password is stored in  DB. As per the sql
    dump, the pwd is in pre-computed HA1 format, while your opensips cfg
    expects the pwd in plain-text format, see the `calculate_ha1` and
    `password_column` modparams for auth_db module.<br>
    <br>
    For more, see
<a class="moz-txt-link-freetext" href="https://opensips.org/html/docs/modules/3.2.x/auth_db.html#param_calculate_ha1">https://opensips.org/html/docs/modules/3.2.x/auth_db.html#param_calculate_ha1</a><br>
    <br>
    Regards,<br>
    <pre class="moz-signature" cols="72">Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  <a class="moz-txt-link-freetext" href="https://www.opensips-solutions.com">https://www.opensips-solutions.com</a>
OpenSIPS Summit 27-30 Sept 2022, Athens
  <a class="moz-txt-link-freetext" href="https://www.opensips.org/events/Summit-2022Athens/">https://www.opensips.org/events/Summit-2022Athens/</a></pre>
    <div class="moz-cite-prefix">On 8/26/22 8:31 AM, SparkleZou wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:31b082cc.1f07.182d8a24a5a.Coremail.sparklezou@126.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div
        style="line-height:1.7;color:#000000;font-size:14px;font-family:Arial">
        <div style="margin:0;">Hi All,</div>
        <div style="margin:0;"><br>
        </div>
        <div style="margin:0;">I'm just start to use OpenSips. Already
          checked the manual. Step by Step, here I need help. Thanks!
          ^_^</div>
        <div style="margin:0;"><br>
        </div>
        <div style="margin:0;">1. Already install Opensips 3.3
          successfully refer to <a
            href="https://www.voip.school/courses/1362752/lectures/31626804"
            moz-do-not-send="true">OpenSIPS 3.1/3.2 Installation
            Instructions | VoIP School</a></div>
        <div style="margin:0;"><br>
        </div>
        <div style="margin:0;">2. <span style="background-color: inherit; font-family: Menlo, Monaco, Consolas, "Andale Mono", "lucida console", "Courier New", monospace; font-size: inherit; color: rgb(18, 18, 18); white-space: pre;">apt install mariadb-server</span></div>
        <div style="margin:0;"><span style="background-color: inherit; font-family: Menlo, Monaco, Consolas, "Andale Mono", "lucida console", "Courier New", monospace; font-size: inherit; color: rgb(18, 18, 18); white-space: pre;">  </span><span style="background-color: inherit; font-family: Menlo, Monaco, Consolas, "Andale Mono", "lucida console", "Courier New", monospace; font-size: inherit; color: rgb(18, 18, 18); white-space: pre;">opensips-cli -x database create opensips</span></div>
        <div style="margin:0;"><span style="background-color: inherit; font-family: Menlo, Monaco, Consolas, "Andale Mono", "lucida console", "Courier New", monospace; font-size: inherit; color: rgb(18, 18, 18); white-space: pre;">
</span></div>
        <div style="margin:0;"><span style="background-color: inherit; white-space: pre;"><font face="Menlo, Monaco, Consolas, Andale Mono, lucida console, Courier New, monospace" color="#121212">root@opensips:/etc/opensips# mysql opensips -e "show tables"
+--------------------+
| Tables_in_opensips |
+--------------------+
| acc                |
| address            |
| clusterer          |
| dbaliases          |
| dialog             |
| dialplan           |
| dispatcher         |
| domain             |
| dr_carriers        |
| dr_gateways        |
| dr_groups          |
| dr_partitions      |
| dr_rules           |
| grp                |
| load_balancer      |
| location           |
| missed_calls       |
| re_grp             |
| rtpengine          |
| rtpproxy_sockets   |
| silo               |
| speed_dial         |
| subscriber         |
| tls_mgm            |
| uri                |
| usr_preferences    |
| version            |
+--------------------+</font></span></div>
        <div style="margin:0;"><span style="background-color: inherit; white-space: pre;"><font face="Menlo, Monaco, Consolas, Andale Mono, lucida console, Courier New, monospace" color="#121212">
</font></span></div>
        <div style="margin:0;"><span style="background-color: inherit; white-space: pre;"><font face="Menlo, Monaco, Consolas, Andale Mono, lucida console, Courier New, monospace" color="#121212">MariaDB [opensips]> select * FROM subscriber;
+----+----------+--------------+----------+---------------+----------------------------------+------------------------------------------------------------------+------------------------------------------------------------------+------+
| id | username | domain       | password | email_address | ha1                              | ha1_sha256                                                       | ha1_sha512t256                                                   | rpid |
+----+----------+--------------+----------+---------------+----------------------------------+------------------------------------------------------------------+------------------------------------------------------------------+------+
|  1 | 1000     | 192.168.3.53 |          |               | 1c77bd7afa5414714be613363977341f | a821eb87519b53a8e505184a8798b9300dd1788c32ce59026c6f047d5f0eb717 | 1947492ee9de11818d8a54cc5969bd87e5622f412e1b3e1a117ce8c44b936b5d | NULL |
|  2 | 1001     | 192.168.3.53 |          |               | c3d0ccc517e752190644392e7f0c5d93 | b4efb98003f1e5f75ad6ca5ce320a367a430415b9e304ef384e19b969e14ea44 | 49a9a44fbb296fed9c7fe9b4e86ef113642d2e911fe34e93742cc249de261d5a | NULL |
+----+----------+--------------+----------+---------------+----------------------------------+------------------------------------------------------------------+------------------------------------------------------------------+------+
2 rows in set (0.000 sec)</font></span></div>
        <div style="margin:0;"><span style="background-color: inherit; white-space: pre;"><font face="Menlo, Monaco, Consolas, Andale Mono, lucida console, Courier New, monospace" color="#121212">
</font></span></div>
        <div style="margin:0;"><span style="background-color: inherit; white-space: pre;"><font face="Menlo, Monaco, Consolas, Andale Mono, lucida console, Courier New, monospace" color="#121212">accounts 1000 & 1001 are already created in db.</font></span></div>
        <div style="margin:0;"><span style="background-color: inherit; white-space: pre;"><font face="Menlo, Monaco, Consolas, Andale Mono, lucida console, Courier New, monospace" color="#121212">
</font></span></div>
        <div style="margin:0;"><span style="background-color: inherit; white-space: pre;"><font face="Menlo, Monaco, Consolas, Andale Mono, lucida console, Courier New, monospace" color="#121212">run </font></span><span style="white-space: pre; color: rgb(18, 18, 18); font-family: Menlo, Monaco, Consolas, "Andale Mono", "lucida console", "Courier New", monospace; background-color: inherit;">/usr/sbin/osipsconfig select </span><span style="color: rgb(18, 18, 18); font-family: Menlo, Monaco, Consolas, "Andale Mono", "lucida console", "Courier New", monospace; white-space: pre;">ENABLE_TCP & </span><span style="color: rgb(18, 18, 18); font-family: Menlo, Monaco, Consolas, "Andale Mono", "lucida console", "Courier New", monospace; white-space: pre;">USE_AUTH, generate the CFG file.</span></div>
        <div style="margin:0;"><span style="background-color: inherit;"><font
              style="" face="Menlo, Monaco, Consolas, Andale Mono,
              lucida console, Courier New, monospace" color="#121212"><span style="white-space: pre;">                                                                                           ____________________________________________
                                                                                          |                                            |
                                                                                          |     [*] ENABLE_TCP                         |
                                                                                          |     [ ] ENABLE_TLS                         |
                                                                                          |     [ ] USE_ALIASES                        |
                                                                                          |     [*] USE_AUTH                           |
                                                                                          |     [ ] USE_DBACC                          |
                                                                                          |     [ ] USE_DBUSRLOC                       |
                                                                                          |     [ ] USE_DIALOG                         |
                                                                                          |     [ ] USE_MULTIDOMAIN                    |
                                                                                          |     [ ] USE_NAT                            |
                                                                                          |     [ ] USE_PRESENCE                       |
                                                                                          |     [ ] USE_DIALPLAN                       |
                                                                                          |     [ ] VM_DIVERSION                       |
                                                                                          |     [ ] HAVE_INBOUND_PSTN                  |
                                                                                          |     [ ] HAVE_OUTBOUND_PSTN                 |
                                                                                          |     [ ] USE_DR_PSTN                        |
                                                                                          |     [ ] USE_HTTP_MANAGEMENT_INTERFACE      |
                                                                                          |____________________________________________|

</span></font></span></div>
        <div style="margin:0;"><span style="background-color: inherit;"><font
              style="" face="Menlo, Monaco, Consolas, Andale Mono,
              lucida console, Courier New, monospace" color="#121212"><span style="white-space: pre;">Then start the opensips. But REGISTER get 401 fail message.</span></font></span></div>
        <div style="margin:0;"><span style="background-color: inherit;"><font
              style="" face="Menlo, Monaco, Consolas, Andale Mono,
              lucida console, Courier New, monospace" color="#121212"><span style="white-space: pre;">
</span></font></span></div>
        <div style="margin:0;">
          <p style="margin: 0px;"><span style=" color:#7f0000;
              background-color:#fbeded;">REGISTER <a class="moz-txt-link-freetext" href="sip:192.168.3.53">sip:192.168.3.53</a>
              SIP/2.0</span></p>
          <p style="margin: 0px;"><span style=" color:#7f0000;
              background-color:#fbeded;">Via: SIP/2.0/UDP
10.120.100.250:39720;branch=z9hG4bK-d87543-ec515058dd0d9227-1--d87543-;rport</span></p>
          <p style="margin: 0px;"><span style=" color:#7f0000;
              background-color:#fbeded;">Max-Forwards: 70</span></p>
          <p style="margin: 0px;"><span style=" color:#7f0000;
              background-color:#fbeded;">Contact:
              <a class="moz-txt-link-rfc2396E" href="sip:1000@10.120.100.250:39720;rinstance=69251742e61e3bf0"><sip:1000@10.120.100.250:39720;rinstance=69251742e61e3bf0></a></span></p>
          <p style="margin: 0px;"><span style=" color:#7f0000;
              background-color:#fbeded;">To:
              "1000"<a class="moz-txt-link-rfc2396E" href="sip:1000@192.168.3.53"><sip:1000@192.168.3.53></a></span></p>
          <p style="margin: 0px;"><span style=" color:#7f0000;
              background-color:#fbeded;">From:
              "1000"<a class="moz-txt-link-rfc2396E" href="sip:1000@192.168.3.53"><sip:1000@192.168.3.53></a>;tag=a16e1263</span></p>
          <p style="margin: 0px;"><span style=" color:#7f0000;
              background-color:#fbeded;">Call-ID:
              ZTY2NDZlYjc1ZTE3MGE4ZjI5YzhhZjA4M2IzYTIyZTc.</span></p>
          <p style="margin: 0px;"><span style=" color:#7f0000;
              background-color:#fbeded;">CSeq: 1 REGISTER</span></p>
          <p style="margin: 0px;"><span style=" color:#7f0000;
              background-color:#fbeded;">Expires: 3600</span></p>
          <p style="margin: 0px;"><span style=" color:#7f0000;
              background-color:#fbeded;">Allow: INVITE, ACK, CANCEL,
              OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO</span></p>
          <p style="margin: 0px;"><span style=" color:#7f0000;
              background-color:#fbeded;">User-Agent: X-Lite release
              1011s stamp 41150</span></p>
          <p style="margin: 0px;"><span style=" color:#7f0000;
              background-color:#fbeded;">Content-Length: 0</span></p>
          <p style="margin: 0px; color: rgb(127, 0, 0);"><br>
          </p>
          <p style="margin: 0px;"><span style=" color:#00007f;
              background-color:#ededfb;">SIP/2.0 401 Unauthorized</span></p>
          <p style="margin: 0px;"><span style=" color:#00007f;
              background-color:#ededfb;">Via: SIP/2.0/UDP
10.120.100.250:39720;received=192.168.3.250;branch=z9hG4bK-d87543-ec515058dd0d9227-1--d87543-;rport=39720</span></p>
          <p style="margin: 0px;"><span style=" color:#00007f;
              background-color:#ededfb;">To:
"1000"<a class="moz-txt-link-rfc2396E" href="sip:1000@192.168.3.53"><sip:1000@192.168.3.53></a>;tag=a42c.30207dd1fda47907656684ceecd519a5</span></p>
          <p style="margin: 0px;"><span style=" color:#00007f;
              background-color:#ededfb;">From:
              "1000"<a class="moz-txt-link-rfc2396E" href="sip:1000@192.168.3.53"><sip:1000@192.168.3.53></a>;tag=a16e1263</span></p>
          <p style="margin: 0px;"><span style=" color:#00007f;
              background-color:#ededfb;">Call-ID:
              ZTY2NDZlYjc1ZTE3MGE4ZjI5YzhhZjA4M2IzYTIyZTc.</span></p>
          <p style="margin: 0px;"><span style=" color:#00007f;
              background-color:#ededfb;">CSeq: 1 REGISTER</span></p>
          <p style="margin: 0px;"><span style=" color:#00007f;
              background-color:#ededfb;">WWW-Authenticate: Digest
              realm="192.168.3.53",
              nonce="Tx723UFoxz9VG6/4szaVxWNyEKleCmoNQbbunbDRcdAA",
              qop="auth"</span></p>
          <p style="margin: 0px;"><span style=" color:#00007f;
              background-color:#ededfb;">Server: OpenSIPS (3.3.1
              (x86_64/linux))</span></p>
          <p style="margin: 0px;"><span style=" color:#00007f;
              background-color:#ededfb;">Content-Length: 0</span></p>
          <p style="margin: 0px;"><span style=" color:#00007f;
              background-color:#ededfb;"><br>
            </span></p>
          <p style="margin: 0px;"><span style=" color:#00007f;
              background-color:#ededfb;">The </span><font
              color="#00007f">opensips.cfg is attached. Please help
              check where is the problem. Thanks!</font></p>
          <p style="margin: 0px;"><font color="#00007f"><br>
            </font></p>
          <p style="margin: 0px;"><font color="#00007f">BR,</font></p>
          <p style="margin: 0px;"><font color="#00007f">SparkleZou</font></p>
        </div>
        <div style="margin:0;"><span style="background-color: inherit;"><font
              style="" face="Menlo, Monaco, Consolas, Andale Mono,
              lucida console, Courier New, monospace" color="#121212"><span style="white-space: pre;">
</span></font></span></div>
      </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>
    <br>
  </body>
</html>