Thread: [Asterisk-java-users] To run a standalone java program in a browser
Brought to you by:
srt
From: preetha A. <pre...@gm...> - 2008-02-28 10:05:48
|
Hi, I am using Asteriskjava's managerAPI program(HelloManager.java) to originate a call to an extension.But as it is a stanalone application,I can able to run the program in console only.Then the call gets originated to the extension i have specified.But my requirement is ,If i click a number in a web based application which is developed in asp.net,that number should be passed to the HelloManager.java program and that number should be originated.I cannot do this since HelloManager.java is standalone.How could i run the java program in a browser? please let me know in brief where should i download tomcat in my linux and how to run this? Thanks. Preetha.A |
From: Patrick B. <bre...@go...> - 2008-02-28 11:05:56
|
Hi Preetha, so you can use the package manager from your linux distribution to install a tomcat on your machine. If you are using e.g. debian, use: $> apt-get install tomcat I don't now if there is a way to run asp.net in a tomcat container, but you can use tomcat only for originate. So create a Webapp in your preffered Java IDE (Eclipse), put the asterisk java lib into the lib-Dir for tomcat webapps. Create a Servlet with a .doGet() Method, so you can extract the extension parameter from URL with ... request.getAttribute("extension"); ... and you can use your Asterisk-Java code. The URL is http://localhost:8080/Servlet?extension=183 Hope this helps, let me know if you have problems or other questions. Regards, Patrick preetha Ayyappan schrieb: > Hi, > > I am using Asteriskjava's managerAPI program(HelloManager.java) to > originate a call to an extension.But as it is a stanalone > application,I can able to run the program in console only.Then the > call gets originated to the extension i have specified.But my > requirement is ,If i click a number in a web based application which > is developed in asp.net <http://asp.net>,that number should be passed > to the HelloManager.java program and that number should be > originated.I cannot do this since HelloManager.java is standalone.How > could i run the java program in a browser? please let me know in > brief where should i download tomcat in my linux and how to run this? > > Thanks. > Preetha.A > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > 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/ > ------------------------------------------------------------------------ > > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > -- Patrick Breucking <bre...@GO...> (System Engineer) * GONICUS GmbH * NL Arnsberg * Moehnestrasse 11-17 * D-59755 Arnsberg * Tel.: +49 (0) 29 32 / 9 16 - 0 * Fax: +49 (0) 29 32 / 9 16 - 278 * http://www.GONICUS.de *Sitz der Gesellschaft: Moehnestrasse 11-17 * D-59755 Arnsberg *Geschaeftsfuehrer: Rainer Luelsdorf, Alfred Schroeder *Vorsitzender des Beirats: Juergen Michels *Amtsgericht Arnsberg * HRB 1968 |
From: preetha A. <pre...@gm...> - 2008-03-27 10:52:33
|
Hi, As you suggested,I have placed the asteriskjava.jar file into webapps/root/web-inf/lib.when i try to compile the servlet program i am getting the following error: java.lang.NoClassDefFoundError: org/asteriskjava/manager/ManagerConnectionFactory since i am having the ManagerConnectionFactory.class as imported. Please assist me On 2/28/08, Patrick Breucking <bre...@go...> wrote: > > Hi Preetha, > > so you can use the package manager from your linux distribution to > install a tomcat on your machine. If you are using e.g. debian, use: > > $> apt-get install tomcat > > I don't now if there is a way to run asp.net in a tomcat container, but > you can use tomcat only for originate. So create a Webapp in your > preffered Java IDE (Eclipse), put the asterisk java lib into the lib-Dir > for tomcat webapps. Create a Servlet with a .doGet() Method, so you can > extract the extension parameter from URL with > > ... > request.getAttribute("extension"); > ... > > and you can use your Asterisk-Java code. The URL is > http://localhost:8080/Servlet?extension=183 > > Hope this helps, let me know if you have problems or other questions. > > > > Regards, > Patrick > > > preetha Ayyappan schrieb: > > > Hi, > > > > I am using Asteriskjava's managerAPI program(HelloManager.java) to > > originate a call to an extension.But as it is a stanalone > > application,I can able to run the program in console only.Then the > > call gets originated to the extension i have specified.But my > > requirement is ,If i click a number in a web based application which > > > is developed in asp.net <http://asp.net>,that number should be passed > > > to the HelloManager.java program and that number should be > > originated.I cannot do this since HelloManager.java is standalone.How > > could i run the java program in a browser? please let me know in > > brief where should i download tomcat in my linux and how to run this? > > > > Thanks. > > Preetha.A > > > ------------------------------------------------------------------------ > > > > > ------------------------------------------------------------------------- > > 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/ > > ------------------------------------------------------------------------ > > > > _______________________________________________ > > Asterisk-java-users mailing list > > Ast...@li... > > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > > > -- > > Patrick Breucking <bre...@GO...> (System Engineer) > * GONICUS GmbH * NL Arnsberg * Moehnestrasse 11-17 * D-59755 Arnsberg > * Tel.: +49 (0) 29 32 / 9 16 - 0 * Fax: +49 (0) 29 32 / 9 16 - 278 > * http://www.GONICUS.de > > *Sitz der Gesellschaft: Moehnestrasse 11-17 * D-59755 Arnsberg > *Geschaeftsfuehrer: Rainer Luelsdorf, Alfred Schroeder > *Vorsitzender des Beirats: Juergen Michels > *Amtsgericht Arnsberg * HRB 1968 > > > > ------------------------------------------------------------------------- > 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/ > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > -- Preetha.A |
From: David R. <dr...@in...> - 2008-02-28 11:44:47
|
On Thursday, 28. February 2008 11:05:49 preetha Ayyappan wrote: > I am using Asteriskjava's managerAPI program(HelloManager.java) to > originate a call to an extension.But as it is a stanalone application,I can > able to run the program in console only.Then the call gets originated to > the extension i have specified.But my requirement is ,If i click a number > in a web based application which is developed in asp.net,that number should > be passed to the HelloManager.java program and that number should be > originated.I cannot do this since HelloManager.java is standalone.How could > i run the java program in a browser? please let me know in brief where > should i download tomcat in my linux and how to run this? If you only need to originate a call I would recommend that you either implement the bits of the Manager API you need in ASP.net or that you look into the outgoing call spool file thingy that Asterisk can do. Running some Java application server for the simple task of originating a call is bloat^2. David -- INA Service GmbH Willhoop 7 22453 Hamburg Germany Mail: in...@in... Phone: +49 (0)40 557 07-07 Fax: +49 (0)40 557 07-100 Geschäftsführer: Ines M. Hoerner Amtsgericht Hamburg HRB 96470 Ust-IdNr. DE248754961 |