Possible error in the to_tag

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Aug 9, 2010 at 4:35 PM, Rafael Maia <rmaia_lcm at hotmail.com> wrote:
> Hi,
>
> I am having a problem in pjsip in the ?TO? header tag.
>
>
>
> In the file ?pjsip\src\pjsip\sip_util.c? in the following bit of code:
>
>
>
> /* Must add To tag in the response (Section 8.2.6.2), except if this is
>
> ?* 100 (Trying) response. Same tag must be created for the same request
>
> ?* (e.g. same tag in provisional and final response). The easiest way
>
> ?* to do this is to derive the tag from Via branch parameter (or to
>
> ?* use it directly).
>
> ?*/
>
> if (st_code > 100 && top_via) {
>
> to_hdr->tag = top_via->branch_param;
>
> }
>
>
>
> In section 8.2.6.2 of RFC 3261 it says that the to_hdr->tag of the response
> must be the same of the request, if the request contains a to_hdr->tag. Only
> if the to_hdr->tag is empty we should provide a new one in the reponse.
>
>
>
> Here is how I fixed this:
>
>
>
> if (to_hdr->tag.slen == 0 && st_code > 100 && top_via) {
>
> to_hdr->tag = top_via->branch_param;
>
> }
>
>
>
> Can anyone confirm if this is the correct interpretation of the RFC 3261?
>
>

I think your interpretation makes more sense, I've just changed the
code accordingly.

Thanks!

 Benny



[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux