[OpenSIPS-Devel] pres_rules: Does presence_xml uses "sphere" element?

Anca Vamanu anca at opensips.org
Wed Jul 15 18:01:36 CEST 2009


Hi Inaki,

Yes there is a sphere implementation in Opensips PA but it is not maybe 
the "most" correct one. If a sphere condition is encountered, the PA 
searches in the most recent published body for a sphere definition. If 
one is found, then it is evaluated if it matches the one in the 
condition. If no sphere definition is found then the condition is 
evaluated as true.
I see now that this does not respect the RFC which says that the sphere 
must be searched in all bodies.

regards,
Anca


Iñaki Baz Castillo wrote:
> 2009/7/14 Iñaki Baz Castillo <ibc at aliax.net>:
>   
>> So the presence agent should check if the current sphere value for the
>> presentity matches the sphere value in the rule conditions.
>> Of course this is really complex since there could be multiple PUBLISH
>> at the same time, each one with different "sphere" value.
>>
>> For me it's too much "exotic", but does OpenSIPS consider it?
>>     
>
>
> RFC 5025:
>
> ---------------------------------------------
> 3.1.2.  Sphere
>
>    The <sphere> element is defined in [8].  However, each application
>    making use of the common policy specification needs to determine how
>    the presence server computes the value of the <sphere> to be used in
>    the evaluation of the condition.
>
>    To compute the value of <sphere>, the presence agent examines all
>    published presence documents for the presentity.  If at least one of
>    them includes the <sphere> element [9] as part of the person data
>    component [10], and all of those containing the element have the same
>    value for it, which is the value used for the <sphere> in presence
>    policy processing.  If, however, the <sphere> element was not present
>    in any of the published documents, or it was present but had
>    inconsistent values, its value is considered undefined in terms of
>    presence policy processing.
>
>    Care must be taken in using <sphere> as a condition for determining
>    the subscription handling.  Since the value of <sphere> changes
>    dynamically, a state change can cause a subscription to be suddenly
>    terminated.  The watcher has no way to know, aside from polling, when
>    their subscription would be reinstated as the value of <sphere>
>    changes.  For this reason, <sphere> is primarily useful for matching
>    on rules that define transformations.
> ------------------------------
>
>
> Could I know what does the last phrase mean?:
>
>   "<sphere> is primarily useful for matching  on rules that define
> transformations."
>
>
>
>
>
>   




More information about the Devel mailing list