[SR-Users] PUA_XMPP: Notify in a non existing dialog

Dan-Cristian Bogos danb.lists at googlemail.com
Fri Mar 2 19:33:31 CET 2012


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 at hiddendom.com
sip:user01 at 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 at hiddendom.com SIP/2.0.
Via: SIP/2.0/UDP 127.0.0.1;branch=z9hG4bK5ddb.d2ee4046.0.
To: sip:dan at hiddendom.com.
From: sip:user01 at 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 at 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 at 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... at ...........................
##
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 at 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 at hiddendom.com;tag=c87c23e595340de8a004872f7dfab287-19b1.
From: sip:user01 at 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... at .....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 at 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 at hiddendom.com SIP/2.0.
Via: SIP/2.0/UDP 127.0.0.1;branch=z9hG4bKae68.a038faa7.0.
To: sip:user01 at hiddendom.com;tag=7bcd2f0283a17a6a3eb34b70a7dbcaec-55da.
From: sip:dan at 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 at 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 at hiddendom.com via
sip:user01 at hiddendom.com on behalf of sip:dan at 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

"""



More information about the sr-users mailing list