Subject: [Sip] RE: [Sip-implementors] Ambiguity in "absoluteURI" (Cannot resolve between "srvr" and"reg-name")

From: "Rob Phillips" <[email-masked]>
Date: Mon, 11 Nov 2002 05:56:52 -0600

This was discussed on the list earlier.  The answer is: 

	If it matches srvr, then it's srvr.  
	If it matches reg-name, then it's reg-name.  
	If it matches both, then it's srvr, since it's the more specific case.

So in your specific examples:

	[email-masked] is "srvr".
	domainLabel.com is also "srvr".

If you had something like:

	regname@@something::[email-masked]

however, it would only resolve to "reg-name".

- rob

-----Original Message-----
From: Gade Ramesh [mailto:[email-masked]]
Sent: Monday, November 11, 2002 2:44 AM
To: [email-masked]; [email-masked]
Cc: [email-masked]; [email-masked];
[email-masked]
Subject: [Sip-implementors] Ambiguity in "absoluteURI" (Cannot resolve
between "srvr" and"reg-name")

Hi,

I'm am trying to implement a SIP parser. 

I have an issue here while parsing the Absolute-uri. I am
not able to resolve between "srvr" and "reg-name".

-----------------------------------------------------------------------
*) Absolute uri:
 
  absoluteURI    = scheme ":" ( hier-part / opaque-part )
  scheme         = ALPHA *( ALPHA / DIGIT / "+" / "-" / "." )
  hier-part      = ( net-path / abs-path ) [ "?" query ]
  net-path       = "//" authority [ abs-path ]
  abs-path       = "/" path-segments
  authority      = srvr / reg-name
  srvr           = [ [ userinfo "@" ] hostport ]
  reg-name       = 1*( unreserved / escaped / "$" / ","
  		   / ";" / ":" / "@" / "&" / "=" / "+" )
  userinfo       = ( user / telephone-subscriber ) 
  		     [ ":" password ] "@"
  user           = 1*( unreserved / escaped / user-unreserved )
  unreserved  	 = alphanum / mark
  mark           = "-" / "_" / "." / "!" / "~" / "*" / "'" / "(" / ")"
  user-unreserved= "&" / "=" / "+" / "$" / "," / ";" / "?" / "/"
  password       = *( unreserved / escaped /
  		       "&" / "=" / "+" / "$" / "," )
  hostport       = host [ ":" port ]
  host           = hostname / IPv4address / IPv6reference
------------------------------------------------------------------------

Here the problem is with "authority". srvr contains "@" 
and reg-name can contain multiple "@" characters. How do
I resolve between the 2 non-terminals?

Example 1: [email-masked].
Example 2: domainLabel.com

"srvr" can contain either "userinfo@hostport" or "hostport".
In hostport, port is optional. Both examples 1 and 2, 
according to the grammar, can match with both reg-name 
and srvr. How do I decide whether it belongs to reg-name 
or srvr?

One possibility is: 
-------------------
If token contains multiple "@"s, then it could be resolved
as reg-name. (But then, this aspect is not specified in the
grammar and it is our hack.)

Could somebody kindly help me out with this aspect?

Thanks in advance.

G. Ramesh
Research Engineer, Internet Telephony Group
=====================================================================
C-DOT (Centre for Development of Telematics)
71/1, Sneha Complex, Miller Road, Bangalore - 560052, India
email: [email-masked]
Phone: +91-80-2263399, +91-80-2383951, Fax: +91-80-2263256
=====================================================================
_______________________________________________
Sip-implementors mailing list
[email-masked]
http://lists.cs.columbia.edu/mailman/listinfo/sip-implementors
_______________________________________________
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