[OpenSIPS-Devel] presence aggregation

Anca Vamanu anca at voice-system.ro
Thu Sep 11 11:10:23 CEST 2008


Hi Klaus,


The off_index parameter is used for presence event when a Publish with 
expires 0 is received. In that case, the presence server must send a 
Notify with a body containing basic status 'closed'. And it must keep 
the same tuple id so that the client receiving the Notify knows it is 
about that entity that went off line. So the solution is to take the old 
body and modify it.
The agg_nbody function is given as a parameter an array with all the 
published bodies associated with the presentity. If one publication has 
just been removed by a Publish with expires 0, then the previous body 
for that publication will be in the array and its index will be given as 
the off_index parameter. This parameter is used only when a Publish with 
expires = 0 is received, in the rest of the cases this parameter is -1. 
The aggregating function for presence looks at this parameter, and if 
different that -1 it modifies the corresponding body before adding it. 
The other bodies are added as they are.

regards,
Anca

Klaus Darilion wrote:
> Hi Anca!
>
> I wonder what is the meaning of the "off_index" parameter in the 
> agg_nbody() function of the presence module?
>
> thanks
> klaus
>
> _______________________________________________
> Devel mailing list
> Devel at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
>
>   




More information about the Devel mailing list