[OpenSIPS-Devel] Presence API & Clustering
Bogdan-Andrei Iancu
bogdan at opensips.org
Wed Sep 20 12:25:22 UTC 2023
Hi Carsten,
Let me check on this...
Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
https://www.opensips-solutions.com
https://www.siphub.com
On 9/20/23 1:56 PM, Carsten Bock via Devel wrote:
> Hi there,
> ´
> I have a quick question regarding presence & clustering:
> I am working on extensions for handling "reg"-Events based on Usrloc.
> I came across the following:
>
> When OpenSIPS receives and handles a publish, it does the following:
>
> /* query the database and update or insert */
> if(update_presentity(msg, &presentity, &sent_reply) <0)
> {
> LM_ERR("when updating presentity\n");
> reply_code = 500;
> reply_str = pu_500_rpl;
> goto error;
> }
>
> /* send event E_PRESENCE_PUBLISH */
> presence_raise_event(presence_event_id, &presentity);
>
> /* see if this PUBLISH needs to be replicated via cluster */
> if (is_cluster_federation_enabled() &&
> is_event_clustered(event->evp->parsed))
> replicate_publish_on_cluster(&presentity);
>
> 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()".
> 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?
> Is that intended, or is there missing some functionality?
> Should those functions be exposed so I can trigger a replication in
> the cluster?
>
> 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.
>
> Thanks,
> Carsten
> --
> Carsten Bock I Chief Technology Innovation Officer & Founder
>
> ng-voice GmbH
>
> Trostbrücke 1 I 20457 Hamburg I Germany
> T +49 1511 5942983 I www.ng-voice.com <http://www.ng-voice.com/>
>
> Registry Office at Local Court Hamburg, HRB 120189
> Managing Directors: Dr. David Bachmann, Carsten Bock, Quirin Maderspacher
>
>
> _______________________________________________
> Devel mailing list
> Devel at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/devel/attachments/20230920/d28faea3/attachment.html>
More information about the Devel
mailing list