[asterisk-commits] branch oej/disable-ol-and-sub r12611 -
/team/oej/disable-ol-and-sub/channels/
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Sun Mar 12 11:49:02 MST 2006
Author: oej
Date: Sun Mar 12 12:48:58 2006
New Revision: 12611
URL: http://svn.digium.com/view/asterisk?rev=12611&view=rev
Log:
- Fix configuration parsing
Modified:
team/oej/disable-ol-and-sub/channels/chan_sip.c
Modified: team/oej/disable-ol-and-sub/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/oej/disable-ol-and-sub/channels/chan_sip.c?rev=12611&r1=12610&r2=12611&view=diff
==============================================================================
--- team/oej/disable-ol-and-sub/channels/chan_sip.c (original)
+++ team/oej/disable-ol-and-sub/channels/chan_sip.c Sun Mar 12 12:48:58 2006
@@ -402,7 +402,8 @@
static int global_reg_timeout;
static int global_regattempts_max; /*!< Registration attempts before giving up */
static int global_allowguest; /*!< allow unauthenticated users/peers to connect? */
-static int global_allowsubscribe; /*!< Flag for disabling ALL subscriptions */
+static int global_allowsubscribe; /*!< Flag for disabling ALL subscriptions, this is FALSE only if all peers are FALSE
+ the global setting is in globals_flag_page2 */
static int global_mwitime; /*!< Time between MWI checks for peers */
static int global_tos; /*!< IP Type of service */
static int global_videosupport; /*!< Videosupport on or off */
@@ -11839,17 +11840,6 @@
ast_set_flag(flags, SIP_PROG_INBAND_YES);
else if (strcasecmp(v->value, "never"))
ast_set_flag(flags, SIP_PROG_INBAND_NO);
- } else if (!strcasecmp(v->name, "allowsubscribe")) {
- if (ast_true(v->value)) {
- global_allowsubscribe = FALSE;
- ast_set_flag(&global_flags_page2, SIP_PAGE2_ALLOWSUBSCRIBE);
- } else
- ast_clear_flag(&global_flags_page2, SIP_PAGE2_ALLOWSUBSCRIBE);
- } else if (!strcasecmp(v->name, "allowoverlap")) {
- if (ast_true(v->value)) {
- ast_set_flag(&global_flags_page2, SIP_PAGE2_ALLOWOVERLAP);
- } else
- ast_clear_flag(&global_flags_page2, SIP_PAGE2_ALLOWOVERLAP);
} else if (!strcasecmp(v->name, "allowguest")) {
#ifdef OSP_SUPPORT
if (!strcasecmp(v->value, "osp"))
@@ -12684,6 +12674,24 @@
ast_parse_allow_disallow(&default_prefs, &global_capability, v->value, 1);
} else if (!strcasecmp(v->name, "disallow")) {
ast_parse_allow_disallow(&default_prefs, &global_capability, v->value, 0);
+ } else if (!strcasecmp(v->name, "allowsubscribe")) {
+ if (ast_true(v->value)) {
+ ast_log(LOG_DEBUG, "Turning on global subscription support!\n");
+ global_allowsubscribe = TRUE;
+ ast_set_flag(&global_flags_page2, SIP_PAGE2_ALLOWSUBSCRIBE);
+ } else {
+ global_allowsubscribe = FALSE;
+ ast_log(LOG_DEBUG, "Turning off global subscription support!\n");
+ ast_clear_flag(&global_flags_page2, SIP_PAGE2_ALLOWSUBSCRIBE);
+ }
+ } else if (!strcasecmp(v->name, "allowoverlap")) {
+ if (ast_true(v->value)) {
+ ast_log(LOG_DEBUG, "Turning on global overlap support!\n");
+ ast_set_flag(&global_flags_page2, SIP_PAGE2_ALLOWOVERLAP);
+ } else {
+ ast_log(LOG_DEBUG, "Turning off global overlap support!\n");
+ ast_clear_flag(&global_flags_page2, SIP_PAGE2_ALLOWOVERLAP);
+ }
} else if (!strcasecmp(v->name, "allowexternaldomains")) {
allow_external_domains = ast_true(v->value);
} else if (!strcasecmp(v->name, "autodomain")) {
More information about the asterisk-commits
mailing list