« Back to CVP - All Versions

Inputmode in custom Form element

Combination View Flat View Tree View
Threads [ Previous | Next ]
Hi,
I have a custom element that extends a form element and has a DTMF grammar and a voice grammar.  I want to see what the input mode is when the return value is a nomatch. The reason is that i need to update some variables based on if the user had tried the voice grammar or if they have tried the dtmg grammar. I checked reqparamaters and ved but on a nomatch event, they dont hold anything that can give away the inputmode. Any suggestion on how I can get this? Thanks.

Try using:
application.lastresult$[0].inputmode

That can be used in the vxml code

Try using:
application.lastresult$[0].inputmode


Thanks for the suggestion but as you said it in the next post, it can only be used in the VXML. I need to do the samething in a custom form element for when a nomatch happens...

First you have to determine whether Cisco fills in the shadow variable
application.lastresult$[0].inputmode upon a nomatch.

The VoiceXML 2.0 Specification says "All of the shadow variables are set
immediately after any recognition. In this context, a <nomatch> event
counts as a recognition, and causes the value of
"application.lastresult$" to be set, though the values stored in
application.lastresult$ are PLATFORM DEPENDENT"

Can anyone at Cisco answer that question?

Then you'd need to extend the Form element's java class to include the
passing back of that variable. You'd do this by modifying the
addXmlBody() method calling super.addXmlBody(); adding some VFCs to
create a new variable 'nomatch_inputmode'; assign it the value
application.lastresult$[0].inputmode into the 'nomatch_inputmode'
variable; and then return 'nomatch_inputmode' as part of the <submit>
from the gateway to VxmlServer.




On 8/27/2010 8:25 AM, Cisco Developer Community Forums wrote:
> Arvand Owji has created a new message in the forum "CVP - All Versions":
>
> --------------------------------------------------------------
> Try using:
> application.lastresult$[0].inputmode
>
>
> Thanks for the suggestion but as you said it in the next post, it can
> only be used in the VXML. I need to do the samething in a custom form
> element for when a nomatch happens...
> --
> To respond to this post, please click the following link:
>
> <http://developer.cisco.com/web/cvp/forums/-/message_boards/message/2483270>
>
> or simply reply to this email.

--
Janine Graves
781-990-1040