Hi List,

I've been trying to make the Presence thing work with kamailio but the very
basic presence doesn't seem to work. I've tried multiple modules and
different how-tos for running successful presence aware configuration but
seems something is missing. The ultimate goal is to give user
online/busy/offline status updaes to Subscribers.

My Kamailio version is: kamailio 4.0.1 (i386/linux) 55f7de

I've loaded the following modules.

loadmodule "presence.so"
loadmodule "presence_xml.so"
loadmodule "presence_dialoginfo.so"
loadmodule "presence_reginfo"
loadmodule "pua.so"
#loadmodule "sca.so"
loadmodule "pua_dialoginfo.so"
loadmodule "pua_usrloc.so"
loadmodule "pua_reginfo"

The Presence route contains this:

route[PRESENCE] {
        if(!is_method("PUBLISH|SUBSCRIBE"))
                return;

        xlog("L_INFO", "[$fU@$si:$sp]{$rm}  In Presence Route \n");
#!ifdef WITH_PRESENCE
        if (!t_newtran())
        {
                sl_reply_error();
                exit;
        };

        if(is_method("PUBLISH"))
        {
               handle_publish();
               t_release();
        }
        else
        if( is_method("SUBSCRIBE"))
        {
                handle_subscribe();
                t_release();
        }
        exit;
#!endif

        # if presence enabled, this part will not be executed
        if (is_method("PUBLISH") || $rU==$null)
        {
                sl_send_reply("404", "Not here");
                exit;
        }
        return;
}

Then I've my x-lite phone (which is known to work with Presence in
Asterisk) tries to register and subscribe to its own extensions. Nothing
happens. The trace from sipgrep is attached.

Please help me in making presence work.

Thanks,
Sammy
U 2013/06/10 02:48:15.025967 182.189.2.135:10736 -> 1.1.1.1:50041

REGISTER sip:wistle.myvoip.com:50041 SIP/2.0
Via: SIP/2.0/UDP 
192.168.1.100:10736;branch=z9hG4bK-d8754z-551cea7cd1cc4a1a-1---d8754z-;rport
Max-Forwards: 70
Contact: <sip:4144@192.168.1.100:10736;rinstance=ff68c7835b0e94e4>
To: "4144"<sip:4...@wistle.myvoip.com:50041>
From: "4144"<sip:4...@wistle.myvoip.com:50041>;tag=653fc508
Call-ID: YTYxMjdlNWZmM2Y3ZDUxYzhkZGQ1MGViNmY3MWQ4YWQ
CSeq: 1 REGISTER
Expires: 3600
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, 
INFO
User-Agent: X-Lite release 4.5.2 stamp 70142
Content-Length: 0


U 2013/06/10 02:48:15.026307 1.1.1.1:50041 -> 182.189.2.135:10736

SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 
192.168.1.100:10736;branch=z9hG4bK-d8754z-551cea7cd1cc4a1a-1---d8754z-;rport=10736;received=182.189.2.135
To: 
"4144"<sip:4...@wistle.myvoip.com:50041>;tag=66aa33862dbfa4f1bbc1cebf6c618e8c.c767
From: "4144"<sip:4...@wistle.myvoip.com:50041>;tag=653fc508
Call-ID: YTYxMjdlNWZmM2Y3ZDUxYzhkZGQ1MGViNmY3MWQ4YWQ
CSeq: 1 REGISTER
WWW-Authenticate: Digest realm="wistle.myvoip.com", 
nonce="UbV321G1dq/grm+0pgq88RqDetEHsxBT"
Server: kamailio (4.0.1 (i386/linux))
Content-Length: 0


U 2013/06/10 02:48:15.343647 182.189.2.135:10736 -> 1.1.1.1:50041

REGISTER sip:wistle.myvoip.com:50041 SIP/2.0
Via: SIP/2.0/UDP 
192.168.1.100:10736;branch=z9hG4bK-d8754z-c4f1e5199878995f-1---d8754z-;rport
Max-Forwards: 70
Contact: <sip:4144@192.168.1.100:10736;rinstance=ff68c7835b0e94e4>
To: "4144"<sip:4...@wistle.myvoip.com:50041>
From: "4144"<sip:4...@wistle.myvoip.com:50041>;tag=653fc508
Call-ID: YTYxMjdlNWZmM2Y3ZDUxYzhkZGQ1MGViNmY3MWQ4YWQ
CSeq: 2 REGISTER
Expires: 3600
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, 
INFO
User-Agent: X-Lite release 4.5.2 stamp 70142
Authorization: Digest 
username="4144",realm="wistle.myvoip.com",nonce="UbV321G1dq/grm+0pgq88RqDetEHsxBT",uri="sip:wistle.myvoip.com:50041",response="016038f7a6ff64d44edcd5812944fc39",algorithm=MD5
Content-Length: 0


U 2013/06/10 02:48:15.345708 1.1.1.1:50041 -> 182.189.2.135:10736

SIP/2.0 200 OK
Via: SIP/2.0/UDP 
192.168.1.100:10736;branch=z9hG4bK-d8754z-c4f1e5199878995f-1---d8754z-;rport=10736;received=182.189.2.135
To: 
"4144"<sip:4...@wistle.myvoip.com:50041>;tag=66aa33862dbfa4f1bbc1cebf6c618e8c.e83b
From: "4144"<sip:4...@wistle.myvoip.com:50041>;tag=653fc508
Call-ID: YTYxMjdlNWZmM2Y3ZDUxYzhkZGQ1MGViNmY3MWQ4YWQ
CSeq: 2 REGISTER
Contact: 
<sip:4144@192.168.1.100:10736;rinstance=ff68c7835b0e94e4>;expires=3600;received="sip:182.189.2.135:10736"
Server: kamailio (4.0.1 (i386/linux))
Content-Length: 0


U 2013/06/10 02:48:15.685502 182.189.2.135:10736 -> 1.1.1.1:50041

REGISTER sip:wistle.myvoip.com:50041 SIP/2.0
Via: SIP/2.0/UDP 
192.168.1.100:10736;branch=z9hG4bK-d8754z-4849990c22af9558-1---d8754z-;rport
Max-Forwards: 70
Contact: <sip:4144@192.168.1.100:10736;rinstance=ff68c7835b0e94e4>;expires=0
To: "4144"<sip:4...@wistle.myvoip.com:50041>
From: "4144"<sip:4...@wistle.myvoip.com:50041>;tag=653fc508
Call-ID: YTYxMjdlNWZmM2Y3ZDUxYzhkZGQ1MGViNmY3MWQ4YWQ
CSeq: 3 REGISTER
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, 
INFO
User-Agent: X-Lite release 4.5.2 stamp 70142
Authorization: Digest 
username="4144",realm="wistle.myvoip.com",nonce="UbV321G1dq/grm+0pgq88RqDetEHsxBT",uri="sip:wistle.myvoip.com:50041",response="016038f7a6ff64d44edcd5812944fc39",algorithm=MD5
Content-Length: 0


U 2013/06/10 02:48:15.687612 1.1.1.1:50041 -> 182.189.2.135:10736

SIP/2.0 200 OK
Via: SIP/2.0/UDP 
192.168.1.100:10736;branch=z9hG4bK-d8754z-4849990c22af9558-1---d8754z-;rport=10736;received=182.189.2.135
To: 
"4144"<sip:4...@wistle.myvoip.com:50041>;tag=66aa33862dbfa4f1bbc1cebf6c618e8c.da54
From: "4144"<sip:4...@wistle.myvoip.com:50041>;tag=653fc508
Call-ID: YTYxMjdlNWZmM2Y3ZDUxYzhkZGQ1MGViNmY3MWQ4YWQ
CSeq: 3 REGISTER
Server: kamailio (4.0.1 (i386/linux))
Content-Length: 0


U 2013/06/10 02:48:16.019503 182.189.2.135:10736 -> 1.1.1.1:50041

REGISTER sip:wistle.myvoip.com:50041 SIP/2.0
Via: SIP/2.0/UDP 
192.168.1.100:10736;branch=z9hG4bK-d8754z-5a4762794bffdd48-1---d8754z-;rport
Max-Forwards: 70
Contact: <sip:4144@182.189.2.135:10736;rinstance=f9fef1941fa572a2>
To: "4144"<sip:4...@wistle.myvoip.com:50041>
From: "4144"<sip:4...@wistle.myvoip.com:50041>;tag=653fc508
Call-ID: YTYxMjdlNWZmM2Y3ZDUxYzhkZGQ1MGViNmY3MWQ4YWQ
CSeq: 4 REGISTER
Expires: 3600
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, 
INFO
User-Agent: X-Lite release 4.5.2 stamp 70142
Authorization: Digest 
username="4144",realm="wistle.myvoip.com",nonce="UbV321G1dq/grm+0pgq88RqDetEHsxBT",uri="sip:wistle.myvoip.com:50041",response="016038f7a6ff64d44edcd5812944fc39",algorithm=MD5
Content-Length: 0


U 2013/06/10 02:48:16.021569 1.1.1.1:50041 -> 182.189.2.135:10736

SIP/2.0 200 OK
Via: SIP/2.0/UDP 
192.168.1.100:10736;branch=z9hG4bK-d8754z-5a4762794bffdd48-1---d8754z-;rport=10736;received=182.189.2.135
To: 
"4144"<sip:4...@wistle.myvoip.com:50041>;tag=66aa33862dbfa4f1bbc1cebf6c618e8c.3a5c
From: "4144"<sip:4...@wistle.myvoip.com:50041>;tag=653fc508
Call-ID: YTYxMjdlNWZmM2Y3ZDUxYzhkZGQ1MGViNmY3MWQ4YWQ
CSeq: 4 REGISTER
Contact: 
<sip:4144@182.189.2.135:10736;rinstance=f9fef1941fa572a2>;expires=3600;received="sip:182.189.2.135:10736"
Server: kamailio (4.0.1 (i386/linux))
Content-Length: 0


U 2013/06/10 02:48:16.359547 182.189.2.135:10736 -> 1.1.1.1:50041

SUBSCRIBE sip:4...@wistle.myvoip.com:50041 SIP/2.0
Via: SIP/2.0/UDP 
192.168.1.100:10736;branch=z9hG4bK-d8754z-dcc3f0279836712a-1---d8754z-;rport
Max-Forwards: 70
Contact: <sip:4144@182.189.2.135:10736>
To: "4144"<sip:4...@wistle.myvoip.com:50041>
From: "4144"<sip:4...@wistle.myvoip.com:50041>;tag=1f923a02
Call-ID: MWZjMzU0MjVmNGIzZWU0ZDBlMTBmOGEyY2YxMmM0ODc
CSeq: 1 SUBSCRIBE
Expires: 300
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, 
INFO
Supported: eventlist
User-Agent: X-Lite release 4.5.2 stamp 70142
Event: message-summary
Content-Length: 0


U 2013/06/10 02:48:16.359939 1.1.1.1:50041 -> 182.189.2.135:10736

SIP/2.0 407 Proxy Authentication Required
Via: SIP/2.0/UDP 
192.168.1.100:10736;branch=z9hG4bK-d8754z-dcc3f0279836712a-1---d8754z-;rport=10736;received=182.189.2.135
To: 
"4144"<sip:4...@wistle.myvoip.com:50041>;tag=66aa33862dbfa4f1bbc1cebf6c618e8c.3774
From: "4144"<sip:4...@wistle.myvoip.com:50041>;tag=1f923a02
Call-ID: MWZjMzU0MjVmNGIzZWU0ZDBlMTBmOGEyY2YxMmM0ODc
CSeq: 1 SUBSCRIBE
Proxy-Authenticate: Digest realm="wistle.myvoip.com", 
nonce="UbV33FG1drCCWPPikucUJkZqeyoLaKdO"
Server: kamailio (4.0.1 (i386/linux))
Content-Length: 0


U 2013/06/10 02:48:16.471664 182.189.2.135:10736 -> 1.1.1.1:50041

SUBSCRIBE sip:4...@wistle.myvoip.com:50041 SIP/2.0
Via: SIP/2.0/UDP 
192.168.1.100:10736;branch=z9hG4bK-d8754z-fcbe087cbcb27b74-1---d8754z-;rport
Max-Forwards: 70
Contact: <sip:4144@182.189.2.135:10736>
To: <sip:4...@wistle.myvoip.com:50041>
From: "4144"<sip:4...@wistle.myvoip.com:50041>;tag=f03dab25
Call-ID: ZjAzZmU2MTExYmI1MjlhMTMwYTczNDNjN2YwZWUzZGE
CSeq: 1 SUBSCRIBE
Expires: 3600
Accept: multipart/related, application/rlmi+xml, application/pidf+xml
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, 
INFO
Supported: eventlist
User-Agent: X-Lite release 4.5.2 stamp 70142
Event: presence
Content-Length: 0


U 2013/06/10 02:48:16.472032 1.1.1.1:50041 -> 182.189.2.135:10736

SIP/2.0 407 Proxy Authentication Required
Via: SIP/2.0/UDP 
192.168.1.100:10736;branch=z9hG4bK-d8754z-fcbe087cbcb27b74-1---d8754z-;rport=10736;received=182.189.2.135
To: <sip:4...@wistle.myvoip.com:50041>;tag=66aa33862dbfa4f1bbc1cebf6c618e8c.21a1
From: "4144"<sip:4...@wistle.myvoip.com:50041>;tag=f03dab25
Call-ID: ZjAzZmU2MTExYmI1MjlhMTMwYTczNDNjN2YwZWUzZGE
CSeq: 1 SUBSCRIBE
Proxy-Authenticate: Digest realm="wistle.myvoip.com", 
nonce="UbV33FG1drCCWPPikucUJkZqeyoLaKdO"
Server: kamailio (4.0.1 (i386/linux))
Content-Length: 0


U 2013/06/10 02:48:16.673726 182.189.2.135:10736 -> 1.1.1.1:50041

SUBSCRIBE sip:4...@wistle.myvoip.com:50041 SIP/2.0
Via: SIP/2.0/UDP 
192.168.1.100:10736;branch=z9hG4bK-d8754z-db203141fc72216e-1---d8754z-;rport
Max-Forwards: 70
Contact: <sip:4144@182.189.2.135:10736>
To: "4144"<sip:4...@wistle.myvoip.com:50041>
From: "4144"<sip:4...@wistle.myvoip.com:50041>;tag=1f923a02
Call-ID: MWZjMzU0MjVmNGIzZWU0ZDBlMTBmOGEyY2YxMmM0ODc
CSeq: 2 SUBSCRIBE
Expires: 300
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, 
INFO
Proxy-Authorization: Digest 
username="4144",realm="wistle.myvoip.com",nonce="UbV33FG1drCCWPPikucUJkZqeyoLaKdO",uri="sip:4...@wistle.myvoip.com:50041",response="a0d26bfb681d73aed0807049f63e3f35",algorithm=MD5
Supported: eventlist
User-Agent: X-Lite release 4.5.2 stamp 70142
Event: message-summary
Content-Length: 0


U 2013/06/10 02:48:16.674605 1.1.1.1:50041 -> 182.189.2.135:10736

SIP/2.0 489 Bad Event
Via: SIP/2.0/UDP 
192.168.1.100:10736;branch=z9hG4bK-d8754z-db203141fc72216e-1---d8754z-;rport=10736;received=182.189.2.135
To: 
"4144"<sip:4...@wistle.myvoip.com:50041>;tag=414ad63373116e68203e2a5e8b07c824-967f
From: "4144"<sip:4...@wistle.myvoip.com:50041>;tag=1f923a02
Call-ID: MWZjMzU0MjVmNGIzZWU0ZDBlMTBmOGEyY2YxMmM0ODc
CSeq: 2 SUBSCRIBE
Allow-Events: presence.winfo, reg, dialog, presence
Server: kamailio (4.0.1 (i386/linux))
Content-Length: 0


U 2013/06/10 02:48:16.811712 182.189.2.135:10736 -> 1.1.1.1:50041

SUBSCRIBE sip:4...@wistle.myvoip.com:50041 SIP/2.0
Via: SIP/2.0/UDP 
192.168.1.100:10736;branch=z9hG4bK-d8754z-db87f11226dd9649-1---d8754z-;rport
Max-Forwards: 70
Contact: <sip:4144@182.189.2.135:10736>
To: <sip:4...@wistle.myvoip.com:50041>
From: "4144"<sip:4...@wistle.myvoip.com:50041>;tag=f03dab25
Call-ID: ZjAzZmU2MTExYmI1MjlhMTMwYTczNDNjN2YwZWUzZGE
CSeq: 2 SUBSCRIBE
Expires: 3600
Accept: multipart/related, application/rlmi+xml, application/pidf+xml
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, 
INFO
Proxy-Authorization: Digest 
username="4144",realm="wistle.myvoip.com",nonce="UbV33FG1drCCWPPikucUJkZqeyoLaKdO",uri="sip:4...@wistle.myvoip.com:50041",response="a0d26bfb681d73aed0807049f63e3f35",algorithm=MD5
Supported: eventlist
User-Agent: X-Lite release 4.5.2 stamp 70142
Event: presence
Content-Length: 0


U 2013/06/10 02:48:16.812957 1.1.1.1:50041 -> 182.189.2.135:10736

SIP/2.0 202 OK
Via: SIP/2.0/UDP 
192.168.1.100:10736;branch=z9hG4bK-d8754z-db87f11226dd9649-1---d8754z-;rport=10736;received=182.189.2.135
To: <sip:4...@wistle.myvoip.com:50041>;tag=414ad63373116e68203e2a5e8b07c824-1eac
From: "4144"<sip:4...@wistle.myvoip.com:50041>;tag=f03dab25
Call-ID: ZjAzZmU2MTExYmI1MjlhMTMwYTczNDNjN2YwZWUzZGE
CSeq: 2 SUBSCRIBE
Expires: 3600
Contact: <sip:1.1.1.1:50041>
Server: kamailio (4.0.1 (i386/linux))
Content-Length: 0


U 2013/06/10 02:48:16.813122 1.1.1.1:50041 -> 182.189.2.135:10736

NOTIFY sip:4144@182.189.2.135:10736 SIP/2.0
Via: SIP/2.0/UDP 1.1.1.1:50041;branch=z9hG4bK4b5c.0d541266.0
To: sip:4...@wistle.myvoip.com;tag=f03dab25
From: sip:4...@wistle.myvoip.com;tag=414ad63373116e68203e2a5e8b07c824-1eac
CSeq: 2 NOTIFY
Call-ID: ZjAzZmU2MTExYmI1MjlhMTMwYTczNDNjN2YwZWUzZGE
Content-Length: 0
User-Agent: kamailio (4.0.1 (i386/linux))
Max-Forwards: 70
Event: presence
Contact: <sip:1.1.1.1:50041>
Subscription-State: pending;expires=3600


U 2013/06/10 02:48:17.288625 1.1.1.1:50041 -> 182.189.2.135:10736

NOTIFY sip:4144@182.189.2.135:10736 SIP/2.0
Via: SIP/2.0/UDP 1.1.1.1:50041;branch=z9hG4bK4b5c.0d541266.0
To: sip:4...@wistle.myvoip.com;tag=f03dab25
From: sip:4...@wistle.myvoip.com;tag=414ad63373116e68203e2a5e8b07c824-1eac
CSeq: 2 NOTIFY
Call-ID: ZjAzZmU2MTExYmI1MjlhMTMwYTczNDNjN2YwZWUzZGE
Content-Length: 0
User-Agent: kamailio (4.0.1 (i386/linux))
Max-Forwards: 70
Event: presence
Contact: <sip:1.1.1.1:50041>
Subscription-State: pending;expires=3600


U 2013/06/10 02:48:17.653461 182.189.2.135:10736 -> 1.1.1.1:50041

SIP/2.0 200 OK
Via: SIP/2.0/UDP 1.1.1.1:50041;branch=z9hG4bK4b5c.0d541266.0
Contact: <sip:4144@182.189.2.135:10736>
To: <sip:4...@wistle.myvoip.com>;tag=f03dab25
From: <sip:4...@wistle.myvoip.com>;tag=414ad63373116e68203e2a5e8b07c824-1eac
Call-ID: ZjAzZmU2MTExYmI1MjlhMTMwYTczNDNjN2YwZWUzZGE
CSeq: 2 NOTIFY
User-Agent: X-Lite release 4.5.2 stamp 70142
Content-Length: 0


_______________________________________________
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

Reply via email to