Hi all,
I am stuck with a presence authorization problem using openSer 1.3 and
openXcap 0.9.9. I have read some similar posts in the mailing list but I
couldn't find a solution, so I'll try to explain my scenario to see if it is
my mistake or it is a bug.
I explain the scenario:
User test1 and test2 successfully register and sunscribe to presence.winfo.
Both receive a NOTIFY informing that their winfo subscriptions are active.
Test2 adds test1 as a contact so he subscribes to test1's presence, then
test1 receives a winfo NOTIFY requesting authorization for test2. Test1 does
it sending a XCAP document to openXcap the document is correctly stored in
openSer xcap table.
User test2 receives a presence NOTIFY in pending state, even if user test1
publishes other presence state, the subscription state of test2 remains
pending forever.
If we look the data base in that moment:
+------+--------------------------+------------------+----------------+---------+----------------+----------------+----------+----------------------+---------------+--------------------------------------+------------+-------------+-------------------+--------------+------------+--------+--------+---------+------------------------+------------------------+
| id | presentity_uri | watcher_username | watcher_domain |
to_user | to_domain | event | event_id | to_tag
| from_tag | callid | local_cseq |
remote_cseq | contact | record_route | expires | status |
reason | version | socket_info | local_contact |
+------+--------------------------+------------------+----------------+---------+----------------+----------------+----------+----------------------+---------------+--------------------------------------+------------+-------------+-------------------+--------------+------------+--------+--------+---------+------------------------+------------------------+
| 1177 | sip:test2@Mydomain | test2 | Mydomain | test2
| Mydomain | presence.winfo | NULL | 10.2670.1209516359.7 |
cvvUDerBXK1Qc | b4c2997e-64ac-122b-2780-39a48cb53b8d | 1 |
96206117 | sip:192.168.1.222 | NULL | 1209519959 | 1 | |
1 | udp:192.168.1.210:5060 | sip:192.168.1.210:5060 |
+------+--------------------------+------------------+----------------+---------+----------------+----------------+----------+----------------------+---------------+--------------------------------------+------------+-------------+-------------------+--------------+------------+--------+--------+---------+------------------------+------------------------+
WATCHERS
+----+--------------------------+------------------+----------------+----------+--------+--------+---------------+
| id | presentity_uri | watcher_username | watcher_domain | event
| status | reason | inserted_time |
+----+--------------------------+------------------+----------------+----------+--------+--------+---------------+
| 80 | sip:test1@Mydomain | test2 | Mydomain |
presence | 2 | NULL | 1209516407 |
+----+--------------------------+------------------+----------------+----------+--------+--------+---------------+
XCAP
+-----+----------+----------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------+----------------------------------+--------+-------------+------+
| id | username | domain | doc
| doc_type | etag | source | doc_uri | port
|
+-----+----------+----------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------+----------------------------------+--------+-------------+------+
| 190 | test2 | Mydomain | <?xml version="1.0"
encoding="UTF-8"?>
<resource-lists xmlns="urn:ietf:params:xml:ns:resource-lists"><list
name="Users"><entry
uri="sip:test1@Mydomain"><display-name>test1</display-name></entry></list></resource-lists>
| 4 | 8ea82eeb40e00fcf626dbe17d1961ad5 | 0 | buddies.xml | 0
|
| 191 | test2 | Mydomain | <?xml version='1.0'
encoding='UTF-8'?><ruleset
xmlns='urn:ietf:params:xml:ns:common-policy'
xmlns:pr='urn:ietf:params:xml:ns:pres-rules'><rule
id='whitelist'><conditions><identity></identity></conditions><actions><pr:sub-handling>allow</pr:sub-handling></actions></rule><rule
id='politeblocklist'><conditions><identity></identity></conditions><actions><pr:sub-handling>polite-block</pr:sub-handling></actions></rule><rule
id='blacklist'><conditions><identity></identity></conditions><actions><pr:sub-handling>block</pr:sub-handling></actions></rule></ruleset>
| 2 | 46353b3b55d23d24fd4d9c87a5ff7ba4 | 0 | index.xml | 0
|
| 192 | test1 | Mydomain | <?xml version='1.0'
encoding='UTF-8'?><resource-lists
xmlns='urn:ietf:params:xml:ns:resource-lists'><list
name='Users'></list></resource-lists>
| 4 | f854971d48ed1a8913e20b3409a6b723 | 0 | buddies.xml | 0
|
| 193 | test1 | Mydomain | <?xml version="1.0"
encoding="UTF-8"?>
<ruleset xmlns="urn:ietf:params:xml:ns:common-policy"
xmlns:pr="urn:ietf:params:xml:ns:pres-rules"><rule
id="whitelist"><conditions><identity><one
id="sip:test2@Mydomain"/></identity></conditions><actions><pr:sub-handling>allow</pr:sub-handling></actions></rule><rule
id="politeblocklist"><conditions/><actions><pr:sub-handling>polite-block</pr:sub-handling></actions></rule><rule
id="blacklist"><conditions/><actions><pr:sub-handling>block</pr:sub-handling></actions></rule></ruleset>
| 2 | 8afbf7f0464de1273303bbea554404ff |
0 | index.xml | 0 |
+-----+----------+----------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------+----------------------------------+--------+-------------+------+
We can see in 'WATCHERS' table that test2 has a pending presence
subscription but as can be seen in 'XCAP' table user test1 has authorized
test2 to see his presence.
My thinking is that once test1 changes his authorization rule, the presence
subscription should chage to active, am I right?
My conclusion is that something between the presence rules authorization and
the subscriptions is not working fine, or I did something wrong and I
haven't noticed it.
Please, I really need help with that as I have been stuck here for weeks.
Thanks in advance!!
Gregorio
--
View this message in context:
http://www.nabble.com/OpenSER-%2B-OpenXcap-for-pres-rules%3A-no-NOTIFY-tp15…
Sent from the OpenSER Users Mailing List mailing list archive at
Nabble.com.