Subject: [SIP] Sip-to-XML mapping

From: [email-masked]
Date: Tue, 5 Dec 2000 08:49:15 +0200

In the everything-is-a-nail department, XML has become the most popular
hammer nowadays, and I have fielded questions from my colleagues about SIP
and XML.

1. Why isn't SIP sent in XML but rather in a line-oriented syntax?
2. What about SIP-to-XML mappings?

I have some answers to the questions.
1. The line-oriented syntax allows and exisiting HTTP/SMTP parsers can be
easily applied to SIP in UAs, servers, and SIP-aware firewalls. Given that
SIP is a protocol requiring coupling on the protocol level between
components, the added metainformation of XML is not needed. Given that
text-based SIP is already  a "higher-level" protocol (to human readers)
than binary protocols like H.323, it would be ill-advised to take that to
an extreme with XML metainformation, reducing efficiency. SIP was invented
well before XML became popular and people started recoding every text-based
(or even binary)  data transmission into XML.

2.  A SIP-to-XML mapping would have the advantage of being parseably
transmittable over protocols that use XML, including firewall-penetrating
ones. As various types of different routing and firewall software become
XML-aware, SIP transmissions would be handled more flexibly. When this
occurs, such software may be able to convert line-based SIP transmissions
to XML at run-time for more sophisticated processing. Still, the
"name:value" line-based format provides enought metainformation for easy
processing, so that there is little advantage to XML.

I should clarify that in my opinion, SIP does NOT need to be sent in XML,
and only limited processing tasks would benefit by SIP-to-XML conversion,
which can be accomplished ad-hoc. Still, the comparison between line-based
and tag-based formats highlights some interesting questions about the
benefits of different syntaxes.

_______________________________________________
SIP mailing list
[email-masked]
http://lists.bell-labs.com/mailman/listinfo/sip

---

From: "Henning G. Schulzrinne" <[email-masked]>
Date: Tue, 05 Dec 2000 10:09:55 -0500

Yes, this is almost a FAQ. Short, snippy answers:

1) It's too late to worry about it - any gains in changing the syntax
would be far outweighed by the delay, cost and confusion.

2) I have a hard time picturing a firewall that would somehow parse XML
and let random XML pass through, if it worries about content. After all,
if you construct an XML DTD for file management, you really wouldn't
want 

<action>
delete
<files>
*.*
</files>
</action>

to pass through.

3) It appears likely that SDPng will indeed use XML, if only to appease
the XML fanatics. This is probably the part that a firewall needs to
parse for the most part.

4) XML parsers appear to be significantly more complex than basic SIP
parsers, judging from what's available. It may well be possible to write
a simple XML parser, so this may be an interesting academic exercise.

-- 
Henning Schulzrinne   http://www.cs.columbia.edu/~hgs