My mistake - I was thinking of the URI portion and not the display-name grammar 
when referencing escaped characters.

-----Original Message-----
From: Attila Sipos [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 14, 2005 9:07 AM
To: Rob Phillips; Anshuman Singh Rawat
Cc: [email protected]
Subject: RE: RE: [Sip-implementors] display name in From header



Hi Rob,

I had initially thought that one should use
"% HEXDIG HEXDIG" however, usually the SIP grammar
is more explicit about using escaped characters.
For example:

user   =  1*( unreserved / escaped / user-unreserved )

I would agree that you can't always put everything
into the grammar because there are some exceptions
(such as special escaping rules for encoding
telephone-subscriber fields in SIP and SIPS URIs)
but I would've thought that the display-name grammar
would've mentioned the "escaped".

Why isn't "escaped" part of the display-name grammar
definition?

And how do we know that "%5c", if it appeard in a display-name
is not intended to be a literal?

qd-text would have to change from:

      qdtext         =  LWS / %x21 / %x23-5B / %x5D-7E
                        / UTF8-NONASCII
to:
      qdtext         =  LWS / %x21 / %x23-24 / escaped / %x26-5B / %x5D-7E
                        / UTF8-NONASCII

would it not?

I don't know, I'm not a grammar expert but I would like someone
to clarify the escaping used within display-name.

Regards,

Attila


>> -----Original Message-----
>> From: Rob Phillips [mailto:[EMAIL PROTECTED]
>> Sent: 14 July 2005 14:15
>> To: Attila Sipos; Anshuman Singh Rawat
>> Cc: [email protected]
>> Subject: RE: RE: [Sip-implementors] display name in From header
>> 
>> 
>> The backslash is not escaped per the spec.  You've escaped 
>> it per C/C++/et.al. string conventions.
>> 
>> To escape something per RFC-3261 means you subsitute 
>> %{hexdig}{hexdig} for the escaped character.  See Section 
>> 19.1.2 of the RFC on how you do that.  Your slash character 
>> should be represented as "%5c"
>> 
>> - rob
>> 
>> -----Original Message-----
>> From: [EMAIL PROTECTED]
>> [mailto:[EMAIL PROTECTED] Behalf Of Attila
>> Sipos
>> Sent: Thursday, July 14, 2005 7:49 AM
>> To: Anshuman Singh Rawat
>> Cc: [email protected]
>> Subject: RE: RE: [Sip-implementors] display name in From header
>> 
>> 
>> Hi,
>> 
>> I can't see that you have done anything wrong.
>> 
>> >From the SIP grammar, the display-name is:
>> 
>>    display-name   =  *(token LWS)/ quoted-string
>> 
>> And, in your case, you have a quoted-string:
>> 
>>    A string of text is parsed as a single word if it is quoted using
>>    double-quote marks.  In quoted strings, quotation marks (") and
>>    backslashes (\) need to be escaped.
>> 
>> It seems that you have escaped the backslash.
>> 
>> The only thing is, I can't see where it says how to escape
>> things in the quoted-strings.  I assume that your use of the 
>> backslash
>> to do the escape is correct but I'm not sure.
>> 
>> >> 
>> "abc\\dfe"<sip:[EMAIL PROTECTED]>;tag=a31419ac-13c4-39-e26e-29f0
>> 
>> Maybe you could try adding a space after the second
>> double-quote - I have heard that some implementations
>> don't like it if there is no space (even though the
>> lack of ' ' is actually legal).
>> 
>> Regards,
>> 
>> Attila
>> 
>> 
>> >> -----Original Message-----
>> >> From: Anshuman Singh Rawat [mailto:[EMAIL PROTECTED]
>> >> Sent: 14 July 2005 12:00
>> >> To: Attila Sipos
>> >> Cc: [email protected]
>> >> Subject: Re: RE: [Sip-implementors] display name in From header
>> >> 
>> >> 
>> >> Hi,
>> >> 
>> >> This is the log for the request/response. Original display name 
>> >> was "abc\dfe" (quotes not included).
>> >> 
>> >> -------------------------------------------------------------
>> >> -----------
>> >> ------
>> >> 
>> >> <<<<<<<<<<<<<<<< MESSAGE SENT >>>>>>>>>>>>>>>>
>> >> INVITE sip:[EMAIL PROTECTED]:5060 SIP/2.0
>> >> From: 
>> >> "abc\\dfe"<sip:[EMAIL PROTECTED]>;tag=a31419ac-13c4-39-e26e-
>> >> 29f0
>> >> To: <sip:[EMAIL PROTECTED]:5060>
>> >> Call-ID: [EMAIL PROTECTED]
>> >> CSeq: 101 INVITE
>> >> Via: SIP/2.0/UDP 172.25.20.163:5060;branch=z9hG4bK-39-e26e-2b69
>> >> Max-Forwards: 70
>> >> Supported: replaces
>> >> Contact: <sip:[EMAIL PROTECTED]:5060>
>> >> Content-Type: application/SDP
>> >> Content-Length: 324
>> >> 
>> >> v=0
>> >> o=xxxxxxxx 2890844526 2890842807 IN IP4 172.25.20.163
>> >> s=SIP UA
>> >> c=IN IP4 172.25.20.163
>> >> t=0 0
>> >> m=audio 5000 RTP/AVP 0 8 18 101 13
>> >> a=rtcp:5001 IN IP4 172.25.20.163
>> >> a=rtpmap:0 PCMU/8000
>> >> a=rtpmap:8 PCMA/8000
>> >> a=rtpmap:18 G729/8000
>> >> a=rtpmap:13 CN/8000
>> >> a=rtpmap:101 telephone-event/8000
>> >> a=fmtp:101 0-15
>> >> a=sendrecv
>> >> 
>> >> 
>> >> <<<<<<<<<<<<<<<< MESSAGE RECEIVED >>>>>>>>>>>>>>>>
>> >> SIP/2.0 500 I'm terribly sorry, server error occured (1/SL)
>> >> From: 
>> >> "abc\\dfe"<sip:[EMAIL PROTECTED]>;tag=a31419ac-13c4-39-e26e-
>> >> 29f0
>> >> To: 
>> >> <sip:[EMAIL PROTECTED]:5060>;tag=cb2000b247d89723001a8361
>> >> 45f3b053.6b
>> >> 38
>> >> Call-ID: [EMAIL PROTECTED]
>> >> CSeq: 102 INVITE
>> >> Via: SIP/2.0/UDP 172.25.20.163:5060;branch=z9hG4bK-3a-e3fe-e8f
>> >> Server: Sip EXpress router (0.8.14 (i386/linux))
>> >> Content-Length: 0
>> >> 
>> >> 
>> >> 
>> >> <<<<<<<<<<<<<<<< MESSAGE SENT >>>>>>>>>>>>>>>>
>> >> ACK sip:[EMAIL PROTECTED]:5060 SIP/2.0
>> >> From: 
>> >> "abc\\dfe"<sip:[EMAIL PROTECTED]>;tag=a31419ac-13c4-39-e26e-
>> >> 29f0
>> >> To: 
>> >> <sip:[EMAIL PROTECTED]:5060>;tag=cb2000b247d89723001a8361
>> >> 45f3b053.6b
>> >> 38
>> >> Call-ID: [EMAIL PROTECTED]
>> >> CSeq: 102 ACK
>> >> Via: SIP/2.0/UDP 172.25.20.163:5060;branch=z9hG4bK-3a-e3fe-e8f
>> >> Max-Forwards: 70
>> >> Contact: <sip:[EMAIL PROTECTED]:5060>
>> >> Content-Length: 0
>> >> 
>> >> 
>> >> -------------------------------------------------------------
>> >> -----------
>> >> ---------
>> >> 
>> >> Thanks,
>> >> Anshuman.
>> >> 
>> >> ----- Original Message -----
>> >> From: Attila Sipos <[EMAIL PROTECTED]>
>> >> Date: Thursday, July 14, 2005 4:03 pm
>> >> Subject: RE: [Sip-implementors] display name in From header
>> >> 
>> >> > Can you tell us exactly what From header you are using?
>> >> > I'd just like to see the exact example.
>> >> > 
>> >> > Regards,
>> >> > 
>> >> > Attila
>> >> > 
>> >> > Attila Sipos
>> >> > http://www.vegastream.com
>> >> > 
>> >> > >> -----Original Message-----
>> >> > >> From: [EMAIL PROTECTED]
>> >> > >> [mailto:[EMAIL PROTECTED] Behalf 
>> >> > >> Of Anshuman
>> >> > >> Singh Rawat
>> >> > >> Sent: 14 July 2005 11:07
>> >> > >> To: [email protected]
>> >> > >> Subject: [Sip-implementors] display name in From header
>> >> > >> 
>> >> > >> 
>> >> > >> Hi All,
>> >> > >> 
>> >> > >> We are having a problem with escaping '\' and '"'. When our 
>> >> > >> application 
>> >> > >> sees these 2 characters in the display name in an outgoing 
>> >> > >> INVITE, it 
>> >> > >> escapes them appropriately with a back-slash ('\') i.e. 
>> >> > something 
>> >> > >> like "abc\def" is changed to "abc\\def". But the SIP proxy 
>> >> > >> rejects the 
>> >> > >> INVITE with a 500 error; error message "I am 
>> terribily sorry, 
>> >> > server 
>> >> > >> error occured [1/SL]". The SIP server we are using is 
>> >> > >> fwd.pulver.com. 
>> >> > >> It returns the same error message with SIP server at 
>> >> > >> voip.globalvillage.com too.
>> >> > >> 
>> >> > >> Are we doing something wrong (I looked at the grammer in the 
>> >> > RFC but 
>> >> > >> that suggests otherwise)? or Are the SIP server's 
>> not behaving 
>> >> > >> correctly ?
>> >> > >> 
>> >> > >> Any comments will be appreciated.
>> >> > >> 
>> >> > >> Thanks.
>> >> > >> 
>> >> > >> _______________________________________________
>> >> > >> Sip-implementors mailing list
>> >> > >> [email protected]
>> >> > >> 
http://lists.cs.columbia.edu/mailman/listinfo/sip-implementors
>> > >> 
>> > 
>> 

_______________________________________________
Sip-implementors mailing list
[email protected]
http://lists.cs.columbia.edu/mailman/listinfo/sip-implementors

_______________________________________________
Sip-implementors mailing list
[email protected]
http://lists.cs.columbia.edu/mailman/listinfo/sip-implementors

Reply via email to