I forward this mail with an attached fix for the issue I encountered.<br>It enables the service lookup to include parameters from the URI.<br>So the RLS now respond with a 200OK to the subscribe request for a parametized service uri.<br>
<br>But I&#39;m still stuck because the service node parser doesn&#39;t handle resource-list tag in the service node so the RLS doesn&#39;t expand subscription...<br>This could be fixed inside notify.c:process_list_and_exec<br>
<br>Eric.<br><br><br><div class="gmail_quote">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">Eric PTAK</b> <span dir="ltr">&lt;<a href="http://eric.ptak.fr">eric.ptak.fr</a>@<a href="http://gmail.com">gmail.com</a>&gt;</span><br>
Date: 2008/12/13<br>Subject: Re: [RLS] Cannot found service uri in rls-services<br>To: <a href="mailto:users@lists.opensips.org">users@lists.opensips.org</a><br><br><br>After a look at modules/rls/subcribe.c from trunk, I found line 557 :<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if(uandd_to_uri(msg-&gt;parsed_uri.user, msg-&gt;parsed_uri.host,<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &amp;subs.pres_uri)&lt; 0)<br><br>then, line 566 :<br>

&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if( get_resource_list(&amp;subs.pres_uri, fu.user, fu.host,<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &amp;service_node, &amp;doc) &lt; 0)<br><br>In my memory, the pres_uri should include the parameters.<br><br>Eric.<br><br><br><div class="gmail_quote">

2008/12/12 Eric PTAK <span dir="ltr">&lt;<a href="http://eric.ptak.fr" target="_blank">eric.ptak.fr</a>@<a href="http://gmail.com" target="_blank">gmail.com</a>&gt;</span><div><div></div><div class="Wj3C7c"><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div>Hi all,</div>
<div>&nbsp;</div>
<div>I&#39;m currently integrating OpenSIPS with OpenXCAP.</div>
<div>After a lot a problem with ubuntu libraries in order to setup openxcap, I&#39;m now facing to another issue with RLS module.</div>
<div>I&#39;m using Mercuro and it subsribes to sip:alice@domain;pres-list=Default, but the RLS looks for a service at sip:alice@domain so it response by a 404 Not Found error.</div>
<div>&nbsp;</div>
<div>This is the xml files from xcap :</div>
<div>&nbsp;</div>
<div><a href="mailto:eptak@rd-srv-devlnx2:%7E$" target="_blank">eptak@rd-srv-devlnx2:~$</a> xcapclient --app rls-services get<br>get <a href="http://10.26.52.122:8080/xcap-root/rls-services/users/sip:alice@domain/index" target="_blank">http://10.26.52.122:8080/xcap-root/rls-services/users/sip:alice@domain/index</a><br>



etag: &quot;d113935c4c7324c99077a925492251b2&quot;<br>content-type: application/rls-services+xml<br>content-length: 467<br>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;<br>&lt;rls-services xmlns:rl=&quot;urn:ietf:params:xml:ns:resource-lists&quot; xmlns=&quot;urn:ietf:params:xml:ns:rls-services&quot;&gt;<br>



&nbsp; &lt;service uri=&quot;sip:alice@domain;pres-list=Default&quot;&gt;<br>&nbsp;&nbsp;&nbsp; &lt;resource-list&gt;<a href="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" target="_blank">http://10.26.52.122:8080/xcap-root/resource-lists/users/sip%3aalice%40domain/index/~~/resource-lists/list%5b@name=%22Default%22%5d</a>&lt;/resource-list&gt;<br>



&nbsp;&nbsp;&nbsp; &lt;packages&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;package&gt;presence&lt;/package&gt;<br>&nbsp;&nbsp;&nbsp; &lt;/packages&gt;<br>&nbsp; &lt;/service&gt;<br>&lt;/rls-services&gt;</div>
<div><br><a href="mailto:eptak@rd-srv-devlnx2:%7E$" target="_blank">eptak@rd-srv-devlnx2:~$</a> xcapclient --app resource-lists get<br>get <a href="http://10.26.52.122:8080/xcap-root/resource-lists/users/sip:alice@domain/index" target="_blank">http://10.26.52.122:8080/xcap-root/resource-lists/users/sip:alice@domain/index</a><br>



etag: &quot;e153e7e4688122a04434b77cd1ecb5e1&quot;<br>content-type: application/resource-lists+xml<br>content-length: 324<br>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;<br>&lt;resource-lists xmlns=&quot;urn:ietf:params:xml:ns:resource-lists&quot;&gt;<br>



&nbsp; &lt;list name=&quot;Default&quot;&gt;<br>&nbsp;&nbsp;&nbsp; &lt;display-name&gt;All Contacts&lt;/display-name&gt;<br>&nbsp; &lt;entry uri=&quot;sip:bob@domain&quot; xmlns=&quot;urn:ietf:params:xml:ns:resource-lists&quot;&gt;<br>&nbsp; &lt;display-name&gt;bob&lt;/display-name&gt;<br>



&lt;/entry&gt;&lt;/list&gt;<br>&lt;/resource-lists&gt;<br></div>
<div>and this is the stack trace :</div>
<div>&nbsp;</div>
<div>Dec 12 15:17:15 rd-srv-devlnx2 /usr/local/sbin/opensips[25465]: SUBSCRIBE presence from sip:alice@domain to sip:alice@domain;pres-list=Default (Mercuro IMS Client Beta (4.0.1011.0))<br>Dec 12 15:17:15 rd-srv-devlnx2 /usr/local/sbin/opensips[25465]: DBG:core:parse_headers: flags=ffffffffffffffff<br>



Dec 12 15:17:15 rd-srv-devlnx2 /usr/local/sbin/opensips[25465]: DBG:core:parse_headers: flags=ffffffffffffffff<br>Dec 12 15:17:15 rd-srv-devlnx2 /usr/local/sbin/opensips[25465]: DBG:presence:search_event: start event= [presence]<br>



Dec 12 15:17:16 rd-srv-devlnx2 /usr/local/sbin/opensips[25465]: DBG:rls:rls_handle_subscribe: &#39;To&#39; header ALREADY PARSED: &lt;sip:alice@domain;pres-list=Default&gt;<br>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@domain<br>



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



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



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<br>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]<br>



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



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]<br>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<br>



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



Dec 12 15:17:16 rd-srv-devlnx2 /usr/local/sbin/opensips[25465]: DBG:db_mysql:db_mysql_str2val: converting BLOB [&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;^M &lt;rls-services xmlns:rl=&quot;urn:ietf:params:xml:ns:resource-lists&quot; xmlns=&quot;urn:ietf:params:xml:ns:rls-services&quot;&gt;^M&nbsp;&nbsp; &lt;service uri=&quot;sip:alice@domain;pres-list=Default&quot;&gt;^M&nbsp;&nbsp;&nbsp;&nbsp; &lt;resource-list&gt;<a href="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" target="_blank">http://10.26.52.122:8080/xcap-root/resource-lists/users/sip%3aalice%40domain/index/~~/resource-lists/list%5b@name=%22Default%22%5d</a>&lt;/resource-list&gt;^M&nbsp;&nbsp;&nbsp;&nbsp; &lt;packages&gt;^M&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;package&gt;presence&lt;/package&gt;^M&nbsp;&nbsp;&nbsp;&nbsp; &lt;/packages&gt;^M&nbsp;&nbsp; &lt;/service&gt;^M &lt;/rls-services&gt;]<br>



Dec 12 15:17:16 rd-srv-devlnx2 /usr/local/sbin/opensips[25465]: DBG:db_mysql:db_mysql_str2val: converting STRING [d113935c4c7324c99077a925492251b2]<br>Dec 12 15:17:16 rd-srv-devlnx2 /usr/local/sbin/opensips[25465]: DBG:rls:get_resource_list: rls_services document: &lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;^M &lt;rls-services xmlns:rl=&quot;urn:ietf:params:xml:ns:resource-lists&quot; xmlns=&quot;urn:ietf:params:xml:ns:rls-services&quot;&gt;^M&nbsp;&nbsp; &lt;service uri=&quot;sip:alice@domain;pres-list=Default&quot;&gt;^M&nbsp;&nbsp;&nbsp;&nbsp; &lt;resource-list&gt;<a href="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" target="_blank">http://10.26.52.122:8080/xcap-root/resource-lists/users/sip%3aalice%40domain/index/~~/resource-lists/list%5b@name=%22Default%22%5d</a>&lt;/resource-list&gt;^M&nbsp;&nbsp;&nbsp;&nbsp; &lt;packages&gt;^M&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;package&gt;presence&lt;/package&gt;^M&nbsp;&nbsp;&nbsp;&nbsp; &lt;/packages&gt;^M&nbsp;&nbsp; &lt;/service&gt;^M &lt;/rls-services&gt;<br>



Dec 12 15:17:16 rd-srv-devlnx2 /usr/local/sbin/opensips[25465]: DBG:rls:get_resource_list: service uri sip:alice@domain not found in rl document for user sip:alice@domain<br></div>
</blockquote></div></div></div><br>
</div><br>