I was wondering if anyone has gotten the presence module working with openser. The reason I ask is because I've been trying to make it work for 2 weeks without any luck, and at this point, I can't figure out what I'm doing wrong.
This is my setup:
I have a debian 4.0, running openser 1.3.0-dev11-notls [svnrevision: 2:2607M] also tried with 2327 Compiled with mysql, presence, mi_xmlrpc, presence xml modules. Also have the xcap-lite server set up.
My configuration looks like this: [just the related stuff]
# -- mi_xmlrpc params --
modparam("mi_xmlrpc", "log_file", "/var/log/openser-xmlrpc.log") modparam("mi_xmlrpc", "port", 9090)
# -- presence params -- modparam("presence", "db_url", "mysql://openser:openserrw@localhost/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", "to_tag_pref", 'a') modparam("presence", "expires_offset", 10) modparam("presence", "max_expires", 3600) modparam("presence", "server_address", "sip:presense_server_ip:5065") #modparam("presence", "xcap_table", "xcap_xml")
# -- presence_xml params modparam("presence_xml", "force_active", 0) modparam("presence_xml", "db_url", "mysql://openser:openserrw@localhost/openser") modparam("presence_xml", "xcap_table", "xcap_xml") modparam("presence_xml", "pidf_manipulation", 1)
# presence handling route route[2] { # absorb retransmissions if (! t_newtran()) { sl_reply_error(); exit; };
if(is_method("PUBLISH")) { if($hdr(Sender)!= NULL) handle_publish("$hdr(Sender)"); else handle_publish(""); t_release(); } else if( is_method("SUBSCRIBE")) { handle_subscribe(); t_release(); };
exit; }
The presentity does get updated when I change my status.
Ie: <presence xmlns="urn:ietf:params:xml:ns:pidf" xmlns:pp="urn:ietf:params:xml:ns:pidf:person" xmlns:et="urn:ietf:params:xml:ns:pidf:rpid:rpid-tuple" xmlns:ep="urn:ietf:params:xml:ns:pidf:rpid:rpid-person" xmlns:es="urn:ietf:params:xml:ns:pidf:rpid:status:rpid-status" xmlns:ci="urn:ietf:params:xml:ns:pidf:cipid" entity="sip:10000010002@216.xxx.xxx.xxx"> pp:person <status> ep:activities ep:busy/ </ep:activities> </status> </pp:person> <note>Busy</note> <tuple id="e2438d66"> <contact priority="1">sip:10000010002@216.xxx.xxx.xxx</contact> <status> <basic>open</basic> </status> </tuple> </presence>
But if I add this line into another account running eyebeam, ie: account 10000010001, it doesn't get a notify with my new status. So I have it "sort" of working, yet the notifies are not.
My Server set up is as follows: Ser Main Server <---> Openser Presence Server fwd subscribes and notifies to openser presence server using the forward(); method.
This is the debug log from openser, for when I change my status.
If someone has any idea of what's wrong or has make it work, I'd really appreciate any advice.
SIP Request: method: <PUBLISH> uri: sip:10000010002@216.151.151.100 version: <SIP/2.0> parse_headers: flags=2 Found param type 232, <branch> = <z9hG4bK4dfb.d33c6ba1b93007191109f843acc1462e.0>; state=16 end of header reached, state=5 parse_headers: Via found, flags=2 parse_headers: this is the first via After parse_msg... preparing to run routing scripts... parse_headers: flags=100 Found param type 234, <received> = <74.1.66.114>; state=6 Found param type 232, <branch> = <z9hG4bK-d87543-6a194925c74e4c78-1--d87543->; state=6 Found param type 235, <rport> = <6937>; state=16 end of header reached, state=5 parse_headers: Via found, flags=100 parse_headers: this is the second via Aug 16 07:06:38 [8788] DBG:maxfwd:is_maxfwd_present: value = 70 DEBUG: t_newtran: T on entrance=0xffffffff parse_headers: flags=ffffffffffffffff DEBUG:parse_to:end of header reached, state=10 DBUG:parse_to: display={}, ruri={sip:10000010002@216.151.151.100} DEBUG: get_hdr_field: <To> [35]; uri=[sip:10000010002@216.151.151.100] DEBUG: to body [sip:10000010002@216.151.151.100 ] get_hdr_field: cseq <CSeq>: <2> <PUBLISH> DEBUG: get_hdr_body : content_length=772 found end of header parse_headers: flags=78 t_lookup_request: start searching: hash=49108, isACK=0 DEBUG: RFC3261 transaction matching failed DEBUG: t_lookup_request: no transaction found parse_headers: flags=ffffffffffffffff parse_headers: flags=ffffffffffffffff PRESENCE:search_event... PRESENCE:handle_publish: SIP-If-Match found PRESENCE:handle_publish: existing etag = a.1187271113.8763.46.0 PRESENCE: handle_publish: 'expires' found PRESENCE: handle_publish: lexpire= 3600 parse_headers: flags=ffffffffffffffff parse_headers: flags=ffffffffffffffff PRESENCE: new_presentity:init_len= 142 size= 93 PRESENCE:update_presentity: querying presentity DEBUG:db_free_rows: Freeing 1 rows DEBUG:db_free_row: Row[0]=0x815d848 DEBUG:db_free_rows: 0x815d848=pkg_free() RES_ROWS PRESENCE: generate_ETag: etag= a.1187273178.8788.3.1 / 21 PRESENCE:update_presentity: new etag = a.1187273178.8788.3.1 PRESENCE:publ_send200ok: send 200OK reply PRESENCE:publ_send200ok: etag= a.1187273178.8788.3.1 - len= 21 parse_headers: flags=ffffffffffffffff check_via_address(216.151.151.100, 216.151.151.100, 0) presence:uandd_to_uri: uri=sip:10000010002@216.151.151.100 PRESENCE: publ_notify: Could not find subs_dialog DEBUG: cleanup_uac_timers: RETR/FR timers reset DEBUG: add_to_tail_of_timer[2]: 0xb59d6518 (25) DEBUG:tm:UNREF_UNSAFE: after is 0 DEBUG:destroy_avp_list: destroying list (nil) receive_msg: cleaning up SIP Request: method: <PUBLISH> uri: sip:10000010001@216.151.151.100 version: <SIP/2.0> parse_headers: flags=2 Found param type 232, <branch> = <z9hG4bK7936.faaa924e40db7cae4b0e70aeb7b51182.0>; state=16 end of header reached, state=5 parse_headers: Via found, flags=2 parse_headers: this is the first via After parse_msg... preparing to run routing scripts... parse_headers: flags=100 Found param type 234, <received> = <74.1.66.114>; state=6 Found param type 232, <branch> = <z9hG4bK-d87543-294e3c7ecc6c3561-1--d87543->; state=6 Found param type 235, <rport> = <9296>; state=16 end of header reached, state=5 parse_headers: Via found, flags=100 parse_headers: this is the second via Aug 16 07:06:39 [8788] DBG:maxfwd:is_maxfwd_present: value = 70 DEBUG: t_newtran: T on entrance=0xffffffff parse_headers: flags=ffffffffffffffff DEBUG:parse_to:end of header reached, state=10 DBUG:parse_to: display={}, ruri={sip:10000010001@216.151.151.100} DEBUG: get_hdr_field: <To> [35]; uri=[sip:10000010001@216.151.151.100] DEBUG: to body [sip:10000010001@216.151.151.100 ] get_hdr_field: cseq <CSeq>: <34> <PUBLISH> DEBUG: get_hdr_body : content_length=0 found end of header parse_headers: flags=78 t_lookup_request: start searching: hash=25495, isACK=0 DEBUG: RFC3261 transaction matching failed DEBUG: t_lookup_request: no transaction found parse_headers: flags=ffffffffffffffff parse_headers: flags=ffffffffffffffff PRESENCE:search_event... PRESENCE:handle_publish: SIP-If-Match found PRESENCE:handle_publish: existing etag = a.1187200063.27795.7638.32 PRESENCE: handle_publish: 'expires' found PRESENCE: handle_publish: lexpire= 60 PRESENCE: new_presentity:init_len= 146 size= 97 PRESENCE:update_presentity: querying presentity DEBUG:db_free_rows: Freeing 1 rows DEBUG:db_free_row: Row[0]=0x815d828 DEBUG:db_free_rows: 0x815d828=pkg_free() RES_ROWS PRESENCE: generate_ETag: etag= a.1187273178.8788.4.33 / 22 PRESENCE:update_presentity: new etag = a.1187273178.8788.4.33 PRESENCE:publ_send200ok: send 200OK reply PRESENCE:publ_send200ok: etag= a.1187273178.8788.4.33 - len= 22 parse_headers: flags=ffffffffffffffff check_via_address(216.151.151.100, 216.151.151.100, 0) DEBUG: cleanup_uac_timers: RETR/FR timers reset DEBUG: add_to_tail_of_timer[2]: 0xb59d7d48 (25) DEBUG:tm:UNREF_UNSAFE: after is 0 DEBUG:destroy_avp_list: destroying list (nil) receive_msg: cleaning up SIP Request: method: <PUBLISH> uri: sip:16196393459@216.151.143.69 version: <SIP/2.0> parse_headers: flags=2 Found param type 232, <branch> = <z9hG4bKb655.5b8160680f2305b89dfda92f6199df18.0>; state=16 end of header reached, state=5 parse_headers: Via found, flags=2 parse_headers: this is the first via After parse_msg... preparing to run routing scripts... parse_headers: flags=100 Found param type 234, <received> = <74.1.66.114>; state=6 Found param type 235, <rport> = <1157>; state=6 Found param type 232, <branch> = <z9hG4bK514376579>; state=16 end of header reached, state=5 parse_headers: Via found, flags=100 parse_headers: this is the second via DEBUG:parse_to:end of header reached, state=10 DBUG:parse_to: display={}, ruri={sip:16196393459@216.151.143.69} DEBUG: get_hdr_field: <To> [34]; uri=[sip:16196393459@216.151.143.69] DEBUG: to body [sip:16196393459@216.151.143.69 ] get_hdr_field: cseq <CSeq>: <20> <PUBLISH> Aug 16 07:06:40 [8788] DBG:maxfwd:is_maxfwd_present: value = 70 DEBUG: t_newtran: T on entrance=0xffffffff parse_headers: flags=ffffffffffffffff DEBUG: get_hdr_body : content_length=253 found end of header parse_headers: flags=78 t_lookup_request: start searching: hash=21867, isACK=0 DEBUG: RFC3261 transaction matching failed DEBUG: t_lookup_request: no transaction found parse_headers: flags=ffffffffffffffff parse_headers: flags=ffffffffffffffff PRESENCE:search_event... PRESENCE:handle_publish: SIP-If-Match not found PRESENCE: generate_ETag: etag= a.1187273178.8788.5.0 / 21 PRESENCE:handle_publish: new etag = a.1187273178.8788.5.0 PRESENCE: handle_publish: 'expires' not found; default=3600 parse_headers: flags=ffffffffffffffff parse_headers: flags=ffffffffffffffff PRESENCE: new_presentity:init_len= 140 size= 91 PRESENCE:update_presentity: inserting 7 cols into table PRESENCE:publ_send200ok: send 200OK reply PRESENCE:publ_send200ok: etag= a.1187273178.8788.5.0 - len= 21 parse_headers: flags=ffffffffffffffff check_via_address(216.151.143.69, 216.151.143.69, 0) presence:uandd_to_uri: uri=sip:16196393459@216.151.143.69 PRESENCE: publ_notify: Could not find subs_dialog DEBUG: cleanup_uac_timers: RETR/FR timers reset DEBUG: add_to_tail_of_timer[2]: 0xb59d95f0 (27) DEBUG:tm:UNREF_UNSAFE: after is 0 DEBUG:destroy_avp_list: destroying list (nil) receive_msg: cleaning up