Help needed with Asterisk-Java

asadeffendi
Joined: Fri 16 of Jul, 2010

Re: Help needed with Asterisk-Java

Posted:Fri 16 of Jul, 2010 (10:36 UTC)
Just to mention that i am using ubuntu 9.1 ,Asterisk 1.6 and asterisk-java 1.0
asadeffendi
Joined: Fri 16 of Jul, 2010

Help needed with Asterisk-Java

Posted:Fri 16 of Jul, 2010 (09:48 UTC)
Does any one have any idea about this error i am recievin in my asterisk-java terminal:

I have done this in my extensions.conf ...
exten => 1300,1,Agi(agi://myIpAddresst/hello.agi)

There are theese 4 files in my project folder:
asterisk-java.jar
HelloAgiScript.jar
HelloAgiScript.class
fastagi-mapping.properties

When i run asterisk-java server it says :
16-Jul-10 2:33:52 PM org.asteriskjava.fastagi.DefaultAgiServer startup
INFO: Listening on *:4573.

My HelloAgiScript.java is this...
import org.asteriskjava.fastagi.AgiChannel;
import org.asteriskjava.fastagi.AgiException;
import org.asteriskjava.fastagi.AgiRequest;
import org.asteriskjava.fastagi.BaseAgiScript;

public class HelloAgiScript extends BaseAgiScript
{
public void service(AgiRequest request, AgiChannel channel)
throws AgiException
{
// Answer the channel...
answer();

// ...say hello...
streamFile("welcome");

// ...and hangup.
hangup();
}
}
When i call on extension 1300 the asterisk-java automatically stops and says:

Exception in thread "main" java.lang.NoClassDefFoundError: java.util.Scanner
at org.asteriskjava.util.internal.SocketConnectionFacadeImpl.initialize(SocketConnectionFacadeImpl.java:105)
at org.asteriskjava.util.internal.SocketConnectionFacadeImpl.<init>(SocketConnectionFacadeImpl.java:94)
at org.asteriskjava.util.internal.ServerSocketFacadeImpl.accept(ServerSocketFacadeImpl.java:51)
at org.asteriskjava.fastagi.DefaultAgiServer.startup(DefaultAgiServer.java:256)
at org.asteriskjava.Cli.startAgiServer(Cli.java:123)
at org.asteriskjava.Cli.startAgiServer(Cli.java:111)
at org.asteriskjava.Cli.parseOptions(Cli.java:33)
at org.asteriskjava.Cli.main(Cli.java:133)