<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix"><tt>Hi,<br>
        <br>
        The www_authorize() function has a return code which indicates
        why the auht failed. Print the return code to see what's going
        on.<br>
        <br>
        &lt;snap&gt;<br>
        $var(ret) = www_authorize("","0");<br>
        xlog("auth ret code = $var(ret) \n");<br>
        if ($var(ret)&lt;0) {<br>
        &nbsp;&nbsp;&nbsp; www_challenge()<br>
        &nbsp;&nbsp;&nbsp; exit;<br>
        }<br>
        &lt;snap&gt;<br>
        <br>
        Regards,<br>
      </tt>
      <pre class="moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a></pre>
      On 17.07.2014 10:16, Aqs Younas wrote:<br>
    </div>
    <blockquote
cite="mid:CAGVOjVWH1mEbyF6O7QuCyqFt4=JPbV82VQeJPCb9qqwYzbn=9A@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <pre>I had successfully install &nbsp;Opensips and configured mysql DB with it. Now Opensips up and running. I add sip account to mysql DB as follows.

mysql&gt; select * from subscriber;
+----+----------+---------------+----------+---------------+----------------------------------+----------------------------------+------+

| id | username | domain        | password | email_address | ha1                              | ha1b                             | rpid |
+----+----------+---------------+----------+---------------+----------------------------------+----------------------------------+------+

|  1 | 1000     | 192.170.70.29 | 12345    |               | d59df94dbda4290385f6f85ddeac3aca | 854442095be5a00fa4306b3d74d14f93 | NULL |
+----+----------+---------------+----------+---------------+----------------------------------+----------------------------------+------+


</pre>
        <pre>mysql&gt; select * from domain;
+----+---------------+---------------------+
| id | domain        | last_modified       |
+----+---------------+---------------------+
|  1 | 192.170.70.29 | 2014-07-17 11:35:24 |

+----+---------------+---------------------+

opensips is running at 

udp        0      0 <a moz-do-not-send="true" href="http://192.170.70.29:5060">192.170.70.29:5060</a>      0.0.0.0:*                           1778/opensips   


</pre>
        <pre>And my x-lite phone is running at 192.170.70.3.

when i try to register my x-lite phone with opensips it gives this error
</pre>
        <pre>"Try server returned ..unauthorized (401)
</pre>
        <pre>syslog file gives.


Jul 17 12:06:12 kick ./opensips[1782]: [<a moz-do-not-send="true" href="http://udp:1000@192.170.70.3:4995">udp:1000@192.170.70.3:4995</a>]: Processing 'REGISTER'

</pre>
        <pre>why i am getting this error?Am i doing something wrong?


</pre>
        <pre>Please Help.

</pre>
        <pre>Thanks
</pre>
      </div>
      <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>