cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3066
Views
0
Helpful
12
Replies

DTMF only grammar not working. What am I missing? Does anyone have a working one to share?

nanosynth
Level 1
Level 1

I am familiar with grammars, but on the Aspect/CXP platform. This is my first time on UCCX 10.6 enhanced. I need a grammar to take either 9 digits in and put them right back out OR if the person presses # and then 7 digits, I need to substitute the letters DB51 for the # and then output that along with the 7 digits. Very simple substitution, I know how to do it BUT, I cant even get the UCCX to work on a known good simple digits grammar I found. When I have the generic input referencing the grammar below I am getting java nested problems/cant find resource. I looked in MIVR logs and my grammar is certainly there, in the proper grammar folder and can be found, so I dont know what 'resource' Java is complaining about that he cant find. Do I need the ASR server thing to make just a digits grammar work? I am NOT using any speech here. What am I missing? Am I not setup for dtmf grammars to even work? Does anyone have a known good DTMF ONLY grammar they can share that they know just "works"? So I can see if ti "works" on my system. There is like NOTHING on the Google about this really. Just a few posts here.

 

I found this and it is supposed to work but I think there something else going on with my UCCX where I cant even process a grammar.

 

<?xml version="1.0" encoding="UTF-8" ?>
<grammar xml:lang="en-US"
root="rootrule"
mode="dtmf"
tag-format="semantics/1.0.2006">

<rule id="rootrule">
<one-of>
<item><ruleref uri="builtin:dtmf/digits"/></item>
</one-of>
<tag>out.digits = rules.latest();out.dtmf = 0;</tag>
</rule>
</grammar>

1 Accepted Solution

Accepted Solutions

Hi Nanosynth,

                     I have only tried digital grammar as I do not have access to ASR or TTS in my home lab.  The  .grxml file is a MRCP grammar, and as I understand it require the support of a third party product e.g. Nuance.  If my understanding is incorrect, I am sure that someone in the forum will correct this understanding.

 

As for uploading and using a grammar file, I have included a version of the Cisco aa.aef (auto attendant sample provided by Cisco UCCX distribution) with a that a ".digital" grammar file. The Cisco aa.aef example has many references to ASR and TTS - for my modified example attached, all these references will be evaluated to false and skipped over.    They make the script much longer than needed, and you only need the one line: "Simple Recognition(--Triggering Contact--, prompt G[AAMainMenu.digit]".  This line will read in the simple .digit grammar file.  Cisco's aa.aef example script uses UCCX System prompts.

 

The AAMainMenu.digit just maps the dtmf digits to a set of "tags" (a bit of a misnomer in a .digit file, but it is what it is).  

 

Whilst the Digital Grammar File format is simple, it answers the part of your question as to how "a simple grammar works in UCCX".  Assuming you have MRCP capable product integrated with UCCX, you could then try your .grxml grammar file. Then you can try to see if you can sort out your java issues.

 

In the example files provided, the AAMainMenu.digit grammar file is uploaded to the UCCX "document repository" in the "en" directory. Once you have uploaded the .digit file you should be able to run the script.

 

Hope this helps you with getting a grammar file running.

 

 

View solution in original post

12 Replies 12

Peter G
Level 1
Level 1

Hi Nanosynth,

                     I did play with digital grammar out of curiosity as I have no ASR or TTS system.  This may get you started:

Digital Grammar.jpg

 

I would just observe the result in the reactive debugger to see that script went to the correct "connection".  I have uploaded the files needed.

 

A good document is: Advanced Scripting Techniques

 

If you want to use a file for the grammar, then the file is very simple (no tags required):

dtmf-1=Yes
dtmf-2=No

 

Save the file with a ".digit" extension, and you are good to go.

 

It should get you started.

 

PeterG

Hi Peter, thanks for replying. I dont see the actual grammar file for this, like the .grxml file I would upload to the grammar repository. Your grammar variable in your sample script is empty. That is the part I am still cloudy on. I was looking for a known good working simple UCCX DTMF grammar file that I could upload to my repository just to see if I can gen get it to work without Java problems. Do you have the one for this? One that is formatted correctly for the UCCX to process at run-time. I have grammars from other IVR platforms but I know I just can't shove one of those into the UCCX. I am going to need about 100+ .grxmls uploaded so I need to figure out how to just get one simple uploaded .grxml grammar to work. 

Here is a known good working grammar that does exactly what I need it to do. Take 9 entered digits in and send them right back out or if the person presses #, it substitutes 'DB51" for the # key and sends the 7 digits the person entered after the # concatenated with the DB51. This is from Apsect/CXP IVR platform. I have no idea if it will work in the UCCX the way it is syntaxed. I have no idea what I would need to change in the syntax if I had to make it UCCX 'readable', but I can certainly figure it out, IF I could even get a simple grammar to work in the UCCX. In that simple grammar that works, I would need to see how all the headers and tags and syntax of it all is constructed. 

 

 

 

<?xml version="1.0" encoding="UTF-8" ?>
<grammar xml:lang="en-US"
root="pol"
mode="dtmf"
tag-format="semantics/1.0.2006">


<rule id="pol">
<one-of>
<item>
<ruleref uri='ddigits.grxml#digit9'/>
<tag>out=rules.digit9</tag>
</item>
<item>
<ruleref uri='#pol_DB51'/>
<tag>out=rules.pol_DB51</tag>
</item>
</one-of>
</rule>

<rule id="pol_DB51">
<item>
<tag>out=&apos;DB51&apos;</tag>
<ruleref uri='ddigits.grxml#pound'/>
<ruleref uri='ddigits.grxml#digit7'/>
<tag>out+=rules.digit7</tag>
</item>
</rule>

</grammar>

Hi Nanosynth,

                     I have only tried digital grammar as I do not have access to ASR or TTS in my home lab.  The  .grxml file is a MRCP grammar, and as I understand it require the support of a third party product e.g. Nuance.  If my understanding is incorrect, I am sure that someone in the forum will correct this understanding.

 

As for uploading and using a grammar file, I have included a version of the Cisco aa.aef (auto attendant sample provided by Cisco UCCX distribution) with a that a ".digital" grammar file. The Cisco aa.aef example has many references to ASR and TTS - for my modified example attached, all these references will be evaluated to false and skipped over.    They make the script much longer than needed, and you only need the one line: "Simple Recognition(--Triggering Contact--, prompt G[AAMainMenu.digit]".  This line will read in the simple .digit grammar file.  Cisco's aa.aef example script uses UCCX System prompts.

 

The AAMainMenu.digit just maps the dtmf digits to a set of "tags" (a bit of a misnomer in a .digit file, but it is what it is).  

 

Whilst the Digital Grammar File format is simple, it answers the part of your question as to how "a simple grammar works in UCCX".  Assuming you have MRCP capable product integrated with UCCX, you could then try your .grxml grammar file. Then you can try to see if you can sort out your java issues.

 

In the example files provided, the AAMainMenu.digit grammar file is uploaded to the UCCX "document repository" in the "en" directory. Once you have uploaded the .digit file you should be able to run the script.

 

Hope this helps you with getting a grammar file running.

 

 

You have really cleared up everything for me with your last post, thank you Peter for wiriting as much as you did. Now I understand that in order to process .grxml grammars in UCCX you need a 3rd party MRCP platform, even if my grammar is only doing digit manipulations and no speech recognition. This now clears up my Java errors telling me 'resource not found' when trying to run a .grxml grammar. When I said 'simple digits' grammar, I meant the manipulations I wanted to do, substitute a few letters for the # or * key. To me that is 'simple', but you made it even more clear that 'simple digits' is in fact even simpler, by the .digits file you reference, that does not need MRCP thing. So now I must see about getting MRCP platform. 

Time for me to give back. This has been a nightmare, UCCX with Nuance speech server, recognizer and vocalizer. They are all working fine but the problem is it seems once you enable ASR/TTS for an application, you cant use any of the Cisco menu steps or get digit step or anything that requires DTMF input because Wireshark is telling me that behind those built in Cisco UCCX steps are built in Cisco grammars to handle them and when you get to that step the 'behind the scenes Cisco grammar' is getting sent to Nuance for processing and of course Nuance doesn't know what to do with it (and this is confirmed in the Nuance NSS logs). So I cant have a mixed environment in my script? The first part ASR/TTS and the rest of it pre-recorded prompts and regular Cisco menu DTMF options? Am I forced to use Nuance ASR/TTS for anything and everything that requires menu choices? Im stuck, cant get past this. Going to evaluate a different product, Lumenvox. Anyway, I have attached some grxml grammars I modified that work perfectly with Nuance recognizer, so others can look at the syntax and maybe learn or modify it to their needs, cause there is no a lot of this stuff out there. Actually, there is like NOTHING out there that explains how the grxml grammars put the result in a variable that the UCCX can then get and look at. Every grxml script I look at has no indication of what is holding the result for the UCCX to interpret. So in my attached scripts, the tag.out martha  is the name of the variable you use in the UCCX generic recognition step to collect the output of the grxml grammars. Just "martha". If you load all these grxmls in the UCCX grammar repository, they will work. The DB51 main grammar takes a DTMF input of either 9 digits and sends it right back out in the martha variable or if you enter # and 7 digits, it replaces the # key with DB51 and then concatenates it with the next 7 digits you entered. The ILWU main VOICE grammar takes you speaking 7 digits and then 2 letters and puts it back out in the martha variable for UCCX to then do what it wants. You need the other grxmls as 'supporting' grammars for the ILWU and DB51 main grammars to work.

Daaang! Thanks for sharing your experience and giving up your result set from your testing.

RE: ASR overriding Cisco Grammars

Seems to me like you could just have your triggers and cisco media groups for your mrcp stuff separate from your triggers and non-mrcp stuff.

To say it another way:

If you want to collect ASR input from the caller, send the caller to a special trigger/cisco media group for ASR, then once completed with that interaction, send the caller to a normal trigger/cisco media group for simple DTMF.

In fact, I think this is even the recommendation to save on ASR ports, since they are held for the duration of the call, whereas TTS ports are only used during the TTS prompt playback.

I thought of that. I thought of everything possible that I could think of. There is something you can use in a UCCX VXML script, and that is the 'crtp' protocol where you can fetch things directly from the UCCX repository's and Nuance doesn't understand it, and I did this successfully with a prompt. It looks like this crtp:/Prompts/hello.wav , but when I tried it with a simple UCCX digit grammar, it still failed on the Java processing of the grammar return from that call. I thought about a sub-flow, but a sub-flow is part of the main script. I thought about a separate ASR trigger for just the part I needed external grammar recognition done, but I would have to actually phone call it from within my non-ASR script and then phone call back to the non-ASR script. This would just be too much I would think because all the apps I am writing are medical apps that people query all kinds of records with their social security number or alternate ID. Then if they need to check the 10 kids they have in the family, thats 10 separate actual calls to back and forth between the non-ASR and ASR apps. I didnt say nothing before but there are some quirks with Nuance I have. Like when the script starts out with ASR/TTS it recognizes your DTMF just fine. Then when it proceeded to the next step of a Cisco "Simple" recognition step, it would NOT recognize the same good DTMF I just keyed in. Ridiculous. No RTP events in the Wiresharks like there were on the 1st part. I had to add sip-notify to the dial peer that faced the UCCX (for ITSP in-bounds) for it to work, but why? It worked fine in the first part and it works fine in the other 7 non-ASR scripts I have. Heres the kicker. At that same "Simple" menu step after the 1st ASR/TTS part, the 7942 phones on my internal LAN did not work DTMF after that 1st part when they did. Really? These are Cisco SCCP/KPML phones that 'just work' with the entire CUCM/UCCX at all times. I never figured that one out yet, I just quit for a while. 

Im making progress here. I created the ASR script to do only one thing and that is the grammar work. You call into this short ASR script and enter in your alternate ID and the Nuance does its thing and returns the product of the grammar to a variable which I then have this script write it into an XML doc. Then this script call redirects to my main non-ASR script and I read the alternate ID from that same XML doc and everything is good. Its fast too, you never know your being transferred between scripts. The DTMF works 100%. Only question is, what if another person called into the same ASR script and entered their thing for the ASR grammar to process and it wrote its product to that same XML doc, thus writing over what it had just written for the person who called in 1 second before them? Does it work that way? Would it be better and can I use session variables to carry over things from a script that actually calls another script rather than a call sub flow step that uses session variables? In reality when I am done, this ASR short script will need to be in-between 2 non-ASR scripts, thus they will have to call redirect each-other and I need to carry over variables back and forth. This is a lot of 'carrying variables' between scripts, will it work OK with session variables setup between scripts or should I just write things to a document from one script to the other? 

I find it interesting how you're leaning towards the lesser of the two solutions. I can only imagine its because you have a higher level of comfort writing to a file in the repo than you do working with session objects. :)

I definitely think you'll run into issues with callers trampling on each others xml documents...absolutely. Hence, its a terrible idea.

The session object, would be the better approach by far. Not only are you giving each caller their own space to store their variable results in, thus eliminating the trampling, but you're also avoiding reading/writing to disk, by keeping the operations 100% in memory.

Heck, an even better solution, so you don't have to mess with a Session object, is to just use Enterprise Data. Use the Set Enterprise Contact Info step in the ASR script, to store the results in an ECC called something like user.asr_results, and then in your post ASR script, use the Get Enterprise Contact Info step to read it out.

The differences between the Session and Enterprise data are as follows:

Session data cannot be passed to finesse, Enterprise data can
Session data cannot be passed to CUIC, Enterprise data can
Session data can persist even after the call has ended, Enterprise data cannot
Session data requires creating a Session variable, Enterprise data requires no variables
Session data can be created without an associated contact, Enterprise data is tied to a contact

HA! LOL.. Im not frightened of session variables..haha.. I was just playing around yesterday with ideas on how to pass variables data back and forth like a ping pong ball between UCCX scripts, so I could isolate the nasty hijacked ASR/TTS script, and I did today with session variable. You had a post here with a YouTube link to a simple video on session variables between scripts and 100% call redirects, no sub-flows. So my flow is call into DNIS app (start of session) then that calls ASR/TTS app, session carry's and drops off some variables here and picks up some differnet ones, then that calls main eligibility app, session carry's and drops off more variables, then in this app the caller bounces back and forth to the ASR/TTS app for when they enter different social security or alternate ID for grammar processing, same session ping ponging, then when they wind up back the the main eligibility app and the are finally done, they then go to call que app to talk to CSR, same session follows. In my call que app I use enterprises to fill out in Finesse and do a screen pop gadget thing in Finesse of the confirmation details from the main elig app. What Im trying to say is the session variable that started out in the DNIS app worked flawlessly all the way through. Now I just got the full Luminvox ASR/TTS to trail and will be config that tomorrow with the UCCX and see how it does. 

Damn! Very nice my man! Good work!