[SIP Beyond VoIP] sip-subscribe-presence does not unsubscribe correctly

Owen Lynch owen.lynch at paragon.co.nz
Tue Dec 11 20:49:01 CET 2012


Hi Adrian,

thanks, the NOTIFY from the server has Contact header "Contact:
<sip:192.168.2.129:57929;transport=tls>". I will follow this up.

Owen


On 11 December 2012 21:24, Adrian Georgescu <ag at ag-projects.com> wrote:

> The request URI should be taken from the Contact header of the server
> response.
>
> Pasting the whole dialog, not just the start and end may provide a clue
> when it, if it changed.
>
> Adrian
>
> On Dec 11, 2012, at 4:28 AM, Owen Lynch wrote:
>
> Hi,
>
> I am running sip-subscribe-presence like this:
> sip-subscribe-presence -s -a monkey3 at flowdevtest.paragon.co.nz
> monkey3 at flowdevtest.paragon.co.nz
>
> When I terminate sip-subscribe-presence after a successful subscription I
> get a 404 Not Here instead of a NOTIFY. This is because the request URI has
> changed and the kamailio server does not consider it to be a valid
> in-dialog subscribe.
>
> The initial subscribe is:
>
> 192.168.2.236:57765 -(SIP over tls)-> 192.168.2.125:5061
> SUBSCRIBE sip:monkey3 at flowdevtest.paragon.co.nz SIP/2.0
> Via: SIP/2.0/tls 192.168.2.236:57765
> ;rport;branch=z9hG4bKPjqvB4spMeyGC4jdrtknGLSSFxdq68xa58
> Max-Forwards: 70
> From: <sip:monkey3 at flowdevtest.paragon.co.nz
> >;tag=DlElTbYUX1NSHigaPB0l56s42EdoOvzx
> To: <sip:monkey3 at flowdevtest.paragon.co.nz>
> Contact: <sip:pfyhnird at 192.168.2.236:47656;transport=tls>
> Call-ID: r-Zf69ji74Iu3xxxiIcPDAet9OKEndj7
> CSeq: 5339 SUBSCRIBE
> Event: presence
> Expires: 3600
> Accept: application/pidf+xml
> Allow-Events: presence
> User-Agent: sipsimple 0.31.1
> Authorization: Digest username="monkey3", realm="flowdevtest.paragon.co.nz",
> nonce="UMalGFDGo+yB6OMcb64SBYtElh7Q1zF3", uri="
> sip:monkey3 at flowdevtest.paragon.co.nz",
> response="752330a8c9062b82c2e7b9e8ab11a7d0",
> cnonce="VJJm.rzmXf3nViftDB6NolivoXaTWzWH", qop=auth, nc=00000001
> Content-Length:  0
>
> It is acknowledged with:
>
> 2012-12-11 16:11:47.712883: RECEIVED: Packet 4, +0:00:00.023362
> 192.168.2.125:5061 -(SIP over tls)-> 192.168.2.236:57765
> SIP/2.0 202 OK
> Record-Route: <sip:192.168.2.125:5061;transport=tls;lr=on>
> Via: SIP/2.0/tls 192.168.2.236:57765
> ;rport=57765;branch=z9hG4bKPjqvB4spMeyGC4jdrtknGLSSFxdq68xa58
> From: <sip:monkey3 at flowdevtest.paragon.co.nz
> >;tag=DlElTbYUX1NSHigaPB0l56s42EdoOvzx
> To: <sip:monkey3 at flowdevtest.paragon.co.nz
> >;tag=85c03e96299e8572e145bc73db23802a-c1f4
> Call-ID: r-Zf69ji74Iu3xxxiIcPDAet9OKEndj7
> CSeq: 5339 SUBSCRIBE
> Expires: 3600
> Contact: <sip:192.168.2.129:5061;transport=tls>
> Server: kamailio (3.3.2 (i386/linux))
> Content-Length: 0
>
>
> But the final subscribe (expires=0) is:
>
> 2012-12-11 16:12:07.179514: SENDING: Packet 7, +0:00:19.489993
> 192.168.2.236:57765 -(SIP over tls)-> 192.168.2.125:5061
> SUBSCRIBE *sip:192.168.2.129:57929*;transport=tls SIP/2.0
> Via: SIP/2.0/tls 192.168.2.236:57765
> ;rport;branch=z9hG4bKPjW4TsbpZqhCOjMMm0KhIzbvrJant7Ovip
> Max-Forwards: 70
> From: <sip:monkey3 at flowdevtest.paragon.co.nz
> >;tag=DlElTbYUX1NSHigaPB0l56s42EdoOvzx
> To: <sip:monkey3 at flowdevtest.paragon.co.nz
> >;tag=85c03e96299e8572e145bc73db23802a-c1f4
> Contact: <sip:pfyhnird at 192.168.2.236:47656;transport=tls>
> Call-ID: r-Zf69ji74Iu3xxxiIcPDAet9OKEndj7
> CSeq: 5340 SUBSCRIBE
> Route: <sip:192.168.2.125:5061;transport=tls;lr>
> Event: presence
> Expires: 0
> Accept: application/pidf+xml
> Allow-Events: presence
> User-Agent: sipsimple 0.31.1
> Content-Length:  0
>
> It is acknowledged with:
>
> 2012-12-11 16:12:07.179669: RECEIVED: Packet 8, +0:00:19.490148
> 192.168.2.125:5061 -(SIP over tls)-> 192.168.2.236:57765
> SIP/2.0 404 Not here
> Via: SIP/2.0/tls 192.168.2.236:57765
> ;rport=57765;branch=z9hG4bKPjW4TsbpZqhCOjMMm0KhIzbvrJant7Ovip
> From: <sip:monkey3 at flowdevtest.paragon.co.nz
> >;tag=DlElTbYUX1NSHigaPB0l56s42EdoOvzx
> To: <sip:monkey3 at flowdevtest.paragon.co.nz
> >;tag=85c03e96299e8572e145bc73db23802a-c1f4
> Call-ID: r-Zf69ji74Iu3xxxiIcPDAet9OKEndj7
> CSeq: 5340 SUBSCRIBE
> Server: kamailio (3.3.2 (i386/linux))
> Content-Length: 0
>
> The final subscribe request URI is "SUBSCRIBE sip:192.168.2.129:*57929*;transport=tls"
> but it needs to be "SUBSCRIBE sip:192.168.2.129:*5061*;transport=tls",
> i.e. the port should match the port it is connected to, not a new port. Can
> you advise on how the script picks a new port for the request URI and
> whether I can force it to what I want. Package version is 0.31.1
>
> We have a kamailio sip proxy on .2.125 and a kamailio presence server on
> .2.129
>
> Kind regards,
> Owen Lynch
> _______________________________________________
> SIPBeyondVoIP mailing list
> SIPBeyondVoIP at lists.ag-projects.com
> http://lists.ag-projects.com/mailman/listinfo/sipbeyondvoip
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ag-projects.com/pipermail/sipbeyondvoip/attachments/20121212/f894673e/attachment.html>


More information about the SIPBeyondVoIP mailing list