Opened 8 days ago

Closed 8 days ago

Last modified 42 hours ago

#2241 closed defect (fixed)

Update Via header on CANCEL request for proxy scenario if the "sent-by" field is not set

Reported by: riza Owned by: riza
Priority: normal Milestone: release-2.10
Component: pjsip Version: trunk
Keywords: Cc:
Backport to 1.x milestone: Backported: no

Description (last modified by riza)

From rfc3261:

For each target, the proxy forwards the request following these
   steps:
      1.  Make a copy of the received request
      2.  Update the Request-URI
      3.  Update the Max-Forwards header field
      4.  Optionally add a Record-route header field value
      5.  Optionally add additional header fields
      6.  Postprocess routing information
      7.  Determine the next-hop address, port, and transport
      8.  Add a Via header field value
      9.  Add a Content-Length header field if necessary
      10. Forward the new request
      11. Set timer C

On proxy scenario, Via header required to be added to the message sent.
The library will add the header on sip_util_proxy.c without the sent-by field which is updated on sip_util.c.

Unfortunately, #2085 will not update Via header on CANCEL request making the Via header without the sent-by field. Afterwards the message will get ignored/discarded by the receiving end.

This ticket will update the Via header when the sent-by field is not set.

Thanks to Varun Ahluwalia for the report

Change History (3)

comment:1 Changed 8 days ago by riza

  • Owner set to riza
  • Resolution set to fixed
  • Status changed from new to closed

In 6088:

Fixed #2241: Update "sent-by" field of Via header on CANCEL request for proxy scenario.

comment:2 Changed 7 days ago by riza

  • Description modified (diff)
  • Summary changed from Update "sent-by" field of Via header on CANCEL request for proxy scenario to Update Via header on CANCEL request for proxy scenario if the "sent-by" field is not set

comment:3 Changed 42 hours ago by nanang

In 6092:

Re #2241: Fixed compile error due to declaration after code on older compilers or pre-C99 specs, such as MSVC2005.

Note: See TracTickets for help on using tickets.