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.


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <kamailio/kamailio/issues/3399@github.com>