Hi all, I am learning freeswitch applications.In this the application called 'javascript' which is used to execute our java scripts.
I have created the following java script.
var languageCode = "en";
var soundDir = "sound/";
function playFile(fileName, callBack, callBackArgs)
{
session.streamFile(soundDir + languageCode + "/" + fileName, callBack, callBackArgs);
}
session.answer();
playFile("HelloWorld.wav");
exit()
Then I have run this script using jsrun API in fs_cli. but it has given the error as 'session.answer' is not a function.
Someone help me in this.
Thanks in advance.