Hello,

mqybe is faster to fix the handling of subscriptions from openfire. Can you get the xmpp request with ngrep and paste it here -- maybe it is easy to find and fix the reason the parser in xmpp module fails to understand it.

I guess pua_xmpp has to know the dialog for the mapping between the sip and xmpp sides.

Cheers,
Daniel

On Fri, Mar 2, 2012 at 7:33 PM, Dan-Cristian Bogos <danb.lists@googlemail.com> wrote:
Guys,

After my previous discovered issue (Kamailio not happy to talk with
Openfire for subscriptions), trying to find work arounds, thought
about using pua_mi to enforce subscriptions coming from XMPP side.

The following events happen:
 * I subscribe over mi interface successfully.
 * Presence sends NOTIFY out.
 * PUA_XMPP rejects the NOTIFY saying that it does not match an
existing dialog.

I was wondering where does PUA_XMPP check the existing dialogs and if
there is other way to fix my issues?

Bellow you can find commands, ngrep as well as kamailio error to syslog.

Ta for any kind of tip,
DanB

"""

###
Console
###
kamctl fifo pua_subscribe sip:dan@hiddendom.com
sip:user01@hiddendom.com presence 3600

###
Trace
###


U 2012/03/02 18:17:07.318753 127.0.0.1:5060 -> 127.0.0.1:5060
SUBSCRIBE sip:dan@hiddendom.com SIP/2.0.
Via: SIP/2.0/UDP 127.0.0.1;branch=z9hG4bK5ddb.d2ee4046.0.
To: sip:dan@hiddendom.com.
From: sip:user01@hiddendom.com;tag=7bcd2f0283a17a6a3eb34b70a7dbcaec-55da.
CSeq: 10 SUBSCRIBE.
Call-ID: 77d7b19267fdcae8.
Content-Length: 0.
User-Agent: kamailio (3.2.0 (x86_64/linux)).
Max-Forwards: 70.
Event: presence.
Contact: <sip:user01@hiddendom.com>.
Expires: 3610.
.

#
T 2012/03/02 18:17:07.319501 127.0.0.1:35067 -> 127.0.0.1:3306 [AP]
.....select status,reason from watchers where
presentity_uri='sip:dan@hiddendom.com' AND watcher_username='user01'
AND watcher_domain='hiddendom.com' AND event='presence'
#
T 2012/03/02 18:17:07.319795 127.0.0.1:3306 -> 127.0.0.1:35067 [AP]
.....7....def.prxdb.watchers.watchers.status.status.?...........7....def.prxdb.watchers.watchers.reason.reason...@...........................
##
T 2012/03/02 18:17:07.319885 127.0.0.1:35067 -> 127.0.0.1:3306 [AP]
.....insert into watchers
(presentity_uri,watcher_username,watcher_domain,event,status,inserted_time
) values ('sip:dan@hiddendom.com','user01','hiddendom.com','presence',1,1330712227)
#
T 2012/03/02 18:17:07.320079 127.0.0.1:3306 -> 127.0.0.1:35067 [AP]
...........
#
U 2012/03/02 18:17:07.320250 127.0.0.1:5060 -> 127.0.0.1:5060
SIP/2.0 202 OK.
Via: SIP/2.0/UDP 127.0.0.1;branch=z9hG4bK5ddb.d2ee4046.0;rport=5060.
To: sip:dan@hiddendom.com;tag=c87c23e595340de8a004872f7dfab287-19b1.
From: sip:user01@hiddendom.com;tag=7bcd2f0283a17a6a3eb34b70a7dbcaec-55da.
CSeq: 10 SUBSCRIBE.
Call-ID: 77d7b19267fdcae8.
Expires: 3600.
Contact: <sip:127.0.0.1>.
Server: kamailio (3.2.0 (x86_64/linux)).
Content-Length: 0.
.

#
T 2012/03/02 18:17:07.320317 127.0.0.1:35067 -> 127.0.0.1:3306 [AP]
.....select body,expires,etag,sender from presentity where
domain='hiddendom.com' AND username='dan' AND event='presence' order
by received_time
#
T 2012/03/02 18:17:07.320541 127.0.0.1:3306 -> 127.0.0.1:35067 [AP]
.....7....def.prxdb
presentity
presentity.body.body.?...........=....def.prxdb
presentity
presentity.expires.expires.?...........7....def.prxdb
presentity
presentity.etag.etag...@.....P...;....def.prxdb
presentity
presentity.sender.sender...........................Y.<?xml version="1.0"?>
<presence xmlns="urn:ietf:params:xml:ns:pidf"
xmlns:dm="urn:ietf:params:xml:ns:pidf:data-model"
xmlns:rpid="urn:ietf:params:xml:ns:pidf:rpid"
xmlns:c="urn:ietf:params:xml:ns:pidf:cipid"
entity="dan@hiddendom.com">
 <tuple id="0x7f7e550f0d70">
   <status>
     <basic>open</basic>
   </status>
 </tuple>
</presence>

1330712820.a.1330712207.16317.1.1..........
#
U 2012/03/02 18:17:07.320996 127.0.0.1:5060 -> 127.0.0.1:5060
NOTIFY sip:user01@hiddendom.com SIP/2.0.
Via: SIP/2.0/UDP 127.0.0.1;branch=z9hG4bKae68.a038faa7.0.
To: sip:user01@hiddendom.com;tag=7bcd2f0283a17a6a3eb34b70a7dbcaec-55da.
From: sip:dan@hiddendom.com;tag=c87c23e595340de8a004872f7dfab287-19b1.
CSeq: 2 NOTIFY.
Call-ID: 77d7b19267fdcae8.
Content-Length: 345.
User-Agent: kamailio (3.2.0 (x86_64/linux)).
Max-Forwards: 70.
Event: presence.
Contact: <sip:127.0.0.1>.
Subscription-State: active;expires=3670.
Content-Type: application/pidf+xml.
.
<?xml version="1.0"?>
<presence xmlns="urn:ietf:params:xml:ns:pidf"
xmlns:dm="urn:ietf:params:xml:ns:pidf:data-model"
xmlns:rpid="urn:ietf:params:xml:ns:pidf:rpid"
xmlns:c="urn:ietf:params:xml:ns:pidf:cipid"
entity="dan@hiddendom.com">
 <tuple id="0x7f7e550f0d70">
   <status>
     <basic>open</basic>
   </status>
 </tuple>
</presence>






#############
kamailio.log:
#############


Mar  2 18:17:07 prx3 /usr/sbin/kamailio[16319]: INFO: presence
[notify.c:1593]: NOTIFY sip:user01@hiddendom.com via
sip:user01@hiddendom.com on behalf of sip:dan@hiddendom.com for event
presence
Mar  2 18:17:07 prx3 /usr/sbin/kamailio[16317]: ERROR: pua_xmpp
[simple2xmpp.c:198]: Notify in a non existing dialog

"""

_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users



--
Daniel-Constantin Mierla
  http://www.asipto.com