<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">The database is commonly shared between the two servers. So you can create an user with opensipsctl command on the sip machine as long as OpenXCAP is using the same database as OpenSIPS.<div>&nbsp;</div><div>Adrian</div><div><br><div><div>On Jan 7, 2009, at 8:29 AM, Jun.Wen wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"> <div style="WORD-WRAP: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space"> <div dir="ltr" align="left"><span class="798262807-07012009"><font face="Arial Narrow" color="#0000ff">I did not install opensips with openxcap in same server, is it a must or not ?</font></span></div><br> <div class="OutlookMessageHeader" lang="en-us" dir="ltr" align="left"> <hr tabindex="-1"> <font face="Tahoma" size="2"><b>From:</b> Adrian Georgescu [<a href="mailto:ag@ag-projects.com">mailto:ag@ag-projects.com</a>] <br><b>Sent:</b> 2009年1月7日 14:49<br><b>To:</b> Jun.Wen<br><b>Cc:</b> <a href="mailto:users@lists.opensips.org">users@lists.opensips.org</a><br><b>Subject:</b> Re: [OpenSIPS-Users] OpenXCAP Put 401 Unauthorized<br></font><br></div> <div></div>Did you try opensipsctl command?&nbsp; <div> <div> <div><br></div> <div>Adrian</div> <div><br> <div> <div>On Jan 7, 2009, at 5:33 AM, Jun.Wen wrote:</div><br class="Apple-interchange-newline"> <blockquote type="cite">  <div style="WORD-WRAP: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space">  <div dir="ltr" align="left"><span class="876582804-07012009"><font face="Arial Narrow" color="#0000ff">Adrian,</font></span></div>  <div dir="ltr" align="left"><span class="876582804-07012009"><font face="Arial Narrow" color="#0000ff"></font></span>&nbsp;</div>  <div dir="ltr" align="left"><span class="876582804-07012009"><font face="Arial Narrow" color="#0000ff">I guess my problem is I did   not&nbsp;successfully created users in xcap server by the scripts of "python   add-openxcap-user.py". Inside the table of <font color="#000000"><font color="#0000ff">subscriber</font> </font><font color="#0000ff">of mysql, there is   no any user record existed.</font></font></span></div>  <div dir="ltr" align="left"><span class="876582804-07012009"><font face="Arial Narrow" color="#0000ff"></font></span>&nbsp;</div>  <div dir="ltr" align="left"><span class="876582804-07012009"><font face="Arial Narrow" color="#0000ff">Any tips to create user inside xcap server   ?</font></span></div>  <div dir="ltr" align="left"><span class="876582804-07012009"><font face="Arial Narrow" color="#0000ff"></font></span>&nbsp;</div>  <div dir="ltr" align="left"><span class="876582804-07012009"><font face="Arial Narrow" color="#0000ff">Regards</font></span></div>  <div dir="ltr" align="left"><span class="876582804-07012009"><font face="Arial Narrow" color="#0000ff"></font></span>&nbsp;</div>  <div dir="ltr" align="left"><span class="876582804-07012009"><font face="Arial Narrow" color="#0000ff">Jun</font></span></div><br>  <div class="OutlookMessageHeader" lang="en-us" dir="ltr" align="left">  <hr tabindex="-1">  <font face="Tahoma" size="2"><b>From:</b> Adrian Georgescu [<a href="mailto:ag@ag-projects.com">mailto:ag@ag-projects.com</a>]   <br><b>Sent:</b> 2009年1月3日 1:08<br><b>To:</b> Jun.Wen<br><b>Cc:</b> <a href="mailto:users@lists.opensips.org">users@lists.opensips.org</a><br><b>Subject:</b>   Re: [OpenSIPS-Users] OpenXCAP Put 401 Unauthorized<br></font><br></div>  <div></div>I do not find in your logs what is wrong with your setup, it could   be either the client or the server configuration.   <div><br></div>  <div>Can you try your XCAP client using a SIP account from <a href="http://sip2sip.info">http://sip2sip.info</a> see if that works?</div>  <div><br></div>  <div>Regards,</div>  <div>Adrian</div>  <div><br></div>  <div><br></div>  <div>  <div>  <div>  <div>On Jan 2, 2009, at 2:39 PM, Jun.Wen wrote:</div><br class="Apple-interchange-newline">  <blockquote type="cite">    <div style="WORD-WRAP: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space">    <div dir="ltr" align="left"><span class="884063713-02012009"><font face="Arial Narrow" color="#0000ff">It looks like this -</font></span></div>    <div dir="ltr" align="left"><span class="884063713-02012009"><font face="Arial Narrow" color="#0000ff"></font></span>&nbsp;</div>    <div dir="ltr" align="left"><span class="884063713-02012009"><font face="Arial Narrow" color="#0000ff">-------------------------------------------------------------------------</font></span></div>    <div dir="ltr" align="left"><span class="884063713-02012009"><font face="Arial Narrow" color="#0000ff">xcap:~/.sipclient# cat config.ini <br>#     rename this file to 'config.ini' and copy it in ~/.sipclient/     directory</font></span></div>    <div>&nbsp;</div>    <div dir="ltr" align="left"><span class="884063713-02012009"><font face="Arial Narrow" color="#0000ff"># this will be the default account used by     xcapclient<br>[Account]<br>sip_address = <a href="mailto:alice@192.168.10.10">alice@192.168.10.10</a><br>password =     123<br>xcap_root = <a href="http://192.168.10.10/xcap-root">http://192.168.10.10/xcap-root</a></font></span></div>    <div>&nbsp;</div>    <div dir="ltr" align="left"><span class="884063713-02012009"><font face="Arial Narrow" color="#0000ff"># this will be used when -a bob     command-line switch is provided<br>[Account_bob]<br>sip_address = <a href="mailto:bob@192.168.10.10">bob@192.168.10.10</a><br>password =     123<br>xcap_root = <a href="http://192.168.10.10/xcap-root">http://192.168.10.10/xcap-root</a></font></span></div><br>    <div class="OutlookMessageHeader" lang="en-us" dir="ltr" align="left">    <hr tabindex="-1">    <font face="Tahoma" size="2"><b>From:</b> Adrian Georgescu [<a href="mailto:ag@ag-projects.com">mailto:ag@ag-projects.com</a>]     <br><b>Sent:</b> 2009年1月2日 21:35<br><b>To:</b> Jun.Wen<br><b>Subject:</b>     Re: [OpenSIPS-Users] OpenXCAP Put 401 Unauthorized<br></font><br></div>    <div></div>What is the content of your xcapclient configuration file     .sipclient/config.ini ?     <div><br></div>    <div>Adrian</div>    <div><br></div>    <div>    <div>    <div>On Jan 2, 2009, at 9:33 AM, Jun.Wen wrote:</div><br class="Apple-interchange-newline">    <blockquote type="cite">      <div>      <div dir="ltr" align="left"><font face="Arial Narrow" color="#0000ff"><span class="805071608-02012009">Hi, All, Happy new year to all the team       here.</span></font></div>      <div dir="ltr" align="left"><font face="Arial Narrow" color="#0000ff"><span class="805071608-02012009"></span></font>&nbsp;</div>      <div dir="ltr" align="left"><font face="Arial Narrow" color="#0000ff"><span class="805071608-02012009">Please help me to figure out what is going wrong       with my openxcap. Thanks in advance.</span></font></div>      <div dir="ltr" align="left"><font face="Arial Narrow" color="#0000ff"><span class="805071608-02012009"></span></font>&nbsp;</div>      <div dir="ltr" align="left"><font face="Arial Narrow" color="#0000ff"><span class="805071608-02012009">I've built up openxcap in debian according to the       installation guide and the it works as followings info from       error.log.</span></font></div>      <div dir="ltr" align="left"><font face="Arial Narrow" color="#0000ff"><span class="805071608-02012009">-------------------------------------------------------------------------------------------------------------------------------</span></font></div>      <div dir="ltr" align="left"><font face="Arial Narrow" color="#0000ff"><span class="805071608-02012009">2009-01-02 02:56:26-0500 [-] Starting OpenXCAP       1.0.6<br>2009-01-02 02:56:37-0500 [-] Supported Root URIs: <a href="http://192.168.10.10/xcap-root">http://192.168.10.10/xcap-root</a><br>2009-01-02       02:56:39-0500 [-] Certificate file 'tls/server.crt' could not be loaded:       File 'tls/server.crt' does not exist<br>2009-01-02 02:56:39-0500 [-]       Private key file 'tls/server.key' could not be loaded: File       'tls/server.key' does not exist<br>2009-01-02 02:56:39-0500 [-] Trusted       peers: 192.168.10.0/24, 127.0.0.1<br>2009-01-02 02:56:39-0500 [-]       xcap.server.HTTPFactory starting on 80</span></font></div>      <div dir="ltr" align="left"><font face="Arial Narrow" color="#0000ff"><span class="805071608-02012009">--------------------------------------------------------------------------------------------------------------------------------</span></font></div>      <div dir="ltr" align="left"><font face="Arial Narrow" color="#0000ff"><span class="805071608-02012009"></span></font>&nbsp;</div>      <div dir="ltr" align="left"><font face="Arial Narrow" color="#0000ff"><span class="805071608-02012009">The openxcap server is configured to domain       192.168.10.10 ( local server static&nbsp;IP address ). I also created a       test account <a href="mailto:alice@192.168.10.10">alice@192.168.10.10</a>       with pwd 123 by python add-openxcap-user.py in scripts.&nbsp; While when       I&nbsp;tried the python-xcapclient to put a document to the openxcap       server, I always encountered "401 Unauthorized" for following details       -</span></font></div>      <div dir="ltr" align="left"><font face="Arial Narrow" color="#0000ff"><span class="805071608-02012009">-----------------------------------------------------------------------------------------------------------------------------------</span></font></div>      <div dir="ltr" align="left"><font face="Arial Narrow" color="#0000ff"><span class="805071608-02012009">xcap:/opt/python-xcaplib/examples# xcapclient -i       pres-rules.xml put<br>put <a href="http://192.168.10.10/xcap-root/pres-rules/users/sip:alice@192.168.10.10/index">http://192.168.10.10/xcap-root/pres-rules/users/sip:alice@192.168.10.10/index</a><br>401       Unauthorized<br>content-type: text/html<br>content-length:       141<br>&lt;html>&lt;head>&lt;title>Unauthorized&lt;/title>&lt;/head>&lt;body>&lt;h1>Unauthorized&lt;/h1>&lt;p>You       are not authorized to access this       resource.&lt;/p>&lt;/body>&lt;/html></span></font></div>      <div dir="ltr" align="left"><font face="Arial Narrow" color="#0000ff"><span class="805071608-02012009"><span class="805071608-02012009">-----------------------------------------------------------------------------------------------------------------------------------</span></span></font></div>      <div dir="ltr" align="left"><font face="Arial Narrow" color="#0000ff"><span class="805071608-02012009"><span class="805071608-02012009"></span></span></font>&nbsp;</div>      <div dir="ltr" align="left"><font face="Arial Narrow" color="#0000ff"><span class="805071608-02012009"><span class="805071608-02012009">Please refer       the&nbsp;the access.log and it seems something related my domain       settings.</span></span></font></div>      <div dir="ltr" align="left"><font face="Arial Narrow" color="#0000ff"><span class="805071608-02012009"><span class="805071608-02012009"></span></span></font>&nbsp;</div>      <div dir="ltr" align="left"><font face="Arial Narrow" color="#0000ff"><span class="805071608-02012009"><span class="805071608-02012009"><span class="805071608-02012009">-----------------------------------------------------------------------------------------------------------------------------------</span></span></span></font></div>      <div dir="ltr" align="left"><font face="Arial Narrow" color="#0000ff"><span class="805071608-02012009"><span class="805071608-02012009"><span class="805071608-02012009">2009-01-01 08:41:08-0500 [-] 192.168.10.10 'PUT       /xcap-root/pres-rules/users/<a href="sip:alice@192.168.10.10/index">sip:alice@192.168.10.10/index</a>       HTTP/1.1' 401 0 141 'python-xcaplib/1.0.8'       -<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; REQUEST       headers:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;       Accept-Encoding:       identity<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;       User-Agent:       python-xcaplib/1.0.8<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;       Host:       192.168.10.10<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;       Content-Type:       application/x-www-form-urlencoded<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;       Authorization: Basic       YWxpY2U6MTIz<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; RESPONSE       headers:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;       Date: Thu, 01 Jan 2009 13:41:08       GMT<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;       Content-Type:       text/html<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;       WWW-Authenticate: basic       realm="192.168.10.10"<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;       Server: OpenXCAP/1.0.6</span></span></span></font></div>      <div dir="ltr" align="left"><font face="Arial Narrow" color="#0000ff"><span class="805071608-02012009"><span class="805071608-02012009"><span class="805071608-02012009"><span class="805071608-02012009"><span class="805071608-02012009"><span class="805071608-02012009">-----------------------------------------------------------------------------------------------------------------------------------</span></span></span></span></span></span></font></div>      <div dir="ltr" align="left"><font face="Arial Narrow" color="#0000ff"><span class="805071608-02012009"><span class="805071608-02012009"><span class="805071608-02012009"><span class="805071608-02012009"><span class="805071608-02012009"><span class="805071608-02012009"></span></span></span></span></span></span></font>&nbsp;</div>      <div dir="ltr" align="left"><font face="Arial Narrow" color="#0000ff"><span class="805071608-02012009"><span class="805071608-02012009"><span class="805071608-02012009"><span class="805071608-02012009"><span class="805071608-02012009"><span class="805071608-02012009">Regards</span></span></span></span></span></span></font></div>      <div dir="ltr" align="left"><font face="Arial Narrow" color="#0000ff"><span class="805071608-02012009"><span class="805071608-02012009"><span class="805071608-02012009"><span class="805071608-02012009"><span class="805071608-02012009"><span class="805071608-02012009"></span></span></span></span></span></span></font>&nbsp;</div>      <div dir="ltr" align="left"><font face="Arial Narrow" color="#0000ff"><span class="805071608-02012009"><span class="805071608-02012009"><span class="805071608-02012009"><span class="805071608-02012009"><span class="805071608-02012009"><span class="805071608-02012009">Jun</span></span></span></span></span></span></font></div>      <div dir="ltr" align="left"><font face="Arial Narrow" color="#0000ff"><span class="805071608-02012009"><span class="805071608-02012009"></span></span></font>&nbsp;</div>      <div dir="ltr" align="left"><font face="Arial Narrow" color="#0000ff"><span class="805071608-02012009"><span class="805071608-02012009"></span></span></font>&nbsp;</div>      <div dir="ltr" align="left"><font face="Arial Narrow" color="#0000ff"><span class="805071608-02012009"><span class="805071608-02012009"></span></span></font>&nbsp;</div>      <div dir="ltr" align="left"><font face="Arial Narrow" color="#0000ff"><span class="805071608-02012009"><span class="805071608-02012009"></span></span></font>&nbsp;</div>      <div dir="ltr" align="left"><font face="Arial Narrow" color="#0000ff"><span class="805071608-02012009"><span class="805071608-02012009"></span></span></font>&nbsp;</div>      <div dir="ltr" align="left"><font face="Arial Narrow" color="#0000ff"><span class="805071608-02012009"></span></font>&nbsp;</div></div>_______________________________________________<br>Users       mailing list<br><a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br><a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br></blockquote></div><br></div></div></blockquote></div><br></div></div></div></blockquote></div><br></div></div></div></div></blockquote></div><br></div></body></html>