FS-4692 gsmopen: patch from Ivan Mironov allowing for values 'context', 'dialplan', 'destination' and 'hold_music' from configuration file global_settings used by default for individual interfaces
This commit is contained in:
parent
92d44e5023
commit
dedbb3a8cb
|
@ -1223,6 +1223,14 @@ static switch_status_t load_config(int reload_type)
|
||||||
}
|
}
|
||||||
|
|
||||||
switch_mutex_lock(globals.mutex);
|
switch_mutex_lock(globals.mutex);
|
||||||
|
|
||||||
|
set_global_dialplan("XML");
|
||||||
|
DEBUGA_GSMOPEN("Default globals.dialplan=%s\n", GSMOPEN_P_LOG, globals.dialplan);
|
||||||
|
set_global_destination("5000");
|
||||||
|
DEBUGA_GSMOPEN("Default globals.destination=%s\n", GSMOPEN_P_LOG, globals.destination);
|
||||||
|
set_global_context("default");
|
||||||
|
DEBUGA_GSMOPEN("Default globals.context=%s\n", GSMOPEN_P_LOG, globals.context);
|
||||||
|
|
||||||
if ((global_settings = switch_xml_child(cfg, "global_settings"))) {
|
if ((global_settings = switch_xml_child(cfg, "global_settings"))) {
|
||||||
for (param = switch_xml_child(global_settings, "param"); param; param = param->next) {
|
for (param = switch_xml_child(global_settings, "param"); param; param = param->next) {
|
||||||
char *var = (char *) switch_xml_attr_soft(param, "name");
|
char *var = (char *) switch_xml_attr_soft(param, "name");
|
||||||
|
@ -1256,16 +1264,16 @@ static switch_status_t load_config(int reload_type)
|
||||||
for (myinterface = switch_xml_child(interfaces, "interface"); myinterface; myinterface = myinterface->next) {
|
for (myinterface = switch_xml_child(interfaces, "interface"); myinterface; myinterface = myinterface->next) {
|
||||||
char *id = (char *) switch_xml_attr(myinterface, "id");
|
char *id = (char *) switch_xml_attr(myinterface, "id");
|
||||||
char *name = (char *) switch_xml_attr(myinterface, "name");
|
char *name = (char *) switch_xml_attr(myinterface, "name");
|
||||||
const char *context = "default";
|
const char *context = globals.context;
|
||||||
const char *dialplan = "XML";
|
const char *dialplan = globals.dialplan;
|
||||||
const char *destination = "5000";
|
const char *destination = globals.destination;
|
||||||
const char *controldevice_name = "/dev/ttyUSB3";
|
const char *controldevice_name = "/dev/ttyUSB3";
|
||||||
const char *controldevice_audio_name = "/dev/ttyUSB2";
|
const char *controldevice_audio_name = "/dev/ttyUSB2";
|
||||||
char *digit_timeout = NULL;
|
char *digit_timeout = NULL;
|
||||||
char *max_digits = NULL;
|
char *max_digits = NULL;
|
||||||
char *hotline = NULL;
|
char *hotline = NULL;
|
||||||
char *dial_regex = NULL;
|
char *dial_regex = NULL;
|
||||||
char *hold_music = NULL;
|
char *hold_music = globals.hold_music;
|
||||||
char *fail_dial_regex = NULL;
|
char *fail_dial_regex = NULL;
|
||||||
const char *enable_callerid = "true";
|
const char *enable_callerid = "true";
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue