Re: [Asterisk-java-users] classpath not found error
Brought to you by:
srt
From: Martin S. <ma...@be...> - 2008-01-24 15:11:23
|
Manager !=3D Agi. A manager program cannot be an agi script. They are totally distinct ways of interacting with Asterisk (right now, anyway). =20 You cannot call a manager script through AGI; Manager scripts are event driven, and require a main method to setup an event processing loop. =20 The example of a manager script clearly contains a main() method and is not initiated from AGI. Please re-check the manager example and make a main method. Manager script connections to Asterisk are initiated BY the manager script, and AGI script connections to Asterisk are initiated BY the dialplan inside Asterisk. =20 Let us know if you're still stuck. =20 Martin Smith, Systems Developer ma...@be... Bureau of Economic and Business Research University of Florida (352) 392-0171 Ext. 221=20 =20 ________________________________ From: ast...@li... [mailto:ast...@li...] On Behalf Of Gopal krishnan Sent: Thursday, January 24, 2008 12:31 AM To: ast...@li... Subject: Re: [Asterisk-java-users] classpath not found error =09 =09 Hi Martin / William, =09 thanks for the reply. The example "Public class HelloAgiScript extends BaseAgiScript" is working fine and we are getting the output in the command line=20 "$ java -cp asterisk-java.jar: . org.asteriskjava.fastagi.DefaultAgiServer" by initiating the call with "exten =3D> 1300,1,Agi(agi://localhost/hello.agi)" =09 For the manager script I am initiating the Java program like this "exten =3D> 1300,1,Agi(agi://localhost/hello.agi)" and in the command line interface we are getting the error =09 "Error: SEVERE: Unable to create AgiScript instance of type HelloManager: Class does not implement the AgiScript interface" =09 Since we tested both examples given in the site http://asterisk-java.org/development/tutorial.html HelloManager and HelloEvent =09 I think that I need to run the manager script in different manner, since we need to login in Asterisk console.=20 =09 Please let me know how I need to run the manager script. =09 =09 On Jan 23, 2008 9:49 PM, Martin Smith <ma...@be...> wrote: =09 Does your Hello class extend the Base class or implement the correct interface? =09 The example has: "public class HelloAgiScript extends BaseAgiScript" =09 Does yours? If yes, can we see it? Also, how do you run the Manager=20 script? =09 Your error: "Error: SEVERE: Unable to create AgiScript instance of type =09 HelloManager: Class does not implement the AgiScript interface" =09 =09 Like the tutorial says, you should be using a command line for the Agi=20 script like: $ java -cp asterisk-java.jar:. org.asteriskjava.fastagi.DefaultAgiServer =09 AND for the Manager one, with a main method of your own design. =09 Please give us more information. =09 =09 Martin Smith, Systems Developer=20 ma...@be... Bureau of Economic and Business Research University of Florida (352) 392-0171 Ext. 221 =09 =09 =09 =09 ________________________________ =09 From: ast...@li... =09 [mailto:ast...@li... ] On Behalf Of Gopal krishnan Sent: Wednesday, January 23, 2008 7:41 AM =09 To: ast...@li...=20 =09 Subject: [Asterisk-java-users] classpath not found error =09 =09 =09 Hi, =09 I am using asteriskjava 0.3.1, when I tried the HelloAgi=20 example in the url http://asterisk-java.org/development/tutorial.html it was working fine, in the same page Manager API programs are there,=20 HelloManager, HelloEvents, I tried both of them, but i am getting the following error in fastagi console, =09 Error: SEVERE: Unable to create AgiScript instance of type HelloManager: Class does not implement the AgiScript interface Jan 23, 2008 4:13:24 PM org.asteriskjava.fastagi.AbstractMappingStrategy createA giScriptInstance SEVERE: Unable to create AgiScript instance of type hello.agi: Class not found, make sure the class exists and is available on the CLASSPATH Jan 23, 2008 4:13:24 PM =09 org.asteriskjava.fastagi.internal.AgiConnectionHandler r un SEVERE: No script configured for URL=20 'agi://localhost/hello.agi?user=3D5101' (scri pt 'hello.agi') =09 Can you please help me on this. =09 -- Thank you with regards, Gopal, PeopleTech Systems Private Limited=20 www.peopletech.co.in =09 =09 =09 =09 ------------------------------------------------------------------------ -=20 This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/=20 _______________________________________________ Asterisk-java-users mailing list Ast...@li... =09 https://lists.sourceforge.net/lists/listinfo/asterisk-java-users =09 --=20 Thank you with regards, Gopal, PeopleTech Systems Private Limited www.peopletech.co.in=20 |