[Freeswitch-svn] [commit] r9407 - freeswitch/trunk/src

Freeswitch SVN anthm at freeswitch.org
Tue Sep 2 12:38:45 EDT 2008


Author: anthm
Date: Tue Sep  2 12:38:45 2008
New Revision: 9407

Modified:
   freeswitch/trunk/src/switch_ivr.c

Log:
insert variables from the domain tag in the set_user app

Modified: freeswitch/trunk/src/switch_ivr.c
==============================================================================
--- freeswitch/trunk/src/switch_ivr.c	(original)
+++ freeswitch/trunk/src/switch_ivr.c	Tue Sep  2 12:38:45 2008
@@ -1794,6 +1794,17 @@
 		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");



More information about the Freeswitch-svn mailing list