Subject: [Sip] what's the usage of R-URI's header part

From: FengZhang <[email-masked]>
Date: Thu, 21 Aug 2003 10:41:36 +0800

SGkgYWxsLA0KDQogIEFzIHBlciB0aGUgZGVmaW5hdGlvbiBvZiBTSVAtVVJJLCBoZXJlIEkgd3JpdGVzIG9uZToNCg0KICBzaXA6aGVsbG9AZm9vLmJhcjo1MDYwP2E9MSZiPTImYz0zDQoNCiAgQ2FuIGFueWJvZHkgdGVsbCBtZSBvbiB3aGF0IGNpcmN1bXN0YW5jZSBzaG91bGQgSSB1c2UgdGhpcyBoZWFkZXIgIj9hPTEmYj0yJmM9MyI/IFdoYXQncyB0aGUgbWVhbmluZyBmb3IgU0lQLVVSST8NCkkgY2FuIG5vdCBmaW5kIHRoZSBleHBsYW5hdGlvbiBvZiBTSVAtVVJJJ3MgaGVhZGVycyBpbiBSRkMzMjYxLg0KDQogIFRoYW5rcyBhIGxvdCENCiAJCQkJDQqhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhRmVuZ1poYW5nDQqhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGheTAxMzE3QG5qdXB0LmVkdS5jbg0KoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoTIwMDMtMDgtMjENCg==_______________________________________________Sip mailing list  https://www1.ietf.org/mailman/listinfo/sipThis list is for NEW development of the core SIP ProtocolUse [email-masked] for questions on current sipUse [email-masked] for new developments on the application of sip

---

From: "Dean Willis" <[email-masked]>
Date: Fri, 22 Aug 2003 11:45:01 -0500

FengZhang asked:
>   As per the defination of SIP-URI, here I writes one:
> 
>   sip:[email-masked]:5060?a=1&b=2&c=3
> 
>   Can anybody tell me on what circumstance should I use this 
> header "?a=1&b=2&c=3"? What's the meaning for SIP-URI? I can 
> not find the explanation of SIP-URI's headers in RFC3261.

That's because those things on the right hand side are analogous to CGI Get
parameters from HTTP. Really, using the ? syntax is syntactically equivalent
to shoving the a=1 and b=1 and c=3 text into header fields in the SIP body.
There's a separate syntax for request-URI "parameters" -- they're set off by
a semicolon ";".

See section 19.1.1 of RFC 3261

      Headers: Header fields to be included in a request constructed
         from the URI.

         Headers fields in the SIP request can be specified with the "?"
         mechanism within a URI.  The header names and values are
         encoded in ampersand separated hname = hvalue pairs.  The
         special hname "body" indicates that the associated hvalue is
         the message-body of the SIP request.

Consider the stock trading page I was just looking at:

https://investing.schwab.com/trading/center?PwdMsg=Msg1

Nowhere in the HTTP specification is ?PwdMsg defined. It doesn't have to be.
It's essentially a variable being passed to a subroutine. The definition of
the variable, the allowable range of values, and its functional impact on
the subroutine named by the URI are defined by the writer of the subroutine,
not by the writer of the HTTP specification. All that the HTTP specs did was
define the allowable syntax that the subroutine writer could use for passing
parameters in a Request-URI.

This is similar to C. Consider:

int myfunc(int anumber, int anothernumber) {
	return(anumber + anothernumber * 11)
}

The standard C specification doesn't define "anumber" and "anothernumber".
Rather, it defines mechanisms by which the writers of C programs may define
them.

SIP went a little further here. According to RFC 3427 "The SIP Change
Process", 
http://www.ietf.org/rfc/rfc3427.txt?number=3427

each SIP header is considered "a SIP Extension" and those used outside of a
very limited scoped must be defined in an appropriate RFC and registered
with IANA. 3427 defines the process for "standard" headers and for a
restricted header class, called "P-headers". Some people strongly believe
that this registration requirement will increase interoperability.

Remember that Request URI parameters are a little different from headers
encoded into the request URI, so they're not covered by 3427. The working
group has recently come to the conclusion that some specific request URI
parameters are in fact widely used and constitute "reserved" words that
should not be casually reused. Work is underway to add an IANA registry and
registration process. An example would be the "lr" parameter used to
indicate loose routing.

You may find it helpful to look at RFC3050 "Common Gateway Interface for
SIP", which provides one model for developing applications that might use
parameters.

http://www.ietf.org/rfc/rfc3050.txt?number=3050

<irony> Gee, I wonder if the IETF bothered to register the HTTP parameter
"number"? They must have, because it works with all three of my browsers  .
. . </irony>

--
Dean

_______________________________________________
Sip mailing list  https://www1.ietf.org/mailman/listinfo/sip
This list is for NEW development of the core SIP Protocol
Use [email-masked] for questions on current sip
Use [email-masked] for new developments on the application of sip