Subject: [Sipping] SIP Configuration Framework uses underscore in SIP URI

From: "Geir Arne Sandbakken" <[email-masked]>
Date: Tue, 2 Dec 2008 16:32:54 +0100

The Local-Network profile in the framework requires "_sipuaconfig"
concatenated with the local network domain to be used as the host part
of the Request URI.  

Our SIP stack does not view this as valid SIP URI, and rejects the
message. AFAICC RFC 3261 seems to agree with our parser.

IMHO, using underscores in DNS host for finding services related names
in DNS queries is one thing. Changing the grammar of a SIP URI
potentially breaking parsers is quite another matter.

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

---

From: "Dale Worley" <[email-masked]>
Date: Tue, 02 Dec 2008 22:22:47 -0500

> potentially breaking parsers is quite another matter.

Yes, that seems to be a problem.

There was a discussion starting at
http://www.ietf.org/mail-archive/web/sip/current/msg00966.html regarding
adding "_" and other characters to the allowed set of characters in
host-parts of SIP URIs, but it was inconclusive.

It seems that the use of "_sipuaconfig" prefixing a domain name was
introduced in regard to looking up DNS A records.  (This is a valid
extension of current practice.)  But at some point, this was
transitioned into being the request-URI of a SUBSCRIBE.  And as you say,
that's not syntactically valid.

Interestingly, "_" has no reserved uses in RFC 3261 section 25.1, so we
could extend the grammar to allow it in host names with no ill effects.

Dale

---

From: Robert Sparks <[email-masked]>
Date: Wed, 10 Dec 2008 11:01:18 -0600

Geir is correct that _ can't appear bare in the hostname part of a SIP  
URI.

It can appear %-escaped.

Is that what the profile should be using?

RjS

---

From: "Sumanth Channabasappa" <[email-masked]>
Date: Wed, 10 Dec 2008 10:05:41 -0700

In addition to what has been indicated, the design team discussed this
in mid-2007. Now, the UA either sends the SIP SUBSCRIBE request via
configured outbound proxies (if available) or via 3263. In the case of
the latter, the FQDN in the SIP URI (sip:_sipuaconfig.<domain name>) is
used to determine the next-hop proxy. We debated whether to use
'sipuaconfig' or '_sipuaconfig'. There was a concern that there would be
considerable pushback if we ask that no-one use the name sipuaconfig for
a host name in any domain  - or if they do use it, they can expect to
get random requests hitting their box. Hence the suggestion was to use
_sipuaconfig. We contacted the DNS experts and did not get any
objections. However, we failed to see that this would break the URI (as
Geir indicated, correctly).

I will let the design team pitch in with any additional details.

- S

-----Original Message-----
From: [email-masked] [mailto:[email-masked]] On
Behalf Of Robert Sparks
Sent: Wednesday, December 10, 2008 10:01 AM
To: Geir Arne Sandbakken
Cc: [email-masked]
Subject: Re: [Sipping] SIP Configuration Framework uses underscore in
SIP URI

It can appear %-escaped.

RjS

---

From: "Brett Tate" <[email-masked]>
Date: Wed, 10 Dec 2008 12:23:04 -0500

RFC 3261 section 19.1.2 disallows escaping hostname.

"Note that character escaping is not allowed in the host component of a
SIP or SIPS URI (the % character is not valid in its expansion).  This
is likely to change in the future as requirements for Internationalized
Domain Names are finalized.  Current implementations MUST NOT attempt to
improve robustness by treating received escaped characters in the host
component as literally equivalent to their unescaped counterpart.  The
behavior required to meet the requirements of IDN may be significantly
different."

> From: [email-masked] 
> [mailto:[email-masked]] On Behalf Of Robert Sparks
> Sent: Wednesday, December 10, 2008 12:01 PM
> To: Geir Arne Sandbakken
> Cc: [email-masked]
> Subject: Re: [Sipping] SIP Configuration Framework uses 
> underscore in SIP URI
> 
> Geir is correct that _ can't appear bare in the hostname part 
> of a SIP URI.
> 
> It can appear %-escaped.
> 
> > This list is for NEW development of the application of SIP Use 
> > [email-masked] for questions on current sip Use 
> > [email-masked] for new developments of core SIP
> 
> Use [email-masked] for questions on current 
> sip Use [email-masked] for new developments of core SIP
>

---

From: Robert Sparks <[email-masked]>
Date: Wed, 10 Dec 2008 17:33:25 -0600

Very good catch.

---

From: Josh Littlefield <[email-masked]>
Date: Thu, 11 Dec 2008 16:25:20 -0500

Following up on Sumanth's and Dale's responses:

>From my point of view, the original URI structure (as copied from RFC 2396) probably assumes the hostname portion will be used directly for A/AAAA record lookup, and in that case, "_" is illegal in DNS.  But we are actually expecting to perform more of a service lookup on that hostname portion, getting to an A/AAAA is the last resort.  The A/AAAA lookp for this name, if the client gets that far, will simply fail (because "_" is illegal in hostnames in DNS, which mostly means illegal for A/AAAA records).  But the NAPTR and/or SRV lookups will have no problem.

I'm not sure how to get around the URI syntax issue, other than to redefine the syntax. I note that while RFC 3261 is based on the URI syntax of RFC 2396, RFC 3986 (which obsoletes it) is less restrictive about "host" syntax, and treats this component as a registered name rather than purely a hostname. So I imagine the SIP URI syntax could be extended to fix this at the expense of allowing more illegal A/AAAA lookups to be generated from SIP URIs with "_".

-josh

-- 
=====================================================================
Josh Littlefield                                  Cisco Systems, Inc.
[email-masked]                             1414 Massachusetts Avenue
tel: 978-936-1379  fax: 978-936-2226       Boxborough, MA  01719-2205

---

From: "Dale Worley" <[email-masked]>
Date: Fri, 12 Dec 2008 12:19:28 -0500

On Thu, 2008-12-11 at 16:25 -0500, Josh Littlefield wrote:
> I'm not sure how to get around the URI syntax issue, other than to
> redefine the syntax. I note that while RFC 3261 is based on the URI
> syntax of RFC 2396, RFC 3986 (which obsoletes it) is less restrictive
> about "host" syntax, and treats this component as a registered name
> rather than purely a hostname. So I imagine the SIP URI syntax could
> be extended to fix this at the expense of allowing more illegal A/AAAA
> lookups to be generated from SIP URIs with "_".

Unfortunately, in RFC 3986, "host" can be a "reg-name", and "reg-name"
can contain "sub-delims".  But "sub-delims" includes ";" and ",", both
of which cause problems for SIP URI parsing.

Dale