]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-4692 gsmopen: patch from Ivan Mironov allowing for values 'context', 'dialplan...
authorGiovanni Maruzzelli <gmaruzz@gmail.com>
Tue, 6 Nov 2012 11:31:32 +0000 (12:31 +0100)
committerGiovanni Maruzzelli <gmaruzz@gmail.com>
Tue, 6 Nov 2012 11:31:32 +0000 (12:31 +0100)
src/mod/endpoints/mod_gsmopen/mod_gsmopen.cpp

index 026db9eb8d62ef342c7ba35e39671e68b7e6927b..1474f779083f2832edc914eb585d90b4e221708a 100644 (file)
@@ -1223,6 +1223,14 @@ static switch_status_t load_config(int reload_type)
        }
 
        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"))) {
                for (param = switch_xml_child(global_settings, "param"); param; param = param->next) {
                        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) {
                        char *id = (char *) switch_xml_attr(myinterface, "id");
                        char *name = (char *) switch_xml_attr(myinterface, "name");
-                       const char *context = "default";
-                       const char *dialplan = "XML";
-                       const char *destination = "5000";
+                       const char *context = globals.context;
+                       const char *dialplan = globals.dialplan;
+                       const char *destination = globals.destination;
                        const char *controldevice_name = "/dev/ttyUSB3";
                        const char *controldevice_audio_name = "/dev/ttyUSB2";
                        char *digit_timeout = NULL;
                        char *max_digits = NULL;
                        char *hotline = NULL;
                        char *dial_regex = NULL;
-                       char *hold_music = NULL;
+                       char *hold_music = globals.hold_music;
                        char *fail_dial_regex = NULL;
                        const char *enable_callerid = "true";