[Freeswitch-svn] [commit] r1789 - in freeswitch/trunk: conf src/mod/applications/mod_conference

Freeswitch SVN anthm at freeswitch.org
Fri Jul 7 15:07:07 EDT 2006


Author: anthm
Date: Fri Jul  7 15:07:07 2006
New Revision: 1789

Modified:
   freeswitch/trunk/conf/freeswitch.xml
   freeswitch/trunk/src/mod/applications/mod_conference/mod_conference.c

Log:
fix param names

Modified: freeswitch/trunk/conf/freeswitch.xml
==============================================================================
--- freeswitch/trunk/conf/freeswitch.xml	(original)
+++ freeswitch/trunk/conf/freeswitch.xml	Fri Jul  7 15:07:07 2006
@@ -287,43 +287,43 @@
           <!-- Number of milliseconds per frame -->
           <param name="interval" value="20"/>
           <!-- Energy level required for audio to be sent to the other users -->
-          <param name="energy_level" value="300"/>
+          <param name="energy-level" value="300"/>
           <!-- TTS Engine to use -->
-          <!--<param name="tts_engine" value="cepstral"/>-->
+          <!--<param name="tts-engine" value="cepstral"/>-->
           <!-- TTS Voice to use -->
-          <!--<param name="tts_voice" value="david"/>-->
+          <!--<param name="tts-voice" value="david"/>-->
 
           <!-- If TTS is enabled all audio-file params not beginning with '/'
           will be considered text to say with TTS -->
 
           <!-- File to play to acknowledge succees -->
-          <!--<param name="ack_sound" value="/soundfiles/beep.wav"/>-->
+          <!--<param name="ack-sound" value="/soundfiles/beep.wav"/>-->
           <!-- File to play to acknowledge failure -->
-          <!--<param name="nack_sound" value="/soundfiles/beeperr.wav"/>-->
+          <!--<param name="nack-sound" value="/soundfiles/beeperr.wav"/>-->
           <!-- File to play to acknowledge muted -->
-          <!--<param name="muted_sound" value="/soundfiles/muted.wav"/>-->
+          <!--<param name="muted-sound" value="/soundfiles/muted.wav"/>-->
           <!-- File to play to acknowledge unmuted -->
-          <!--<param name="unmuted_sound" value="/soundfiles/unmuted.wav"/>-->
+          <!--<param name="unmuted-sound" value="/soundfiles/unmuted.wav"/>-->
           <!-- File to play if you are alone in the conference -->
-          <!--<param name="alone_sound" value="/soundfiles/yactopitc.wav"/>-->
+          <!--<param name="alone-sound" value="/soundfiles/yactopitc.wav"/>-->
           <!-- File to play when you join the conference -->
-          <!--<param name="enter_sound" value="/soundfiles/welcome.wav"/>-->
+          <!--<param name="enter-sound" value="/soundfiles/welcome.wav"/>-->
           <!-- File to play when you leave the conference -->
-          <!--<param name="exit_sound" value="/soundfiles/exit.wav"/>-->
+          <!--<param name="exit-sound" value="/soundfiles/exit.wav"/>-->
           <!-- File to play when you ae ejected from the conference -->
-          <!--<param name="kicked_sound" value="/soundfiles/kicked.wav"/>-->
+          <!--<param name="kicked-sound" value="/soundfiles/kicked.wav"/>-->
           <!-- File to play when the conference is locked -->
-          <!--<param name="locked_sound" value="/soundfiles/locked.wav"/>-->
+          <!--<param name="locked-sound" value="/soundfiles/locked.wav"/>-->
           <!-- File to play to prompt for a pin -->
-          <!--<param name="pin_sound" value="/soundfiles/pin.wav"/>-->
+          <!--<param name="pin-sound" value="/soundfiles/pin.wav"/>-->
           <!-- File to play to when the pin is invalid -->
-          <!--<param name="bad_pin_sound" value="/soundfiles/invalid-pin.wav"/>-->
+          <!--<param name="bad-pin-sound" value="/soundfiles/invalid-pin.wav"/>-->
           <!-- Conference pin -->
           <!--<param name="pin" value="12345"/>-->
           <!-- Default Caller ID Name for outbound calls -->
-          <param name="caller_id_name" value="FreeSWITCH"/>
+          <param name="caller-id-name" value="FreeSWITCH"/>
           <!-- Default Caller ID Number for outbound calls -->
-          <param name="caller_id_number" value="8777423583"/>
+          <param name="caller-id-number" value="8777423583"/>
         </profile>
       </profiles>
       <rooms>
@@ -354,7 +354,7 @@
       <!-- Enter an existing conference -->
       <extension name="1000">
         <condition field="destination_number" expression="^1000$">
-          <action application="conference" data="1000"/>
+          <action application="conference" data="freeswitch"/>
         </condition>
       </extension>
 

Modified: freeswitch/trunk/src/mod/applications/mod_conference/mod_conference.c
==============================================================================
--- freeswitch/trunk/src/mod/applications/mod_conference/mod_conference.c	(original)
+++ freeswitch/trunk/src/mod/applications/mod_conference/mod_conference.c	Fri Jul  7 15:07:07 2006
@@ -2513,50 +2513,61 @@
 		return NULL;
 	}
 
-
 	for (param = switch_xml_child(profile, "param"); param; param = param->next) {
 		char *var = (char *) switch_xml_attr_soft(param, "name");
 		char *val = (char *) switch_xml_attr_soft(param, "value");
+		char buf[128] = "";
+		char *p;
 
+		if ((p = strchr(var, '_'))) {
+			switch_copy_string(buf, var, sizeof(buf));
+			for(p = buf; *p; p++) {
+				if (*p == '_') {
+					*p = '-';
+				}
+			}
+			var = buf;
+		}
+		
 		if (!strcasecmp(var, "rate")) {
 			rate_name = val;
 		} else if (!strcasecmp(var, "interval")) {
 			interval_name= val;
-		} else if (!strcasecmp(var, "timer_name")) {
+		} else if (!strcasecmp(var, "timer-name")) {
 			timer_name= val;
-		} else if (!strcasecmp(var, "tts_engine")) {
+		} else if (!strcasecmp(var, "tts-engine")) {
 			tts_engine= val;
-		} else if (!strcasecmp(var, "tts_voice")) {
+		} else if (!strcasecmp(var, "tts-voice")) {
 			tts_voice= val;
-		} else if (!strcasecmp(var, "enter_sound")) {
+		} else if (!strcasecmp(var, "enter-sound")) {
 			enter_sound = val;
-		} else if (!strcasecmp(var, "exit_sound")) {
+		} else if (!strcasecmp(var, "exit-sound")) {
 			exit_sound = val;
-		} else if (!strcasecmp(var, "alone_sound")) {
+		} else if (!strcasecmp(var, "alone-sound")) {
 			alone_sound = val;
-		} else if (!strcasecmp(var, "ack_sound")) {
+		} else if (!strcasecmp(var, "ack-sound")) {
 			ack_sound = val;
-		} else if (!strcasecmp(var, "nack_sound")) {
+		} else if (!strcasecmp(var, "nack-sound")) {
 			nack_sound = val;
-		} else if (!strcasecmp(var, "muted_sound")) {
+		} else if (!strcasecmp(var, "muted-sound")) {
 			muted_sound = val;
-		} else if (!strcasecmp(var, "unmuted_sound")) {
+		} else if (!strcasecmp(var, "unmuted-sound")) {
 			unmuted_sound = val;
-		} else if (!strcasecmp(var, "locked_sound")) {
+		} else if (!strcasecmp(var, "locked-sound")) {
 			locked_sound= val;
-		} else if (!strcasecmp(var, "kicked_sound")) {
+		} else if (!strcasecmp(var, "kicked-sound")) {
 			kicked_sound = val;
 		} else if (!strcasecmp(var, "pin")) {
 			pin = val;
-		} else if (!strcasecmp(var, "pin_sound")) {
+		} else if (!strcasecmp(var, "pin-sound")) {
 			pin_sound = val;
-		} else if (!strcasecmp(var, "bad_pin_sound")) {
+		} else if (!strcasecmp(var, "bad-pin-sound")) {
 			bad_pin_sound = val;
-		} else if (!strcasecmp(var, "energy_level")) {
+		} else if (!strcasecmp(var, "energy-level")) {
 			energy_level = val;
-		} else if (!strcasecmp(var, "caller_id_name")) {
+		} else if (!strcasecmp(var, "caller-id-name")) {
 			caller_id_name = val;
-		} else if (!strcasecmp(var, "caller_id_number")) {
+		} else if (!strcasecmp(var, "caller-id-number")) {
 			caller_id_number = val;
 		}
 	}



More information about the Freeswitch-svn mailing list