<div>I&#39;m using non rls presence mode. When a user logs in , he gets the latest presence for all the users correctly who are online at that time, and if any of the online users goes offline I get NOTIFY as well. In this logged in state, if any other user newly logs in , this presentity is not getting NOTIFIED by the presence server. The newly logged in user gets all the presence NOTIFIES (incl his own) correctly. I can reproduce this almost every time. I&#39;m not sure if my config is wrong or there is a bug.</div>

<div> </div>
<div>Please help.</div>
<div> </div>
<div>Here is my config.</div>
<div> </div>
<div>#auto_aliases=no</div>
<div> </div>
<div>loadmodule &quot;db_mysql.so&quot;<br>loadmodule &quot;signaling.so&quot;<br>loadmodule &quot;sl.so&quot;<br>loadmodule &quot;tm.so&quot;<br>loadmodule &quot;rr.so&quot;<br>loadmodule &quot;maxfwd.so&quot;<br>loadmodule &quot;usrloc.so&quot;<br>
loadmodule &quot;registrar.so&quot;<br>loadmodule &quot;textops.so&quot;<br>loadmodule &quot;mi_fifo.so&quot;<br>loadmodule &quot;uri_db.so&quot;<br>loadmodule &quot;uri.so&quot;<br>loadmodule &quot;xlog.so&quot;<br>loadmodule &quot;acc.so&quot;<br>
loadmodule &quot;nathelper.so&quot;<br>loadmodule &quot;mi_xmlrpc.so&quot;</div>
<div>modparam(&quot;mi_xmlrpc&quot;, &quot;log_file&quot;, &quot;/var/log/openser-xmlrpc.log&quot;)<br>modparam(&quot;mi_xmlrpc&quot;, &quot;port&quot;, 8000)</div>
<div>modparam(&quot;usrloc&quot;, &quot;nat_bflag&quot;, 6)</div>
<div> </div>
<div># -- nathelper params --<br>modparam(&quot;nathelper&quot;, &quot;rtpproxy_sock&quot;, &quot;udp:localhost:22222&quot;)<br>modparam(&quot;nathelper&quot;, &quot;natping_interval&quot;, 30)<br>modparam(&quot;nathelper&quot;, &quot;ping_nated_only&quot;, 1) # Ping only clients behind NAT<br>
modparam(&quot;nathelper&quot;, &quot;sipping_bflag&quot;, 7)<br>modparam(&quot;nathelper|registrar&quot;, &quot;received_avp&quot;, &quot;$avp(i:42)&quot;)<br>modparam(&quot;nathelper&quot;, &quot;sipping_from&quot;, &quot;<a href="mailto:sip%3Apinger@sips01.smithmicro.com">sip:pinger@sips01.smithmicro.com</a>&quot;)</div>

<div> </div>
<div>loadmodule &quot;auth.so&quot;<br>loadmodule &quot;auth_db.so&quot;<br>loadmodule &quot;alias_db.so&quot;<br><br>#loadmodule &quot;domain.so&quot;<br><br>loadmodule &quot;presence.so&quot;<br>loadmodule &quot;presence_xml.so&quot;<br>
loadmodule &quot;presence_mwi.so&quot;<br>loadmodule &quot;pua.so&quot;<br>loadmodule &quot;pua_mi.so&quot;<br>#loadmodule &quot;rls.so&quot;</div>
<div> </div>
<div># ----------------- setting module-specific parameters ---------------</div>
<div># ----- mi_fifo params -----<br>modparam(&quot;mi_fifo&quot;, &quot;fifo_name&quot;, &quot;/tmp/opensips_fifo&quot;)</div>
<div> </div>
<div># ----- rr params -----<br># add value to ;lr param to cope with most of the UAs<br>modparam(&quot;rr&quot;, &quot;enable_full_lr&quot;, 1)</div>
<div><br># do not append from tag to the RR (no need for this script)<br>modparam(&quot;rr&quot;, &quot;append_fromtag&quot;, 0)</div>
<div> </div>
<div># ----- registrar params -----<br>modparam(&quot;registrar&quot;, &quot;method_filtering&quot;, 1)</div>
<div> </div>
<div># ----- usrloc params -----<br>modparam(&quot;usrloc&quot;, &quot;db_mode&quot;,   0)<br>/* uncomment the following lines if you want to enable DB persistency<br>   for location entries */<br>modparam(&quot;usrloc&quot;, &quot;db_mode&quot;,   2)<br>
modparam(&quot;usrloc&quot;, &quot;db_url&quot;,<br>        &quot;mysql://opensips:opensipsrw@localhost/opensips&quot;)</div>
<div><br>modparam(&quot;uri_db&quot;, &quot;use_uri_table&quot;, 0)<br>modparam(&quot;uri_db&quot;, &quot;db_url&quot;, &quot;&quot;)</div>
<div><br># ----- acc params -----<br>/* what sepcial events should be accounted ? */<br>modparam(&quot;acc&quot;, &quot;early_media&quot;, 1)<br>modparam(&quot;acc&quot;, &quot;report_ack&quot;, 1)<br>modparam(&quot;acc&quot;, &quot;report_cancels&quot;, 1)<br>
modparam(&quot;acc&quot;, &quot;detect_direction&quot;, 0)<br>/* account triggers (flags) */<br>modparam(&quot;acc&quot;, &quot;failed_transaction_flag&quot;, 3)<br>modparam(&quot;acc&quot;, &quot;log_flag&quot;, 1)<br>modparam(&quot;acc&quot;, &quot;log_missed_flag&quot;, 2)<br>
/* uncomment the following lines to enable DB accounting also */<br>modparam(&quot;acc&quot;, &quot;db_flag&quot;, 1)<br>modparam(&quot;acc&quot;, &quot;db_missed_flag&quot;, 2)</div>
<div><br>modparam(&quot;auth_db&quot;, &quot;calculate_ha1&quot;, yes)<br>modparam(&quot;auth_db&quot;, &quot;password_column&quot;, &quot;password&quot;)<br>modparam(&quot;auth_db&quot;, &quot;db_url&quot;,<br>        &quot;mysql://opensips:opensipsrw@localhost/opensips&quot;)<br>
modparam(&quot;auth_db&quot;, &quot;load_credentials&quot;, &quot;&quot;)</div>
<div><br><br>modparam(&quot;alias_db&quot;, &quot;db_url&quot;,<br>        &quot;mysql://opensips:opensipsrw@localhost/opensips&quot;)</div>
<div> </div>
<div># ----- presence params -----<br>/* uncomment the following lines if you want to enable presence */<br>modparam(&quot;presence|presence_xml&quot;, &quot;db_url&quot;,<br>        &quot;mysql://opensips:opensipsrw@localhost/opensips&quot;)<br>
modparam(&quot;presence&quot;, &quot;server_address&quot;, &quot;sip:<a href="http://63.148.166.215:5060">63.148.166.215:5060</a>&quot;)<br>modparam(&quot;presence&quot;, &quot;fallback2db&quot;, 1)<br>modparam(&quot;presence&quot;, &quot;clean_period&quot;,  30)</div>

<div> </div>
<div># -- xcap params --<br>modparam(&quot;presence_xml&quot;, &quot;db_url&quot;, &quot;mysql://opensips:opensipsrw@localhost/opensips&quot;)<br>modparam(&quot;presence_xml&quot;, &quot;force_active&quot;, 1)<br>modparam(&quot;presence_xml&quot;, &quot;pidf_manipulation&quot;, 1)<br>
modparam(&quot;presence_xml&quot;, &quot;integrated_xcap_server&quot;, 0)<br>modparam(&quot;presence_xml&quot;, &quot;xcap_server&quot;, &quot;localhost:9080&quot;)</div>
<div># -- rr params --<br>#modparam(&quot;rr&quot;, &quot;enable_full_lr&quot;, 1)</div>
<div> </div>
<div><br>route {</div>
<div>  if (method!=&quot;REGISTER&quot;) {<br>    record_route();<br>  };</div>
<div><br>  if (loose_route()) {</div>
<div>    append_hf(&quot;P-Hint: rr-enforced&quot;);</div>
<div>    if (method==&quot;INVITE&quot;) {</div>
<div>      if (!proxy_authorize(&quot;&quot;,&quot;subscriber&quot;)) {<br>        proxy_challenge(&quot;&quot;,&quot;0&quot;);<br>        return;<br>      } else if (!check_from()) {<br>        sl_send_reply(&quot;403&quot;, &quot;Use From=ID&quot;);<br>
        return;<br>      };</div>
<div>      consume_credentials();</div>
<div>      if (nat_uac_test(&quot;19&quot;)) {<br>        setbflag(6);<br>        force_rport();<br>        fix_nated_contact();<br>      };<br>      force_rtp_proxy(&quot;l&quot;);<br>    };</div>
<div>    if (method==&quot;ACK&quot;) {<br>      if (nat_uac_test(&quot;19&quot;)) {<br>        setbflag(6);<br>        force_rport();<br>        fix_nated_contact();<br>      };<br>    }</div>
<div>  route(1);<br>  return;<br>};</div>
<div># -----------------------------------------------------------------<br># Call Type Processing Section<br># -----------------------------------------------------------------<br>if (uri!=myself) {</div>
<div>    route(4);<br>    route(1);<br>    return;<br>  };</div>
<div> if (method==&quot;REGISTER&quot;) {<br>    route(2);<br>    return;<br>  } else if (method==&quot;SUBSCRIBE&quot;) {<br>    route(3);<br>    return;<br>  } else if (method==&quot;PUBLISH&quot;) {<br>    route(3);<br>
    return;<br>  };</div>
<div>  lookup(&quot;aliases&quot;);<br>  if (uri!=myself) {<br>    append_hf(&quot;P-Hint: outbound alias&quot;);<br>    route(4);<br>    route(1);<br>    return;<br>  };</div>
<div>  if (!lookup(&quot;location&quot;)) {<br>    sl_send_reply(&quot;404&quot;, &quot;User Not Found&quot;);<br>    return;<br>  };</div>
<div>  append_hf(&quot;P-Hint: usrloc applied&quot;);<br>  route(1);<br>}</div>
<div>route[1] {</div>
<div>  # -----------------------------------------------------------------<br>  # Default Message Handler<br>  # -----------------------------------------------------------------<br>  t_on_reply(&quot;1&quot;);</div>
<div>  if (!t_relay()) {<br>    if (method==&quot;INVITE&quot; &amp;&amp; isbflagset(6)) {<br>      unforce_rtp_proxy();<br>    };<br>    sl_reply_error();<br>  };<br>}</div>
<div>route[3] {</div>
<div>  if (nat_uac_test(&quot;19&quot;)) {<br>    setbflag(6);<br>  }</div>
<div>  lookup(&quot;aliases&quot;);<br>  if (uri!=myself) {<br>    route(4);<br>    route(1);<br>    return;<br>  };</div>
<div>  if (!lookup(&quot;location&quot;)) {<br>    if(method!=&quot;SUBSCRIBE&quot; &amp;&amp; method!=&quot;MESSAGE&quot;) {<br>        sl_send_reply(&quot;404&quot;, &quot;User Not Found&quot;);<br>        return;<br>    }<br>
  }</div>
<div>  route(4);<br>  route(1);<br>}</div>
<div>route[4] {</div>
<div>if ( isbflagset(6) )<br>{<br>    ## Added for Subscribes<br>    if (method==&quot;SUBSCRIBE&quot;) {<br>            # in-dialog subscribe request<br>            # mani added 2 following line to fix subscribe contact<br>
            if (nat_uac_test(&quot;1&quot;)) {<br>            fix_nated_contact();<br>            }<br>            route(5);<br>            return;<br>    }<br>    else  if (method==&quot;PUBLISH&quot;) {<br>           # publish<br>
           route(5);<br>           return;<br>    }<br>    fix_nated_contact();<br>}</div>
<div># !! Presence handling<br>route[5]<br>{<br>        if (!t_newtran())<br>        {<br>                sl_reply_error();<br>                exit;<br>        };</div>
<div>        if(is_method(&quot;PUBLISH&quot;))<br>        {<br>                handle_publish();<br>        }<br>        else<br>        if( is_method(&quot;SUBSCRIBE&quot;))<br>        {<br>                handle_subscribe();<br>
        }<br>        exit;<br>}<br></div>
<div> </div>