[OpenSER-Users] OpenSER + OpenXcap for pres-rules: no NOTIFY
gregor.sp
goyo.villalba at dialcom.com
Thu Mar 13 18:31:59 CET 2008
Hi again,
Thanks for your help presence authorization is working now, but I have found
other issue also related to this topic. After User A and B have mutual
presence authorization, A is registered and ‘online’ when B registers and
subscribes to A, he receives a NOTIFY telling that A is online. Then if A
publishes other state, B does not receive any NOTIFY with produces a error
in the log, but If B reconnects (registers an subscribes to A again) then he
receives the new presence state of A.
When the PUBLISH is received by OpenSER and the NOTIFY is being generated,
the log messages show this errors:
openser[2631]: DBG:presence:printf_subs: [pres_uri]= sip:A at Mydialcom
[to_user]= A [to_domain]= Mydialcom [w_user]= B [w_domain]=
Mydialcom [event]= presence [status]= active [expires]=
3509 [callid]= 60023eee-6bc3-122b-2880-39a48cb53b8d
[local_cseq]=1 [to_tag]= 10.2630.1210295728.21 [from_tag]= H9tQp1e3XXrcD
[contact]= sip:192.168.1.222 [record_route]=
openser[2631]: DBG:core:db_free_rows: freeing 1 rows
openser[2631]: DBG:core:db_free_rows: row[0]=0x8186940
openser[2631]: DBG:core:db_free_rows: 0x8186940=pkg_free() RES_ROWS
openser[2631]: DBG:presence:printf_subs: [pres_uri]= sip:A at Mydialcom
[to_user]= A [to_domain]= Mydialcom [w_user]= B [w_domain]=
Mydialcom [event]= presence [status]= active [expires]=
1210299328 [callid]= 60023eee-6bc3-122b-2880-39a48cb53b8d
[local_cseq]=3 [to_tag]= 10.2630.1210295728.21 [from_tag]= H9tQp1e3XXrcD
[contact]= sip:192.168.1.222 [record_route]=
openser[2631]: DBG:presence:get_subs_dialog: s->db_flag== UPDATEDB_FLAG
openser[2631]: DBG:presence:printf_subs: [pres_uri]= sip:A at Mydialcom
[to_user]= A [to_domain]= Mydialcom [w_user]= B [w_domain]=
Mydialcom [event]= presence [status]= active [expires]=
3509 [callid]= 60023eee-6bc3-122b-2880-39a48cb53b8d
[local_cseq]=1 [to_tag]= 10.2630.1210295728.21 [from_tag]= H9tQp1e3XXrcD
[contact]= sip:192.168.1.222 [record_route]=
openser[2631]: DBG:presence:get_subs_dialog: found 1 dialogs( 1 in database
and 0 in hash_table)
openser[2631]: DBG:presence:get_p_notify_body: Event requires aggregation
openser[2631]: DBG:core:db_free_rows: freeing 1 rows
openser[2631]: DBG:core:db_free_rows: row[0]=0x8186940
openser[2631]: DBG:core:db_free_rows: 0x8186940=pkg_free() RES_ROWS
openser[2631]: DBG:presence_xml:pres_agg_nbody: [user]=A [domain]=
Mydialcom
openser[2631]: DBG:presence:send_notify_request: dialog info:
openser[2631]: DBG:presence:printf_subs: [pres_uri]= sip:A at Mydialcom
[to_user]= A [to_domain]= Mydialcom [w_user]= B [w_domain]=
Mydialcom [event]= presence [status]= active [expires]=
3508 [callid]= 60023eee-6bc3-122b-2880-39a48cb53b8d
[local_cseq]=3 [to_tag]= 10.2630.1210295728.21 [from_tag]= H9tQp1e3XXrcD
[contact]= sip:192.168.1.222 [record_route]=
openser[2631]: DBG:presence_xml:get_rule_node: node1->name= rule
openser[2631]: DBG:presence_xml:get_rule_node: cond_node->name= conditions
openser[2631]: DBG:presence_xml:get_rule_node: apply_rule= 1
openser[2631]: ERROR:presence_xml:get_final_notify_body: while extracting
the transformation node
openser[2631]: ERROR:presence_xml:pres_apply_auth: in function
get_final_notify_body
openser[2631]: ERROR:presence:send_notify_request: in function
apply_auth_nbody
openser[2631]: ERROR:presence:notify: sending Notify not successful
openser[2631]: ERROR:presence:publ_notify: Could not send notify for
presence
Thank for your help.
Goyo
Mircea Amarascu-2 wrote:
>
>
>
>
>
>
>
> Hi Gregorio,
>
> This is stated in OpenXCAP's documentation:
>
> http://openxcap.org/wiki/Installation#Configuration
>
> Gregorio wrote:
>
>
>
>
>
>
> Hi Mircea et all,
>
> It was the configuration problem that Mircea mentioned. I
> was
> using ‘Database’ as the backend and it didn´t work, now
> with ‘OpenSER’
> as the backend it seems to work fine.
> I wonder why my previous configuration was not working,
> as the
> configuration parameters were the same (subscribers table, xcap table,
> xmlrpc
> URI…), I would also suggest to clarify this point somewhere in
> openSER
> documentation as it was not obvious for me and it is an issue difficult
> to find
> out.
>
> Thanks for your help, and kind regards.
> Gregorio.
>
>
>
> De:
> Mircea Amarascu [ mailto:mircea at ag-projects.com ]
> Enviado el: viernes, 07 de marzo de 2008 9:25
> Para: Gregorio
> CC: users at lists.openser.org
> Asunto: Re: [OpenSER-Users] OpenSER + OpenXcap for pres-rules:
> no NOTIFY
>
>
>
> Hi Gregorio,
>
> This means there's a problem when OpenXCAP should send this command to
> OpenSER.
> First, check if the XMLRPC server in OpenSER is working, if you can
> connect to
> it. Then, make sure that in OpenXCAP's configuration file you have
> backend =
> OpenSER under [Server] section, and that xmlrpc_url under [OpenSER]
> section is
> set to the address where the XMLRPC server is listening.
>
> Gregorio wrote:
> Hi Anca et all,
>
> I have repeated the same test described in the first name with the debug
> level set to 7 and I couldn't find the string 'mi_refreshWatchers' in
> the
> debbug messages. I can't attach the debug messages file because it is
> too
> large.
> I am using OpenSer 1.3 and openXcap 0.99. My configuration related to
> presence is this:
>
> modparam("presence|usrloc",
> "db_url", "mysql://openser:password@127.0.0.1/openser" )
> modparam("presence", "presentity_table", "presentity")
> modparam("presence", "active_watchers_table", "active_watchers")
> modparam("presence", "watchers_table", "watchers")
> modparam("presence", "clean_period", 100)
> modparam("presence", "max_expires", 3600)
> modparam("presence", "server_address", "sip:192.168.1.210:5060")
> modparam("presence", "fallback2db", 1)
>
> #MI_XMLRPC
> modparam("mi_xmlrpc", "log_file", "/var/log/openser-xmlrpc.log")
> modparam("mi_xmlrpc", "port", 8080)
>
> modparam("pua", "db_url", "mysql://openser:password@127.0.0.1/openser" )
>
> # -- xcap params --
> modparam("presence_xml", "db_url",
> "mysql://openser:password@127.0.0.1/openser" )
> modparam("presence_xml", "force_active", 0) #0 Activates permissions for
> subscriptions
> modparam("presence_xml", "xcap_table", "xcap") modparam("presence_xml",
> "integrated_xcap_server", 1)
>
> If someone needs the debug messages I can send it to personal mail
> accounts,
> and thank you very much for helping.
> Regards,
> Gregorio.
>
>
>
> -----Mensaje original-----
> De: users-bounces at lists.openser.org [
> mailto:users-bounces at lists.openser.org ]
> En nombre de Anca Vamanu
> Enviado el: jueves, 06 de marzo de 2008 10:34
> Para: greg.co
> CC: users at lists.openser.org
> Asunto: Re: [OpenSER-Users] OpenSER + OpenXcap for pres-rules: no NOTIFY
>
> Hi,
>
> I think you might be right about the problem source.
> The real time update in OpenSER is triggered by OpenXCAP with an mi
> command: "mi_refreshWatchers". You could set the 'debug' in config file
> to 7 and search in the log for 'mi_refreshWatchers' string and send the
> debug messages printed while processing.
>
> regards,
> Anca Vamanu
>
> greg.co wrote:
>
>
> 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 at 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 at 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 at 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:su
>
> b-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:su
>
> b-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 at Mydomain"/></identity></conditions><actions><pr:sub-handling>a
> llow</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
>
>
>
>
>
> _______________________________________________
> Users mailing list
> Users at lists.openser.org
> http://lists.openser.org/cgi-bin/mailman/listinfo/users
>
>
> _______________________________________________
> Users mailing list
> Users at lists.openser.org
> http://lists.openser.org/cgi-bin/mailman/listinfo/users
>
>
>
>
>
> _______________________________________________
> Users mailing list
> Users at lists.openser.org
> http://lists.openser.org/cgi-bin/mailman/listinfo/users
>
>
>
>
>
>
>
> _______________________________________________
> Users mailing list
> Users at lists.openser.org
> http://lists.openser.org/cgi-bin/mailman/listinfo/users
>
>
--
View this message in context: http://www.nabble.com/OpenSER-%2B-OpenXcap-for-pres-rules%3A-no-NOTIFY-tp15832121p16032988.html
Sent from the OpenSER Users Mailing List mailing list archive at Nabble.com.
More information about the Users
mailing list