[SIPForum-discussion] SIP and XML (pidf+xml)
Moshe Ostrovsky
mosheo at radvision.com
Sun Mar 29 08:32:55 UTC 2009
Hi Clint.
There are 2 cases here.
1. If we are talking about a single body within your message, then
according to the rfc3261, message headers must be separated from the
message body using extra CR.
2. As I could see from your mail you are using
--Boundary4bd1b8_282b3a0e_1965fbb2_b72ddb30
So, probably we are talking about multipart-related body and according
to its syntax, described in rfc2387, your the service provider does the
proper fix to your message.
View an examples for both of the cases below.
========================================================================
=============
PUBLISH sip:a at SERVER.com SIP/2.0
From: <sip:a at SERVER.com>;tag=2629d90-0-13c4-5505-24dc43-219d75e2-24dc43
To: <sip:a at SERVER.com>
Call-ID: 263b1e0-0-13c4-5505-24dc43-3af214fc-24dc43
CSeq: 1 PUBLISH
Via: SIP/2.0/TCP a at SERVER.com;branch=z9hG4bK-24dc43-8ffc695c-1a8873c3
Max-Forwards: 70
Expires: 111
Event: presence
Content-Type: application/pidf+xml
Content-Length: 267
<?xml version="1.0" encoding="UTF-8"?>
<presence xmlns="urn:ietf:params:xml:ns:pidf" entity="ent1">
<tuple id="Doc_02A47A68_tID_1">
<status>
<basic>open</basic>
</status>
<contact priority="0">a at rvsn.com</contact>
</tuple>
</presence>
========================================================================
===============
PUBLISH sip:a at SERVER.com SIP/2.0
From: <sip:a at SERVER.com>;tag=2629d90-0-13c4-5505-24dc43-219d75e2-24dc43
To: <sip:a at SERVER.com>
Call-ID: 263b1e0-0-13c4-5505-24dc43-3af214fc-24dc43
CSeq: 1 PUBLISH
Via: SIP/2.0/TCP a at SERVER.com;branch=z9hG4bK-24dc43-8ffc695c-1a8873c3
Max-Forwards: 70
Expires: 111
Event: presence
Content-Type:
multipart/related;boundary="xml-doc-boundary";start=<sip:02A47988 at Publis
her.com>;type="application/pidf+xml"
Content-Length: 1078
--xml-doc-boundary
Content-Type: application/pidf+xml
Content-ID: <sip:02A478A8 at Publisher.com>
<?xml version="1.0" encoding="UTF-8"?>
<presence xmlns="urn:ietf:params:xml:ns:pidf" entity="ent1">
<tuple id="Doc_02A478A8_tID_1">
<status>
<basic>closed</basic>
</status>
<contact priority="0">a at rvsn.com</contact>
</tuple>
<tuple id="Doc_02A478A8_tID_2">
<status>
<basic>closed</basic>
</status>
<contact priority="0">a1 at rvsn.com</contact>
</tuple>
</presence>
--xml-doc-boundary
Content-Type: application/pidf+xml
Content-ID: <sip:02A47988 at Publisher.com>
<?xml version="1.0" encoding="UTF-8"?>
<presence xmlns="urn:ietf:params:xml:ns:pidf" entity="ent2">
<tuple id="Doc_02A47988_tID_3">
<status>
<basic>open</basic>
</status>
<contact priority="0">b at rvsn.com</contact>
</tuple>
<tuple id="Doc_02A47988_tID_4">
<status>
<basic>open</basic>
</status>
<contact priority="0">b1 at rvsn.com</contact>
</tuple>
</presence>
--xml-doc-boundary--
========================================================================
============
Moshe Ostrovsky
SIP-IMS team leader
RADVISION(r)
Delivering the Visual ExperienceTM
Website: www.radvision.com
-----Original Message-----
From: discussion-bounces at sipforum.org
[mailto:discussion-bounces at sipforum.org] On Behalf Of Clint Perry
Sent: Thursday, March 26, 2009 8:23 PM
To: discussion at sipforum.org
Subject: [SIPForum-discussion] SIP and XML (pidf+xml)
I have a SIP App Server that is injecting Geolocation information.
When I send a call to the service provider with the Geolocation info
they eject the message do to a carriage return that is in between the
"Content-Type:" and the "Content-ID:"
They say that the cariage return needs to be after the "Content-ID:"
and the XML body?
Are there any RFC that enforce this?
***********************My Server**********************************
--Boundary4bd1b8_282b3a0e_1965fbb2_b72ddb30
Content-Type: application/pidf+xml
Content-ID: 1236907399341 at ttt.com
<?xml version="1.0" encoding="UTF-8"?>
************************Service Provider
Example**********************************
Content-Type: application/pidf+xml
Content-ID: alice123 at atlanta.example.com
<?xml version="1.0" encoding="UTF-8"?>
_______________________________________________
This is the SIP Forum discussion mailing list
TO UNSUBSCRIBE, or edit your delivery options, please visit
http://sipforum.org/mailman/listinfo/discussion
Post to the list at discussion at sipforum.org
More information about the discussion
mailing list