OpenXcap: watchers table info.

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

OpenXcap: watchers table info.

Thiago Rondon

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:[hidden email]"/>
</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:[hidden email]  | 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:[hidden email]"/>
</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:[hidden email]  | userA    | sip.domain.com | presence
|      2 |        |    1249476759 |
| 123 | sip:[hidden email]  | userB    | sip.domain.com | presence
|      1 |        |    1249476860 |

Why the status of userA -> [hidden email] doesn't change from 2 to
1 ?

Thanks!
-Thiago Rondon





_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users