[OpenSIPS-Users] OpenXcap: watchers table info.

Thiago Rondon thiago at aware.com.br
Wed Aug 5 15:50:46 CEST 2009


I try to add a user each other with permission to see the status,

So, the userA insert userB, I do xcap-insert with the docs:

"index.xml":

<?xml version="1.0" ?><resource-lists 
xmlns="urn:ietf:params:xml:ns:resource-lists">
        <list name="contacts">
        <entry 
uri="sip:userB"><display-name>userB</display-name></entry></list>
 <list name="phones">
     </list>
 </resource-lists> 

The pres-rules is:

<?xml version="1.0" ?><ruleset 
xmlns="urn:ietf:params:xml:ns:common-policy" 
xmlns:cp="www.counterpath.com/privacy-lists" 
xmlns:pr="urn:ietf:params:xml:ns:pres-rules">
<rule id="pres_whitelist">
<conditions>
<identity>
<one id="sip:userB at sip.domain.com"/>
</identity>
</conditions>
<actions>
<pr:sub-handling>allow</pr:sub-handling>
</actions>
<transformations>
<pr:provide-services>
<pr:all-services/>
</pr:provide-services>
<pr:provide-persons>
<pr:all-persons/>
</pr:provide-persons>
<pr:provide-devices>
<pr:all-devices/>
</pr:provide-devices>
<pr:provide-all-attributes/>
</transformations>
</rule>
<rule id="pres_blacklist">
<conditions/>
<actions>
<pr:sub-handling>block</pr:sub-handling>
</actions>
<transformations/>
</rule>
</ruleset>

And watchers table is:

| id  | presentity_uri    | watcher_username | watcher_domain   | 
event    | status | reason | inserted_time |
+-----+-------------------------------+------------------+------------------+----------+--------+--------+---------------+
| 122 | sip:userB at sip.domain.com  | userA    | sip.domain.com | presence 
|      2 |        |    1249476759 |

Ok, so when I see the notify peding when I logged with userB, I add 
userA in userB, I do xcap-insert to userA in userB, the docs is:

"index.xml":

<?xml version="1.0" ?><resource-lists 
xmlns="urn:ietf:params:xml:ns:resource-lists">
        <list name="contacts">
        <entry 
uri="sip:userA"><display-name>userA</display-name></entry></list>
 <list name="phones">
     </list>
 </resource-lists> 

The  pres-rules is:

<?xml version="1.0" ?><ruleset 
xmlns="urn:ietf:params:xml:ns:common-policy" 
xmlns:cp="www.counterpath.com/privacy-lists" 
xmlns:pr="urn:ietf:params:xml:ns:pres-rules">
<rule id="pres_whitelist">
<conditions>
<identity>
<one id="sip:userA at sip.domain.com"/>
</identity>
</conditions>
<actions>
<pr:sub-handling>allow</pr:sub-handling>
</actions>
<transformations>
<pr:provide-services>
<pr:all-services/>
</pr:provide-services>
<pr:provide-persons>
<pr:all-persons/>
</pr:provide-persons>
<pr:provide-devices>
<pr:all-devices/>
</pr:provide-devices>
<pr:provide-all-attributes/>
</transformations>
</rule>
<rule id="pres_blacklist">
<conditions/>
<actions>
<pr:sub-handling>block</pr:sub-handling>
</actions>
<transformations/>
</rule>
</ruleset>

And the watchers table is:

| id  | presentity_uri    | watcher_username | watcher_domain   | 
event    | status | reason | inserted_time |
+-----+-------------------------------+------------------+------------------+----------+--------+--------+---------------+
| 122 | sip:userB at sip.domain.com  | userA    | sip.domain.com | presence 
|      2 |        |    1249476759 |
| 123 | sip:userA at sip.domain.com  | userB    | sip.domain.com | presence 
|      1 |        |    1249476860 |

Why the status of userA -> userB at sip.domain.com doesn't change from 2 to 
1 ?

Thanks!
-Thiago Rondon







More information about the Users mailing list