3

I wonder what the different parameter separators in (SIP) URIs indicate?

Some separated by ;, like: <sip:user@domain.com;foo=bar;x=y>.

Other are separated by ? and &, like: <sip:user@domain.com?foo=bar&x=y>

John Fear
  • 1,265
  • 2
  • 8
  • 10

1 Answers1

2

SIP separator rules comes from RFC 2396 that has been deprecated by RFC 3986. But with some usage specifications defined in section 19.1.1.

To summarize a bit, semicolon ";" is used to separate URI parameters, question mark "?" to signal query component's (stated as "Header fields" in section 19.1.1) starting point, and ampersand "&" is used to separate parameter pairs inside query string ("header fields").

Also worth checking Wikipedia entry: URI scheme

Hope this helps

Community
  • 1
  • 1
jcm
  • 2,568
  • 14
  • 18
  • Well, I think this is as close as I get to understanding it. It's confusing as I see SIP RFCs use the same parameters with our without a query component - and leading me to think that they should be interpreted in the same way. – John Fear Dec 11 '13 at 12:46
  • @JohnFear I'm sorry but I don't get what you mean. As far s I recall, RFC3261, only uses "&" in the query component (described as header fields) and ";" to separate URI parameters. I've checked RFC3261 and edited the answer. You can see that, initially, they've different meanings. – jcm Dec 11 '13 at 13:55
  • I've been looking at the rfc4244 lately and looking the protocol examples in chapter 4.5 I find query components with ";" separators. Ex '?Reason=SIP;cause=603;'. Is cause a separate URI parameter or part of the Reason query parameter? – John Fear Dec 12 '13 at 11:55
  • I think I understand what they are doing in the RFC now. Looking at the protocol example in chapter 4.2, the value of the reason parameter is URI encoded (Reason=SIP%3Bcause%3D302) - and this is simply just not illustrated in chapter 4.5. @jcm: Thanks for help.. – John Fear Dec 12 '13 at 12:38
  • Well, actually, this means: include header `Reason` with code SIP and cause param 603. For example, if you wanted to include two header fields (Reason and Call-Info), it would look like: `?Reason=SIP;cuase=603&Call-Info=` – jcm Dec 12 '13 at 12:52