Ticket #352 (closed enhancement: fixed)

Opened 12 years ago

Last modified 12 years ago

Configuration to turn OFF Via sent-by checking in SIP responses to support IP address change

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

Description (last modified by bennylp) (diff)

RFC 3261 Section 18.1 says:

When a response is received, the client transport examines the top Via header field value. If the value of the "sent-by" parameter in that header field value does not correspond to a value that the client transport is configured to insert into requests, the response MUST be silently discarded.

This check is done in sip_endpoint.c::endpt_on_rx_msg(). When PJSIP drops the request with wrong sent-by, a message like this will be printed to the log:

Dropping response Response msg 200/INVITE/cseq=608594373 (rdata00A99EF4) from because sent-by is mismatch"

With the UA supporting IP address change, it is possible that the Via sent-by in the response is no longer recognized as the UAC's transport address, even when the UAS doesn't modify this Via sent-by values. This happens when the UAC has changed its transport IP address after it sent the request, but before response is received. In this case, the response will be dropped.

So to support IP address change, PJSIP must provide configuration to turn off this setting.

Change History

comment:1 Changed 12 years ago by bennylp

  • Status changed from new to closed
  • Resolution set to fixed
  • Description modified (diff)

Done in r1402: Added PJSIP_CHECK_VIA_SENT_BY configuration macro to control whether PJSIP should perform Via sent-by check for SIP responses. Default is 1 (yes).

comment:2 Changed 12 years ago by bennylp

  • Description modified (diff)

Additional note: SER/iptel.org is also known to produce wrong Via sent-by, so in this case the UA will need to disable Via sent-by checking too.

Note: See TracTickets for help on using tickets.