asterisk-java-users Mailing List for Asterisk-Java Library (Page 22)
Brought to you by:
srt
You can subscribe to this list here.
2005 |
Jan
|
Feb
(8) |
Mar
(33) |
Apr
(36) |
May
(19) |
Jun
(21) |
Jul
(53) |
Aug
(30) |
Sep
(36) |
Oct
(34) |
Nov
(43) |
Dec
(72) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(123) |
Feb
(75) |
Mar
(86) |
Apr
(46) |
May
(41) |
Jun
(29) |
Jul
(76) |
Aug
(38) |
Sep
(39) |
Oct
(68) |
Nov
(16) |
Dec
(17) |
2007 |
Jan
(34) |
Feb
(18) |
Mar
(39) |
Apr
(30) |
May
(20) |
Jun
(10) |
Jul
(59) |
Aug
(54) |
Sep
(60) |
Oct
(22) |
Nov
(14) |
Dec
(10) |
2008 |
Jan
(34) |
Feb
(67) |
Mar
(65) |
Apr
(67) |
May
(60) |
Jun
(51) |
Jul
(88) |
Aug
(75) |
Sep
(47) |
Oct
(143) |
Nov
(54) |
Dec
(42) |
2009 |
Jan
(46) |
Feb
(80) |
Mar
(162) |
Apr
(159) |
May
(200) |
Jun
(34) |
Jul
(46) |
Aug
(59) |
Sep
(5) |
Oct
(35) |
Nov
(73) |
Dec
(30) |
2010 |
Jan
(23) |
Feb
(50) |
Mar
(8) |
Apr
(24) |
May
(19) |
Jun
(49) |
Jul
(56) |
Aug
(35) |
Sep
(26) |
Oct
(79) |
Nov
(39) |
Dec
(34) |
2011 |
Jan
(27) |
Feb
(22) |
Mar
(28) |
Apr
(12) |
May
(16) |
Jun
(19) |
Jul
(1) |
Aug
(64) |
Sep
(19) |
Oct
(11) |
Nov
(17) |
Dec
(12) |
2012 |
Jan
(6) |
Feb
(8) |
Mar
(15) |
Apr
(43) |
May
(41) |
Jun
(14) |
Jul
(32) |
Aug
(3) |
Sep
(4) |
Oct
(7) |
Nov
(11) |
Dec
(11) |
2013 |
Jan
(35) |
Feb
(11) |
Mar
(23) |
Apr
(25) |
May
(37) |
Jun
(47) |
Jul
(25) |
Aug
(21) |
Sep
|
Oct
(1) |
Nov
(9) |
Dec
|
2014 |
Jan
(26) |
Feb
(2) |
Mar
(18) |
Apr
(41) |
May
(7) |
Jun
(7) |
Jul
(24) |
Aug
(5) |
Sep
(6) |
Oct
(8) |
Nov
(9) |
Dec
(7) |
2015 |
Jan
(7) |
Feb
(15) |
Mar
(8) |
Apr
(12) |
May
(7) |
Jun
|
Jul
|
Aug
(5) |
Sep
(1) |
Oct
(3) |
Nov
(30) |
Dec
(3) |
2016 |
Jan
(1) |
Feb
|
Mar
(2) |
Apr
|
May
(9) |
Jun
|
Jul
|
Aug
(3) |
Sep
|
Oct
|
Nov
|
Dec
|
2017 |
Jan
|
Feb
|
Mar
(3) |
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
(2) |
Oct
|
Nov
|
Dec
|
2018 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(8) |
Dec
(4) |
2019 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
2020 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(2) |
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: vic n. <los...@gm...> - 2012-11-15 15:01:11
|
Hello everyone, I write some code to originate a call from a Java app to an Asterisk instance that looks like this: DefaultAsteriskServer astServer = new DefaultAsteriskServer(ip, "manager", "password"); AsteriskChannel asteriskChannel = astServer. originateToExtension(channel, context, exten, priority, timeout); The code works and the call happens but I was expecting the AsteriskChannel object to come back populated with data about the dailed channel, however, asteriskChannel.getDialedChannel() is set to null. Is there a setting on Asterisk that will populate the returned object? What I am looking for is to get information about the call I originated back to the Java app -- things like call duration, disposition and such. Regards |
From: Ricardo G. <rcg...@gm...> - 2012-11-06 22:13:20
|
I was trying to find out if anyone has successfully attempted to combine the FastAGi server with using a pooling manager like C3P0? If so, can anyone help me in getting something like this implemented? |
From: DJ B. <djb...@gm...> - 2012-11-05 00:22:29
|
Good question; I was wondering the same. DJ On Sun, Nov 4, 2012 at 11:07 AM, Marcelo <dev...@be...>wrote: > Hello, > > > > I've been using Asterisk-Java with Asterisk 1.6 for a long time, but I'd > like to update my Asterisk box to the recently launched version 11. I > downloaded the snapshot from 10/23 and I opened the AsteriskVersion file > and I just found references until version 1.8. > > > > Is there anyone using Asterisk-Java with version Asterisk version 11 ? > Does anyone know of any issues with that ? > > > > Thanks in advance, > > > > Marcelo > > > > ------------------------------------------------------------------------------ > LogMeIn Central: Instant, anywhere, Remote PC access and management. > Stay in control, update software, and manage PCs from one command center > Diagnose problems and improve visibility into emerging IT issues > Automate, monitor and manage. Do more in less time with Central > http://p.sf.net/sfu/logmein12331_d2d > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > -- |
From: Marcelo <dev...@be...> - 2012-11-04 17:07:07
|
Hello, I've been using Asterisk-Java with Asterisk 1.6 for a long time, but I'd like to update my Asterisk box to the recently launched version 11. I downloaded the snapshot from 10/23 and I opened the AsteriskVersion file and I just found references until version 1.8. Is there anyone using Asterisk-Java with version Asterisk version 11 ? Does anyone know of any issues with that ? Thanks in advance, Marcelo |
From: Daniele R. <dan...@gm...> - 2012-11-02 11:35:14
|
Hi yves, I don't think that my gui can be so general to be a project that can be shared. I wrote that gui specifically for my internal use. Is not a FreePbx system wrote in java :-) Ok for the "trial and error" pattern, but I was looking for someone who could tell me whether a diaplan written entirely in Java is more convenient than one written in Asterisk. Thanks very much Daniele 2012/11/1 Yves A. <yv...@gm...> > Hi, > > you will have most fun and experience using the "trial and error" > pattern... > and who knows... share your work on sourcefourge and maybe your jPBX will > be > the upcoming star in asterisk heaven... > > regards, > yves > > Am 01.11.2012 15:16, schrieb Daniele Renda: > > Hi guys, > I wrote a web application to manage my asterisk pbx. It manages many > aspect of a classic pbx; the application then write the dialplan of > asterisk in order to syncronize the changes made in the web application > with the Asterisk's dialplan. > > Now I'm wondering if it is the best solution or if is better implements > the logic of diaplan directly in Java. Maybe with fastagi or the ManagerApi > but it is no so clear for me how I can implements an whole diaplan in Java. > In addition, implementing the dialplan in Java there is the same expressive > power of Asterisk's dialplan? > > I hope some of you can give me an idea :-) > > Thanks very much > > -- > Daniele Renda > > > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today:http://p.sf.net/sfu/appdyn_sfd2d_oct > > > > _______________________________________________ > Asterisk-java-users mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > > > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today: > http://p.sf.net/sfu/appdyn_sfd2d_oct > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > -- Daniele Renda |
From: Yves A. <yv...@gm...> - 2012-11-01 17:45:29
|
Hi, you will have most fun and experience using the "trial and error" pattern... and who knows... share your work on sourcefourge and maybe your jPBX will be the upcoming star in asterisk heaven... regards, yves Am 01.11.2012 15:16, schrieb Daniele Renda: > Hi guys, > I wrote a web application to manage my asterisk pbx. It manages many > aspect of a classic pbx; the application then write the dialplan of > asterisk in order to syncronize the changes made in the web > application with the Asterisk's dialplan. > > Now I'm wondering if it is the best solution or if is better > implements the logic of diaplan directly in Java. Maybe with fastagi > or the ManagerApi but it is no so clear for me how I can implements an > whole diaplan in Java. In addition, implementing the dialplan in Java > there is the same expressive power of Asterisk's dialplan? > > I hope some of you can give me an idea :-) > > Thanks very much > > -- > Daniele Renda > > > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today: > http://p.sf.net/sfu/appdyn_sfd2d_oct > > > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users |
From: Daniele R. <dan...@gm...> - 2012-11-01 14:16:54
|
Hi guys, I wrote a web application to manage my asterisk pbx. It manages many aspect of a classic pbx; the application then write the dialplan of asterisk in order to syncronize the changes made in the web application with the Asterisk's dialplan. Now I'm wondering if it is the best solution or if is better implements the logic of diaplan directly in Java. Maybe with fastagi or the ManagerApi but it is no so clear for me how I can implements an whole diaplan in Java. In addition, implementing the dialplan in Java there is the same expressive power of Asterisk's dialplan? I hope some of you can give me an idea :-) Thanks very much -- Daniele Renda |
From: Elie D. <el...@gm...> - 2012-10-29 15:50:11
|
Hi, in SocketConnectionFacadeImpl, line 183 calls the close method on trace even though it might not be initialized. |
From: Yves A. <yv...@gm...> - 2012-10-15 23:10:30
|
could you post the source of your agi script? yves Am 16.10.2012 00:18, schrieb Jeryes .: > Hi All! > > I'm working with asterisk 1.6.3 and asterisk-java 1.0.0.M3, and I have > an implementation of BaseAgiScript, that connects to Asterisk with > AsyncAgiServer. After some calls, between 100 ou 200 , the agiscript > stops to receive the */service/* events, this error log is thrown instead: > > 16:19:33,040 ERROR (Asterisk-Java ManagerConnection-1-Reader-0) > [STDERR] 137706502 [Asterisk-Java ManagerConnection-1-Reader-0] WARN > org.asteriskjava.fastagi.AsyncAgiServer - Unable to execute > org.asteriskjava.fastagi.internal.AsyncAgiConnectionHandler > 16:19:33,040 ERROR (Asterisk-Java ManagerConnection-1-Reader-0) > [STDERR] java.util.concurrent.RejectedExecutionException > 16:19:33,041 ERROR (Asterisk-Java ManagerConnection-1-Reader-0) > [STDERR] at > java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:1768) > > 16:19:33,041 ERROR (Asterisk-Java ManagerConnection-1-Reader-0) > [STDERR] at > java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:767) > > 16:19:33,041 ERROR (Asterisk-Java ManagerConnection-1-Reader-0) > [STDERR] at > java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:658) > > 16:19:33,041 ERROR (Asterisk-Java ManagerConnection-1-Reader-0) > [STDERR] at > org.asteriskjava.fastagi.AbstractAgiServer.execute(AbstractAgiServer.java:137) > > 16:19:33,041 ERROR (Asterisk-Java ManagerConnection-1-Reader-0) > [STDERR] at > org.asteriskjava.fastagi.AsyncAgiServer.handleAsyncAgiEvent(AsyncAgiServer.java:89) > > 16:19:33,041 ERROR (Asterisk-Java ManagerConnection-1-Reader-0) > [STDERR] at > org.asteriskjava.fastagi.AsyncAgiServer.onManagerEvent(AsyncAgiServer.java:68) > > 16:19:33,041 ERROR (Asterisk-Java ManagerConnection-1-Reader-0) > [STDERR] at > org.asteriskjava.manager.internal.ManagerConnectionImpl.fireEvent(ManagerConnectionImpl.java:1245) > > 16:19:33,041 ERROR (Asterisk-Java ManagerConnection-1-Reader-0) > [STDERR] at > org.asteriskjava.manager.internal.ManagerConnectionImpl.dispatchEvent(ManagerConnectionImpl.java:1229) > > 16:19:33,042 ERROR (Asterisk-Java ManagerConnection-1-Reader-0) > [STDERR] at > org.asteriskjava.manager.internal.ManagerReaderImpl.run(ManagerReaderImpl.java:220) > > 16:19:33,042 ERROR (Asterisk-Java ManagerConnection-1-Reader-0) > [STDERR] at java.lang.Thread.run(Thread.java:619) > > > The pool size is 1000, configured on file fastagi.properties: > poolSize=1000 > > Can it be stuck threads, that should be released? Is there any way to > check how many threads of the pool are in use? > > Thanks in advance! > > Regards > Jeryes > > > > ------------------------------------------------------------------------------ > Don't let slow site performance ruin your business. Deploy New Relic APM > Deploy New Relic app performance management and know exactly > what is happening inside your Ruby, Python, PHP, Java, and .NET app > Try New Relic at no cost today and get our sweet Data Nerd shirt too! > http://p.sf.net/sfu/newrelic-dev2dev > > > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users |
From: Jeryes . <je...@vo...> - 2012-10-15 22:26:12
|
Hi All! I'm working with asterisk 1.6.3 and asterisk-java 1.0.0.M3, and I have an implementation of BaseAgiScript, that connects to Asterisk with AsyncAgiServer. After some calls, between 100 ou 200 , the agiscript stops to receive the *service* events, this error log is thrown instead: 16:19:33,040 ERROR (Asterisk-Java ManagerConnection-1-Reader-0) [STDERR] 137706502 [Asterisk-Java ManagerConnection-1-Reader-0] WARN org.asteriskjava.fastagi.AsyncAgiServer - Unable to execute org.asteriskjava.fastagi.internal.AsyncAgiConnectionHandler 16:19:33,040 ERROR (Asterisk-Java ManagerConnection-1-Reader-0) [STDERR] java.util.concurrent.RejectedExecutionException 16:19:33,041 ERROR (Asterisk-Java ManagerConnection-1-Reader-0) [STDERR] at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:1768) 16:19:33,041 ERROR (Asterisk-Java ManagerConnection-1-Reader-0) [STDERR] at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:767) 16:19:33,041 ERROR (Asterisk-Java ManagerConnection-1-Reader-0) [STDERR] at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:658) 16:19:33,041 ERROR (Asterisk-Java ManagerConnection-1-Reader-0) [STDERR] at org.asteriskjava.fastagi.AbstractAgiServer.execute(AbstractAgiServer.java:137) 16:19:33,041 ERROR (Asterisk-Java ManagerConnection-1-Reader-0) [STDERR] at org.asteriskjava.fastagi.AsyncAgiServer.handleAsyncAgiEvent(AsyncAgiServer.java:89) 16:19:33,041 ERROR (Asterisk-Java ManagerConnection-1-Reader-0) [STDERR] at org.asteriskjava.fastagi.AsyncAgiServer.onManagerEvent(AsyncAgiServer.java:68) 16:19:33,041 ERROR (Asterisk-Java ManagerConnection-1-Reader-0) [STDERR] at org.asteriskjava.manager.internal.ManagerConnectionImpl.fireEvent(ManagerConnectionImpl.java:1245) 16:19:33,041 ERROR (Asterisk-Java ManagerConnection-1-Reader-0) [STDERR] at org.asteriskjava.manager.internal.ManagerConnectionImpl.dispatchEvent(ManagerConnectionImpl.java:1229) 16:19:33,042 ERROR (Asterisk-Java ManagerConnection-1-Reader-0) [STDERR] at org.asteriskjava.manager.internal.ManagerReaderImpl.run(ManagerReaderImpl.java:220) 16:19:33,042 ERROR (Asterisk-Java ManagerConnection-1-Reader-0) [STDERR] at java.lang.Thread.run(Thread.java:619) The pool size is 1000, configured on file fastagi.properties: poolSize=1000 Can it be stuck threads, that should be released? Is there any way to check how many threads of the pool are in use? Thanks in advance! Regards Jeryes |
From: Martin B. S. <ma...@mb...> - 2012-10-02 05:33:23
|
Hi Sebastian, You likely need to use both the AGI and Manager interfaces in concert. Do whatever background/concurrent action you are talking about using the Manager API instead of AGI. You might also find the Live API useful. As others have stated, the AGI interface in Asterisk is channel based, so it likely won't support the kind of threading model you want. The best you will probably be able to do is pass messages or data to the AGI interface to the channel, which has the same limitations as what you've already tried, short of spawning additional channels and bridging them to the original. Hope this helps, Martin On Oct 1, 2012 5:13 PM, "Yves A." <yv...@gm...> wrote: > Hi, > > you simply can´t do more than one "action" with a channel at one time... > I dont know what you try to achieve, but maybe bridging more than one > channel could help you? describe your objective more precise... just being > verbose on the channel while streaming a file cant be the thing, you > really > need, i think... > > yves > > Am 01.10.2012 19:30, schrieb Sebastian Gutierrez: > > anyone? Stefan? > > the thing is here that if I try to start a thread passing parameters so > this new thread can make actions, the thread is never started until almost > the end of the service procedure. > > best regards > > > Begin forwarded message: > > *From: *Sebastian Gutierrez <sc...@gm...> > *Subject: **Multithreaded AGI script* > *Date: *September 25, 2012 2:51:52 PM GMT-03:00 > *To: *ast...@li... > > Hi, > > > I´m using AGI scripts for the first time, I have now my server with the > default AGI server and mapping via the Class Name, all that working ok. > > the thing is that I want to be able to make a monitor thread, that be able > to append some commands also to the AGI channel. > > > I put here an example, I want that while executing the streamFiles, the > system also executes on that channel the verbose log. > > is this possible??? > > this won´t work, the monitor apparently can't intervene in the AgiChannel. > > > > for example: > > THE SCRIPT CLASS: > > @Override > public void service(AgiRequest request, AgiChannel channel) throws > AgiException { > > // Answer the channel... > answer(); > > > Monitor r = new Monitor(channel,request); > new Thread(r).start(); > > // ...say hello... > streamFile("demo-nogo"); > > streamFile("tt-monkeysintro"); > streamFile("tt-weasels"); > streamFile("demo-nogo"); > > // ...and hangup. > hangup(); > } > > THE MONITOR CLASS > > public class Monitor implements Runnable { > > private AgiChannel chan; > private AgiRequest req; > > public Monitor(AgiChannel channel, AgiRequest request) { > > chan = channel; > req = request; > } > > > > @Override > public void run() { > while(true) > { > try { > chan.verbose("ASYNC TEST", 1); > Thread.sleep(1000); > > > } catch (Exception ex) { > Logger.getLogger(Monitor.class.getName()).log(Level.SEVERE, > null, ex); > } > > } > } > > > > > > ------------------------------------------------------------------------------ > Got visibility? > Most devs has no idea what their production app looks like. > Find out how fast your code is with AppDynamics Lite.http://ad.doubleclick.net/clk;262219671;13503038;y?http://info.appdynamics.com/FreeJavaPerformanceDownload.html > > > > _______________________________________________ > Asterisk-java-users mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > > > ------------------------------------------------------------------------------ > Got visibility? > Most devs has no idea what their production app looks like. > Find out how fast your code is with AppDynamics Lite. > http://ad.doubleclick.net/clk;262219671;13503038;y? > http://info.appdynamics.com/FreeJavaPerformanceDownload.html > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > |
From: Sebastian G. <sc...@gm...> - 2012-10-02 00:05:44
|
Hi, I want to make a dial and bee able to control from another thread some things of that call. one example: prepaid calling: 1 account for multiple phones, for each call I have to change the amount of money left on the account so every each X time I can make recalcules for all the calls and push an audio or hangup if needed…. I tried making macros, originating, and other kind of things to have a background channel that is for control with no success also. thanks best regards On Oct 1, 2012, at 6:13 PM, Yves A. <yv...@gm...> wrote: > Hi, > > you simply can´t do more than one "action" with a channel at one time... > I dont know what you try to achieve, but maybe bridging more than one > channel could help you? describe your objective more precise... just being > verbose on the channel while streaming a file cant be the thing, you really > need, i think... > > yves > > Am 01.10.2012 19:30, schrieb Sebastian Gutierrez: >>> anyone? Stefan? >>> >>> the thing is here that if I try to start a thread passing parameters so this new thread can make actions, the thread is never started until almost the end of the service procedure. >>> >>> best regards >>> >>> >>> Begin forwarded message: >>> >>>> From: Sebastian Gutierrez <sc...@gm...> >>>> Subject: Multithreaded AGI script >>>> Date: September 25, 2012 2:51:52 PM GMT-03:00 >>>> To: ast...@li... >>>> >>>> Hi, >>>> >>>> >>>> I´m using AGI scripts for the first time, I have now my server with the default AGI server and mapping via the Class Name, all that working ok. >>>> >>>> the thing is that I want to be able to make a monitor thread, that be able to append some commands also to the AGI channel. >>>> >>>> >>>> I put here an example, I want that while executing the streamFiles, the system also executes on that channel the verbose log. >>>> >>>> is this possible??? >>>> >>>> this won´t work, the monitor apparently can't intervene in the AgiChannel. >>>> >>>> >>>> >>>> for example: >>>> >>>> THE SCRIPT CLASS: >>>> >>>> @Override >>>> public void service(AgiRequest request, AgiChannel channel) throws AgiException { >>>> >>>> // Answer the channel... >>>> answer(); >>>> >>>> >>>> Monitor r = new Monitor(channel,request); >>>> new Thread(r).start(); >>>> >>>> // ...say hello... >>>> streamFile("demo-nogo"); >>>> >>>> streamFile("tt-monkeysintro"); >>>> >>>> streamFile("tt-weasels"); >>>> >>>> streamFile("demo-nogo"); >>>> >>>> // ...and hangup. >>>> hangup(); >>>> } >>>> >>>> THE MONITOR CLASS >>>> >>>> public class Monitor implements Runnable { >>>> >>>> private AgiChannel chan; >>>> private AgiRequest req; >>>> >>>> public Monitor(AgiChannel channel, AgiRequest request) { >>>> >>>> chan = channel; >>>> req = request; >>>> } >>>> >>>> >>>> >>>> @Override >>>> public void run() { >>>> while(true) >>>> { >>>> try { >>>> chan.verbose("ASYNC TEST", 1); >>>> Thread.sleep(1000); >>>> >>>> >>>> } catch (Exception ex) { >>>> Logger.getLogger(Monitor.class.getName()).log(Level.SEVERE, null, ex); >>>> } >>>> >>>> } >>>> } >>> >> >> >> >> ------------------------------------------------------------------------------ >> Got visibility? >> Most devs has no idea what their production app looks like. >> Find out how fast your code is with AppDynamics Lite. >> http://ad.doubleclick.net/clk;262219671;13503038;y? >> http://info.appdynamics.com/FreeJavaPerformanceDownload.html >> >> >> _______________________________________________ >> Asterisk-java-users mailing list >> Ast...@li... >> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > ------------------------------------------------------------------------------ > Got visibility? > Most devs has no idea what their production app looks like. > Find out how fast your code is with AppDynamics Lite. > http://ad.doubleclick.net/clk;262219671;13503038;y? > http://info.appdynamics.com/FreeJavaPerformanceDownload.html_______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users |
From: Yves A. <yv...@gm...> - 2012-10-01 21:13:27
|
Hi, you simply can´t do more than one "action" with a channel at one time... I dont know what you try to achieve, but maybe bridging more than one channel could help you? describe your objective more precise... just being verbose on the channel while streaming a file cant be the thing, you really need, i think... yves Am 01.10.2012 19:30, schrieb Sebastian Gutierrez: >> anyone? Stefan? >> >> the thing is here that if I try to start a thread passing parameters >> so this new thread can make actions, the thread is never started >> until almost the end of the service procedure. >> >> best regards >> >> >> Begin forwarded message: >> >>> *From: *Sebastian Gutierrez <sc...@gm... <mailto:sc...@gm...>> >>> *Subject: **Multithreaded AGI script* >>> *Date: *September 25, 2012 2:51:52 PM GMT-03:00 >>> *To: *ast...@li... >>> <mailto:ast...@li...> >>> >>> Hi, >>> >>> >>> I´m using AGI scripts for the first time, I have now my server with >>> the default AGI server and mapping via the Class Name, all that >>> working ok. >>> >>> the thing is that I want to be able to make a monitor thread, that >>> be able to append some commands also to the AGI channel. >>> >>> >>> I put here an example, I want that while executing the streamFiles, >>> the system also executes on that channel the verbose log. >>> >>> is this possible??? >>> >>> this won´t work, the monitor apparently can't intervene in the >>> AgiChannel. >>> >>> >>> >>> for example: >>> >>> THE SCRIPT CLASS: >>> >>> @Override >>> public void service(AgiRequest request, AgiChannel channel) >>> throws AgiException { >>> >>> // Answer the channel... >>> answer(); >>> >>> >>> Monitor r = new Monitor(channel,request); >>> new Thread(r).start(); >>> >>> // ...say hello... >>> streamFile("demo-nogo"); >>> >>> streamFile("tt-monkeysintro"); >>> streamFile("tt-weasels"); >>> streamFile("demo-nogo"); >>> >>> // ...and hangup. >>> hangup(); >>> } >>> >>> THE MONITOR CLASS >>> >>> public class Monitor implements Runnable { >>> >>> private AgiChannel chan; >>> private AgiRequest req; >>> >>> public Monitor(AgiChannel channel, AgiRequest request) { >>> >>> chan = channel; >>> req = request; >>> } >>> >>> >>> >>> @Override >>> public void run() { >>> while(true) >>> { >>> try { >>> chan.verbose("ASYNC TEST", 1); >>> Thread.sleep(1000); >>> >>> >>> } catch (Exception ex) { >>> Logger.getLogger(Monitor.class.getName()).log(Level.SEVERE, >>> null, ex); >>> } >>> >>> } >>> } >> > > > > ------------------------------------------------------------------------------ > Got visibility? > Most devs has no idea what their production app looks like. > Find out how fast your code is with AppDynamics Lite. > http://ad.doubleclick.net/clk;262219671;13503038;y? > http://info.appdynamics.com/FreeJavaPerformanceDownload.html > > > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users |
From: Sebastian G. <sc...@gm...> - 2012-10-01 17:30:36
|
> anyone? Stefan? > > the thing is here that if I try to start a thread passing parameters so this new thread can make actions, the thread is never started until almost the end of the service procedure. > > best regards > > > Begin forwarded message: > >> From: Sebastian Gutierrez <sc...@gm...> >> Subject: Multithreaded AGI script >> Date: September 25, 2012 2:51:52 PM GMT-03:00 >> To: ast...@li... >> >> Hi, >> >> >> I´m using AGI scripts for the first time, I have now my server with the default AGI server and mapping via the Class Name, all that working ok. >> >> the thing is that I want to be able to make a monitor thread, that be able to append some commands also to the AGI channel. >> >> >> I put here an example, I want that while executing the streamFiles, the system also executes on that channel the verbose log. >> >> is this possible??? >> >> this won´t work, the monitor apparently can't intervene in the AgiChannel. >> >> >> >> for example: >> >> THE SCRIPT CLASS: >> >> @Override >> public void service(AgiRequest request, AgiChannel channel) throws AgiException { >> >> // Answer the channel... >> answer(); >> >> >> Monitor r = new Monitor(channel,request); >> new Thread(r).start(); >> >> // ...say hello... >> streamFile("demo-nogo"); >> >> streamFile("tt-monkeysintro"); >> streamFile("tt-weasels"); >> streamFile("demo-nogo"); >> >> // ...and hangup. >> hangup(); >> } >> >> THE MONITOR CLASS >> >> public class Monitor implements Runnable { >> >> private AgiChannel chan; >> private AgiRequest req; >> >> public Monitor(AgiChannel channel, AgiRequest request) { >> >> chan = channel; >> req = request; >> } >> >> >> >> @Override >> public void run() { >> while(true) >> { >> try { >> chan.verbose("ASYNC TEST", 1); >> Thread.sleep(1000); >> >> >> } catch (Exception ex) { >> Logger.getLogger(Monitor.class.getName()).log(Level.SEVERE, null, ex); >> } >> >> } >> } > |
From: Mordechay K. <mka...@gm...> - 2012-09-28 07:11:40
|
B.H. Hi, folks While passively listening to Manager events, i sometimes get the following exceptions: java.lang.ClassCastException: java.util.ArrayList cannot be cast to java.lang.String at org.asteriskjava.manager.internal.ResponseBuilderImpl.buildResponse(ResponseBuilderImpl.java:43) at org.asteriskjava.manager.internal.ManagerReaderImpl.buildResponse(ManagerReaderImpl.java:334) at org.asteriskjava.manager.internal.ManagerReaderImpl.run(ManagerReaderImpl.java:236) Using Asterisk-Java 1.0.0 connected to Asterisk 1.8 and Asterisk 1.4 servers. ----- Moshiach is coming very soon, prepare yourself! יחי אדוננו מורינו ורבינו מלך המשיח לעולם ועד! |
From: Sebastian G. <sc...@gm...> - 2012-09-25 17:52:03
|
Hi, I´m using AGI scripts for the first time, I have now my server with the default AGI server and mapping via the Class Name, all that working ok. the thing is that I want to be able to make a monitor thread, that be able to append some commands also to the AGI channel. I put here an example, I want that while executing the streamFiles, the system also executes on that channel the verbose log. is this possible??? this won´t work, the monitor apparently can't intervene in the AgiChannel. for example: THE SCRIPT CLASS: @Override public void service(AgiRequest request, AgiChannel channel) throws AgiException { // Answer the channel... answer(); Monitor r = new Monitor(channel,request); new Thread(r).start(); // ...say hello... streamFile("demo-nogo"); streamFile("tt-monkeysintro"); streamFile("tt-weasels"); streamFile("demo-nogo"); // ...and hangup. hangup(); } THE MONITOR CLASS public class Monitor implements Runnable { private AgiChannel chan; private AgiRequest req; public Monitor(AgiChannel channel, AgiRequest request) { chan = channel; req = request; } @Override public void run() { while(true) { try { chan.verbose("ASYNC TEST", 1); Thread.sleep(1000); } catch (Exception ex) { Logger.getLogger(Monitor.class.getName()).log(Level.SEVERE, null, ex); } } } |
From: Patrick A. <pat...@gm...> - 2012-09-24 00:11:57
|
Hi, I am going to go with the following solution. I'll just store the failed IP addresses in a map and originate the call. All the logic will be in the dialplan. Here is my mock extensions.conf: [phones] exten => 1000,1,Dial(SIP/1000) exten => 1000,n,Hangup() exten => 1001,1,Dial(SIP/1001) exten => 1001,n,Hangup() exten => 1002,1,Dial(SIP/1002) exten => 1002,n,Hangup() [wanmonitor] exten => s,1,Answer() same => n,Wait(1) same => n,Background(ThisIsTheWanMonitorIvr) same => n,SayNumber(${nonResponders}) same => n,Background(OutOf) same => n,SayNumber(${monitoredDevices}) same => n,Background(IpDevicesNotResponding) same => n(PressOneToList),Background(PressOneToList) same => n,WaitExten(7) same => n,Goto(wanMonitorByeBye,1) exten => 1,1,Set(X=1) same => n,Verbose(1,IP Addresses is: ${ipAddresses}) same => n,Set(ip=${CUT(ipAddresses,-,${X})}) same => n,Verbose(1,IP is: ${ip}) same => n,While($[${EXISTS(${ip})}]) same => n,Background(${ip}) same => n,Set(Y=1) same => n,Set(part=${CUT(ip,.,${Y})}) same => n,Verbose(1,Part is: ${part$}) same => n,While($[${EXISTS(${part})}]) same => n,SayNumber(${part}) same => n,Set(Y=${INC(Y)}) same => n,Set(part=${CUT(ip,.,${Y})}) same => n,EndWhile() same => n,Set(X=${INC(X)}) same => n,Set(ip=${CUT(ipAddresses,-,${X})}) same => n,EndWhile() same => n,Goto(wanmonitor,s,PressOneToList) exten => 2,1,Playback(AllFailuresAcknowledged) same => n,Goto(wanMonitorPost,1) exten => 3,1,Playback(KeyTheNumberOfHoursToSuspendMonitoring) same => n,Read(hoursKeyed,,2) same => n,Verbose(1,Hours keyed by user: ${hoursKeyed}) same => n,Playback(AllFailuresAcknowledged) same => n,Playback(AndSuspendedFor) same => n,ExecIf($[${hoursKeyed} = 0]?Playback(ZeroHours)) same => n,ExecIf($[${hoursKeyed} = 1]?Playback(OneHour)) same => n,ExecIf($[${hoursKeyed} > 1]?SayNumber(${hoursKeyed})) same => n,ExecIf($[${hoursKeyed} > 1]?Playback(Hours)) same => n,Goto(wanMonitorPost,1) exten => i,1,Playback(InvalidSelection) same => n,Goto(wanmonitor,s,1) exten => t,1,Goto(wanMonitorByeBye,1) exten => wanMonitorByeBye,1,Verbose(1,WAN monitor playing bye bye and hanging up) same => n,Playback(ByeBye) same => n,Wait(1) same => n,Hangup() exten => wanMonitorPost,1,Verbose(1,WAN monitor posting result) same => n,Set(response=${CURL(http://pla1.net/SnoopServlet?phoneNumber=${phoneNumber}&hours=${hoursKeyed})}) same => n,Goto(wanMonitorByeBye,1) Here is the Java source: package com.pla.ivr; import java.io.IOException; import java.util.Date; import java.util.HashMap; import java.util.Map; import org.asteriskjava.manager.AuthenticationFailedException; import org.asteriskjava.manager.ManagerConnection; import org.asteriskjava.manager.ManagerConnectionFactory; import org.asteriskjava.manager.TimeoutException; import org.asteriskjava.manager.action.OriginateAction; import org.asteriskjava.manager.response.ManagerResponse; public class HelloManager { private ManagerConnection managerConnection; public HelloManager() throws IOException { ManagerConnectionFactory factory = new ManagerConnectionFactory("ub-asterisk", "managerusername", "managerpassword"); this.managerConnection = factory.createManagerConnection(); } public void run() throws IOException, AuthenticationFailedException, TimeoutException { OriginateAction originateAction; originateAction = new OriginateAction(); originateAction.setChannel("SIP/1001"); originateAction.setContext("wanmonitor"); originateAction.setPriority(new Integer(1)); originateAction.setTimeout(new Long(30000)); Map<String, String> variables = new HashMap<String, String>(); variables.put("ipAddresses", "10.1.0.138-10.1.0.185-10.1.0.248"); variables.put("monitoredDevices", "120"); variables.put("nonResponders", "3"); variables.put("phoneNumber", "8005551212"); originateAction.setVariables(variables); managerConnection.login(); ManagerResponse response = managerConnection.sendAction(originateAction, 30000); System.out.println("Response: " + response.getResponse()); managerConnection.logoff(); } public static void main(String[] args) throws Exception { System.out.println("Start " + new Date()); HelloManager helloManager; helloManager = new HelloManager(); helloManager.run(); } } Rock on, PLA Patrick L Archibald http://PatrickArchibald.com On Sun, Sep 23, 2012 at 12:22 AM, Patrick Archibald <pat...@gm...> wrote: > Hi, > > I am hoping to replace an AS/400 IVR application with the Asterisk > Manager API. The application is a WAN monitor. When an IP device fails > the IVR calls the administrator of the device. Each administrator can > have up to 4 phone numbers. Each device has a primary, secondary, and > third administrator. The IVR app rotates through the administrators > and their phone numbers until someone responds. > > I understand that the OriginateAction can connect to an extension or > an application. I have successfully called extension 1000 and played > back a recording the the following bit of code. > > OriginateAction originateAction = new OriginateAction(); > originateAction.setChannel("SIP/1000"); > originateAction.setApplication("Playback"); > originateAction.setData("Press1ToListPress2ToAckAllPress3ToAckForAnHourOrMore"); > managerConnection.login(); > ManagerResponse response = managerConnection.sendAction(originateAction); > > How can I retrieve the digit entered by the callee and play back the > next recording based on that input? How can I interact with the > callee? > > Thanks in advance! > > Rock on, PLA > > Patrick L Archibald > http://PatrickArchibald.com |
From: Patrick A. <pat...@gm...> - 2012-09-23 04:22:49
|
Hi, I am hoping to replace an AS/400 IVR application with the Asterisk Manager API. The application is a WAN monitor. When an IP device fails the IVR calls the administrator of the device. Each administrator can have up to 4 phone numbers. Each device has a primary, secondary, and third administrator. The IVR app rotates through the administrators and their phone numbers until someone responds. I understand that the OriginateAction can connect to an extension or an application. I have successfully called extension 1000 and played back a recording the the following bit of code. OriginateAction originateAction = new OriginateAction(); originateAction.setChannel("SIP/1000"); originateAction.setApplication("Playback"); originateAction.setData("Press1ToListPress2ToAckAllPress3ToAckForAnHourOrMore"); managerConnection.login(); ManagerResponse response = managerConnection.sendAction(originateAction); How can I retrieve the digit entered by the callee and play back the next recording based on that input? How can I interact with the callee? Thanks in advance! Rock on, PLA Patrick L Archibald http://PatrickArchibald.com |
From: Hernan P. <her...@mi...> - 2012-08-31 18:29:13
|
Hi, First, thank you for making this library available. I am trying to run the javascript examples without success. Here are the steps I followed: 1. I placed the following files inside a directory: asterisk-java.jar demo.js ExampleCallIn.class ExampleCallIn.java fastagi-mapping.properties groovy-all-1.6.2.jar javamail-141.jar jruby-complete-1.2.0.jar mysql-connector-java-5.1.7-bin.jar quercus-3.2.1.jar resin-util-3.2.1.jar servlet-api-2.5.jar 2. I started the fastagi server: $ java -cp asterisk-java.jar org.asteriskjava.fastagi.DefaultAgiServer Aug 31, 2012 12:50:25 PM org.asteriskjava.fastagi.DefaultAgiServer startup INFO: Listening on *:4573. 3. I created extension 200 on Asterisk: exten => 200,1,Answer() same => n,Agi(agi://localhost/demo.js) same => n,Hangup() 4. I call the extension and get the following error: SEVERE: No script configured for URL 'agi://192.168.0.199/demo.js' (script 'demo.js') Do I need to create a custom AgiServer that loads the javascrip? Or is this already included and I need to give java some different paths to find the required classes/libraries? I am certainly missing something basic here. Could you please help me spot the problem? Thanks a lot. Hernan Palombo |
From: Shitian L. <lon...@gm...> - 2012-08-28 19:02:41
|
I recommend you using java properties class. On 2012-08-22 17:00, Nweike Onwuyali wrote: > hello, > I am a newbie in Asterisk and Asterisk-java. I need to build an asterisk application and want to build a custom gui. What is the most effective way to generate the configuration files using java? > > Cheers > > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users |
From: Nweike O. <nwe...@gm...> - 2012-08-22 15:01:00
|
hello, I am a newbie in Asterisk and Asterisk-java. I need to build an asterisk application and want to build a custom gui. What is the most effective way to generate the configuration files using java? Cheers |
From: Kaan Ç. <cal...@gm...> - 2012-07-25 06:18:59
|
Hi Everyone, Is there any configuration with jar files of jtapi on server side? Namely should i put this jars to any directory or path? Best regards. |
From: Mateusz K. <by...@gm...> - 2012-07-17 14:22:02
|
I forgot to add that fastagi mapping file also must be on classpath so you can just put it in the jar (top level) or in the same directory as the jar but then you may need to add "." to -cp parameter. 2012/7/17 Mateusz Kulpa <by...@gm...> > Probably you can also have them both in seperate jars and just add them in > the -cp parameter. > > 2012/7/17 Mateusz Kulpa <by...@gm...> > >> Hello Shanavaz, >> >> This is how I run asterisk-java FastAGI server using jar files: >> >> I have asterisk-java-VERSION.jar unpacked in my agiScripts.jar file (in >> my case it's done automatically by maven). Then from directory containing >> this jar file I run following command: >> java -cp agiScripts.jar org.asteriskjava.fastagi.DefaultAgiServer >> >> I am not sure if it's the best practice but thats what I do and it fits >> my solution perfectly. >> >> Hope it helps. >> >> >> 2012/7/17 Shanavaz E A <sha...@ya...> >> >>> yes, i configured the fastagi mapping file as : >>> hello.agi = com.mysite.mypackagename.MyClassFileName >>> >>> Also while building jar file, the main class also specified in the >>> manifest. >>> >>> >>> >>> --- On *Tue, 7/17/12, Albert Bonomo <ape...@gm...>* wrote: >>> >>> >>> From: Albert Bonomo <ape...@gm...> >>> Subject: Re: [Asterisk-java-users] Run a jar file >>> To: ast...@li... >>> Date: Tuesday, July 17, 2012, 7:07 PM >>> >>> >>> java-asterisk can not find your Main.class in your jar file. >>> Have you tried to configure the map file using the complete calss name ? >>> something like com.yourdomain.yourproject.somepacckage.yourcalss ? >>> >>> I don't remember now how to configure asterisk-java. Once I learned how >>> to do it "inside" >>> my ear project, I dropped asterisk-java and stooped using it. >>> >>> The problem to solve is how to tel asterisk-java where is your Main.call >>> in your .jar project. >>> >>> >>> 2012/7/17 Shanavaz E A <sha...@ya...<http://us.mc1601.mail.yahoo.com/mc/compose?to=sha...@ya...> >>> > >>> >>> When i run single class script, I am first starting asterisk-java >>> using the command : >>> java -jar asterisk-java.jar >>> >>> Then I am putting the class file in the same folder and its working. >>> Then I replace the class file with the jar file and also update the mapping >>> file. Then stop the asterisk-java process and starts it again. This is the >>> scenario i use to test. But in this case its not calling the main class in >>> the jar file. Any clue ? >>> >>> >>> >>> --- On *Tue, 7/17/12, Albert Bonomo <ape...@gm...<http://us.mc1601.mail.yahoo.com/mc/compose?to=ape...@gm...> >>> >* wrote: >>> >>> >>> From: Albert Bonomo <ape...@gm...<http://us.mc1601.mail.yahoo.com/mc/compose?to=ape...@gm...> >>> > >>> Subject: Re: [Asterisk-java-users] Run a jar file >>> To: ast...@li...<http://us.mc1601.mail.yahoo.com/mc/compose?to=ast...@li...> >>> Date: Tuesday, July 17, 2012, 6:53 PM >>> >>> >>> When you use your single class script, there must be some service >>> running listening at port 4573. >>> Probably you have run asterisk-java and left it running before your AGI >>> script runs. >>> asterisk-java reads the mapping file and takes care of everything. >>> >>> When you are working with jar project, your project must listen on this >>> port to get and manage >>> events and AGI script calls. >>> >>> There are many examples of ear projects with NetBeans on the internet. >>> >>> 2012/7/17 Shanavaz E A <sha...@ya...<http://us.mc1601.mail.yahoo.com/mc/compose?to=sha...@ya...> >>> > >>> >>> Dear friends, >>> >>> I have successfully installed asterisk-java, and I am able to run agi >>> scripts using that. I am running asterisk-java and I have put a single >>> class file in the folder and mapped as >>> hello.agi = MyClassFileName >>> and this is working. >>> >>> Now I have added few more class files and used package naming and build >>> a single jar file for this package. I use netbeans to build the proect and >>> the jar file. >>> I have now added mapping as >>> hello.agi = com.mysite.mypackagename.MyClassFileName >>> But this is not working. I am getting this error : >>> agi://127.0.0.1/hello.agi: No script configured for URL 'agi:// >>> 127.0.0.1/hello.agi' >>> >>> Can somebody please help & guide me to configure properly. >>> >>> Thanks in advance. >>> >>> >>> >>> ------------------------------------------------------------------------------ >>> Live Security Virtual Conference >>> Exclusive live event will cover all the ways today's security and >>> threat landscape has changed and how IT managers can respond. Discussions >>> will include endpoint security, mobile security and the latest in malware >>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>> _______________________________________________ >>> Asterisk-java-users mailing list >>> Ast...@li...<http://us.mc1601.mail.yahoo.com/mc/compose?to=Ast...@li...> >>> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >>> >>> >>> >>> >>> -- >>> (@_@) >>> >>> There are only 10 types of people in the world: >>> Those who understand binary and those who don't >>> >>> @apetob at Twitter >>> >>> >>> -----Inline Attachment Follows----- >>> >>> >>> >>> ------------------------------------------------------------------------------ >>> Live Security Virtual Conference >>> Exclusive live event will cover all the ways today's security and >>> threat landscape has changed and how IT managers can respond. >>> Discussions >>> will include endpoint security, mobile security and the latest in >>> malware >>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>> >>> -----Inline Attachment Follows----- >>> >>> >>> _______________________________________________ >>> Asterisk-java-users mailing list >>> Ast...@li...<http://us.mc1601.mail.yahoo.com/mc/compose?to=Ast...@li...> >>> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >>> >>> >>> >>> ------------------------------------------------------------------------------ >>> Live Security Virtual Conference >>> Exclusive live event will cover all the ways today's security and >>> threat landscape has changed and how IT managers can respond. Discussions >>> will include endpoint security, mobile security and the latest in malware >>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>> _______________________________________________ >>> Asterisk-java-users mailing list >>> Ast...@li...<http://us.mc1601.mail.yahoo.com/mc/compose?to=Ast...@li...> >>> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >>> >>> >>> >>> >>> -- >>> (@_@) >>> >>> There are only 10 types of people in the world: >>> Those who understand binary and those who don't >>> >>> @apetob at Twitter >>> >>> >>> -----Inline Attachment Follows----- >>> >>> >>> ------------------------------------------------------------------------------ >>> Live Security Virtual Conference >>> Exclusive live event will cover all the ways today's security and >>> threat landscape has changed and how IT managers can respond. >>> Discussions >>> will include endpoint security, mobile security and the latest in >>> malware >>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>> >>> -----Inline Attachment Follows----- >>> >>> _______________________________________________ >>> Asterisk-java-users mailing list >>> Ast...@li...<http://us.mc1601.mail.yahoo.com/mc/compose?to=Ast...@li...> >>> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >>> >>> >>> >>> ------------------------------------------------------------------------------ >>> Live Security Virtual Conference >>> Exclusive live event will cover all the ways today's security and >>> threat landscape has changed and how IT managers can respond. Discussions >>> will include endpoint security, mobile security and the latest in malware >>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>> _______________________________________________ >>> Asterisk-java-users mailing list >>> Ast...@li... >>> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >>> >>> >> > |
From: Mateusz K. <by...@gm...> - 2012-07-17 14:01:51
|
Probably you can also have them both in seperate jars and just add them in the -cp parameter. 2012/7/17 Mateusz Kulpa <by...@gm...> > Hello Shanavaz, > > This is how I run asterisk-java FastAGI server using jar files: > > I have asterisk-java-VERSION.jar unpacked in my agiScripts.jar file (in my > case it's done automatically by maven). Then from directory containing this > jar file I run following command: > java -cp agiScripts.jar org.asteriskjava.fastagi.DefaultAgiServer > > I am not sure if it's the best practice but thats what I do and it fits my > solution perfectly. > > Hope it helps. > > > 2012/7/17 Shanavaz E A <sha...@ya...> > >> yes, i configured the fastagi mapping file as : >> hello.agi = com.mysite.mypackagename.MyClassFileName >> >> Also while building jar file, the main class also specified in the >> manifest. >> >> >> >> --- On *Tue, 7/17/12, Albert Bonomo <ape...@gm...>* wrote: >> >> >> From: Albert Bonomo <ape...@gm...> >> Subject: Re: [Asterisk-java-users] Run a jar file >> To: ast...@li... >> Date: Tuesday, July 17, 2012, 7:07 PM >> >> >> java-asterisk can not find your Main.class in your jar file. >> Have you tried to configure the map file using the complete calss name ? >> something like com.yourdomain.yourproject.somepacckage.yourcalss ? >> >> I don't remember now how to configure asterisk-java. Once I learned how >> to do it "inside" >> my ear project, I dropped asterisk-java and stooped using it. >> >> The problem to solve is how to tel asterisk-java where is your Main.call >> in your .jar project. >> >> >> 2012/7/17 Shanavaz E A <sha...@ya...<http://us.mc1601.mail.yahoo.com/mc/compose?to=sha...@ya...> >> > >> >> When i run single class script, I am first starting asterisk-java >> using the command : >> java -jar asterisk-java.jar >> >> Then I am putting the class file in the same folder and its working. Then >> I replace the class file with the jar file and also update the mapping >> file. Then stop the asterisk-java process and starts it again. This is the >> scenario i use to test. But in this case its not calling the main class in >> the jar file. Any clue ? >> >> >> >> --- On *Tue, 7/17/12, Albert Bonomo <ape...@gm...<http://us.mc1601.mail.yahoo.com/mc/compose?to=ape...@gm...> >> >* wrote: >> >> >> From: Albert Bonomo <ape...@gm...<http://us.mc1601.mail.yahoo.com/mc/compose?to=ape...@gm...> >> > >> Subject: Re: [Asterisk-java-users] Run a jar file >> To: ast...@li...<http://us.mc1601.mail.yahoo.com/mc/compose?to=ast...@li...> >> Date: Tuesday, July 17, 2012, 6:53 PM >> >> >> When you use your single class script, there must be some service running >> listening at port 4573. >> Probably you have run asterisk-java and left it running before your AGI >> script runs. >> asterisk-java reads the mapping file and takes care of everything. >> >> When you are working with jar project, your project must listen on this >> port to get and manage >> events and AGI script calls. >> >> There are many examples of ear projects with NetBeans on the internet. >> >> 2012/7/17 Shanavaz E A <sha...@ya...<http://us.mc1601.mail.yahoo.com/mc/compose?to=sha...@ya...> >> > >> >> Dear friends, >> >> I have successfully installed asterisk-java, and I am able to run agi >> scripts using that. I am running asterisk-java and I have put a single >> class file in the folder and mapped as >> hello.agi = MyClassFileName >> and this is working. >> >> Now I have added few more class files and used package naming and build a >> single jar file for this package. I use netbeans to build the proect and >> the jar file. >> I have now added mapping as >> hello.agi = com.mysite.mypackagename.MyClassFileName >> But this is not working. I am getting this error : >> agi://127.0.0.1/hello.agi: No script configured for URL 'agi:// >> 127.0.0.1/hello.agi' >> >> Can somebody please help & guide me to configure properly. >> >> Thanks in advance. >> >> >> >> ------------------------------------------------------------------------------ >> Live Security Virtual Conference >> Exclusive live event will cover all the ways today's security and >> threat landscape has changed and how IT managers can respond. Discussions >> will include endpoint security, mobile security and the latest in malware >> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >> _______________________________________________ >> Asterisk-java-users mailing list >> Ast...@li...<http://us.mc1601.mail.yahoo.com/mc/compose?to=Ast...@li...> >> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >> >> >> >> >> -- >> (@_@) >> >> There are only 10 types of people in the world: >> Those who understand binary and those who don't >> >> @apetob at Twitter >> >> >> -----Inline Attachment Follows----- >> >> >> >> ------------------------------------------------------------------------------ >> Live Security Virtual Conference >> Exclusive live event will cover all the ways today's security and >> threat landscape has changed and how IT managers can respond. Discussions >> will include endpoint security, mobile security and the latest in malware >> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >> >> -----Inline Attachment Follows----- >> >> >> _______________________________________________ >> Asterisk-java-users mailing list >> Ast...@li...<http://us.mc1601.mail.yahoo.com/mc/compose?to=Ast...@li...> >> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >> >> >> >> ------------------------------------------------------------------------------ >> Live Security Virtual Conference >> Exclusive live event will cover all the ways today's security and >> threat landscape has changed and how IT managers can respond. Discussions >> will include endpoint security, mobile security and the latest in malware >> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >> _______________________________________________ >> Asterisk-java-users mailing list >> Ast...@li...<http://us.mc1601.mail.yahoo.com/mc/compose?to=Ast...@li...> >> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >> >> >> >> >> -- >> (@_@) >> >> There are only 10 types of people in the world: >> Those who understand binary and those who don't >> >> @apetob at Twitter >> >> >> -----Inline Attachment Follows----- >> >> >> ------------------------------------------------------------------------------ >> Live Security Virtual Conference >> Exclusive live event will cover all the ways today's security and >> threat landscape has changed and how IT managers can respond. Discussions >> will include endpoint security, mobile security and the latest in malware >> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >> >> -----Inline Attachment Follows----- >> >> _______________________________________________ >> Asterisk-java-users mailing list >> Ast...@li...<http://us.mc1601.mail.yahoo.com/mc/compose?to=Ast...@li...> >> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >> >> >> >> ------------------------------------------------------------------------------ >> Live Security Virtual Conference >> Exclusive live event will cover all the ways today's security and >> threat landscape has changed and how IT managers can respond. Discussions >> will include endpoint security, mobile security and the latest in malware >> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >> _______________________________________________ >> Asterisk-java-users mailing list >> Ast...@li... >> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >> >> > |
From: Albert B. <ape...@gm...> - 2012-07-17 14:01:19
|
Sorry, I can't help you there.... But I would drop mapping files and start with a listeners inside the project. here you have the first tutorial I read. http://www.asterisk-java.org/development/tutorial.html Start with the classic map file and takes you all the way to Manager and Events. 2012/7/17 Shanavaz E A <sha...@ya...> > yes, i configured the fastagi mapping file as : > hello.agi = com.mysite.mypackagename.MyClassFileName > > Also while building jar file, the main class also specified in the > manifest. > > > > --- On *Tue, 7/17/12, Albert Bonomo <ape...@gm...>* wrote: > > > From: Albert Bonomo <ape...@gm...> > Subject: Re: [Asterisk-java-users] Run a jar file > To: ast...@li... > Date: Tuesday, July 17, 2012, 7:07 PM > > > java-asterisk can not find your Main.class in your jar file. > Have you tried to configure the map file using the complete calss name ? > something like com.yourdomain.yourproject.somepacckage.yourcalss ? > > I don't remember now how to configure asterisk-java. Once I learned how to > do it "inside" > my ear project, I dropped asterisk-java and stooped using it. > > The problem to solve is how to tel asterisk-java where is your Main.call > in your .jar project. > > > 2012/7/17 Shanavaz E A <sha...@ya...<http://us.mc1601.mail.yahoo.com/mc/compose?to=sha...@ya...> > > > > When i run single class script, I am first starting asterisk-java using > the command : > java -jar asterisk-java.jar > > Then I am putting the class file in the same folder and its working. Then > I replace the class file with the jar file and also update the mapping > file. Then stop the asterisk-java process and starts it again. This is the > scenario i use to test. But in this case its not calling the main class in > the jar file. Any clue ? > > > > --- On *Tue, 7/17/12, Albert Bonomo <ape...@gm...<http://us.mc1601.mail.yahoo.com/mc/compose?to=ape...@gm...> > >* wrote: > > > From: Albert Bonomo <ape...@gm...<http://us.mc1601.mail.yahoo.com/mc/compose?to=ape...@gm...> > > > Subject: Re: [Asterisk-java-users] Run a jar file > To: ast...@li...<http://us.mc1601.mail.yahoo.com/mc/compose?to=ast...@li...> > Date: Tuesday, July 17, 2012, 6:53 PM > > > When you use your single class script, there must be some service running > listening at port 4573. > Probably you have run asterisk-java and left it running before your AGI > script runs. > asterisk-java reads the mapping file and takes care of everything. > > When you are working with jar project, your project must listen on this > port to get and manage > events and AGI script calls. > > There are many examples of ear projects with NetBeans on the internet. > > 2012/7/17 Shanavaz E A <sha...@ya...<http://us.mc1601.mail.yahoo.com/mc/compose?to=sha...@ya...> > > > > Dear friends, > > I have successfully installed asterisk-java, and I am able to run agi > scripts using that. I am running asterisk-java and I have put a single > class file in the folder and mapped as > hello.agi = MyClassFileName > and this is working. > > Now I have added few more class files and used package naming and build a > single jar file for this package. I use netbeans to build the proect and > the jar file. > I have now added mapping as > hello.agi = com.mysite.mypackagename.MyClassFileName > But this is not working. I am getting this error : > agi://127.0.0.1/hello.agi: No script configured for URL 'agi:// > 127.0.0.1/hello.agi' > > Can somebody please help & guide me to configure properly. > > Thanks in advance. > > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li...<http://us.mc1601.mail.yahoo.com/mc/compose?to=Ast...@li...> > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > > > -- > (@_@) > > There are only 10 types of people in the world: > Those who understand binary and those who don't > > @apetob at Twitter > > > -----Inline Attachment Follows----- > > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > > -----Inline Attachment Follows----- > > > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li...<http://us.mc1601.mail.yahoo.com/mc/compose?to=Ast...@li...> > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li...<http://us.mc1601.mail.yahoo.com/mc/compose?to=Ast...@li...> > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > > > -- > (@_@) > > There are only 10 types of people in the world: > Those who understand binary and those who don't > > @apetob at Twitter > > > -----Inline Attachment Follows----- > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > > -----Inline Attachment Follows----- > > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li...<http://us.mc1601.mail.yahoo.com/mc/compose?to=Ast...@li...> > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > -- (@_@) There are only 10 types of people in the world: Those who understand binary and those who don't @apetob at Twitter |