This is the relevant piece of grammer for display-name as per RFC 3261
name-addr = [ display-name ] LAQUOT addr-spec RAQUOT
addr-spec = SIP-URI / SIPS-URI / absoluteURI
display-name = *(token LWS)/ quoted-string
quoted-string = SWS DQUOTE *(qdtext / quoted-pair ) DQUOTE
qdtext = LWS / %x21 / %x23-5B / %x5D-7E / UTF8-NONASCII
quoted-pair = "\" (%x00-09 / %x0B-0C / %x0E-7F)
>From the definition of quoted pair it looks to me that backslash also
needs to be escaped(?).
I think escaping method mentioned in Section 19.1.2 is specifically for
SIP and SIPS URIs.
Any thoughts ?
Thanks.
----- Original Message -----
From: Rob Phillips <[EMAIL PROTECTED]>
Date: Thursday, July 14, 2005 6:44 pm
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