<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>
</head>
<body class='hmmessage'>
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: users@lists.opensips.org<BR>From: ag@ag-projects.com<BR>To: jun.wen@msn.com<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 = <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 = <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> Adrian Georgescu [<A href="mailto:ag@ag-projects.com">mailto:ag@ag-projects.com</A>] <BR><B>Sent:</B> 2009年1月7日 15: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>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> 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?
<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 <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=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> 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=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 <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 = <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> </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 = <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=EC_OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR>
<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=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> 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 <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> 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安全! <a href='http://im.live.cn/safe/' target='_new'>现在就下载!</a></body>
</html>