[asterisk-commits] irroot: branch irroot/distrotech-customers-trunk r320821 - in /team/irroot/di...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed May 25 11:59:16 CDT 2011
Author: irroot
Date: Wed May 25 11:59:05 2011
New Revision: 320821
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=320821
Log:
encryption must not be global
Modified:
team/irroot/distrotech-customers-trunk/channels/chan_sip.c
team/irroot/distrotech-customers-trunk/channels/sip/include/sip.h
Modified: team/irroot/distrotech-customers-trunk/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/team/irroot/distrotech-customers-trunk/channels/chan_sip.c?view=diff&rev=320821&r1=320820&r2=320821
==============================================================================
--- team/irroot/distrotech-customers-trunk/channels/chan_sip.c (original)
+++ team/irroot/distrotech-customers-trunk/channels/chan_sip.c Wed May 25 11:59:05 2011
@@ -26237,20 +26237,6 @@
} else if (!strcasecmp(v->name, "buggymwi")) {
ast_set_flag(&mask[1], SIP_PAGE2_BUGGY_MWI);
ast_set2_flag(&flags[1], ast_true(v->value), SIP_PAGE2_BUGGY_MWI);
- } else if (!strcasecmp(v->name, "encryption_taglen")) {
- ast_set_flag(&mask[2], SIP_PAGE3_SRTP_TAG_32);
- ast_set2_flag(&flags[2], !strcasecmp(v->value, "32"), SIP_PAGE3_SRTP_TAG_32);
- } else if (!strcasecmp(v->name, "encryption")) {
- ast_set_flag(&mask[1], SIP_PAGE2_USE_SRTP);
- ast_set_flag(&mask[2], SIP_PAGE3_SRTP_TRY);
-
- if (!strcasecmp(v->value, "try")) {
- ast_set_flag(&flags[1], SIP_PAGE2_USE_SRTP);
- ast_set_flag(&flags[2], SIP_PAGE3_SRTP_TRY);
- } else {
- ast_set2_flag(&flags[1], ast_true(v->value), SIP_PAGE2_USE_SRTP);
- ast_clear_flag(&flags[2], SIP_PAGE3_SRTP_TRY);
- }
} else
res = 0;
@@ -27000,6 +26986,16 @@
ast_string_field_set(peer, unsolicited_mailbox, v->value);
} else if (!strcasecmp(v->name, "use_q850_reason")) {
ast_set2_flag(&peer->flags[1], ast_true(v->value), SIP_PAGE2_Q850_REASON);
+ } else if (!strcasecmp(v->name, "encryption")) {
+ if (!strcasecmp(v->value, "try")) {
+ ast_set_flag(&peer->flags[1], SIP_PAGE2_USE_SRTP);
+ ast_set_flag(&peer->flags[2], SIP_PAGE3_SRTP_TRY);
+ } else {
+ ast_set2_flag(&peer->flags[1], ast_true(v->value), SIP_PAGE2_USE_SRTP);
+ ast_clear_flag(&peer->flags[2], SIP_PAGE3_SRTP_TRY);
+ }
+ } else if (!strcasecmp(v->name, "encryption_taglen")) {
+ ast_set2_flag(&peer->flags[2], !strcasecmp(v->value, "32"), SIP_PAGE3_SRTP_TAG_32);
} else if (!strcasecmp(v->name, "snom_aoc_enabled")) {
ast_set2_flag(&peer->flags[2], ast_true(v->value), SIP_PAGE3_SNOM_AOC);
}
Modified: team/irroot/distrotech-customers-trunk/channels/sip/include/sip.h
URL: http://svnview.digium.com/svn/asterisk/team/irroot/distrotech-customers-trunk/channels/sip/include/sip.h?view=diff&rev=320821&r1=320820&r2=320821
==============================================================================
--- team/irroot/distrotech-customers-trunk/channels/sip/include/sip.h (original)
+++ team/irroot/distrotech-customers-trunk/channels/sip/include/sip.h Wed May 25 11:59:05 2011
@@ -350,8 +350,8 @@
#define SIP_PAGE3_SNOM_AOC (1 << 0) /*!< DPG: Allow snom aoc messages */
-#define SIP_PAGE3_SRTP_TAG_32 (1 << 1)
-#define SIP_PAGE3_SRTP_TRY (1 << 2)
+#define SIP_PAGE3_SRTP_TAG_32 (1 << 1) /*!< DP: Use a 32bit auth tag in INVITE not 80bit */
+#define SIP_PAGE3_SRTP_TRY (1 << 2) /*!< DP: Attempt SRTP / do not enforce it */
#define SIP_PAGE3_FLAGS_TO_COPY \
(SIP_PAGE3_SNOM_AOC | SIP_PAGE3_SRTP_TAG_32 | SIP_PAGE3_SRTP_TRY)
More information about the asterisk-commits
mailing list