Thanks Anca<br><br>I have another issue with RLS Subscription expiration. I send a Subscribe to RLS and I expect a final (Subscription Ste=terminated) Notify when the subscriptione expires. But I receive no such message.<br>
On the other hand, after a few hours it seems indeed the subscription is not active anymore.<br><br>Sorry to bother you on this, maybe it is a configuration issue.<br><br>Best regards<br><br>Andrés<br><br><br><div class="gmail_quote">
2010/4/28 Anca Vamanu <span dir="ltr"><<a href="mailto:anca@opensips.org">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;">
<div><div></div><div class="h5">Andres2 Cores2 wrote:<br>
> Thank you Anca<br>
><br>
> In fact I am using the user-agent (picked it up from one config file),<br>
> 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<br>
> correctly managed.<br>
> There is still one point I am not sure. I had some issues with the<br>
> NOTIFY sent by PS to RLS<br>
> that was not correctly managed and I fixed it by adding this condition<br>
> for NOTIFY<br>
><br>
> if<br>
> ((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<br>
> "in-dialog" subscribe requests.<br>
><br>
</div></div>Yes, the check is all right. The most common check is if "uri ==<br>
myself", because then it is sure that the Notify is addressed to<br>
OpenSIPS. The stricter check is uri== "what you set in server_address<br>
prameter for module rls".<br>
That comment line with in-dialog requests is put there because that if<br>
you look in the default configuration file - initial and in-dialog<br>
rquests are processed separately. The type is determined at the<br>
beginning and there are two different block for the two types of<br>
messages. So, for Subscribes route(2) is called in two places in the<br>
script - once for the initial ones and also for the in dialog ones.<br>
Anyhow that comment is not something you should worry about.<br>
<div class="im"><br>
Regards,<br>
<br>
--<br>
Anca Vamanu<br>
<a href="http://www.voice-system.ro" target="_blank">www.voice-system.ro</a><br>
<br>
<br>
</div>> Thanks for all.<br>
> Andrew<br>
><br>
><br>
> 2010/4/28 Anca Vamanu <<a href="mailto:anca@opensips.org">anca@opensips.org</a> <mailto:<a href="mailto:anca@opensips.org">anca@opensips.org</a>>><br>
<div class="im">><br>
> Hi Andrew,<br>
><br>
> Thanks for your appreciation.<br>
> The thing that you need to take care with RLS are the Subscribe<br>
> messages<br>
> sent by the RLS server ( because this is the mechanism - when<br>
> receiving<br>
> a Subscribe for RLS the rls server will send more Subscribe<br>
> 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<br>
> 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<br>
> the list.<br>
><br>
> Regards,<br>
><br>
> --<br>
> Anca Vamanu<br>
</div>> <a href="http://www.voice-system.ro" target="_blank">www.voice-system.ro</a> <<a href="http://www.voice-system.ro" target="_blank">http://www.voice-system.ro</a>><br>
<div><div></div><div class="h5">><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<br>
> 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<br>
> 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<br>
> 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<br>
> 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<br>
> 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",<br>
> "<a href="http://sip:pres@10.62.0.155:5060" target="_blank">sip:pres@10.62.0.155:5060</a> <<a href="http://sip:pres@10.62.0.155:5060" target="_blank">http://sip:pres@10.62.0.155:5060</a>><br>
> > <<a href="http://sip:pres@10.62.0.155:5060" target="_blank">http://sip:pres@10.62.0.155:5060</a>>")<br>
> > 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",<br>
> "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>
> <<a href="http://sip:rls@10.62.0.155:5060" target="_blank">http://sip:rls@10.62.0.155:5060</a>><br>
> > <<a href="http://sip:rls@10.62.0.155:5060" target="_blank">http://sip:rls@10.62.0.155:5060</a>>")<br>
> > modparam("rls", "integrated_xcap_server", 1)<br>
> > modparam("rls",<br>
> "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>
> <<a href="http://sip:pres@10.62.0.155:5060" target="_blank">http://sip:pres@10.62.0.155:5060</a>><br>
> > <<a href="http://sip:pres@10.62.0.155:5060" target="_blank">http://sip:pres@10.62.0.155:5060</a>>")<br>
> > 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>
> ><br>
> ------------------------------------------------------------------------<br>
> ><br>
> > _______________________________________________<br>
> > Users mailing list<br>
</div></div>> > <a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a> <mailto:<a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>><br>
<div class="im">> > <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>
</div>> <a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a> <mailto:<a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>><br>
<div><div></div><div class="h5">> <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>
><br>
> _______________________________________________<br>
> Users mailing list<br>
> <a href="mailto:Users@lists.opensips.org">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">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>
</div></div></blockquote></div><br>