[OpenSIPS-Users] Trying to get Snom Contact List to work with OpenSIPS RLS

Saúl Ibarra Corretgé saul at ag-projects.com
Mon Mar 19 10:46:58 CET 2012


Hi Duane,

[snip]

>  
> I created it by doing the following
>  
> PUT /xcap-root/rls-services/users/sip:9012732009 at irock.com/index HTTP/1.1.
> Accept-Encoding: identity.
> Content-Length: 798.
> Host: xcap.X.com.
> User-Agent: python-xcaplib/1.0.16.
> Connection: close.
> Content-Type: application/x-www-form-urlencoded.
> Authorization: Digest username="9012732009", realm="irock.com", nonce="332840634855165799770139975774574805066135619005395955328", uri="/xcap-root/rls-services/users/sip:9012732009 at irock.com/index", response="f76c6a6375156936cb0c5d6137a325ad", opaque="0a430b4a4d580e7d473c2697c9d61477-MzMyODQwNjM0ODU1MTY1Nzk5NzcwMTM5OTc1Nzc0NTc0ODA1MDY2MTM1NjE5MDA1Mzk1OTU1MzI4LDE3My4yMDMuODEuMTExLDEzMjc4MTQzOTE=", algorithm="MD5", qop=auth, nc=00000001, cnonce="dfd8addb86008b0e".
> .
> ##
> T 2012/01/28 23:19:51.385478 173.X.X.X:39849 -> 173.X.X.X:80 [AP]
> <?xml version="1.0" encoding="UTF-8"?>
>    <rls-services xmlns="urn:ietf:params:xml:ns:rls-services"
>       xmlns:rl="urn:ietf:params:xml:ns:resource-lists"
>       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
>     <service uri="sip:9012732009-list at irock.com">
>      <resource-list>http://xcap.X.com/xcap-root/resource-lists/users/sip:9012732009@irock.com/index</resource-list>

^^^ here, in the resource-list element, you need to insert the xpath for a *single* list in the resource-lists document. You are adding a link to the whole document for a given user.

>      <packages>
>       <package>presence</package>
>      </packages>
>     </service>
>     <service uri="sip:9012732009-list at irock.com">
>       <list name="9012732009-list">
>         <rl:entry uri="sip:9012732005 at coolbeans.com"/>
>         <rl:entry uri="sip:9013349020 at coolbeans.com"/>
>       </list>
>       <packages>
>         <package>presence</package>
>       </packages>
>     </service>
>    </rls-services>
> ####
> T 2012/01/28 23:19:52.641120 173.X.X.X:80 -> 173.X.X.X:39849 [AP]
> HTTP/1.1 201 Created.
> Date: Sun, 29 Jan 2012 05:19:52 GMT.
> Content-Length: 0.
> ETag: "0a66a8b47732adca8badebeece871fe4".
> Content-Type: application/rls-services+xml.
> Server: OpenXCAP/2.0.1.
> Connection: close.
>  
>  
>  
>  
> I read over (RFC4826, sec 4.4.5) and it says
> "The URI in the "uri" attribute of the <service> element MUST be
>       unique amongst all other URIs in "uri" elements in any <service>
>       element in any document on a particular server"
>  
> If I am reading this correctly it is telling me that "<service uri="sip:9012732009-list at irock.com">" needs to be unique.  I am pretty positive this is a unique URI and it is not created 

Well, just read the XML you pasted above, you have the same URI twice:

>     <service uri="sip:9012732009-list at irock.com">
^^ service URI 1
>      <resource-list>http://xcap.X.com/xcap-root/resource-lists/users/sip:9012732009@irock.com/index</resource-list>

>      <packages>
>       <package>presence</package>
>      </packages>
>     </service>
>     <service uri="sip:9012732009-list at irock.com">
^^ service URI 2
>       <list name="9012732009-list">


The are the same.

> anywhere else.  Also the RFC says
> "If a server is asked to set the URI to something that already
>       exists, the server MUST reject the request with a 409,"
>  
> I am not seeing a 409 error.  So if I am understanding RFC4826 then I believe I have done everything right.
>  

Your documents are bogus. That's about it. The XCAP server may have a bug as well, it should have gave that 409 error when pushing the document, though.


Regards,

--
Saúl Ibarra Corretgé
AG Projects






More information about the Users mailing list