Kohn1001
Kohn1001

Reputation: 3901

VoIP - SIP contact filed not completely empty - is RFC compliant?

I'm writing some code to parse the contact field in C,and I'm encountering an empty field but instead of empty string, it is in these brackets...: "<>"(please find attached)

Is it RFC compliant? I can't find anything about it... Thanks in advance for the answers...

enter image description here

Upvotes: 0

Views: 182

Answers (1)

sipsorcery
sipsorcery

Reputation: 30699

No it's not compliant. Below is a snippet of the Contact header parsing rules from the SIP RFC.

You can have a contact header of "Contact: *" but if the "<>" are present then it's required that they contain a properly formed SIP URI.

Contact        =  ("Contact" / "m" ) HCOLON
              ( STAR / (contact-param *(COMMA contact-param)))
contact-param  =  (name-addr / addr-spec) *(SEMI contact-params)
name-addr      =  [ display-name ] LAQUOT addr-spec RAQUOT
addr-spec      =  SIP-URI / SIPS-URI / absoluteURI
display-name   =  *(token LWS)/ quoted-string

Upvotes: 1

Related Questions