make mod_openmrcp profile name choosable from engine_name parameter e.g. openmrcp:myprofile

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6012 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale
2007-10-20 17:42:35 +00:00
parent 6b2a40b938
commit c86155c6bf
5 changed files with 88 additions and 69 deletions

View File

@@ -39,6 +39,16 @@ SWITCH_DECLARE(switch_status_t) switch_core_asr_open(switch_asr_handle_t *ah,
char *codec, int rate, char *dest, switch_asr_flag_t *flags, switch_memory_pool_t *pool)
{
switch_status_t status;
char buf[256] = "";
char *param = NULL;
if (strchr(module_name, ':')) {
switch_set_string(buf, module_name);
if ((param = strchr(buf, ':'))) {
*param++ = '\0';
module_name = buf;
}
}
assert(ah != NULL);
@@ -58,6 +68,9 @@ SWITCH_DECLARE(switch_status_t) switch_core_asr_open(switch_asr_handle_t *ah,
switch_set_flag(ah, SWITCH_ASR_FLAG_FREE_POOL);
}
if (param) {
ah->param = switch_core_strdup(ah->memory_pool, param);
}
ah->rate = rate;
ah->name = switch_core_strdup(ah->memory_pool, module_name);