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
"""
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
Hey Daniel,
Here is the subscription coming from OpenFIRE towards Kamailio when the user is added in the roster on XMPP side:
""" T 2012/03/02 09:49:57.743750 127.0.0.1:5275 -> 127.0.0.1:49965 [AP] <presence id="4h8F6-19" to="dan4@gw.mydomain.com" type="subscribe" from="dan@mydomain.com"><c xmlns="http://jabber.org/protocol/caps" ext="voice-v1 video-v1 camera-v1 " hash="sha-1" node="http://jitsi.org" ver="ohjz8WKq0ZQRiNWRNcapX4BBHLk="/></presence> """
When the gateway is functioning properly I could normally see SIP requests being generated on SIP side via proxy defined (eg in case of MESSAGE), but here I cannot see any SIP request nor reply back to OpenFIRE.
Ta, DanB
On Sat, Mar 10, 2012 at 12:13 PM, Daniel-Constantin Mierla miconda@gmail.com wrote:
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
Hello,
to, from and type attributes are there, just that the uris are not the format expected. Can you send the log messages for debug=3?
Cheers, Daniel
On Sat, Mar 10, 2012 at 12:29 PM, Dan-Cristian Bogos < danb.lists@googlemail.com> wrote:
Hey Daniel,
Here is the subscription coming from OpenFIRE towards Kamailio when the user is added in the roster on XMPP side:
""" T 2012/03/02 09:49:57.743750 127.0.0.1:5275 -> 127.0.0.1:49965 [AP] <presence id="4h8F6-19" to="dan4@gw.mydomain.com" type="subscribe" from="dan@mydomain.com"><c xmlns="http://jabber.org/protocol/caps" ext="voice-v1 video-v1 camera-v1 " hash="sha-1" node="http://jitsi.org" ver="ohjz8WKq0ZQRiNWRNcapX4BBHLk="/></presence> """
When the gateway is functioning properly I could normally see SIP requests being generated on SIP side via proxy defined (eg in case of MESSAGE), but here I cannot see any SIP request nor reply back to OpenFIRE.
Ta, DanB
On Sat, Mar 10, 2012 at 12:13 PM, Daniel-Constantin Mierla miconda@gmail.com wrote:
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
Hey Daniel,
This time I will have to take back my thoughts about the module not being in "stable" status ;).
By using debug=3 I could see the reason of the subscribes not being generated (still could be good to have some error on xmpp side back, but I can live with that for now). The problem was me trying to "cheat" how the module works when it comes to double domain usage (one for sip and the other for xmpp - serialized). I did not attach a sip domain to xmpp contact (just the xmpp component one).
After using double domain in my contact (separated by domain separator defined in the module) I was able to see the SUBSCRIBE being generated on SIP side and feedback being sent to XMPP side. For now I can happily declare that the xmpp module works with OpenFIRE as well.
One idea while being here, would it be possible to implement some sort of "default sip domain" in xmpp module of Kamailio, so we make the contacts on xmpp side more "user-friendly"? On the XMPP side (at least in OpenFIRE) there is no need of using multiple domain support since they do not look like supporting it anyway.
I will investigate the setup further but at a glance it looks like all running smooth for now.
Anyway, many thanks for taking a look on this especially being weekend over here ;).
DanB
PS: Requests as they flow right now: """ T 2012/03/10 13:46:11.351207 127.0.0.1:5275 -> 127.0.0.1:34337 [AP] <presence id="6gJ03-31" to="user03#mydomain.com@gw.mydomain.com" type="subscribe" from="dan@mydomain.com"><c xmlns="http://jabber.org/protocol/caps" ext="voice-v1 video-v1 camera-v1 " hash="sha-1" node="http://jitsi.org" ver="m98p+WzZCYgG09CXivNZFRUYr0k="/></presence> ## U 2012/03/10 13:46:11.351602 127.0.0.1:5060 -> 127.0.0.1:5060 SUBSCRIBE sip:user03@mydomain.com SIP/2.0. Via: SIP/2.0/UDP 127.0.0.1;branch=z9hG4bK095.1cbd973.0. To: sip:user03@mydomain.com. From: sip:dan#mydomain.com@gw.mydomain.com;tag=7bcd2f0283a17a6a3eb34b70a7dbcaec-6530. CSeq: 10 SUBSCRIBE. Call-ID: 1aaede21663c390d-6977@127.0.0.1. Content-Length: 0. User-Agent: kamailio (3.2.0 (x86_64/linux)). Max-Forwards: 70. Event: presence. Contact: sip:dan#mydomain.com@gw.mydomain.com. Expires: 3610. .
# U 2012/03/10 13:46:11.353547 127.0.0.1:5060 -> 127.0.0.1:5060 SIP/2.0 404 Not Found. Via: SIP/2.0/UDP 127.0.0.1;branch=z9hG4bK095.1cbd973.0;rport=5060. To: sip:user03@mydomain.com;tag=c87c23e595340de8a004872f7dfab287-11f3. From: sip:dan#mydomain.com@gw.mydomain.com;tag=7bcd2f0283a17a6a3eb34b70a7dbcaec-6530. CSeq: 10 SUBSCRIBE. Call-ID: 1aaede21663c390d-6977@127.0.0.1. Server: kamailio (3.2.0 (x86_64/linux)). Content-Length: 0. .
# T 2012/03/10 13:46:11.354447 127.0.0.1:34337 -> 127.0.0.1:5275 [AP] <presence to="dan@mydomain.com" from="user03#mydomain.com@gw.mydomain.com" type="error"> <error> <item-not-found xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/> </error> </presence> ### """ On Sat, Mar 10, 2012 at 1:06 PM, Daniel-Constantin Mierla miconda@gmail.com wrote:
Hello,
to, from and type attributes are there, just that the uris are not the format expected. Can you send the log messages for debug=3?
Cheers, Daniel
On Sat, Mar 10, 2012 at 12:29 PM, Dan-Cristian Bogos danb.lists@googlemail.com wrote:
Hey Daniel,
Here is the subscription coming from OpenFIRE towards Kamailio when the user is added in the roster on XMPP side:
""" T 2012/03/02 09:49:57.743750 127.0.0.1:5275 -> 127.0.0.1:49965 [AP] <presence id="4h8F6-19" to="dan4@gw.mydomain.com" type="subscribe" from="dan@mydomain.com"><c xmlns="http://jabber.org/protocol/caps" ext="voice-v1 video-v1 camera-v1 " hash="sha-1" node="http://jitsi.org" ver="ohjz8WKq0ZQRiNWRNcapX4BBHLk="/></presence> """
When the gateway is functioning properly I could normally see SIP requests being generated on SIP side via proxy defined (eg in case of MESSAGE), but here I cannot see any SIP request nor reply back to OpenFIRE.
Ta, DanB
On Sat, Mar 10, 2012 at 12:13 PM, Daniel-Constantin Mierla miconda@gmail.com wrote:
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
-- Daniel-Constantin Mierla http://www.asipto.com