]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
insert variables from the domain tag in the set_user app
authorAnthony Minessale <anthony.minessale@gmail.com>
Tue, 2 Sep 2008 16:38:45 +0000 (16:38 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Tue, 2 Sep 2008 16:38:45 +0000 (16:38 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9407 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/switch_ivr.c

index 171e94b23e15e31e3fc42bb21ed46e1f0166fbef..8ebcd71dd96d55dd111d504500d021c6c002bc90 100644 (file)
@@ -1794,6 +1794,17 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_set_user(switch_core_session_t *sessi
                switch_channel_set_variable(channel, "mailbox", mailbox);
        }
 
+       if ((x_params = switch_xml_child(x_domain, "variables"))) {
+               for (x_param = switch_xml_child(x_params, "variable"); x_param; x_param = x_param->next) {
+                       const char *var = switch_xml_attr(x_param, "name");
+                       const char *val = switch_xml_attr(x_param, "value");
+
+                       if (var && val) {
+                               switch_channel_set_variable(channel, var, val);
+                       }
+               }
+       }
+
        if ((x_params = switch_xml_child(x_user, "variables"))) {
                for (x_param = switch_xml_child(x_params, "variable"); x_param; x_param = x_param->next) {
                        const char *var = switch_xml_attr(x_param, "name");