diff options
author | Benny Prijono <bennylp@teluu.com> | 2007-07-10 01:46:08 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2007-07-10 01:46:08 +0000 |
commit | 62932f60662ec8cb2196b27aa922e81ce3082423 (patch) | |
tree | d89de7d86c00ba7d49f0bf979ffd2e91121249b4 /pjsip/include | |
parent | 68a5173aa1e207c4f985ce35306ef3a522ddd8fb (diff) |
Ticket #352: added PJSIP_CHECK_VIA_SENT_BY configuration to turn off Via sent-by checking for SIP responses, to support IP address change
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@1402 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip/include')
-rw-r--r-- | pjsip/include/pjsip/sip_config.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/pjsip/include/pjsip/sip_config.h b/pjsip/include/pjsip/sip_config.h index 3f1276ab..c591e0db 100644 --- a/pjsip/include/pjsip/sip_config.h +++ b/pjsip/include/pjsip/sip_config.h @@ -194,6 +194,29 @@ /** + * Perform Via sent-by checking as specified in RFC 3261 Section 18.1.2, + * which says that UAC MUST silently discard responses with Via sent-by + * containing values that the UAC doesn't recognize as its transport + * address. + * + * In PJSIP, this will cause response to be discarded and a message is + * written to the log, saying something like: + * "Dropping response Response msg 200/INVITE/cseq=608594373 (rdata00A99EF4) + * from 1.2.3.4:5060 because sent-by is mismatch" + * + * The default behavior is yes, but when the UA supports IP address change + * for the SIP transport, it will need to turn this checking off since + * when the transport address is changed between request is sent and + * response is received, the response will be discarded since its Via + * sent-by now contains address that is different than the transport + * address. + */ +#ifndef PJSIP_CHECK_VIA_SENT_BY +# define PJSIP_CHECK_VIA_SENT_BY 1 +#endif + + +/** * If non-zero, SIP parser will unescape the escape characters ('%') * in the original message, which means that it will modify the * original message. Otherwise the parser will create a copy of |