Hi Adam,
Spacing is not significant. In SIP headers containing a format with a
display-name and URI (name-addr), your parser should be able to handle
multiple spaces between the display-name and the addr-spec which includes
even a line break followed by a space like "\r\n " or no spaces at all like:
" CISCO SYSTEMS "<sip:...>.
>From section 25.1 or rfc 3261:
SIP header field values can be folded onto multiple lines if the
continuation line begins with a space or horizontal tab. All linear
white space, including folding, has the same semantics as SP. A
recipient MAY replace any linear white space with a single SP before
interpreting the field value or forwarding the message downstream.
This is intended to behave exactly as HTTP/1.1 as described in RFC
2616 [8]. The SWS construct is used when linear white space is
optional, generally between tokens and separators.
LWS = [*WSP CRLF] 1*WSP ; linear whitespace
SWS = [LWS] ; sep whitespace
Now the name-addr is described as:
name-addr = [ display-name ] LAQUOT addr-spec RAQUOT
I don't see any requirement of SP between the optional display-name and the
quoted addr-spec, but as I know from working with SIP that SP is used a lot.
Perhaps someone else can comment on that? Maybe "The SWS construct is used
when linear white space is optional, generally between tokens and
separators" from above answers that question.
Hope that helps,
Brandon
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Adam
Frankel
Sent: Thursday, October 07, 2010 4:13 PM
To: [email protected]
Cc: Roopa Bharathan (robharat)
Subject: [Sip-implementors] Valid Remote Party ID?
Hi All,
I am working with a third party who is sending Remote-Party-ID with an
additional space than we typically see, and our app is not parsing the
name properly to display on the phone. I am trying to understand if the
third party SIP is behaving appropriately with the Remote-Party-ID:
Incoming Message:
INVITE sip:1210408#[email protected]:5060;transport=udp SIP/2.0
Via: SIP/2.0/UDP
x.x.x.x:5060;branch=z9hG4bK928944d55440bffe739c6d1dc9ea8e43.0
Session-Expires: 14400
Record-Route: <sip:[email protected];lr>
Record-Route: <sip:x.x.x.x;lr;ftag=gK071366e5>
Record-Route: <sip:x.x.x.x;lr=on;ftag=gK071366e5>
Via: SIP/2.0/UDP
x.x.x.x;branch=z9hG4bKe6a7.a5e075a7.0.fso88Pc4o0lLG-kbMSZ2Bg__
Via: SIP/2.0/UDP
x.x.x.x;branch=z9hG4bKe6a7.7f99a4e6.1.A5UQyGfP-ul0FAx-HK+hCQ__
Via: SIP/2.0/UDP
x.x.x.x:5060;branch=z9hG4bK07Bedb7466ad9a4b760.mGc9WrRat2LaP6yV0oADNQ__
From: "CISCO SYSTEMS " <sip:+1919392#[email protected]>;tag=gK071366e5
To: <sip:[email protected]>
Call-ID: [email protected]
CSeq: 27151 INVITE
Max-Forwards: 56
Contact:
<sip:ewsvb3zduuuoer7tava1qmwzltp4ysprlr04szrfxwfksakpd6r6m6oczbjjbf...@x.x.x
.x>
Content-Length: 279
Content-Disposition: session; handling=required
Content-Type: application/sdp
Remote-Party-ID: "CISCO SYSTEMS "
<sip:[email protected]:5060>;privacy=off
P-Asserted-Identity: <sip:+1919392#[email protected]:5060>
Notice after the "CISCO SYSTEMS " there are two space before the <sip
The BNF doesn't seem clear on if the spacing is significant:
http://www.ietf.org/proceedings/50/I-D/sip-privacy-01.txt
Remote-Party-ID = "Remote-Party-ID" ":" [display-name]
"<" addr-spec">" *(";" rpi-token)
Can anyone comment if this is correct Remote-Party-ID syntax or if only
a single space should be allowed? (which our app is expecting)
Thanks,
--
Adam
_______________________________________________
Sip-implementors mailing list
[email protected]
https://lists.cs.columbia.edu/cucslists/listinfo/sip-implementors
_______________________________________________
Sip-implementors mailing list
[email protected]
https://lists.cs.columbia.edu/cucslists/listinfo/sip-implementors