inline Klaus Darilion wrote: > Hi all! > > RFC 3261 explicitly allows the having multiple contacts in a single header. > > > 7.3: ... Specifically, any SIP header whose grammar is of the form > > > > header = "header-name" HCOLON header-value *(COMMA header-value) > > > > allows for combining header fields of the same name into a comma- > > separated list. The Contact header field allows a comma-separated > > list unless the header field value is "*". > > Further RFC 3261 specifies that single and multiple header files have > the same semantic: > > 7.3.1 ... > > Multiple header field rows with the same field-name MAY be present in > > a message if and only if the entire field-value for that header field > > is defined as a comma-separated list (that is, if follows the grammar > > defined in Section 7.3). It MUST be possible to combine the multiple > > header field rows into one "field-name: field-value" pair, without > > changing the semantics of the message, by appending each subsequent > > field-value to the first, each separated by a comma. > > Ok, thus: > Contact: <sip:1.1.1.1> > Contact: <sip:2.2.2.2> > > can be written as: > Contact: <sip:1.1.1.1>, <sip:2.2.2.2> > > But what about: > Contact: <sip:1.1.1.1>;expires=111 > Contact: <sip:2.2.2.2>;expires=222 > > This can not be written in a single header without changing semantic.
Sure it can: Contact: <sip:1.1.1.1>;expires=111,<sip:2.2.2.2>;expires=222 > Further is this allowed? > Contact: <sip:1.1.1.1>, <sip:2.2.2.2>;expires=111 > Contact: <sip:3.3.3.3>, <sip:4.4.4.4>;expires=222 Yes. > What about: > Contact: <sip:1.1.1.1> > Contact: <sip:2.2.2.2>;expires=222 Yes. > This can be rewritten as > Contact: <sip:1.1.1.1>, <sip:2.2.2.2>;expires=222 > > Does this imply that a missing expires header means that the expires is > equivalent to the expires of the next Contact header with expires parameter? no. > How should we deal with such scenarios? A header field parameter ( ;... ) binds to the header field it is within. Note that while Contact may (according to the ABNF) appear multiple times in a message, that is only permitted in *certain* messages. For instance it can be repeated in REGISTER and 3xx, but not in INVITE, or responses to INVITE other than 3xx. The significance of the expires depends on where the Contact appears. Off the top of my head I think it only applies to REGISTER and its response. Thanks, Paul _______________________________________________ Sip-implementors mailing list Sip-implementors@lists.cs.columbia.edu https://lists.cs.columbia.edu/cucslists/listinfo/sip-implementors