Hello,
How do you write script in javascript when you want to invoke it in the dialplan?
I tried this:
#!/usr/bin/js
session.waitForanswer(10000);
if(session.ready()) {
session.sleep(1000);
session.streamFile("path to the file");
But when i execute it, i get the error:
ReferenceError: Session is not defined
How can i fix it?