0

currentCall.message() fails in groovy

The following pruned down groovy script fails with an error:

===================

answer(500);

currentCall.say("Hello steve this worked.  ",[allowSignals:"*", voice:"allison"]);

currentCall.message("You pressed 30",   [callerID:"+1xxxyyyzzzz", channel:"text", network:"SMS", timeout:90.0F, to:"tel:+1xxxyyyzzzz"]);

say("Thanks for calling !",[allowSignals:"*", voice:"allison"]);

==================

Note that replacing currentCall.message with message works :)  In all other cases I have found that the unqualified method** XXX** is equivalent to **currentCall.XXX.  **I assume the intention is that here also ?

==================

#TROPO#: ApplicationInstance has runtime errors: groovy.lang.MissingMethodException: No signature of method: TropoCall.message() is applicable for argument types: (java.lang.String, java.util.LinkedHashMap) values: []\nPossible solutions: getTag(), state() with cause: groovy.lang.MissingMethodException: No signature of method: TropoCall.message() is applicable for argument types: (java.lang.String, java.util.LinkedHashMap) values: []\nPossible solutions: getTag(), state()@T: javax.script.ScriptException: groovy.lang.MissingMethodException: No signature of method: TropoCall.message() is applicable for argument types: (java.lang.String, java.util.LinkedHashMap) values: []\nPossible solutions: getTag(), state()\n at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:318)\n at org.codehaus.groovy.jsr223.GroovyCompiledScript.eval(GroovyCompiledScript.java:41)\n at com.voxeo.tropo.app.SimpleInstance.evaluateScript(SimpleInstance.java:291)\n at com.voxeo.tropo.app.SimpleInstance.run(SimpleInstance.java:213)\n at com.voxeo.tropo.app.TropoApplicationManager$4.run(TropoApplicationManager.java:483)\n at java.lang.Thread.run(Thread.java:724)\nCaused by: groovy.lang.MissingMethodException: No signature of method: TropoCall.message() is applicable for argument types: (java.lang.String, java.util.LinkedHashMap) values: []\nPossible solutions: getTag(), state()\n at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:55)\n at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:51)\n at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)\n at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)\n at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:120)\n at Script22.run(Script22.groovy:1115)\n at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:315)\n ...

Thanks for checking !

3 comments

Please sign in to leave a comment.