cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2107
Views
0
Helpful
1
Comments
cdnadmin
Level 11
Level 11

Subject: RE: builtin:grammar
Replied by: Janine Graves on 07-02-2012 04:16:29 PM
Hi Ryan,

I don't think it's possible anymore.

It used to be possible in Studio 3.1 (and maybe 4.0?) but once they added in the language-context, it became impossible because VXMLServer is parsing the semi-colons. I tried using backslash - no good. I also tried including the language-context info hoping VxmlServer would stop looking for semi-colons after it found the first four
(en-US;en-US;1;;builtin:dtmf/digits?minlength=1;maxlength=5)  but VxmlServer doesn't like that either.

I think you'll just have to tell your caller to press the pound key, then create a custom element to tell you the length of their entry.

Janine

Subject: RE: builtin:grammar
Replied by: Janine Graves on 07-02-2012 04:36:11 PM
Well, here's something you could try, I know it's worked for me. Create 4 different DTMF Grammar settings - one for each length you are allowing, then they are all loaded and active, allowing exactly what you want to do (not elegant, but it'll work)
DTMF Grammar: builtin:dtmf/digits?length=6
DTMF Grammar: builtin:dtmf/digits?length=7
DTMF Grammar: builtin:dtmf/digits?length=8
DTMF Grammar: builtin:dtmf/digits?length=9

Janine

Subject: RE: builtin:grammar
Replied by: Hemal Mehta on 07-02-2012 05:01:33 PM
Have you tried directly writing vxml code with vxml insert element and use the grammar
builtin:dtmf/digits?minlength=6;maxlength=9

It should work

Hemal

Subject: RE: builtin:grammar
Replied by: Janine Graves on 07-02-2012 05:07:42 PM
Hi Ryan,
Truthfully, I don't know if builtins are more efficient than writing your grammars and precompiling them. But I would guess that the builtin grammars are the most efficient. They are precompiled and reside on the ASR box - so no http retrieval or caching needed.
Janine

Subject: RE: builtin:grammar
Replied by: Hemal Mehta on 07-02-2012 05:07:59 PM
Built in grammars are optimized and typically pre compiled. Built in grammar have always some advantages, less code and you minimize the chances of any error.  However they are less flexible and may not be able to cater to any special situation. However for a small grammar like yours there will not be any significant diff that you can notice.
Hemal
This document was generated from CDN thread

Created by: Ryan Hilfers on 07-02-2012 03:56:07 PM
Hopefully this is an easy question..
 
I'm trying to use the builtin grammars with Nuance.  Here's my only issue, when I for example use builtin:dtmf/digits?minlength=6    in the DTMFGrammar settting for a form element it works fine.
 
But when I try to add another parameter to the builtin grammar  e.g.   builtin:dtmf/digits?minlength=6;maxlength=9          The element seems to be stripping everything before the ;  as if it were a language context or something..   I see in the nuance logs that the grammar resolves to  http://VXMLTOMCAT/CVP/maxlength=9     whereas without the semicolon and extra parameter resolves to the expected <builtin:http://ASRServer:8080/dtmf/digits?minlength=6>  
 
 
I've tried enclosing in brackets [] or "" but "" is not allowed in studio.   Not sure how to make studio to stop thinking I'm using the syntax for an external grammar
 
 
Thanks,
Ryan

Subject: RE: builtin:grammar
Replied by: Ryan Hilfers on 07-02-2012 04:28:30 PM
Interesting...  and unfortunate.  I can definitely write an external grammar to accomplish what I need but thought I'd give the builtin grammars a try and see how they perform.  C'mon Cisco!

Thanks Janine! Your wisdom is always appreciated.

-Ryan

Subject: RE: builtin:grammar
Replied by: Ryan Hilfers on 07-02-2012 04:52:43 PM
Ahh, that would work.  What are your thoughts on buitin grammars? Are their efficiences worth it?  I guess is this:

builtin:dtmf/digits?length=6

any better than referring to an external grammar with this in the grammar file:

<code>
;GSL
NumberCapture (DtmfSelections:dtmf) {<rslt $dtmf>}


DtmfSelections (
  Dtmf0_9:d0 Dtmf0_9:d1 Dtmf0_9:d2 Dtmf0_9:d3 Dtmf0_9:d4 Dtmf0_9:d5 ?dtmf-pound
)
{return(strcat($d0 strcat($d1 strcat($d2 strcat($d3 strcat($d4 $d5)))))))}

</code>


Nuance will cache the external grammars correct?   I was assuming the builtins would use a pre-compiled grammar and therefore be the most efficient/best pracitce.

Thanks!

Subject: RE: builtin:grammar
Replied by: Ryan Hilfers on 07-02-2012 05:11:19 PM
Haven't tried it, but I agree that should work.  Going that route though means I'd have to write the Vxml for the entire menu correct?   I've worked with the VCFs and written a few simple things but haven't taken a stab at my own menu in straight Vxml yet..   really probably overkill for what I'm experimenting with.


Anyway, thanks for the input on builtin vs. non-pre compiled external grammars. Much appreciated!

-Ryan
Comments

Is this still a known issue with a form element? That the ; in a grammar url fails to parse properly and content is stripped? This is an old thread, but here's hoping Cisco addressed this in the last 7 years.

 

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Quick Links