Revision
14706
Author
brian
Date
2009-08-31 15:38:23 -0500 (Mon, 31 Aug 2009)

Log Message

 clarify usage of unimrcp 

Modified Paths

Diff

Modified: freeswitch/trunk/src/mod/asr_tts/mod_unimrcp/mod_unimrcp.c (14705 => 14706)


--- freeswitch/trunk/src/mod/asr_tts/mod_unimrcp/mod_unimrcp.c	2009-08-31 20:01:05 UTC (rev 14705)
+++ freeswitch/trunk/src/mod/asr_tts/mod_unimrcp/mod_unimrcp.c	2009-08-31 20:38:23 UTC (rev 14706)
@@ -2507,7 +2507,7 @@
 	speech_channel_t *schannel = NULL;
 	int speech_channel_number = get_next_speech_channel_number();
 	char name[200] = { 0 };
-	const char *profile_name;
+	const char *profile_name = NULL;
 	profile_t *profile = NULL;
 	recognizer_data_t *r = NULL;
 
@@ -2532,8 +2532,14 @@
 	switch_core_hash_init(&r->grammars, ah->memory_pool); 
 
 	/* try to open an MRCP channel */
-	profile_name = switch_strlen_zero(dest) ? globals.unimrcp_default_recog_profile : dest;
+	if (!(profile_name = dest)) {
+		if (!(profile_name = ah->param)) {
+			profile_name = globals.unimrcp_default_recog_profile;
+		}
+	}
+
 	profile = (profile_t *)switch_core_hash_find(globals.profiles, profile_name);
+
 	if (!profile) {
 		switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "(%s) Can't find profile, %s\n", name, profile_name);
 		status = SWITCH_STATUS_FALSE;

Modified: freeswitch/trunk/src/switch_core_asr.c (14705 => 14706)


--- freeswitch/trunk/src/switch_core_asr.c	2009-08-31 20:01:05 UTC (rev 14705)
+++ freeswitch/trunk/src/switch_core_asr.c	2009-08-31 20:38:23 UTC (rev 14706)
@@ -44,9 +44,9 @@
 	char buf[256] = "";
 	char *param = NULL;
 
-	if (strchr(module_name, '@')) {
+	if (strchr(module_name, ':')) {
 		switch_set_string(buf, module_name);
-		if ((param = strchr(buf, '@'))) {
+		if ((param = strchr(buf, ':'))) {
 			*param++ = '\0';
 			module_name = buf;
 		}