Ticket #352 (closed enhancement: fixed)
Configuration to turn OFF Via sent-by checking in SIP responses to support IP address change
|Reported by:||bennylp||Owned by:||bennylp|
|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 188.8.131.52:5060 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.