mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-16 23:08:32 +00:00
If multiple [general] contexts occur from sip.conf (usually due to external includes), merge them.
The original implementation of this did the merging of all contexts with the
same name in the realtime layer, but that implementation severely breaks
drivers which use the same context name (e.g. iax.conf, type={peer,user}).
Therefore, the implementation needs to do the merging for particular entries
only, based upon what contexts would allow that in the channel driver itself.
This implementation is for chan_sip only, but others could be added in the
future.
(closes issue #17957)
Reported by: marcelloceschia
Patches:
chan-sip_parsing-general_branch162.patch uploaded by marcelloceschia (license 1079)
Tested by: tilghman
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@316428 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
5
CHANGES
5
CHANGES
@@ -108,6 +108,11 @@ FollowMe
|
|||||||
compatability for a FollowMe call with certain dialplan apps, options, and
|
compatability for a FollowMe call with certain dialplan apps, options, and
|
||||||
functions.
|
functions.
|
||||||
|
|
||||||
|
SIP Changes
|
||||||
|
-----------
|
||||||
|
* Multiple [general] contexts are now permitted within sip.conf. They will be
|
||||||
|
merged at load time.
|
||||||
|
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
--- Functionality changes from Asterisk 1.6.2 to Asterisk 1.8 ----------------
|
--- Functionality changes from Asterisk 1.6.2 to Asterisk 1.8 ----------------
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -27228,8 +27228,13 @@ static int reload_config(enum channelreloadreason reason)
|
|||||||
ast_clear_flag(&global_flags[1], SIP_PAGE2_IGNORESDPVERSION);
|
ast_clear_flag(&global_flags[1], SIP_PAGE2_IGNORESDPVERSION);
|
||||||
|
|
||||||
|
|
||||||
/* Read the [general] config section of sip.conf (or from realtime config) */
|
/* Read all [general] config sections of sip.conf (or from realtime config) */
|
||||||
for (v = ast_variable_browse(cfg, "general"); v; v = v->next) {
|
for (cat = ast_category_browse(cfg, "general"); cat; cat = ast_category_browse(cfg, cat)) {
|
||||||
|
if (strcmp(cat, "general")) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (v = ast_variable_browse(cfg, cat); v; v = v->next) {
|
||||||
if (handle_common_options(&global_flags[0], &dummy[0], v)) {
|
if (handle_common_options(&global_flags[0], &dummy[0], v)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@@ -27728,6 +27733,8 @@ static int reload_config(enum channelreloadreason reason)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
} /* for (...ast_category_browse(cfg, "general")...) */
|
||||||
|
|
||||||
if (subscribe_network_change) {
|
if (subscribe_network_change) {
|
||||||
network_change_event_subscribe();
|
network_change_event_subscribe();
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user