<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<font face="monospace">Hi Carsten,<br>
<br>
Let me check on this...<br>
<br>
Regards,<br>
</font>
<pre class="moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a class="moz-txt-link-freetext" href="https://www.opensips-solutions.com">https://www.opensips-solutions.com</a>
<a class="moz-txt-link-freetext" href="https://www.siphub.com">https://www.siphub.com</a></pre>
<div class="moz-cite-prefix">On 9/20/23 1:56 PM, Carsten Bock via
Devel wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAOCjumHXzyRe8A=D5fTazLEUYK8sA2+fA09sTCgt_cdYC5Z9WA@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">
<div>Hi there,</div>
´
<div>I have a quick question regarding presence &
clustering:<br>
I am working on extensions for handling "reg"-Events based on
Usrloc. I came across the following:</div>
<div><br>
When OpenSIPS receives and handles a publish, it does the
following:</div>
<div><br>
/* query the database and update or insert */<br>
if(update_presentity(msg, &presentity, &sent_reply)
<0)<br>
{<br>
LM_ERR("when updating presentity\n");<br>
reply_code = 500;<br>
reply_str = pu_500_rpl;<br>
goto error;<br>
}<br>
<br>
/* send event E_PRESENCE_PUBLISH */<br>
presence_raise_event(presence_event_id, &presentity);<br>
<br>
/* see if this PUBLISH needs to be replicated via cluster */<br>
if (is_cluster_federation_enabled() &&<br>
is_event_clustered(event->evp->parsed))<br>
replicate_publish_on_cluster(&presentity);<br>
<br>
The API, however, only exposes "update_presentity()". I want
to avoid having to send me a PUBLISH locally, so I tried to
use "update_presentity()".<br>
Do I understand this code correctly that the status set by my
module using "update_presentity()" is not replicated across
the cluster and would not raise any event?<br>
Is that intended, or is there missing some functionality?<br>
Should those functions be exposed so I can trigger a
replication in the cluster?</div>
<div><br>
</div>
<div>I am happy to make a PR for the changes once I have tested
this, but I wanted to know if this is on purpose.</div>
<div><br>
</div>
<div>Thanks,</div>
<div>Carsten<br clear="all">
<div>
<div dir="ltr" class="gmail_signature"
data-smartmail="gmail_signature">
<div dir="ltr">
<div>
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">--</div>
<div dir="ltr">Carsten Bock I Chief Technology
Innovation Officer & Founder</div>
<div dir="ltr"><br>
<p style="margin:0cm 0cm
0.0001pt;background-image:initial;background-position:initial;background-repeat:initial"><span
style="color:black" lang="EN-US">ng-voice
GmbH</span><span
style="color:rgb(0,112,192)" lang="EN-US"></span></p>
<p
style="margin-right:0cm;margin-bottom:12pt;margin-left:0cm;background-image:initial;background-position:initial;background-repeat:initial"><span
style="color:black" lang="EN-US">Trostbrücke
1 I 20457 Hamburg I Germany<br>
T +49 1511 5942983 I <a
href="http://www.ng-voice.com/"
style="color:rgb(17,85,204)"
target="_blank" moz-do-not-send="true"><span
style="color:black">www.ng-voice.com</span></a></span></p>
<p style="margin:0cm 0cm
0.0001pt;background-image:initial;background-position:initial;background-repeat:initial"><span
style="color:black" lang="EN-US">Registry
Office at Local Court Hamburg, HRB 120189<br>
Managing Directors: Dr. David Bachmann,
Carsten Bock, Quirin Maderspacher</span></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
Devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Devel@lists.opensips.org">Devel@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/devel">http://lists.opensips.org/cgi-bin/mailman/listinfo/devel</a>
</pre>
</blockquote>
<br>
</body>
</html>