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

Anca Vamanu anca at opensips.org
Wed Jul 15 19:08:35 CEST 2009


Iñaki Baz Castillo wrote:
> 2009/7/15 Anca Vamanu <anca at opensips.org>:
>   
>> 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.
>>     
>
> ok
>
>   
>> If no sphere
>> definition is found then the condition is evaluated as true.
>>     
>
> This is incorrect (IMHO) and explains some strange issues I've detected.
> For example, EyeBeam uses a custom pres-rules document which also
> includes rules for IM and call (and of course also por presence).
> Theorically pres-rules is just for presence.
>
> Fortunatelly, the "rules" for IM and call authorization sent by
> EyeBeam includes a sphere which custom values as "im_whitelist",
> "call_whitelist" and so. Since nobody (neither EyeBeam) publishes a
> presence document containing "sphere" value, this means that the rules
> for IM and calls will *never* match and the PA should *ignore* them.
> In this way, a user allowed for IM but not for presence wouldn't be
> matched as "allowed" by OpenSIPS PA.
>
>   
You are saying that eyebeam forms the pres-rules document as more 
sections each with a sphere definition - im_whitelist, call_whitelist  
from your example. Right? And isn't there a sphere defined also for the 
section corresponding to the real pres-rules section. In this case, 
making the check to fail when no sphere is defined would also mean that 
the pres-rules section will not be processed.

Anca

> I know that EyeBeam makes a "custom" usage of pres-rules document, but
> it *is* RFC compliant: the "custom" rules (for IM and calls) include a
> never matched "sphere" so PA should never match them.
>
>
>   
>> I see now that this does not respect the RFC which says that the sphere must
>> be searched in all bodies.
>>     
>
> Note also that sphere can have multiple values separated by space.
>
>
>
>   




More information about the Devel mailing list