I want to use SpeechLoadGrammar to apply grammar for the response speech. I have watched an example for a grammar file like this:
#ABNF 1.0;
mode voice;
language en-US;
tag-format <semantics/1.0.2006>;
root $yesorno;
$yes = (yes $GARBAGE | yep | yeah | sure | correct) { out = "yes" };
$no = (no $GARBAGE | nope) {out = "no" };
$yesorno = ($yes | $no) { out=rules.latest() };
But when i used AGI to call Application SpeechLoadGrammar(“yesno,/etc/asterisk/grammars/yesno.gram”) then the result was:
{
code: "200"
result: "-1"
data: false
line: "200 result=-1"
}
result = -1 and asterisk couldn’t load this file.
Where did i do wrong and can you give me an example or a link. Thanks