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

Duane Larson duane.larson at gmail.com
Sun Mar 18 21:29:53 CET 2012


Saul,

A while back in this email thread Adrian asked if the Resource-List
document existed and I showed him that it did in fact exist.  See the
database entry here

This is what I have in the xcap table for user 9012732009.
527     9012732009irock.com       <?xml version="1.0" encoding="UTF-8"
standalone="no"?><resource-lists
xmlns="urn:ietf:params:xml:ns:resource-lists"><list name="Work"><entry uri="
sip:9012732005 at coolbeans.com"><display-name>9012732005</display-name></entry><entry
uri="sip:9013349020 at coolbeans.com"><display-name>9013349020</display-name></entry></list><list
name="RootGroup"/></resource-lists>  4
9b67239aba25756f119fbcce38b156f3        0       index   0


523     9012732009irock.com       <?xml version="1.0" encoding="UTF-8"
standalone="no"?><ruleset
xmlns="urn:ietf:params:xml:ns:common-policy"><rule
id="presence_allow"><conditions><identity><one id="
sip:9012732005 at coolbeans.com"/><one
id="sip:9013349020 at coolbeans.com"/></identity></conditions><actions><sub-handling
xmlns="urn:ietf:params:xml:ns:pres-rules">allow</sub-handling></actions><transformations><provide-devices
xmlns="urn:ietf:params:xml:ns:pres-rules"><all-devices/></provide-devices><provide-persons
xmlns="urn:ietf:params:xml:ns:pres-rules"><all-persons/></provide-persons><provide-services
xmlns="urn:ietf:params:xml:ns:pres-rules"><all-services/></provide-services></transformations></rule></ruleset>
2       7389ddfe17038e107feb98b0382ed1a9        0       index.xml    0

1291    9012732009      irock.com       <?xml version="1.0"
encoding="UTF-8"?>\n   <rls-services
xmlns="urn:ietf:params:xml:ns:rls-services"\n
xmlns:rl="urn:ietf:params:xml:ns:resource-lists"\
n      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">\n    <service
uri="sip:9012732009-list at irock.com">\n     <resource-list>
http://xcap.aethercommunications.com/xcap-root/resource-lists/u
sers/sip:9012732009 at irock.com/index</resource-list>\n     <packages>\n
<package>presence</package>\n     </packages>\n    </service>\n    <service
uri="sip:9012732009-list at irock.com">\n      <
list name="9012732009-list">\n        <rl:entry uri="
sip:9012732005 at coolbeans.com"/>\n        <rl:entry uri="
sip:9013349020 at coolbeans.com"/>\n      </list>\n      <packages>\n
<package>prese
nce</package>\n      </packages>\n    </service>\n   </rls-services>\n
8       0a66a8b47732adca8badebeece871fe4        0       index   0

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>
     <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 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.




On Thu, Mar 15, 2012 at 3:36 AM, Saúl Ibarra Corretgé
<saul at ag-projects.com>wrote:

> Hi Duane,
>
> The mail was filtered as spam so I didn't see it, sorry about that.
>
> On Mar 14, 2012, at 8:12 PM, Duane Larson wrote:
>
> > Saul,
> >
> > I sent them to your email address directly.  Let me know if you didn't
> get that email.
> >
>
> I think I found the problem :-) You are subscribing to this service URi:
> sip:9012732009-list at irock.com which according to the RLS services
> document points to the following list:
> http://xcap.xxxxxxx.com/xcap-root/resource-lists/users/sip:9012732009@irock.com/index
>
> Now, that list that you are referencing needs to exist in the
> resources-list document, does it?
>
> I also see that you defined another service with same URI and this time
> there is a list item in it. The document is bogus because the service URI
> needs to be unique (RFC4826, sec 4.4.5). Moreover, I don't know if OpenSIPS
> currently supports expanding the resource-list element in the RLS document,
> so please test it out with the second approach, that is:
>
>    <service uri="sip:9012732009-list at irock.com">
>      <list name="9012732009-list">
>         <rl:entry uri="sip:9012732005 at xxxxxxxxxxxxxx.com"/>
>        <rl:entry uri="sip:9013349020 at xxxxxxxxxxxxxx.com"/>
>      </list>
>      <packages>
>        <package>presence</package>
>      </packages>
>    </service>
>
> and remove every other service.
>
>
> Regards,
>
> --
> Saúl Ibarra Corretgé
> AG Projects
>
>
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>



-- 
--
*--*--*--*--*--*
Duane
*--*--*--*--*--*
--
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20120318/5748b754/attachment.htm>


More information about the Users mailing list