[asterisk-dev] No complete handling of SIP Via: header?

Johansson Olle E olle at voop.com
Wed Dec 6 04:46:07 MST 2006


6 dec 2006 kl. 12.20 skrev Samuel Tardieu:

>> From what I can read in chan_sip.c (SVN), Asterisk contains no
> provision for handling SIP Via: headers containing several routing
> information.
>
> According to RFC 3261, one can use a single Via: header to put several
> data (note the 0 or more "COMMA via-parm" term):
>
>   Via =  ( "Via" / "v" ) HCOLON via-parm *(COMMA via-parm)
>
> At least one vendor hardware (Cirpack) uses this compact form, causing
> Asterisk to add the ";received=..." to the wrong place (on the latest
> record of the first Via: header, instead of on the first record of the
> first Via header). This wrongly placed "received" causes further
> problems afterwards.
>
> Did I overlook something in chan_sip.c or is it (as I think) a real
> bug?

The syntax here allows for multiple via parameters, but I've never
met a UA that does that. The RFC seems pretty unclear, since
it in same cases talk about "inserting Via header values" and
in some cases talk about "the topmost via header" not the
"topmost/leftmost via header value". So to be safe, I would
not implement this in a UA at all.

Make sure you add SIP debug to your bug report and that you're
ready to help us test patches.

/O


More information about the asterisk-dev mailing list