I need help on asterisk java AGI integration. I am taking the reference from: [color=blue]http://asterisk-java.org/development/tutorial.html[/color] for FastAGI.
- calling from 2000 to 3000 on asterisk.
- from the dial plan call a AGI script.
- in the script using java code i am printing something and using external jar for the some purpose.
I am [color=red]able to call [/color]the java code from asterisk using FastAGI
Normal Script is running fine and printing whatever is directed in the streamfile() method.
in the java code i am taking the reference of some externam APIs, say [color=red]mail.jar [/color]i am using.
on the UNIX system when i am setting the classpath, compiling and running is fine for the
But when the same script is been run from the Asterisk, it gives error as follows:
[color=red]Sep 9, 2008 12:00:47 PM org.asteriskjava.fastagi.DefaultAgiServer startup
INFO: Received connection from /127.0.0.1
Exception in thread “Asterisk-Java DaemonPool-1-thread-1” java.lang.NoClassDefFoundError: javax/mail/Service
at java.lang.Class.forName0(Native Method)
I know this error is only that FastAGI server is not getting the reference to the mail.jar
I have included this jar into the same folder where the java code is running as well as in the library folder too. I have set the CLASSPATH on the unix end, and if i run the code only from unix things works fine for me.
But gives problem when run by Asterisk - FastAGI.
Please give me any helping pointer, if someone had already done something on this.