[OpenSIPS-Devel] empty publish results in invalid notify body

Juha Heinanen jh at tutpro.com
Thu Dec 30 10:41:17 CET 2010


i did some presence tests with sip-communicator and twinkle.  when i
tell sip-communicator that i'm offline, it sends a publish with empty
body like this:

PUBLISH sip:test at test.fi SIP/2.0.
Call-ID: a915618a37062a26f07f35ba7d538aa3 at 0.0.0.0.
CSeq: 9 PUBLISH.
From: "Test" <sip:test at test.fi>;tag=50de411e.
To: "Test" <sip:test at test.fi>.
Max-Forwards: 69.
Content-Type: application/pidf+xml.
Contact: "Test" <sip:test at 192.168.0.169:11417;transport=udp>.
User-Agent: SIP Communicator1.0-alpha6-nightly.build.3174Linux.
Expires: 0.
Event: presence.
SIP-If-Match: a.1293545574.14775.16.0.
Via: SIP/2.0/UDP x.x.x.x;branch=z9hG4bK7d28.92f1bd43.0.
Via: SIP/2.0/UDP 192.168.0.169:11417;rport=63441;received=x.x.x.x;branch=z9hG4bK-383134-a1b11a5839f6b262b0926731752edbfb.
Content-Length: 0.

once presence server gets it, it sends out a notify like this:

NOTIFY sip:jh at 192.168.0.169:5074;alias=x.x.x.x~63373~2;transport=tcp SIP/2.0.
Via: SIP/2.0/UDP x.x.x.x;branch=z9hG4bK4eec.58bca9d.0.
Via: SIP/2.0/UDP 127.0.0.1:5082;branch=z9hG4bK4eec.ebd886e3.0.
To: <sip:jh at test.fi>;tag=lgwpg.
From: <sip:test at test.fi>;tag=48de7c3cb9f0a00e953b10ae4e49e9de-0f9f.
CSeq: 10 NOTIFY.
Call-ID: vctlhxdlljfighc at sip.test.fi.
Route: <sip:x.x.x.x;r2=on;lr;ftag=lgwpg;n1>,<sip:x.x.x.x;transport=tcp;r2=on;lr;ftag=lgwpg;n1>.
Content-Length: 144.
User-Agent: OpenSIPS (1.6.4-tls (i386/linux)).
Max-Forwards: 69.
Event: presence.
Contact: <sip:127.0.0.1:5082>.
Subscription-State: active;expires=132.
Content-Type: application/pidf+xml.
.
<?xml version="1.0"?>
<presence entity="sip:test at test.fi"><tuple id="t5374"><status><basic>closed</basic></status></tuple></presence>

when twinkle receives the notify, it claims that it has invalid sip
body.

indeed, rfc3863 in section 4.1.1 says:

   The <presence> element MUST contain a namespace declaration ('xmlns')
   to indicate the namespace on which the presence document is based.
   The presence document compliant to this specification MUST have the
   namespace 'urn:ietf:params:xml:ns:pidf:'.

looks like namespace declaration is missing from the notify document that
presence server has generated on its own as response to empty publish body.

should i open a ticket on this or have i misunderstood something?

-- juha



More information about the Devel mailing list