Thank you Anca<br><br>In fact I am using the user-agent (picked it up from one config file), either my client either opensips.<br> if($hdr(User-Agent) =~ "me")<br> {<br> xlog("L_DBG","RLS subscribe");<br>
$var(ret_code)= rls_handle_subscribe();<br> if($var(ret_code)== 10){<br> handle_subscribe();<br> }<br> }<br> else<br> {<br> xlog("---- route 2 subscribe normal --- \n");<br>
handle_subscribe();<br> }<br><br>Now, after some fixes of the configuration, it seems the flow is correctly managed. <br>There is still one point I am not sure. I had some issues with the NOTIFY sent by PS to RLS<br>
that was not correctly managed and I fixed it by adding this condition for NOTIFY<br><br> if ((is_method("SUBSCRIBE")||is_method("NOTIFY")) && $rd == "10.62.0.155") {<br>
# in-dialog subscribe requests<br> route(2);<br> exit;<br> }<br><br>Where route(2) invokes rls_handle_notify() for NOTIFY requests.<br>
<br>Do you think it is fine? It is not perfectly clear what is called the "in-dialog" subscribe requests. <br><br>Thanks for all.<br>Andrew<br><br><br><div class="gmail_quote">2010/4/28 Anca Vamanu <span dir="ltr"><<a href="mailto:anca@opensips.org" target="_blank">anca@opensips.org</a>></span><br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Hi Andrew,<br>
<br>
Thanks for your appreciation.<br>
The thing that you need to take care with RLS are the Subscribe messages<br>
sent by the RLS server ( because this is the mechanism - when receiving<br>
a Subscribe for RLS the rls server will send more Subscribe messages to<br>
the presence server, and I see that you have the presence server<br>
collocated with rls). You need to make sure that these are handled by<br>
the presence server and that they do not go into rls again. For this you<br>
can check the source of the message and if it is the same machine just<br>
call handle_subscribe.<br>
<br>
if(is_method("SUBSCRIBE") && si == "_local_ip_")<br>
handle_subscribe();<br>
<br>
If you watch the network trace and log where each subscribe goes for<br>
processing and still notice this errors, post again an email on the list.<br>
<br>
Regards,<br>
<br>
--<br>
Anca Vamanu<br>
<a href="http://www.voice-system.ro" target="_blank">www.voice-system.ro</a><br>
<div><div></div><div><br>
<br>
<br>
<br>
Andres2 Cores2 wrote:<br>
> Hi,<br>
><br>
> First of all we would like to thank the whole opensips team. For<br>
> testing our client, we are mainly interested in the presence and rls<br>
> topics and found that a pretty good set of features is available right<br>
> now, so thanks for your job.<br>
><br>
> During our tests we encountered an issue running opensips 1.6 in<br>
> rls-server mode (simple presence works fine). It seems to us it is<br>
> just a configuration issue or a bug in the routing rules, but we can't<br>
> find out it.<br>
><br>
> From the client point of view I cannot succeed in receiving presence<br>
> Notify messages body, only rlmi parts are provided.<br>
><br>
> In fact it seems rls_handle_subscribe has issues when trying to send<br>
> Subscribes to Presence on behalf of rls. I have systematically errors<br>
> "presence:get_stored_info: record not found in hash_table" and<br>
> sometimes "Duplicate entry<br>
> 'sip:alice-list@promethee.test.com-cbb99ea81711c30ed9c0edf6' for key 2"<br>
><br>
> Typically:<br>
> Apr 26 13:45:57 [20047] ERROR:db_mysql:db_mysql_do_prepared_query:<br>
> driver error: Duplicate entry<br>
> 'sip:alice-list@promethee.test.com-cbb99ea81711c30ed9c0edf6' for key 2<br>
> Apr 26 13:45:57 [20047] ERROR:presence:update_db_subs: unsuccessful<br>
> sql insert<br>
> Apr 26 13:46:01 [20045] ERROR:presence:get_stored_info: record not<br>
> found in hash_table<br>
> Apr 26 13:46:01 [20045] ERROR:presence:handle_subscribe: getting<br>
> stored info<br>
> Apr 26 13:46:11 [20045] ERROR:presence:get_stored_info: record not<br>
> found in hash_table<br>
> Apr 26 13:46:11 [20045] ERROR:presence:handle_subscribe: getting<br>
> stored info<br>
> Apr 26 13:46:21 [20045] ERROR:presence:get_stored_info: record not<br>
> found in hash_table<br>
> Apr 26 13:46:21 [20045] ERROR:presence:handle_subscribe: getting<br>
> stored info<br>
> Apr 26 14:25:40 [20586] ERROR:presence:get_stored_info: record not<br>
> found in hash_table<br>
> Apr 26 14:25:40 [20586] ERROR:presence:handle_subscribe: getting<br>
> stored info<br>
> Apr 26 14:25:45 [20586] ERROR:presence:get_stored_info: record not<br>
> found in hash_table<br>
> Apr 26 14:25:45 [20586] ERROR:presence:handle_subscribe: getting<br>
> stored info<br>
> Apr 26 14:25:50 [20586] ERROR:presence:get_stored_info: record not<br>
> found in hash_table<br>
> Apr 26 14:25:50 [20586] ERROR:presence:handle_subscribe: getting<br>
> stored info<br>
> Apr 26 14:25:55 [20586] ERROR:presence:get_stored_info: record not<br>
> found in hash_table<br>
> Apr 26 14:25:55 [20586] ERROR:presence:handle_subscribe: getting<br>
> stored info<br>
> Apr 26 14:26:05 [20586] ERROR:presence:get_stored_info: record not<br>
> found in hash_table<br>
> Apr 26 14:26:05 [20586] ERROR:presence:handle_subscribe: getting<br>
> stored info<br>
> Apr 26 14:26:09 [20586] ERROR:presence:get_stored_info: record not<br>
> found in hash_table<br>
> Apr 26 14:26:09 [20586] ERROR:presence:handle_subscribe: getting<br>
> stored info<br>
><br>
> My main settings for presence and rls modules are:<br>
><br>
> modparam("presence|presence_xml",<br>
> "db_url","mysql://opensips:opensipsrw@localhost/opensips")<br>
> modparam("presence", "server_address", "<a href="http://sip:pres@10.62.0.155:5060" target="_blank">sip:pres@10.62.0.155:5060</a><br>
</div></div>> <<a href="http://sip:pres@10.62.0.155:5060" target="_blank">http://sip:pres@10.62.0.155:5060</a>>")<br>
<div>> modparam("presence", "clean_period", 30)<br>
> modparam("presence_xml", "integrated_xcap_server", 1)<br>
><br>
> modparam("pua", "db_url",<br>
> "mysql://opensips:opensipsrw@localhost/opensips")<br>
><br>
> # -- rls parameters --<br>
> modparam("rls","db_url", "mysql://opensips:opensipsrw@localhost/opensips")<br>
> modparam("rls", "server_address", "<a href="http://sip:rls@10.62.0.155:5060" target="_blank">sip:rls@10.62.0.155:5060</a><br>
</div>> <<a href="http://sip:rls@10.62.0.155:5060" target="_blank">http://sip:rls@10.62.0.155:5060</a>>")<br>
<div>> modparam("rls", "integrated_xcap_server", 1)<br>
> modparam("rls", "xcap_root","<a href="http://promethee.test.com:8888/xcap-root" target="_blank">http://promethee.test.com:8888/xcap-root</a>" )<br>
> modparam("rls", "presence_server", "<a href="http://sip:pres@10.62.0.155:5060" target="_blank">sip:pres@10.62.0.155:5060</a><br>
</div>> <<a href="http://sip:pres@10.62.0.155:5060" target="_blank">http://sip:pres@10.62.0.155:5060</a>>")<br>
<div>> modparam("rls", "to_presence_code", 10)<br>
> modparam("xcap_client","periodical_query",1)<br>
> modparam("xcap_client","query_period",10)<br>
> modparam("xcap_client","db_url",<br>
> "mysql://opensips:opensipsrw@localhost/opensips")<br>
><br>
> I can send you the routing rules if neeeded.<br>
><br>
> Could you please help us?<br>
><br>
> Many thanks<br>
><br>
> Andrew<br>
</div>> ------------------------------------------------------------------------<br>
><br>
> _______________________________________________<br>
> Users mailing list<br>
> <a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
> <a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
><br>
<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
</blockquote></div><br>