asterisk-java-users Mailing List for Asterisk-Java Library (Page 120)
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: itgasterisk <ast...@iv...> - 2008-02-25 22:01:15
|
Hello everyone, I have agi server running that will load different classes based on the fastagi-mapping file. But i need the server to reload the changes made to the fastagi-mapping file without shutting down the agi server. Any ideas of how i can accomplish this? thanks Eric |
From: Gopal k. <sa...@gm...> - 2008-02-22 14:04:53
|
Hi, I too trying to make a operator panel, i can able to capture the channels and possibly i can able to display in a applet screen, but not in the structured format. for example i need to show the active channels, agent name, status of the channel and etc... On Fri, Feb 22, 2008 at 5:05 PM, Mark Harold Rivera <mar...@gm...> wrote: > > > ---------- Forwarded message ---------- > From: Mark Harold Rivera <mar...@gm...> > Date: Fri, Feb 22, 2008 at 7:21 PM > Subject: Dial Event Not Generated > To: ast...@li... > > > I am making an operator panel where status of extensions and queues are > displayed. I have this particular problem where dial events are not produced > when multiple channels dial to the queue. > > Here is the example problem. > I have two channels SIP/111 and SIP/222 which dials a queue extension > 2020. A dial event is generated when SIP/111 calls but there is no Dial > event generated for SIP/222 when dialing 2020 even though it is ringing > simultaneously with SIP/111. Dial event for SIP/222 is only generated after > an agent receives the call from a queue by SIP/111. > What should be the problem? I really need the dial event for all the > channels that dials the queue. > > Mark > Rivera > > > > ------------------------------------------------------------------------- > 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 > > -- Thank you with regards, Gopal, PeopleTech Systems Private Limited www.peopletech.co.in |
From: Mark H. R. <mar...@gm...> - 2008-02-22 11:35:21
|
---------- Forwarded message ---------- From: Mark Harold Rivera <mar...@gm...> Date: Fri, Feb 22, 2008 at 7:21 PM Subject: Dial Event Not Generated To: ast...@li... I am making an operator panel where status of extensions and queues are displayed. I have this particular problem where dial events are not produced when multiple channels dial to the queue. Here is the example problem. I have two channels SIP/111 and SIP/222 which dials a queue extension 2020. A dial event is generated when SIP/111 calls but there is no Dial event generated for SIP/222 when dialing 2020 even though it is ringing simultaneously with SIP/111. Dial event for SIP/222 is only generated after an agent receives the call from a queue by SIP/111. What should be the problem? I really need the dial event for all the channels that dials the queue. Mark Rivera |
From: Mark H. R. <mar...@gm...> - 2008-02-22 11:33:14
|
Thanks for the info On Fri, Feb 22, 2008 at 7:30 PM, Carlos G Mendioroz <tr...@hu...> wrote: > Sounds like your using asterisk 1.2. > You have to go to 1.4 for Queues to dial in paralel... > > Mark Harold Rivera @ 22/2/2008 09:21 -0600 dixit: > > I am making an operator panel where status of extensions and queues are > > displayed. I have this particular problem where dial events are not > > produced when multiple channels dial to the queue. > > > > Here is the example problem. > > I have two channels SIP/111 and SIP/222 which dials a queue extension > > 2020. A dial event is generated when SIP/111 calls but there is no Dial > > event generated for SIP/222 when dialing 2020. Dial event for SIP/222 > > is only generated after an agent receives the call from a queue by > SIP/111. > > What should be the problem? I really need the dial event for all the > > channels that dials the queue. > > > > Mark > > Rivera > > > > > > ------------------------------------------------------------------------ > > > > > ------------------------------------------------------------------------- > > 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 > > -- > Carlos G Mendioroz <tr...@hu...> LW7 EQI Argentina > > ------------------------------------------------------------------------- > 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 > |
From: Carlos G M. <tr...@hu...> - 2008-02-22 11:31:05
|
Sounds like your using asterisk 1.2. You have to go to 1.4 for Queues to dial in paralel... Mark Harold Rivera @ 22/2/2008 09:21 -0600 dixit: > I am making an operator panel where status of extensions and queues are > displayed. I have this particular problem where dial events are not > produced when multiple channels dial to the queue. > > Here is the example problem. > I have two channels SIP/111 and SIP/222 which dials a queue extension > 2020. A dial event is generated when SIP/111 calls but there is no Dial > event generated for SIP/222 when dialing 2020. Dial event for SIP/222 > is only generated after an agent receives the call from a queue by SIP/111. > What should be the problem? I really need the dial event for all the > channels that dials the queue. > > Mark > Rivera > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > 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 -- Carlos G Mendioroz <tr...@hu...> LW7 EQI Argentina |
From: Mark H. R. <mar...@gm...> - 2008-02-22 11:21:48
|
I am making an operator panel where status of extensions and queues are displayed. I have this particular problem where dial events are not produced when multiple channels dial to the queue. Here is the example problem. I have two channels SIP/111 and SIP/222 which dials a queue extension 2020. A dial event is generated when SIP/111 calls but there is no Dial event generated for SIP/222 when dialing 2020. Dial event for SIP/222 is only generated after an agent receives the call from a queue by SIP/111. What should be the problem? I really need the dial event for all the channels that dials the queue. Mark Rivera |
From: Eduard M. <mar...@gm...> - 2008-02-20 23:32:07
|
Yes, I think its the same problem. Well, unafortunately Asterisk Manager API is a bit inconsistent... Regards, Edu On Wed, Feb 20, 2008 at 11:44 PM, Stefan Reuter <ste...@re...> wrote: > Eduard Martinez wrote: > > Stefan, I suspect there is a race condition, it seems that the originate > > method looks for the channel but the object is not created yet. If I put > a > > wait(3) before answering the channel, the originate returns the channel > > successfully. > > could this relate to http://jira.reucon.org/browse/AJ-102 ? > > =Stefan > > -- > reuter network consulting > Neusser Str. 110 > 50760 Koeln > Germany > Telefon: +49 221 1305699-0 > Telefax: +49 221 1305699-90 > E-Mail: ste...@re... > Jabber: ste...@re... > WWW: http://www.reucon.com > > Steuernummern 215/5140/1791 USt-IdNr. DE220701760 > > > ------------------------------------------------------------------------- > 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 > > |
From: Stefan R. <ste...@re...> - 2008-02-20 22:44:57
|
Eduard Martinez wrote: > Stefan, I suspect there is a race condition, it seems that the originate > method looks for the channel but the object is not created yet. If I put a > wait(3) before answering the channel, the originate returns the channel > successfully. could this relate to http://jira.reucon.org/browse/AJ-102 ? =Stefan -- reuter network consulting Neusser Str. 110 50760 Koeln Germany Telefon: +49 221 1305699-0 Telefax: +49 221 1305699-90 E-Mail: ste...@re... Jabber: ste...@re... WWW: http://www.reucon.com Steuernummern 215/5140/1791 USt-IdNr. DE220701760 |
From: Eduard M. <mar...@gm...> - 2008-02-20 21:31:09
|
Stefan, I suspect there is a race condition, it seems that the originate method looks for the channel but the object is not created yet. If I put a wait(3) before answering the channel, the originate returns the channel successfully. On Feb 20, 2008 5:53 PM, Eduard Martinez <mar...@gm...> wrote: > ok hehe > Yes, I see the channels, as I said in the last message, but the message of > the exception is: > org.asteriskjava.live.NoSuchChannelException: Channel ' > Local/prueba@pruebas' is not available > The channel in asterisk is Local/prueba@pruebas-88da,1 and The channel in > asterisk is Local/prueba@pruebas-88da,2, where the 88da part is different > for every created channel. > > Full log of my program is here. Note that 'adding channel' messages > appears after the exception. > > 2008-02-20 17:49:57,574 > org.asteriskjava.manager.internal.ManagerConnectionImpl INFO [Thread-0] - > Connecting to 192.168.1.5:5038 > 2008-02-20 17:49:57,668 > org.asteriskjava.manager.internal.ManagerConnectionImpl INFO > [Asterisk-Java ManagerConnection-0-Reader-0] - Connected via Asterisk Call > Manager/1.0 > 2008-02-20 17:49:57,678 > org.asteriskjava.manager.internal.ManagerConnectionImpl INFO [Thread-0] - > Successfully logged in > 2008-02-20 17:49:57,686 > org.asteriskjava.manager.internal.ManagerConnectionImpl INFO [Thread-0] - > Determined Asterisk version: Asterisk 1.4 > 2008-02-20 17:49:57,696 org.asteriskjava.live.internal.AsteriskServerImplINFO [Thread-0] - Initializing done > 2008-02-20 17:50:00,714 org.asteriskjava.live.internal.AsteriskServerImplDEBUG [Thread-0] - > org.asteriskjava.manager.event.OriginateResponseEvent received with > uniqueId 1202781244.40 > NoSuchChannelException!!!: Channel 'Local/prueba@pruebas' is not available > 2008-02-20 17:50:00,721 org.asteriskjava.live.internal.ChannelManager INFO > [Asterisk-Java DaemonPool-2-thread-1] - Adding channel > Local/prueba@pruebas-7e08,1(1202781244.40) > 2008-02-20 17:50:00,759 org.asteriskjava.live.internal.ChannelManager INFO > [Asterisk-Java DaemonPool-2-thread-1] - Adding channel > Local/prueba@pruebas-7e08,2(1202781244.41) > > > > On Feb 20, 2008 1:59 AM, Stefan Reuter <ste...@re...> wrote: > > > Eduard Martinez wrote: > > > Yes, I see the channels, Local/prueba@pruebas,XXXX,1 and > > > Local/prueba@pruebas,XXXX,2, both up and waiting. > > > Can you clarify the meaning of NSCE? > > > > sorry NSCE was short for NoSuchChannelException :) > > > > > In the java logs I also see the creation of both channels in asterisk > > > java but AFTER the exception. > > > > > > On Feb 20, 2008 1:08 AM, Stefan Reuter <ste...@re... > > > <mailto:ste...@re...>> wrote: > > > > > > Eduard Martinez wrote: > > > > Hi! > > > > I'm trying to use Originate in order to create a local channel. > > In the > > > > tests, I'm using originate to application (Wait 300) and the > > > channel is > > > > Local/prueba@pruebas. This extension has an Answer and then > > > another Wait > > > > 300. > > > > As far as I know, when I answer the local channel in the > > dialplan the > > > > originate must be succesful, and that's the response I get. But > > with > > > > asterisk-java throws a NoSuchChannelException. Is this a bug? > > > > > > when you do a "show channels" on the CLI after your tests do you > > see the > > > channels? if yes do the names match the message of the NSCE? > > > > > > =Stefan > > > > > > -- > > > reuter network consulting > > > Neusser Str. 110 > > > 50760 Koeln > > > Germany > > > Telefon: +49 221 1305699-0 > > > Telefax: +49 221 1305699-90 > > > E-Mail: ste...@re... <mailto:ste...@re... > > > > > > Jabber: ste...@re... <mailto:ste...@re... > > > > > > WWW: http://www.reucon.com > > > > > > Steuernummern 215/5140/1791 USt-IdNr. DE220701760 > > > > > > > > > > > ------------------------------------------------------------------------- > > > 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... > > > <mailto:Ast...@li...> > > > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > > > > > > > > > > > > ------------------------------------------------------------------------ > > > > > > > > ------------------------------------------------------------------------- > > > 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 > > > > > > -- > > reuter network consulting > > Neusser Str. 110 > > 50760 Koeln > > Germany > > Telefon: +49 221 1305699-0 > > Telefax: +49 221 1305699-90 > > E-Mail: ste...@re... > > Jabber: ste...@re... > > WWW: http://www.reucon.com > > > > Steuernummern 215/5140/1791 USt-IdNr. DE220701760 > > > > > > > > ------------------------------------------------------------------------- > > 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 > > > > > |
From: Eduard M. <mar...@gm...> - 2008-02-20 16:53:51
|
ok hehe Yes, I see the channels, as I said in the last message, but the message of the exception is: org.asteriskjava.live.NoSuchChannelException: Channel 'Local/prueba@pruebas' is not available The channel in asterisk is Local/prueba@pruebas-88da,1 and The channel in asterisk is Local/prueba@pruebas-88da,2, where the 88da part is different for every created channel. Full log of my program is here. Note that 'adding channel' messages appears after the exception. 2008-02-20 17:49:57,574 org.asteriskjava.manager.internal.ManagerConnectionImpl INFO [Thread-0] - Connecting to 192.168.1.5:5038 2008-02-20 17:49:57,668 org.asteriskjava.manager.internal.ManagerConnectionImpl INFO [Asterisk-Java ManagerConnection-0-Reader-0] - Connected via Asterisk Call Manager/1.0 2008-02-20 17:49:57,678 org.asteriskjava.manager.internal.ManagerConnectionImpl INFO [Thread-0] - Successfully logged in 2008-02-20 17:49:57,686 org.asteriskjava.manager.internal.ManagerConnectionImpl INFO [Thread-0] - Determined Asterisk version: Asterisk 1.4 2008-02-20 17:49:57,696 org.asteriskjava.live.internal.AsteriskServerImplINFO [Thread-0] - Initializing done 2008-02-20 17:50:00,714 org.asteriskjava.live.internal.AsteriskServerImplDEBUG [Thread-0] - org.asteriskjava.manager.event.OriginateResponseEvent received with uniqueId 1202781244.40 NoSuchChannelException!!!: Channel 'Local/prueba@pruebas' is not available 2008-02-20 17:50:00,721 org.asteriskjava.live.internal.ChannelManager INFO [Asterisk-Java DaemonPool-2-thread-1] - Adding channel Local/prueba@pruebas-7e08,1(1202781244.40) 2008-02-20 17:50:00,759 org.asteriskjava.live.internal.ChannelManager INFO [Asterisk-Java DaemonPool-2-thread-1] - Adding channel Local/prueba@pruebas-7e08,2(1202781244.41) On Feb 20, 2008 1:59 AM, Stefan Reuter <ste...@re...> wrote: > Eduard Martinez wrote: > > Yes, I see the channels, Local/prueba@pruebas,XXXX,1 and > > Local/prueba@pruebas,XXXX,2, both up and waiting. > > Can you clarify the meaning of NSCE? > > sorry NSCE was short for NoSuchChannelException :) > > > In the java logs I also see the creation of both channels in asterisk > > java but AFTER the exception. > > > > On Feb 20, 2008 1:08 AM, Stefan Reuter <ste...@re... > > <mailto:ste...@re...>> wrote: > > > > Eduard Martinez wrote: > > > Hi! > > > I'm trying to use Originate in order to create a local channel. In > the > > > tests, I'm using originate to application (Wait 300) and the > > channel is > > > Local/prueba@pruebas. This extension has an Answer and then > > another Wait > > > 300. > > > As far as I know, when I answer the local channel in the dialplan > the > > > originate must be succesful, and that's the response I get. But > with > > > asterisk-java throws a NoSuchChannelException. Is this a bug? > > > > when you do a "show channels" on the CLI after your tests do you see > the > > channels? if yes do the names match the message of the NSCE? > > > > =Stefan > > > > -- > > reuter network consulting > > Neusser Str. 110 > > 50760 Koeln > > Germany > > Telefon: +49 221 1305699-0 > > Telefax: +49 221 1305699-90 > > E-Mail: ste...@re... <mailto:ste...@re...> > > Jabber: ste...@re... <mailto:ste...@re...> > > WWW: http://www.reucon.com > > > > Steuernummern 215/5140/1791 USt-IdNr. DE220701760 > > > > > > > ------------------------------------------------------------------------- > > 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... > > <mailto:Ast...@li...> > > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > > > > > > ------------------------------------------------------------------------ > > > > > ------------------------------------------------------------------------- > > 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 > > > -- > reuter network consulting > Neusser Str. 110 > 50760 Koeln > Germany > Telefon: +49 221 1305699-0 > Telefax: +49 221 1305699-90 > E-Mail: ste...@re... > Jabber: ste...@re... > WWW: http://www.reucon.com > > Steuernummern 215/5140/1791 USt-IdNr. DE220701760 > > > ------------------------------------------------------------------------- > 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 > > |
From: Johan S. <js...@sv...> - 2008-02-20 13:22:55
|
Hi again, hi Stefan, ! Sorry for the delay but I've been strangled by deadlines and boring stuff. Now posting my code, so our guru Stefan? might give some input on the problems I'm having. The Answer-class below.service will get called for 7-8 simultanious calls. So 7-8 threads working at the same time if I've understood this. In my code, each thread is doing AgiChannel-work, AsteriskManagerInterface-work, mysql-db-work, and playing/receiving dmtf-tones, and logging to one common logfile using log4J. All threads use the same logfile simultaneously too. Recap of my problem. When checking my outputlog (not included), I see, sometimes one thread have log entries of playing dtmf-tones, and starting the getDTMF-function. Then other threads are executing in between, maybe one more call is answered or hungup. Then the end of getDTMF-logentry is present (and no tones could be found on the channel). It works perfectly when only one or two threads are working. I suspected my cpu was overloaded with DTMF-detection, so I invested in the VPMADTO32 echo-cancelling/hw-dtmf-supported dsp-card for my analog 8ch TDM800P. But still the same problem. So dtmf-detection was not the issue I think. :( I'm posting extracts of my Agi-code in java, and hopefully it will show fatal errors stopping performance to you, dear gurus. I apologize for stripping things, so it will not compile, but I must remove company-private stuff before posting in public. Sincerely, Johan >From Sweden :) My code ============ ========================= ANSWER CLASS ========================= package com.test.johan.callManager; import javax.jms.*; import java.io.FileInputStream; import java.io.IOException; import java.sql.SQLException; import java.text.DateFormat; import java.util.Date; import java.util.InvalidPropertiesFormatException; import java.util.Iterator; import java.util.List; import java.util.Properties; import javax.jms.JMSException; import org.apache.log4j.Logger; import org.asteriskjava.fastagi.AgiChannel; import org.asteriskjava.fastagi.AgiException; import org.asteriskjava.fastagi.AgiRequest; import org.asteriskjava.fastagi.BaseAgiScript; import org.asteriskjava.live.AsteriskChannel; import org.asteriskjava.live.ChannelState; import org.asteriskjava.live.DefaultAsteriskServer; import org.asteriskjava.live.HangupCause; import org.asteriskjava.live.ManagerCommunicationException; import org.asteriskjava.live.NoSuchChannelException; public class Answer extends BaseAgiScript { private static enum AnswerState {ALARM_INIT, ALARM_MSG_REQUEST, ALARM_GET_DTMFTONES, ALARM_CHECK_IF_LASTMESSAGE, ALARM_VERIFYCHECKSUM_AND_RESPOND, ALARM_HANDLE_MESSAGETYPE, ALARM_RETRY_BROKEN_MESSAGE, ALARM_PAUS_BEFORE_NEXTMESSAGE, ALARM_ENDOFREQUESTS, ALARM_NODTMF_ERROR}; private DefaultAsteriskServer asteriskServer; private DbApi dbApi; private static String propertyFile; private static Properties prop = new Properties(); private static final Logger logger = Logger.getLogger(Answer.class); private static String answerInQueName; private static String answerOutQueName; private static String jmsUrl; private static String dbUrl; private static String dbUser; private static String dbPasswd; private static String asteriskUrl; private static String asteriskUser; private static String asteriskPasswd; private static int timeOutInSeconds; private static int PAUS_BETWEEN_DTMF_MESS = 500; public Answer() throws InvalidPropertiesFormatException, IOException { propertyFile = System.getProperty("com.johan.test.callManager.configFile"); if (propertyFile == null) { propertyFile = "callManager.xml"; } FileInputStream fis; fis = new FileInputStream(propertyFile); prop.loadFromXML(fis); //Read in all the properties from the file: answerInQueName = prop.getProperty("Answer.AnswerInQueName"); answerOutQueName = prop.getProperty("Answer.AnswerOutQueName"); jmsUrl = prop.getProperty("Answer.jmsUrl"); dbUrl = prop.getProperty("General.dbUrl"); dbUser = prop.getProperty("General.dbUser"); dbPasswd = prop.getProperty("General.dbPasswd"); asteriskUrl = prop.getProperty("General.asteriskUrl"); asteriskUser = prop.getProperty("General.asteriskUser"); asteriskPasswd = prop.getProperty("General.asteriskPasswd"); timeOutInSeconds = Integer.parseInt(prop.getProperty("Answer.timeOutInSeconds")); numberOfRequestPerProtocol = Integer.parseInt(prop.getProperty("Answer.numberOfRequestPerProtocol")); dbApi = new DbApi(dbUrl, dbUser, dbPasswd); asteriskServer = new DefaultAsteriskServer(asteriskUrl, asteriskUser, asteriskPasswd); fis.close(); } public void service(AgiRequest request, AgiChannel agiChannel){ // Thread.currentThread().setPriority(1); JmsHandler jmsHandler = null; AsteriskChannel incomingChannel = null; Date timeOfAlarmCall = new Date(); GenericMessage incomingMessage = null; int lineNumber = -1; boolean keepRequesting = true; String dtmfIncomingMessage=""; AnswerState state = AnswerState.ALARM_INIT; AlarmSwitchMessageType messageType = null; // ######################################################################## // MAIN WHILE while (keepRequesting && channelIsUp) { switch(state) { case ALARM_INIT: { logger.debug("ALARM_INIT"); try { logger.debug("Creating JmsHandler"); jmsHandler = new JmsHandler(jmsUrl, answerInQueName, answerOutQueName); agiChannel.answer(); String incomingChannelName = agiChannel.getName(); timeOfAlarmCall = new Date(); logger.debug("Answered incoming call on channel: " + incomingChannelName + " on date: " + DateFormat.getDateInstance().format(timeOfAlarmCall)); // Wait a little, so channel is setup, before we send DTMF-tones. Thread.sleep(500); //We use incomingChannel instead of the incoming agiChannel because it supports redirect and playDtmf. //In theory this could have been done by passing AgiActions to the channel. incomingChannel = CallManager.getChannelFromAsteriskServer(incomingChannelName, asteriskServer); state = AnswerState.ALARM_MSG_REQUEST; } catch (SQLException se) { state = AnswerState.ALARM_ENDOFREQUESTS; // eller init-error... } catch(TestException se) { state =AnswerState.ALARM_ENDOFREQUESTS; // eller init-error... } catch (InterruptedException ie) { state =AnswerState.ALARM_ENDOFREQUESTS; // eller init-error... }catch(ManagerCommunicationException mce) { state =AnswerState.ALARM_ENDOFREQUESTS; // eller init-error... } catch(AgiException ae) { state = AnswerState.ALARM_ENDOFREQUESTS; // eller init-error... } catch( JMSException je) { state =AnswerState.ALARM_ENDOFREQUESTS; // eller init-error... } }break; case ALARM_MSG_REQUEST: { logger.debug("ALARM_MSG_REQUEST"); // send dtmf-tones and wait for the response dtmf-tones try { // Thread.currentThread().setPriority(10); playDtmf(TestProtocol.MESSAGE_REQUEST, incomingChannel); state = AnswerState.ALARM_GET_DTMFTONES; } catch (ManagerCommunicationException mce) { logger.fatal("ERROR "+mce.getMessage()); state = AnswerState.ALARM_ENDOFREQUESTS; } catch(TestException se) { logger.fatal("ERROR "+se.getMessage()); state = AnswerState.ALARM_ENDOFREQUESTS; } } break; case ALARM_GET_DTMFTONES: { logger.debug("ALARM_GET_DTMFTONES"); dtmfIncomingMessage = ""; try { dtmfIncomingMessage = CallManager.getDtmfMessage(agiChannel); logger.debug("DTMF->PC: " + dtmfIncomingMessage); if(dtmfIncomingMessage.length()>0) state = AnswerState.ALARM_ENDOFREQUESTS; else { // Nothing received statusMessageRetries++; logger.fatal("ERROR No DTMF-received! "); state = AnswerState.ALARM_ENDOFREQUESTS; } } catch(AgiException ae) { logger.fatal("ERROR "+ae.getMessage()); state = AnswerState.ALARM_ENDOFREQUESTS; } catch(TestException se) { logger.fatal("ERROR "+se.getMessage()); state = AnswerState.ALARM_ENDOFREQUESTS; } } break; case ALARM_ENDOFREQUESTS: { // Thread.currentThread().setPriority(1); logger.debug("ALARM_ENDOFREQUESTS"); agiChannel = null; incomingChannel = null; // Close jms, release resources. This is not happening if we get an agiexception due to code right now jmsHandler.cleanUpConnection(); }break; } // end switch(state) } // end while } } ========================= ========================= ========================= CLASS CALLED CALLMANAGER ========================= ========================= ========================= package com.johan.test.callManager; import org.apache.log4j.Logger; import org.asteriskjava.fastagi.AgiChannel; import org.asteriskjava.fastagi.AgiException; import org.asteriskjava.live.AsteriskChannel; import org.asteriskjava.live.AsteriskServer; import org.asteriskjava.live.HangupCause; import org.asteriskjava.live.ManagerCommunicationException; import org.asteriskjava.live.NoSuchChannelException; public class CallManager { private static final Logger logger = Logger.getLogger(CallManager.class); private static final int requestTimeOutInSeconds = 5; private static final int timeOutForEachDigitInMilliSeconds = 500; private static final int timeBetweenTonesInMs = 140; private static final int lengthOfDTMFTone = 140; private static enum dtmfState {DTMF_INIT, DTMF_WAIT_CHAR, DTMF_STORE_CHAR, DTMF_FINISHED }; public CallManager () { } protected static AsteriskChannel getChannelFromAsteriskServer (String channelName, AsteriskServer asteriskServer) throws ManagerCommunicationException { AsteriskChannel channel = null; for (AsteriskChannel asteriskChannel : asteriskServer.getChannels()) { // Checks if the name matches the incoming string: if ((asteriskChannel.getName().compareTo(channelName) == 0)) { channel = asteriskChannel; } } return channel; } protected static void playDtmf(String dtmfString, AsteriskChannel channel) throws ManagerCommunicationException, IllegalArgumentException, TestException { String sentString[] = new String[50]; logger.debug("PC->DTMF:" + dtmfString); int length = dtmfString.length(); for (int j = 0; j < length; j++) { try { channel.playDtmf(dtmfString.substring(j, j + 1)); sentString[timerIndex] = dtmfString.substring(j, j + 1); } catch (NoSuchChannelException e) { // throw new TestException("Channel disconnected while playing Dtmf!"); } try { Thread.sleep(timeBetweenTonesInMs); } catch (InterruptedException e) { // logger.fatal(e.getMessage()); } } } protected static String getDtmfMessage(AgiChannel agiChannel) throws AgiException, TestException { // logger.debug("Starting getDtmfMessage()"); long timerValue[] = new long[50]; long timerValueBefore[] = new long[50]; char receivedValue[] = new char[50]; int timerIndex = 0; int cyclesBeforeTimeout = (1000 * requestTimeOutInSeconds) / timeOutForEachDigitInMilliSeconds; int i = 0; String message = ""; char[] charBuf = new char[150]; int charPos=0; char newChar = 0; long startTime = 0; boolean running = true; dtmfState state = dtmfState.DTMF_INIT; int waitDelay = 1000; while(running) { switch(state) { case DTMF_INIT: { startTime = System.currentTimeMillis(); waitDelay = 10000; state = dtmfState.DTMF_WAIT_CHAR; logger.debug("Get-DTMF start"); } break; case DTMF_WAIT_CHAR: { if(charPos>64) state = dtmfState.DTMF_FINISHED; try{ if (agiChannel.getChannelStatus() == AlarmSwitch.AGI_CHANNEL_STATE_UP) { newChar = agiChannel.waitForDigit(waitDelay); if(newChar>0) state = dtmfState.DTMF_STORE_CHAR; else { // logger.debug("No more DTMF-tones, timeout!"); state = dtmfState.DTMF_FINISHED; } } else { throw new TestException("Channel disconnected while waiting for digits!"); } } catch(AgiException ae) { // logger.fatal("ERROR " + ae.getMessage()); state = dtmfState.DTMF_FINISHED; } } break; case DTMF_STORE_CHAR: { message = message + String.valueOf(newChar); //charBuf[charPos] = newChar; //charPos++; waitDelay = 400; state = dtmfState.DTMF_WAIT_CHAR; }break; case DTMF_FINISHED: { logger.debug("Get-DTMF done"); running = false; }break; } } // message = new String(charBuf); return message; } } -----Ursprungligt meddelande----- Från: ast...@li... [mailto:ast...@li...] För Stefan Reuter Skickat: den 14 februari 2008 16:32 Till: ast...@li... Ämne: [SPAM] - Re: [Asterisk-java-users] Problems with concurrent java-threads answering incoming calls - Email found in subject Johan Sandgren wrote: > What about my problem, any clever ideas? would you mind to post your code? =Stefan -- reuter network consulting Neusser Str. 110 50760 Koeln Germany Telefon: +49 221 1305699-0 Telefax: +49 221 1305699-90 E-Mail: ste...@re... Jabber: ste...@re... WWW: http://www.reucon.com Steuernummern 215/5140/1791 USt-IdNr. DE220701760 |
From: S. B. S. <bs...@no...> - 2008-02-20 06:09:23
|
Only way I can think of doing it would be to dynamically add those extensions as queue members and then remove them once the normal agents became available. Of course you can also use agent priorities to add a 'secondary' group of users to the list of agents. The secondary group will only get calls when all of the other agents are busy or not logged in. Mark Harold Rivera wrote: > Hello, > I just want to ask if it is possible to transfer calls that is > in queue to nonagents extensions? For example if all agent members of > queue are handling a call, and there are calls that are still waiting > in the queues, could i transfer that calls from queues to other idle > extensions that are available. > > Mark Rivera > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > 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 > |
From: Mark H. R. <mar...@gm...> - 2008-02-20 06:01:44
|
Hello, I just want to ask if it is possible to transfer calls that is in queue to nonagents extensions? For example if all agent members of queue are handling a call, and there are calls that are still waiting in the queues, could i transfer that calls from queues to other idle extensions that are available. Mark Rivera |
From: Stefan R. <ste...@re...> - 2008-02-20 00:59:37
|
Eduard Martinez wrote: > Yes, I see the channels, Local/prueba@pruebas,XXXX,1 and > Local/prueba@pruebas,XXXX,2, both up and waiting. > Can you clarify the meaning of NSCE? sorry NSCE was short for NoSuchChannelException :) > In the java logs I also see the creation of both channels in asterisk > java but AFTER the exception. > > On Feb 20, 2008 1:08 AM, Stefan Reuter <ste...@re... > <mailto:ste...@re...>> wrote: > > Eduard Martinez wrote: > > Hi! > > I'm trying to use Originate in order to create a local channel. In the > > tests, I'm using originate to application (Wait 300) and the > channel is > > Local/prueba@pruebas. This extension has an Answer and then > another Wait > > 300. > > As far as I know, when I answer the local channel in the dialplan the > > originate must be succesful, and that's the response I get. But with > > asterisk-java throws a NoSuchChannelException. Is this a bug? > > when you do a "show channels" on the CLI after your tests do you see the > channels? if yes do the names match the message of the NSCE? > > =Stefan > > -- > reuter network consulting > Neusser Str. 110 > 50760 Koeln > Germany > Telefon: +49 221 1305699-0 > Telefax: +49 221 1305699-90 > E-Mail: ste...@re... <mailto:ste...@re...> > Jabber: ste...@re... <mailto:ste...@re...> > WWW: http://www.reucon.com > > Steuernummern 215/5140/1791 USt-IdNr. DE220701760 > > > ------------------------------------------------------------------------- > 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... > <mailto:Ast...@li...> > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > 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 -- reuter network consulting Neusser Str. 110 50760 Koeln Germany Telefon: +49 221 1305699-0 Telefax: +49 221 1305699-90 E-Mail: ste...@re... Jabber: ste...@re... WWW: http://www.reucon.com Steuernummern 215/5140/1791 USt-IdNr. DE220701760 |
From: Eduard M. <mar...@gm...> - 2008-02-20 00:46:42
|
Yes, I see the channels, Local/prueba@pruebas,XXXX,1 and Local/prueba@pruebas,XXXX,2, both up and waiting. Can you clarify the meaning of NSCE? In the java logs I also see the creation of both channels in asterisk java but AFTER the exception. On Feb 20, 2008 1:08 AM, Stefan Reuter <ste...@re...> wrote: > Eduard Martinez wrote: > > Hi! > > I'm trying to use Originate in order to create a local channel. In the > > tests, I'm using originate to application (Wait 300) and the channel is > > Local/prueba@pruebas. This extension has an Answer and then another Wait > > 300. > > As far as I know, when I answer the local channel in the dialplan the > > originate must be succesful, and that's the response I get. But with > > asterisk-java throws a NoSuchChannelException. Is this a bug? > > when you do a "show channels" on the CLI after your tests do you see the > channels? if yes do the names match the message of the NSCE? > > =Stefan > > -- > reuter network consulting > Neusser Str. 110 > 50760 Koeln > Germany > Telefon: +49 221 1305699-0 > Telefax: +49 221 1305699-90 > E-Mail: ste...@re... > Jabber: ste...@re... > WWW: http://www.reucon.com > > Steuernummern 215/5140/1791 USt-IdNr. DE220701760 > > > ------------------------------------------------------------------------- > 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 > > |
From: Stefan R. <ste...@re...> - 2008-02-20 00:09:00
|
Eduard Martinez wrote: > Hi! > I'm trying to use Originate in order to create a local channel. In the > tests, I'm using originate to application (Wait 300) and the channel is > Local/prueba@pruebas. This extension has an Answer and then another Wait > 300. > As far as I know, when I answer the local channel in the dialplan the > originate must be succesful, and that's the response I get. But with > asterisk-java throws a NoSuchChannelException. Is this a bug? when you do a "show channels" on the CLI after your tests do you see the channels? if yes do the names match the message of the NSCE? =Stefan -- reuter network consulting Neusser Str. 110 50760 Koeln Germany Telefon: +49 221 1305699-0 Telefax: +49 221 1305699-90 E-Mail: ste...@re... Jabber: ste...@re... WWW: http://www.reucon.com Steuernummern 215/5140/1791 USt-IdNr. DE220701760 |
From: Eduard M. <mar...@gm...> - 2008-02-19 23:58:46
|
Hi! I'm trying to use Originate in order to create a local channel. In the tests, I'm using originate to application (Wait 300) and the channel is Local/prueba@pruebas. This extension has an Answer and then another Wait 300. As far as I know, when I answer the local channel in the dialplan the originate must be succesful, and that's the response I get. But with asterisk-java throws a NoSuchChannelException. Is this a bug? Regards, Edu |
From: preetha A. <pre...@gm...> - 2008-02-19 10:02:38
|
Hi, From dialplan,I will be able to execute java agi and get disconnect.But i would like to come back to the dialplan again.otherwise is there any other way i can use manager api to execute some asterisk functions like dialout ,moving the call to meetme ?if any one has examples or ideas,please let me know. -- Preetha.A |
From: Noel R. M. <noe...@gm...> - 2008-02-18 14:46:29
|
So, isn't there an easy way to know how many threads in the threadpool (witch handle AGI request) are in use and not in idle? I need to know it using java language, inside the software that handle AGI requests. I need it to externalize such information for use in a monitoring software (nagios). I was thinking to make a static variable and use it as a counter, synchronizing and all, but I think that maybe there is a better way to do that. sorry about the poor English. regards, Noel On Feb 18, 2008 3:54 AM, Breucking Patrick <bre...@go...> wrote: > Hi, > > additional the tool jconsole (in Java/bin Dir) visualize threads. > > Regards > Patrick > > > Am 18.02.2008 um 05:02 schrieb Stefan Reuter: > > > Noel R. Morais wrote: > On Feb 15, 2008 2:45 PM, Stefan Reuter <ste...@re...> wrote: > > For AGI or the Manager API? > Acctualy I need to know the number of active threads in the thread > pool of asterisk-java. > > Sorry, this is not enough information. There is no "the threadpool" of > Asterisk-Java. Asterisk-Java uses threads and threadpools in different > ways in different places. > > There is no way to ask Asterisk-Java "how many threads do you use?" > Of course you can get the list of active Threads from the JVM with > something like http://www.exampledepot.com/egs/java.lang/ListThreads.html > > =Stefan > > -- > reuter network consulting > Neusser Str. 110 > 50760 Koeln > Germany > Telefon: +49 221 1305699-0 > Telefax: +49 221 1305699-90 > E-Mail: ste...@re... > Jabber: ste...@re... > WWW: http://www.reucon.com > > Steuernummern 215/5140/1791 USt-IdNr. DE220701760 > > ------------------------------------------------------------------------- > 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 > > |
From: Breucking P. <bre...@go...> - 2008-02-18 06:54:13
|
Hi, additional the tool jconsole (in Java/bin Dir) visualize threads. Regards Patrick Am 18.02.2008 um 05:02 schrieb Stefan Reuter: > Noel R. Morais wrote: >> On Feb 15, 2008 2:45 PM, Stefan Reuter <ste...@re...> >> wrote: >>> For AGI or the Manager API? >> Acctualy I need to know the number of active threads in the thread >> pool of asterisk-java. > > Sorry, this is not enough information. There is no "the threadpool" of > Asterisk-Java. Asterisk-Java uses threads and threadpools in different > ways in different places. > > There is no way to ask Asterisk-Java "how many threads do you use?" > Of course you can get the list of active Threads from the JVM with > something like http://www.exampledepot.com/egs/java.lang/ListThreads.html > > =Stefan > > -- > reuter network consulting > Neusser Str. 110 > 50760 Koeln > Germany > Telefon: +49 221 1305699-0 > Telefax: +49 221 1305699-90 > E-Mail: ste...@re... > Jabber: ste...@re... > WWW: http://www.reucon.com > > Steuernummern 215/5140/1791 USt-IdNr. DE220701760 > > ------------------------------------------------------------------------- > 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: Stefan R. <ste...@re...> - 2008-02-18 04:02:36
|
Noel R. Morais wrote: > On Feb 15, 2008 2:45 PM, Stefan Reuter <ste...@re...> wrote: >> For AGI or the Manager API? > Acctualy I need to know the number of active threads in the thread > pool of asterisk-java. Sorry, this is not enough information. There is no "the threadpool" of Asterisk-Java. Asterisk-Java uses threads and threadpools in different ways in different places. There is no way to ask Asterisk-Java "how many threads do you use?" Of course you can get the list of active Threads from the JVM with something like http://www.exampledepot.com/egs/java.lang/ListThreads.html =Stefan -- reuter network consulting Neusser Str. 110 50760 Koeln Germany Telefon: +49 221 1305699-0 Telefax: +49 221 1305699-90 E-Mail: ste...@re... Jabber: ste...@re... WWW: http://www.reucon.com Steuernummern 215/5140/1791 USt-IdNr. DE220701760 |
From: Noel R. M. <noe...@gm...> - 2008-02-18 02:39:45
|
Acctualy I need to know the number of active threads in the thread pool of asterisk-java. Thanks in advance, Noel On Feb 15, 2008 2:45 PM, Stefan Reuter <ste...@re...> wrote: > Noel R. Morais wrote: > > Is there a way to get the number of in use threads (active calls)? > > For AGI or the Manager API? > > =Stefan > > -- > reuter network consulting > Neusser Str. 110 > 50760 Koeln > Germany > Telefon: +49 221 1305699-0 > Telefax: +49 221 1305699-90 > E-Mail: ste...@re... > Jabber: ste...@re... > WWW: http://www.reucon.com > > Steuernummern 215/5140/1791 USt-IdNr. DE220701760 > > > ------------------------------------------------------------------------- > 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 > > |
From: Stefan R. <ste...@re...> - 2008-02-17 15:25:38
|
Mark Harold Rivera wrote: > managerResponse = > managerConnection.sendAction(originateAction); This makes Asterisk-Java wait for the reponse which is not a good thing for the OriginateAction. You should do this asyonchronously and provide a callback instead. Also add originateAction.setAsync(true); > If I will be using the DefaultAsteriskServer in the Asterisk Live, will > it block the events generated in the Manager API? Have a look at it. There are two versions: synchronous and asynchronous. =Stefan -- reuter network consulting Neusser Str. 110 50760 Koeln Germany Telefon: +49 221 1305699-0 Telefax: +49 221 1305699-90 E-Mail: ste...@re... Jabber: ste...@re... WWW: http://www.reucon.com Steuernummern 215/5140/1791 USt-IdNr. DE220701760 |
From: Mark H. R. <mar...@gm...> - 2008-02-17 14:00:46
|
Here is the code Stefan. public Runnable originateCall(final String channel,final String context,final String exten) throws IllegalArgumentException, IllegalStateException, IOException, TimeoutException{ Runnable origaction = new Runnable(){ public void run(){ final Long originateTimeout = new Long(60000); OriginateAction originateAction = new OriginateAction(); originateAction.setChannel(channel); originateAction.setContext(context); originateAction.setExten(exten); originateAction.setPriority(1); originateAction.setTimeout(originateTimeout); try{ managerResponse = managerConnection.sendAction(originateAction); }catch(Exception e){} } }; return origaction; } it will be called by new Thread(manager.originateCall(extensions.get(e.getSipNumber ()).getChannel(),extensions.get(sipnumber).getContext(), extensions.get(sipnumber).getExten())).start(); If I will be using the DefaultAsteriskServer in the Asterisk Live, will it block the events generated in the Manager API? On Feb 17, 2008 7:52 AM, Mark Harold Rivera <mar...@ya...> wrote: > Hello everyone, > Is there a way where I can originate multiple calls using > OriginateAction at once? I have used threads but still it didn't work. > For example: > First originateAction -> okay > Second OriginateAction -> fails when the first originateAction is not done > yet. > > Also, events are blocked whenever i send an originateAction, How can i > solve this? > > > > Yours, > > Mark Rivera > > Send instant messages to your online friends http://uk.messenger.yahoo.com > > ------------------------------------------------------------------------- > 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 > > |
From: Stefan R. <ste...@re...> - 2008-02-16 23:56:34
|
Mark Harold Rivera wrote: > Is there a way where I can originate multiple calls using > OriginateAction at once? I have used threads but still it didn't work. > For example: > First originateAction -> okay > Second OriginateAction -> fails when the first originateAction is not > done yet. You should show us the code you've used to try this. An easier option might be to use the originateXXX methods in DefaultAsteriskServer which is part of the org.asteriskjava.live package and makes your life a bit easier :) =Stefan -- reuter network consulting Neusser Str. 110 50760 Koeln Germany Telefon: +49 221 1305699-0 Telefax: +49 221 1305699-90 E-Mail: ste...@re... Jabber: ste...@re... WWW: http://www.reucon.com Steuernummern 215/5140/1791 USt-IdNr. DE220701760 |