From: Luke Dashjr Date: Sun, 22 Aug 2010 23:12:18 +0000 (-0500) Subject: expose ASR enable/disable grammar (and disable all grammars) to dialplan via mod_dptools X-Git-Tag: v1.2-rc1~171^2~22^2^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0f39c8f9c3d8e8bce05c551e0168e476ce29437a;p=thirdparty%2Ffreeswitch.git expose ASR enable/disable grammar (and disable all grammars) to dialplan via mod_dptools --- diff --git a/src/mod/applications/mod_dptools/mod_dptools.c b/src/mod/applications/mod_dptools/mod_dptools.c index 5a1b8c5d14..e942bc612d 100755 --- a/src/mod/applications/mod_dptools/mod_dptools.c +++ b/src/mod/applications/mod_dptools/mod_dptools.c @@ -28,6 +28,7 @@ * Michael Murdock * Neal Horman * Bret McDanel + * Luke Dashjr (OpenMethods, LLC) * * mod_dptools.c -- Raw Audio File Streaming Application Module * @@ -95,7 +96,7 @@ SWITCH_STANDARD_DIALPLAN(inline_dialplan_hunt) return extension; } -#define DETECT_SPEECH_SYNTAX " [] OR grammar [] OR pause OR resume" +#define DETECT_SPEECH_SYNTAX " [] OR grammar [] OR pause OR resume OR grammaron/grammaroff OR grammarsalloff" SWITCH_STANDARD_APP(detect_speech_function) { char *argv[4]; @@ -108,6 +109,12 @@ SWITCH_STANDARD_APP(detect_speech_function) switch_ivr_detect_speech_load_grammar(session, argv[1], argv[2]); } else if (!strcasecmp(argv[0], "nogrammar")) { switch_ivr_detect_speech_unload_grammar(session, argv[1]); + } else if (!strcasecmp(argv[0], "grammaron")) { + switch_ivr_detect_speech_enable_grammar(session, argv[1]); + } else if (!strcasecmp(argv[0], "grammaroff")) { + switch_ivr_detect_speech_disable_grammar(session, argv[1]); + } else if (!strcasecmp(argv[0], "grammarsalloff")) { + switch_ivr_detect_speech_disable_all_grammars(session); } else if (!strcasecmp(argv[0], "pause")) { switch_ivr_pause_detect_speech(session); } else if (!strcasecmp(argv[0], "resume")) {