summaryrefslogtreecommitdiff
path: root/channels/sip
diff options
context:
space:
mode:
authorJonathan Rose <jrose@digium.com>2014-04-21 16:20:32 +0000
committerJonathan Rose <jrose@digium.com>2014-04-21 16:20:32 +0000
commitae21162a69e222711658c8712f3403bad8101f72 (patch)
tree70c9ece09e33b601a7b0ef4b88f43e1374f724e6 /channels/sip
parentdcb2ea657c2fc6fb07be584087a1affe799a0646 (diff)
chan_sip: Add sendrpid trust options
In r411189, some behavior was changed which made sendrpid behavior act in a more trusting manner by sending full user data for peers set with private caller presence in P-Asserted-Identity headers. Since this changed long time expected behaviors, we decided to pull that patch when that was pointed out by the community. Instead, this patch provides a trust_id_outbound setting which will expose the data per RFC-3325 if set to 'yes' and simply not send the PAI/RPID headers at all if set to 'no'. By default trust_id_outbound will be set to 'legacy' which will preserve the behavior prior to these patches. Extra special thanks to Walter Doekes for providing advice and feedback. (closes issue AST-1301) (closes issue ASTERISK-19465) Reported by: Krzysztof Chmielewski Review: https://reviewboard.asterisk.org/r/3447/ ........ Merged revisions 412744 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 412746 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 412747 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@412759 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/sip')
-rw-r--r--channels/sip/include/sip.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/channels/sip/include/sip.h b/channels/sip/include/sip.h
index 9737806e3..2659b91f9 100644
--- a/channels/sip/include/sip.h
+++ b/channels/sip/include/sip.h
@@ -361,13 +361,18 @@
#define SIP_PAGE2_HAVEPEERCONTEXT (1 << 28) /*< Are we associated with a configured peer context? */
#define SIP_PAGE2_USE_SRTP (1 << 29) /*!< DP: Whether we should offer (only) SRTP */
+#define SIP_PAGE2_TRUST_ID_OUTBOUND (3 << 30) /*!< DP: Do we trust the peer with private presence information? */
+#define SIP_PAGE2_TRUST_ID_OUTBOUND_LEGACY (0 << 30) /*!< Legacy, Do not provide private presence information, but include PAI/RPID when private */
+#define SIP_PAGE2_TRUST_ID_OUTBOUND_NO (1 << 30) /*!< No, Do not provide private presence information, do not include PAI/RPID when private */
+#define SIP_PAGE2_TRUST_ID_OUTBOUND_YES (2 << 30) /*!< Yes, provide private presence information in PAI/RPID headers */
+
#define SIP_PAGE2_FLAGS_TO_COPY \
(SIP_PAGE2_ALLOWSUBSCRIBE | SIP_PAGE2_ALLOWOVERLAP | SIP_PAGE2_IGNORESDPVERSION | \
SIP_PAGE2_VIDEOSUPPORT | SIP_PAGE2_T38SUPPORT | SIP_PAGE2_RFC2833_COMPENSATE | \
SIP_PAGE2_BUGGY_MWI | SIP_PAGE2_TEXTSUPPORT | SIP_PAGE2_FAX_DETECT | \
SIP_PAGE2_UDPTL_DESTINATION | SIP_PAGE2_VIDEOSUPPORT_ALWAYS | SIP_PAGE2_PREFERRED_CODEC | \
SIP_PAGE2_RPID_IMMEDIATE | SIP_PAGE2_RPID_UPDATE | SIP_PAGE2_SYMMETRICRTP |\
- SIP_PAGE2_Q850_REASON | SIP_PAGE2_HAVEPEERCONTEXT | SIP_PAGE2_USE_SRTP)
+ SIP_PAGE2_Q850_REASON | SIP_PAGE2_HAVEPEERCONTEXT | SIP_PAGE2_USE_SRTP | SIP_PAGE2_TRUST_ID_OUTBOUND)
#define SIP_PAGE3_SNOM_AOC (1 << 0) /*!< DPG: Allow snom aoc messages */