Author Message
Anonymous

It´s possible edit an static grammar.
For example:

The IVR gets a number in a WEB-Service and set the value in a variable.

I need get this value and declare the length of DTMF grammar, with this value.

CODE of Constructor:

String digitsLenght = mySession.getVariableField("digitsLength").getStringValue();

setOptions("length=" + digitsLenght);


At the java file from grammar, i need get the session (com.avaya.sce.runtimecommon.SCESession). But when i try, return me an null Exception.

Regards
RossYakulis
Joined: Nov 6, 2013
Messages: 2652
Offline
First, please do not post anonymous.

You just add your code after the protected area. See below.



/**
* Constructor for untitled2.
*/
public untitled2() {
//{{START:CLASS:CONSTRUCTOR
super();
setRootLanguage("en-us");
setMode("voice");
setBuiltin(true);
setBuiltinMode("grammar");
setType("digits");
setOptions("length=7");
//}}END:CLASS:CONSTRUCTOR

/*
* Add Your Code Here! This will override the above.
*/
String digitsLength = mySession.getVariableField("digitsLength").getStringValue();
setOptions("length=" + digitsLength);
}

Go to:   
Mobile view