0

"ask" not working as before?

Hi,

without any change in code my script is not working properly time by time. I think that "ask" does not return pressed number (DMTF) correctly. 

 

...

var randomnumber = Math.floor(Math.random() * 10);

...

results = ask("Hello, this blabla.... To confirm this message press " + randomnumber + ".",
{choices: "[1 DIGIT]",
timeout: 30,
bargein: false
});

if (results.value == randomnumber) {
say("OK, you confirm the call");
isok = true;
}
else {
say("Not confirmed, blabla");
isok = false;
}

...

 

I face it last a few days. In log I can see that "ask" does not return value:

Aug 27 08:31:34.006 rt3-prod.sjc.tropo.com PRISM 5062070/5073254/1bddf08e8529351ee1f4c591a0ae64b7/977f59bf736a91ceeebdf99a02a659ae/1/nsq4x0mp45yt/[Tropo-Thread-977f59bf736a91ceeebdf99a02a659ae]/#TROPO#: ApplicationInstance[http://hosting.tropo.com/5062070/www/aeviOCDcall.js , 977f59bf736a91ceeebdf99a02a659ae] has runtime errors: org.mozilla.javascript.EcmaError: TypeError: Cannot read property "value" from undefined (<Unknown Source>#19) in <Unknown Source> at line number 19 at line #19 with cause: org.mozilla.javascript.EcmaError: TypeError: Cannot read property "value" from undefined (<Unknown Source>#19)@T: com.sun.phobos.script.util.ExtendedScriptException: org.mozilla.javascript.EcmaError: TypeError: Cannot read property "value" from undefined (<Unknown Source>#19) in <Unknown Source> at line number 19\n at com.sun.phobos.script.javascript.RhinoCompiledScript.eval(RhinoCompiledScript.java:68)\n at com.voxeo.tropo.app.TropoCompiledScript.eval(TropoCompiledScript.java:106)\n at com.voxeo.tropo.app.SimpleInstance.evaluateScript(SimpleInstance.java:269)\n at com.voxeo.tropo.app.SimpleInstance.run(SimpleInstance.java:215)\n at com.voxeo.tropo.app.TropoApplicationManager$4.run(TropoApplicationManager.java:511)\n at java.lang.Thread.run(Thread.java:748)\nCaused by: org.mozilla.javascript.EcmaError: TypeError: Cannot read property "value" from undefined (<Unknown Source>#19)\n at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3654)\n at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3632)\n at org.mozilla.javascript.ScriptRuntime.typeError(ScriptRuntime.java:3660)\n at org.mozilla.javascript.ScriptRuntime.typeError2(ScriptRuntime.java:3679)\n at org.mozilla.javascript.ScriptRuntime.undefReadError(ScriptRuntime.java:3692)\n at org.mozilla.javascript.ScriptRuntime.getObjectProp(ScriptRuntime.java:1421)\n at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:3027)\n at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2487)\n at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:164)\n at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:398)\n at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3065)\n at org.mozilla.javascript.InterpretedFunction.exec(InterpretedFunction.java:175)\n at com.sun.phobos.script.javascript.RhinoCompiledScript.eval(RhinoCompiledScript.java:55)\n ... 5 more\n #[N/A][N/A][N/A][N/A][?][?]

 

10 comments

Please sign in to leave a comment.