Hi Kamailio,
We have noticed that a request not belonging to a dialog (e.g. a SIP MESSAGE) missing the tag= parameter in the from: header will trigger an ERROR: message like. ```` Mar 21 14:40:23 ip-10-85-164-143 /usr/sbin/kamailio[172]: ERROR: dialog [dlg_handlers.c:726]: pre_match_parse(): failed to get From header ```` ```` Mar 21 14:42:31 ip-10-85-165-13 /usr/sbin/kamailio[183]: ERROR: tmx [tmx_pretran.c:227]: tmx_check_pretran(): failed to get From header ````
According to our interpretation of 3261 section 12.1.1 ```` "A UAS MUST be prepared to receive a request without a tag in the From field, in which case the tag is considered to have a value of null." ```` this should not be the case. Also the BNF states no from: tag: is mandatory
``` From = ( "From" / "f" ) HCOLON from-spec from-spec = ( name-addr / addr-spec ) *( SEMI from-param ) from-param = tag-param / generic-param tag-param = "tag" EQUAL token ```
We believe this to be implemented in at least two places where one example is in the `dlg_handler` where `pre_match_parse` check ``` if (parse_from_header(req) < 0 || get_from(req)->tag_value.len == 0) { LM_ERR("failed to get From header\n"); return -1; } ```
As our interpretation of the standard is that the from: tag is not mandatory, hence we can't require our customer to change their behaviour, we consider this as a bug.
Just to add the next section from the RFC as well: ``` This is to maintain backwards compatibility with [RFC 2543], which did not mandate From tags. ``` Kamailio is not compatible with SIP 1.0, RFC 2543.
The addition of a From tag is mandatory according to RFC 3261, [8.1.1.3](https://www.rfc-editor.org/rfc/rfc3261#section-8.1.1.3): ``` The From field MUST contain a new "tag" parameter, chosen by the UAC. ``` I think the standard is pretty clear that its mandatory in the scope of RFC 3261.
Close ticket, if you have a different interpretation of the RFC please re-open.
Closed #3399 as not planned.