[OpenSIPS-Users] [RLS] Cannot found service uri in rls-services

Anca Vamanu anca at opensips.org
Mon Dec 15 16:06:15 CET 2008


Hi Eric,

This problem is not that simple.
Indeed the RLS module considers the list URI to be only the user at domain 
part from the R-URI. 
The RLS RFC(4662) says ( in section 3) that:

This resource list is
   represented by a SIP URI.

And indeed as you also said, the SIP URI includes also the parameters.
But, if we were to use the parameters also when querying the XCAP server 
- things will not be that simple. For example, if a URI has 
transport=udp parameter, it should be considered the same as the URI not 
having this parameter( as udp is default). Moreover, the order of the 
parameters should not matter.
For this reasons it seems more logical to treat the list uri as an AOR - 
considering only the user and domain part.
As there isn't a clear answer to this issue, I will post a question on 
the SIP Implementors list hoping to get a clarification from there.
I will come back with more info.

regards,
Anca

Eric PTAK wrote:
> After a look at modules/rls/subcribe.c from trunk, I found line 557 :
>         if(uandd_to_uri(msg->parsed_uri.user, msg->parsed_uri.host,
>                     &subs.pres_uri)< 0)
>
> then, line 566 :
>         if( get_resource_list(&subs.pres_uri, fu.user, fu.host,
>                     &service_node, &doc) < 0)
>
> In my memory, the pres_uri should include the parameters.
>
> Eric.
>
>
> 2008/12/12 Eric PTAK <eric.ptak.fr <http://eric.ptak.fr>@gmail.com 
> <http://gmail.com>>
>
>     Hi all,
>      
>     I'm currently integrating OpenSIPS with OpenXCAP.
>     After a lot a problem with ubuntu libraries in order to setup
>     openxcap, I'm now facing to another issue with RLS module.
>     I'm using Mercuro and it subsribes to
>     sip:alice at domain;pres-list=Default, but the RLS looks for a
>     service at sip:alice at domain so it response by a 404 Not Found error.
>      
>     This is the xml files from xcap :
>      
>     eptak at rd-srv-devlnx2:~$ <mailto:eptak at rd-srv-devlnx2:%7E$>
>     xcapclient --app rls-services get
>     get
>     http://10.26.52.122:8080/xcap-root/rls-services/users/sip:alice@domain/index
>     etag: "d113935c4c7324c99077a925492251b2"
>     content-type: application/rls-services+xml
>     content-length: 467
>     <?xml version="1.0" encoding="utf-8"?>
>     <rls-services xmlns:rl="urn:ietf:params:xml:ns:resource-lists"
>     xmlns="urn:ietf:params:xml:ns:rls-services">
>       <service uri="sip:alice at domain;pres-list=Default">
>        
>     <resource-list>http://10.26.52.122:8080/xcap-root/resource-lists/users/sip%3aalice%40domain/index/~~/resource-lists/list%5b@name=%22Default%22%5d
>     <http://10.26.52.122:8080/xcap-root/resource-lists/users/sip%3aalice%40domain/index/%7E%7E/resource-lists/list%5b@name=%22Default%22%5d></resource-list>
>         <packages>
>           <package>presence</package>
>         </packages>
>       </service>
>     </rls-services>
>
>     eptak at rd-srv-devlnx2:~$ <mailto:eptak at rd-srv-devlnx2:%7E$>
>     xcapclient --app resource-lists get
>     get
>     http://10.26.52.122:8080/xcap-root/resource-lists/users/sip:alice@domain/index
>     etag: "e153e7e4688122a04434b77cd1ecb5e1"
>     content-type: application/resource-lists+xml
>     content-length: 324
>     <?xml version="1.0" encoding="utf-8"?>
>     <resource-lists xmlns="urn:ietf:params:xml:ns:resource-lists">
>       <list name="Default">
>         <display-name>All Contacts</display-name>
>       <entry uri="sip:bob at domain"
>     xmlns="urn:ietf:params:xml:ns:resource-lists">
>       <display-name>bob</display-name>
>     </entry></list>
>     </resource-lists>
>     and this is the stack trace :
>      
>     Dec 12 15:17:15 rd-srv-devlnx2 /usr/local/sbin/opensips[25465]:
>     SUBSCRIBE presence from sip:alice at domain to
>     sip:alice at domain;pres-list=Default (Mercuro IMS Client Beta
>     (4.0.1011.0))
>     Dec 12 15:17:15 rd-srv-devlnx2 /usr/local/sbin/opensips[25465]:
>     DBG:core:parse_headers: flags=ffffffffffffffff
>     Dec 12 15:17:15 rd-srv-devlnx2 /usr/local/sbin/opensips[25465]:
>     DBG:core:parse_headers: flags=ffffffffffffffff
>     Dec 12 15:17:15 rd-srv-devlnx2 /usr/local/sbin/opensips[25465]:
>     DBG:presence:search_event: start event= [presence]
>     Dec 12 15:17:16 rd-srv-devlnx2 /usr/local/sbin/opensips[25465]:
>     DBG:rls:rls_handle_subscribe: 'To' header ALREADY PARSED:
>     <sip:alice at domain;pres-list=Default>
>     Dec 12 15:17:16 rd-srv-devlnx2 /usr/local/sbin/opensips[25465]:
>     DBG:rls:get_resource_list: Searched RL document for user
>     sip:alice at domain
>     Dec 12 15:17:16 rd-srv-devlnx2 /usr/local/sbin/opensips[25465]:
>     DBG:core:db_new_result: allocate 28 bytes for result set at 0x81b52b0
>     Dec 12 15:17:16 rd-srv-devlnx2 /usr/local/sbin/opensips[25465]:
>     DBG:db_mysql:db_mysql_get_columns: 2 columns returned from the query
>     Dec 12 15:17:16 rd-srv-devlnx2 /usr/local/sbin/opensips[25465]:
>     DBG:core:db_allocate_columns: allocate 8 bytes for result names at
>     0x81b5af8
>     Dec 12 15:17:16 rd-srv-devlnx2 /usr/local/sbin/opensips[25465]:
>     DBG:core:db_allocate_columns: allocate 8 bytes for result types at
>     0x81b5360
>     Dec 12 15:17:16 rd-srv-devlnx2 /usr/local/sbin/opensips[25465]:
>     DBG:db_mysql:db_mysql_get_columns: allocate 8 bytes for
>     RES_NAMES[0] at 0x81b5820
>     Dec 12 15:17:16 rd-srv-devlnx2 /usr/local/sbin/opensips[25465]:
>     DBG:db_mysql:db_mysql_get_columns: RES_NAMES(0x81b5820)[0]=[doc]
>     Dec 12 15:17:16 rd-srv-devlnx2 /usr/local/sbin/opensips[25465]:
>     DBG:db_mysql:db_mysql_get_columns: use DB_BLOB result type
>     Dec 12 15:17:16 rd-srv-devlnx2 /usr/local/sbin/opensips[25465]:
>     DBG:db_mysql:db_mysql_get_columns: allocate 8 bytes for
>     RES_NAMES[1] at 0x81b5838
>     Dec 12 15:17:16 rd-srv-devlnx2 /usr/local/sbin/opensips[25465]:
>     DBG:db_mysql:db_mysql_get_columns: RES_NAMES(0x81b5838)[1]=[etag]
>     Dec 12 15:17:16 rd-srv-devlnx2 /usr/local/sbin/opensips[25465]:
>     DBG:db_mysql:db_mysql_get_columns: use DB_STRING result type
>     Dec 12 15:17:16 rd-srv-devlnx2 /usr/local/sbin/opensips[25465]:
>     DBG:db_mysql:db_mysql_convert_rows: allocate 8 bytes for rows at
>     0x81b5948
>     Dec 12 15:17:16 rd-srv-devlnx2 /usr/local/sbin/opensips[25465]:
>     DBG:db_mysql:db_mysql_convert_row: allocate 40 bytes for row
>     values at 0x81b5860
>     Dec 12 15:17:16 rd-srv-devlnx2 /usr/local/sbin/opensips[25465]:
>     DBG:db_mysql:db_mysql_str2val: converting BLOB [<?xml
>     version="1.0" encoding="utf-8"?>^M <rls-services
>     xmlns:rl="urn:ietf:params:xml:ns:resource-lists"
>     xmlns="urn:ietf:params:xml:ns:rls-services">^M   <service
>     uri="sip:alice at domain;pres-list=Default">^M    
>     <resource-list>http://10.26.52.122:8080/xcap-root/resource-lists/users/sip%3aalice%40domain/index/~~/resource-lists/list%5b@name=%22Default%22%5d
>     <http://10.26.52.122:8080/xcap-root/resource-lists/users/sip%3aalice%40domain/index/%7E%7E/resource-lists/list%5b@name=%22Default%22%5d></resource-list>^M    
>     <packages>^M       <package>presence</package>^M    
>     </packages>^M   </service>^M </rls-services>]
>     Dec 12 15:17:16 rd-srv-devlnx2 /usr/local/sbin/opensips[25465]:
>     DBG:db_mysql:db_mysql_str2val: converting STRING
>     [d113935c4c7324c99077a925492251b2]
>     Dec 12 15:17:16 rd-srv-devlnx2 /usr/local/sbin/opensips[25465]:
>     DBG:rls:get_resource_list: rls_services document: <?xml
>     version="1.0" encoding="utf-8"?>^M <rls-services
>     xmlns:rl="urn:ietf:params:xml:ns:resource-lists"
>     xmlns="urn:ietf:params:xml:ns:rls-services">^M   <service
>     uri="sip:alice at domain;pres-list=Default">^M    
>     <resource-list>http://10.26.52.122:8080/xcap-root/resource-lists/users/sip%3aalice%40domain/index/~~/resource-lists/list%5b@name=%22Default%22%5d
>     <http://10.26.52.122:8080/xcap-root/resource-lists/users/sip%3aalice%40domain/index/%7E%7E/resource-lists/list%5b@name=%22Default%22%5d></resource-list>^M    
>     <packages>^M       <package>presence</package>^M    
>     </packages>^M   </service>^M </rls-services>
>     Dec 12 15:17:16 rd-srv-devlnx2 /usr/local/sbin/opensips[25465]:
>     DBG:rls:get_resource_list: service uri sip:alice at domain not found
>     in rl document for user sip:alice at domain
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>   




More information about the Users mailing list