I am learning FreeSWITCH applications. In this the application called 'javascript' which is used to execute our JavaScript.
I have created the following JavaScript:
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.