Hi,

(I'm sending the patch here because email better to have a discussion than 
sourceforge)

Currently the presence module has a parameter called 'notify_offline_body' 
which will trigger a _fake_ NOTIFY to be sent with a body indicating the user 
is offline (ie, status is closed) if a SUBSCRIBE is received and there is no 
presence data for the requested user. Setting this parameter to 0 will disable 
sending such NOTIFY.

However, after the user has published at least one PIDF, if the wants to end 
his publication he will send a PUBLISH with Expires: 0 and at that moment 
OpenSIPS will generate a PIDF derived from the one he previously had sent 
(regardless of the aforementioned setting).

I want to disable this behavior, so the attached patch adds a new module 
parameter to the presence_xml document: generate_offline_body (it defaults to 
1), when set to 0 no derived PIDF will be generated with status set to closed.

At first I thought about reusing the notify_offline_body parameter in the 
presence module for this as well, but I can think of use cases where one would 
want just one of the 2, so adding a new module parameter seemed like the best 
approach to me. (I discussed some other alternatives with Razvan on IRC and 
this seemed fine)

The patch is not big, I'd appreciate if someone can have a look, I'll commit it 
once I get the green light :-)


Kind regards,

Attachment: generate_offline_body.diff
Description: Binary data

--
Saúl Ibarra Corretgé
AG Projects



_______________________________________________
Devel mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel

Reply via email to