Sorry to disturb you.I'm getting an error while i'm trying to call java file from dialplan.
i have compiled mod_java successfully. there was no error during make and make install. but it's showing error in below java code.
import org.freeswitch.*;
import org.freeswitch.swig.*;
public class PhoneTest implements FreeswitchScript, DTMFCallback, HangupHook
{
public PhoneTest()
{
}
public String onDTMF(Object object, int i, String arg)
{
if (object instanceof String)
freeswitch.console_log("notice", "DTMF: " + (String)object + " ARG: " + arg + "\n");
else
freeswitch.console_log("notice", "WOW GOT AN EVENT: " + object.toString());
return "true";
}
public void onHangup()
{
freeswitch.console_log("notice", "HANGUP!\n");
}
public void run(String sessionUuid, String args)
{
freeswitch.console_log("notice", "UUID: " + sessionUuid + " ARGS: " + args + "\n");
JavaSession session = null;
try
{
{
session = new JavaSession(sessionUuid);
session.answer(); // getting Error in This Line
freeswitch.console_log("INFO","\nHIII\n");
}catch(Exception ee){freeswitch.console_log("error",ee.getMessage());}
finally
{
if (session != null)
session.delete();
}
}
}