<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="font-family: Verdana; font-size: 13px; "><div><font class="Apple-style-span" color="#0000FF" face="'Arial Narrow'">By setting:</font></div><div><font class="Apple-style-span" color="#0000FF" face="'Arial Narrow'"><br></font></div><div><font face="Arial Narrow" color="#0000ff"><span class="EC_362540713-07012009">authentication_db_uri = mysql://root:openxcap@localhost/openxcap</span></font></div><div><font face="Arial Narrow" color="#0000ff"><span class="EC_362540713-07012009">storage_db_uri = mysql://root:openxcap@localhost/openxcap</span></font></div><div><font class="Apple-style-span" color="#0000FF" face="'Arial Narrow'"><br></font></div><div><font class="Apple-style-span" color="#0000FF" face="'Arial Narrow'">To your opensips database.</font></div><div><font class="Apple-style-span" color="#0000FF" face="'Arial Narrow'"><br></font></div><div><font class="Apple-style-span" color="#0000FF" face="'Arial Narrow'">Adrian</font></div><div><font class="Apple-style-span" color="#0000FF" face="'Arial Narrow'"><br></font></div></span><div><div>On Jan 9, 2009, at 5:13 AM, wenjun wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 11px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div class="hmmessage" style="font-size: 10pt; font-family: Verdana; ">Adrian,<br> <br>Sorry for my awkward question. I mean I've created a test user inside another machine of OpenSIPS. How can I configure OpenXCAP using the same database as OpenSIPS. I posted my config.ini of OpenXCAP here if you can see the that is correct or now.<br> <br>Regards<br> <br>Jun<br><br><br><hr id="stopSpelling"><br>CC:<span class="Apple-converted-space"> </span><a href="mailto:users@lists.opensips.org">users@lists.opensips.org</a><br>From:<span class="Apple-converted-space"> </span><a href="mailto:ag@ag-projects.com">ag@ag-projects.com</a><br>To:<span class="Apple-converted-space"> </span><a href="mailto:jun.wen@msn.com">jun.wen@msn.com</a><br>Date: Wed, 7 Jan 2009 16:42:51 +0100<br>Subject: Re: [OpenSIPS-Users] OpenXCAP Put 401 Unauthorized<br><br>What exactly do you mean, can you re-phase the question?<br><div><br></div><div>Adrian</div><div><br><div><br><div><div>On Jan 7, 2009, at 2:17 PM, Jun.Wen wrote:</div><br class="EC_Apple-interchange-newline"><blockquote><div style="word-wrap: break-word; "><div dir="ltr" align="left"><font face="Arial Narrow" color="#0000ff"><span class="EC_362540713-07012009">I've created an user in another opensips server and confirmed that user in the table of subscriber of opensips database. How can I let OpenXCAP to visit the mysql of OpenSIPS ?</span></font></div><div dir="ltr" align="left"><font face="Arial Narrow" color="#0000ff"><span class="EC_362540713-07012009"></span></font> </div><div dir="ltr" align="left"><font face="Arial Narrow" color="#0000ff"><span class="EC_362540713-07012009">The following is part of my OpenXCAP config.ini :</span></font></div><div dir="ltr" align="left"><font face="Arial Narrow" color="#0000ff"><span class="EC_362540713-07012009">-------------------------------------------------------------------------</span></font></div><div dir="ltr" align="left"><font face="Arial Narrow" color="#0000ff"><span class="EC_362540713-07012009">[Server]</span></font></div><div dir="ltr" align="left"><font face="Arial Narrow" color="#0000ff"><span class="EC_362540713-07012009">address = 0.0.0.0<br>port = 80</span></font></div><div dir="ltr" align="left"><font face="Arial Narrow" color="#0000ff"><span class="EC_362540713-07012009">root =<span class="Apple-converted-space"> </span><a href="http://xcap.mylab.net/xcap-root">http://xcap.mylab.net/xcap-root</a></span></font></div><div dir="ltr" align="left"><font face="Arial Narrow" color="#0000ff"><span class="EC_362540713-07012009">backend = OpenSER<br></span></font></div><div dir="ltr" align="left"><font face="Arial Narrow" color="#0000ff"><span class="EC_362540713-07012009">[Database]</span></font></div><div><font face="Arial Narrow" color="#0000ff"><span class="EC_362540713-07012009">authentication_db_uri = mysql://root:openxcap@localhost/openxcap</span></font></div><div><font face="Arial Narrow" color="#0000ff"><span class="EC_362540713-07012009">storage_db_uri = mysql://root:openxcap@localhost/openxcap</span></font></div><div><font face="Arial Narrow" color="#0000ff"><span class="EC_362540713-07012009">subscriber_table = subscriber<br>xcap_table = xcap</span></font></div><div><font face="Arial Narrow" color="#0000ff"><span class="EC_362540713-07012009"></span></font><font face="Arial Narrow" color="#0000ff"><span class="EC_362540713-07012009"><br>[OpenSER]</span></font><font face="Arial Narrow" color="#0000ff"><span class="EC_362540713-07012009"><br>xmlrpc_url =<span class="Apple-converted-space"> </span><a href="http://osips.mylab.net:8080/">http://osips.mylab.net:8080</a></span></font><font face="Arial Narrow" color="#0000ff"><span class="EC_362540713-07012009"></span></font></div><font face="Arial Narrow" color="#0000ff"></font><div dir="ltr" align="left"><font face="Arial Narrow" color="#0000ff"><span class="EC_362540713-07012009"><span class="EC_362540713-07012009">-------------------------------------------------------------------------</span></span></font></div><font face="Arial Narrow" color="#0000ff"></font><div dir="ltr" align="left"><font face="Arial Narrow" color="#0000ff"><span class="EC_362540713-07012009"></span></font> </div><br><div class="EC_OutlookMessageHeader" lang="en-us" dir="ltr" align="left"><hr><font face="Tahoma" size="2"><b>From:</b><span class="Apple-converted-space"> </span>Adrian Georgescu [<a href="mailto:ag@ag-projects.com">mailto:ag@ag-projects.com</a>]<span class="Apple-converted-space"> </span><br><b>Sent:</b><span class="Apple-converted-space"> </span>2009年1月7日 15:49<br><b>To:</b><span class="Apple-converted-space"> </span>Jun.Wen<br><b>Cc:</b><span class="Apple-converted-space"> </span><a href="mailto:users@lists.opensips.org">users@lists.opensips.org</a><br><b>Subject:</b><span class="Apple-converted-space"> </span>Re: [OpenSIPS-Users] OpenXCAP Put 401 Unauthorized<br></font><br></div><div></div>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> </div><div>Adrian</div><div><br><div><div>On Jan 7, 2009, at 8:29 AM, Jun.Wen wrote:</div><br class="EC_Apple-interchange-newline"><blockquote><div style="word-wrap: break-word; "><div dir="ltr" align="left"><span class="EC_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="EC_OutlookMessageHeader" lang="en-us" dir="ltr" align="left"><hr><font face="Tahoma" size="2"><b>From:</b><span class="Apple-converted-space"> </span>Adrian Georgescu [<a href="mailto:ag@ag-projects.com">mailto:ag@ag-projects.com</a>]<span class="Apple-converted-space"> </span><br><b>Sent:</b><span class="Apple-converted-space"> </span>2009年1月7日 14:49<br><b>To:</b><span class="Apple-converted-space"> </span>Jun.Wen<br><b>Cc:</b><span class="Apple-converted-space"> </span><a href="mailto:users@lists.opensips.org">users@lists.opensips.org</a><br><b>Subject:</b><span class="Apple-converted-space"> </span>Re: [OpenSIPS-Users] OpenXCAP Put 401 Unauthorized<br></font><br></div><div></div>Did you try opensipsctl command? <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="EC_Apple-interchange-newline"><blockquote><div style="word-wrap: break-word; "><div dir="ltr" align="left"><span class="EC_876582804-07012009"><font face="Arial Narrow" color="#0000ff">Adrian,</font></span></div><div dir="ltr" align="left"><span class="EC_876582804-07012009"><font face="Arial Narrow" color="#0000ff"></font></span> </div><div dir="ltr" align="left"><span class="EC_876582804-07012009"><font face="Arial Narrow" color="#0000ff">I guess my problem is I did not successfully created users in xcap server by the scripts of "python add-openxcap-user.py". Inside the table of<span class="Apple-converted-space"> </span><font color="#000000"><font color="#0000ff">subscriber</font><span class="Apple-converted-space"> </span></font><font color="#0000ff">of mysql, there is no any user record existed.</font></font></span></div><div dir="ltr" align="left"><span class="EC_876582804-07012009"><font face="Arial Narrow" color="#0000ff"></font></span> </div><div dir="ltr" align="left"><span class="EC_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="EC_876582804-07012009"><font face="Arial Narrow" color="#0000ff"></font></span> </div><div dir="ltr" align="left"><span class="EC_876582804-07012009"><font face="Arial Narrow" color="#0000ff">Regards</font></span></div><div dir="ltr" align="left"><span class="EC_876582804-07012009"><font face="Arial Narrow" color="#0000ff"></font></span> </div><div dir="ltr" align="left"><span class="EC_876582804-07012009"><font face="Arial Narrow" color="#0000ff">Jun</font></span></div><br><div class="EC_OutlookMessageHeader" lang="en-us" dir="ltr" align="left"><hr><font face="Tahoma" size="2"><b>From:</b><span class="Apple-converted-space"> </span>Adrian Georgescu [<a href="mailto:ag@ag-projects.com">mailto:ag@ag-projects.com</a>]<span class="Apple-converted-space"> </span><br><b>Sent:</b><span class="Apple-converted-space"> </span>2009年1月3日 1:08<br><b>To:</b><span class="Apple-converted-space"> </span>Jun.Wen<br><b>Cc:</b><span class="Apple-converted-space"> </span><a href="mailto:users@lists.opensips.org">users@lists.opensips.org</a><br><b>Subject:</b><span class="Apple-converted-space"> </span>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><span class="Apple-converted-space"> </span>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="EC_Apple-interchange-newline"><blockquote><div style="word-wrap: break-word; "><div dir="ltr" align="left"><span class="EC_884063713-02012009"><font face="Arial Narrow" color="#0000ff">It looks like this -</font></span></div><div dir="ltr" align="left"><span class="EC_884063713-02012009"><font face="Arial Narrow" color="#0000ff"></font></span> </div><div dir="ltr" align="left"><span class="EC_884063713-02012009"><font face="Arial Narrow" color="#0000ff">-------------------------------------------------------------------------</font></span></div><div dir="ltr" align="left"><span class="EC_884063713-02012009"><font face="Arial Narrow" color="#0000ff">xcap:~/.sipclient# cat config.ini<span class="Apple-converted-space"> </span><br># rename this file to 'config.ini' and copy it in ~/.sipclient/ directory</font></span></div><div> </div><div dir="ltr" align="left"><span class="EC_884063713-02012009"><font face="Arial Narrow" color="#0000ff"># this will be the default account used by xcapclient<br>[Account]<br>sip_address =<span class="Apple-converted-space"> </span><a href="mailto:alice@192.168.10.10">alice@192.168.10.10</a><br>password = 123<br>xcap_root =<span class="Apple-converted-space"> </span><a href="http://192.168.10.10/xcap-root">http://192.168.10.10/xcap-root</a></font></span></div><div> </div><div dir="ltr" align="left"><span class="EC_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 =<span class="Apple-converted-space"> </span><a href="mailto:bob@192.168.10.10">bob@192.168.10.10</a><br>password = 123<br>xcap_root =<span class="Apple-converted-space"> </span><a href="http://192.168.10.10/xcap-root">http://192.168.10.10/xcap-root</a></font></span></div><br><div class="EC_OutlookMessageHeader" lang="en-us" dir="ltr" align="left"><hr><font face="Tahoma" size="2"><b>From:</b><span class="Apple-converted-space"> </span>Adrian Georgescu [<a href="mailto:ag@ag-projects.com">mailto:ag@ag-projects.com</a>]<span class="Apple-converted-space"> </span><br><b>Sent:</b><span class="Apple-converted-space"> </span>2009年1月2日 21:35<br><b>To:</b><span class="Apple-converted-space"> </span>Jun.Wen<br><b>Subject:</b><span class="Apple-converted-space"> </span>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="EC_Apple-interchange-newline"><blockquote><div><div dir="ltr" align="left"><font face="Arial Narrow" color="#0000ff"><span class="EC_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="EC_805071608-02012009"></span></font> </div><div dir="ltr" align="left"><font face="Arial Narrow" color="#0000ff"><span class="EC_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="EC_805071608-02012009"></span></font> </div><div dir="ltr" align="left"><font face="Arial Narrow" color="#0000ff"><span class="EC_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="EC_805071608-02012009">-------------------------------------------------------------------------------------------------------------------------------</span></font></div><div dir="ltr" align="left"><font face="Arial Narrow" color="#0000ff"><span class="EC_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="EC_805071608-02012009">--------------------------------------------------------------------------------------------------------------------------------</span></font></div><div dir="ltr" align="left"><font face="Arial Narrow" color="#0000ff"><span class="EC_805071608-02012009"></span></font> </div><div dir="ltr" align="left"><font face="Arial Narrow" color="#0000ff"><span class="EC_805071608-02012009">The openxcap server is configured to domain 192.168.10.10 ( local server static IP address ). I also created a test account<a href="mailto:alice@192.168.10.10">alice@192.168.10.10</a><span class="Apple-converted-space"> </span>with pwd 123 by python add-openxcap-user.py in scripts. While when I 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="EC_805071608-02012009">-----------------------------------------------------------------------------------------------------------------------------------</span></font></div><div dir="ltr" align="left"><font face="Arial Narrow" color="#0000ff"><span class="EC_805071608-02012009">xcap:/opt/python-xcaplib/examples# xcapclient -i pres-rules.xml put<br>put<span class="Apple-converted-space"> </span><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><html><head><title>Unauthorized</title></head><body><h1>Unauthorized</h1><p>You are not authorized to access this resource.</p></body></html></span></font></div><div dir="ltr" align="left"><font face="Arial Narrow" color="#0000ff"><span class="EC_805071608-02012009"><span class="EC_805071608-02012009">-----------------------------------------------------------------------------------------------------------------------------------</span></span></font></div><div dir="ltr" align="left"><font face="Arial Narrow" color="#0000ff"><span class="EC_805071608-02012009"><span class="EC_805071608-02012009"></span></span></font> </div><div dir="ltr" align="left"><font face="Arial Narrow" color="#0000ff"><span class="EC_805071608-02012009"><span class="EC_805071608-02012009">Please refer the 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="EC_805071608-02012009"><span class="EC_805071608-02012009"></span></span></font> </div><div dir="ltr" align="left"><font face="Arial Narrow" color="#0000ff"><span class="EC_805071608-02012009"><span class="EC_805071608-02012009"><span class="EC_805071608-02012009">-----------------------------------------------------------------------------------------------------------------------------------</span></span></span></font></div><div dir="ltr" align="left"><font face="Arial Narrow" color="#0000ff"><span class="EC_805071608-02012009"><span class="EC_805071608-02012009"><span class="EC_805071608-02012009">2009-01-01 08:41:08-0500 [-] 192.168.10.10 'PUT /xcap-root/pres-rules/users/<a>sip:alice@192.168.10.10/index</a><span class="Apple-converted-space"> </span>HTTP/1.1' 401 0 141 'python-xcaplib/1.0.8' -<br> REQUEST headers:<br> Accept-Encoding: identity<br> User-Agent: python-xcaplib/1.0.8<br> Host: 192.168.10.10<br> Content-Type: application/x-www-form-urlencoded<br> Authorization: Basic YWxpY2U6MTIz<br> RESPONSE headers:<br> Date: Thu, 01 Jan 2009 13:41:08 GMT<br> Content-Type: text/html<br> WWW-Authenticate: basic realm="192.168.10.10"<br> Server: OpenXCAP/1.0.6</span></span></span></font></div><div dir="ltr" align="left"><font face="Arial Narrow" color="#0000ff"><span class="EC_805071608-02012009"><span class="EC_805071608-02012009"><span class="EC_805071608-02012009"><span class="EC_805071608-02012009"><span class="EC_805071608-02012009"><span class="EC_805071608-02012009">-----------------------------------------------------------------------------------------------------------------------------------</span></span></span></span></span></span></font></div><div dir="ltr" align="left"><font face="Arial Narrow" color="#0000ff"><span class="EC_805071608-02012009"><span class="EC_805071608-02012009"><span class="EC_805071608-02012009"><span class="EC_805071608-02012009"><span class="EC_805071608-02012009"><span class="EC_805071608-02012009"></span></span></span></span></span></span></font> </div><div dir="ltr" align="left"><font face="Arial Narrow" color="#0000ff"><span class="EC_805071608-02012009"><span class="EC_805071608-02012009"><span class="EC_805071608-02012009"><span class="EC_805071608-02012009"><span class="EC_805071608-02012009"><span class="EC_805071608-02012009">Regards</span></span></span></span></span></span></font></div><div dir="ltr" align="left"><font face="Arial Narrow" color="#0000ff"><span class="EC_805071608-02012009"><span class="EC_805071608-02012009"><span class="EC_805071608-02012009"><span class="EC_805071608-02012009"><span class="EC_805071608-02012009"><span class="EC_805071608-02012009"></span></span></span></span></span></span></font> </div><div dir="ltr" align="left"><font face="Arial Narrow" color="#0000ff"><span class="EC_805071608-02012009"><span class="EC_805071608-02012009"><span class="EC_805071608-02012009"><span class="EC_805071608-02012009"><span class="EC_805071608-02012009"><span class="EC_805071608-02012009">Jun</span></span></span></span></span></span></font></div><div dir="ltr" align="left"><font face="Arial Narrow" color="#0000ff"><span class="EC_805071608-02012009"><span class="EC_805071608-02012009"></span></span></font> </div><div dir="ltr" align="left"><font face="Arial Narrow" color="#0000ff"><span class="EC_805071608-02012009"><span class="EC_805071608-02012009"></span></span></font> </div><div dir="ltr" align="left"><font face="Arial Narrow" color="#0000ff"><span class="EC_805071608-02012009"><span class="EC_805071608-02012009"></span></span></font> </div><div dir="ltr" align="left"><font face="Arial Narrow" color="#0000ff"><span class="EC_805071608-02012009"><span class="EC_805071608-02012009"></span></span></font> </div><div dir="ltr" align="left"><font face="Arial Narrow" color="#0000ff"><span class="EC_805071608-02012009"><span class="EC_805071608-02012009"></span></span></font> </div><div dir="ltr" align="left"><font face="Arial Narrow" color="#0000ff"><span class="EC_805071608-02012009"></span></font> </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></div></blockquote></div><br></div></div><br><hr>MSN保护盾,十八般武艺保障MSN安全!<span class="Apple-converted-space"> </span><a href="http://im.live.cn/safe/" target="_new">现在就下载!</a></div></span></blockquote></div><br></body></html>