[OpenSIPS-Users] [presence] Understanding "refresh type" field in refreshWatchers MI command

Anca Vamanu anca at opensips.org
Thu Jul 16 11:08:16 CEST 2009


Iñaki Baz Castillo wrote:
> Presence module:
>
> 1.5. Exported MI Functions
>
> 1.5.1.  refreshWatchers 
>  Triggers sending Notify messages to watchers if a change in watchers
>  authorization or in published state occurred. 
>  Name: refreshWatchers 
>  Parameters:
>    presentity_uri : the uri of the user who made the change and whose watchers
>                     should be informed
>    event : the event package
>    refresh type : it distinguishes between the two different types of events
>                   that can trigger a refresh: 
>      - a change in watchers authentication: refresh type= 0 ;
>      - a statical update in published state (either through direct update in
>        db table or by modifying the pidf manipulation document, if
>        pidf_manipulation parameter is set): refresh type!= 0.
>
>
> I don't understand what the "refresh type" is for. Any explanation please?
> Thanks a lot.
>
>
>   
There are two cases in which one might wish to send the MI 
refreshWatchers command.
One is when the pres-rules document has changed and the authorization 
status must be reevaluated.
The other one is when the Publish state might have changed - directly in 
the database and not by sending a Publish request and the watchers must 
be notified of the new state.
Is it clear now?

Anca



More information about the Users mailing list