asterisk-java-users Mailing List for Asterisk-Java Library (Page 170)
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: Laurent S. <lau...@pr...> - 2005-10-06 15:37:28
|
Hello, I would like to make a small program that will be able: 1) to originate a call, 2) then send an audio message, 3) and finally hangup the call after X seconds. I have search over the web and I found that the only way=20 to make spontaneous calls was to use the Asterisk manager. Hence I am trying to use Asterisk-Java which offers among others this fonctionality. Currently I am encoutering the following problem. I succeed to login to Asterisk and initiate a call (both with the OriginateAction and with the originateCall method of AsteriskManager). String remote =3D "SIP/laurent"; originateAction =3D new OriginateAction(); originateAction.setChannel(remote); originateAction.setContext("from-sip"); originateAction.setExten("8"); originateAction.setPriority(new Integer(1)); originateAction.setTimeout(new Long(30000)); However in both methods I do not have as return value the identifier of = the call (or channel). (e.g.: SIP/laurent-b7485# ) Hence when I am trying to hangup the phone using the channel SIP/laurent = I am obtaining an error.=20 Is there any way to obtain easily the identifier of the channel? Otherwise what do you suggest? Just for information but I am planning to have simultaneous calls=20 to the same number. Thanking you in advance for you help, Laurent |
From: Pablo I. <pmi...@ya...> - 2005-10-06 12:54:31
|
Hi, guys. I'm currently using java-asteriks, version 0.1. I'm experiencing a strane behaviour on action IDs. The thing is that when I send a message to the server, I expect that the response has the same action ID, but it has null instead. I debuged a simple test sending a ping, and the response has on it's attributes the actionID. I followed the trace to this point: if (actionId != null) { internalActionId = Util.getInternalActionId(actionId); response.setActionId(Util.stripInternalActionId(actionId)); } , on DefaultManagerConnection. The problem is that the first call to Util.getInternalActionId(actionId) erases the final # from the actionID, so the second call doesn't recognize the format, and returns null. Is this a bug, or the actionID is supposed to be null for a response? Regards, Pablo. ___________________________________________________________ 1GB gratis, Antivirus y Antispam Correo Yahoo!, el mejor correo web del mundo http://correo.yahoo.com.ar |
From: Jan E. <jan...@pl...> - 2005-10-06 05:57:52
|
On thing that bites me with new installations is that the restrictions in manager.conf are too hard. The defaults are at least here: [admin] secret = blabla deny=0.0.0.0/0.0.0.0 permit=127.0.0.1/255.255.255.0 This only allows clients from localhost to connect, which for us isn't enough. I always add in another "permit" line for the local subnet to get my app to work, eg. permit=192.168.0.0/255.255.0.0 On Wednesday 05 October 2005 16:24, Christopher Mylonas wrote: > Hi, > I'm trying to port my CSTA implementation so that it works with asterisk. > I'm just having some trouble connecting to asterisk with the sample code > from the tutorial. > > There is no firewall set, asterisk is running and the manager is enabled as > per the instructions. I get this from the stack trace though........ > > at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171) > at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158) > at java.net.Socket.connect(Socket.java:452) > at java.net.Socket.connect(Socket.java:402) > at java.net.Socket.<init>(Socket.java:309) > at java.net.Socket.<init>(Socket.java:124) > at > net.sf.asterisk.io.SocketConnectionFacadeImpl.<init>(SocketConnectionFacade >Impl.java:34) at > net.sf.asterisk.manager.DefaultManagerConnection.createSocket(DefaultManage >rConnection.java:343) at > net.sf.asterisk.manager.DefaultManagerConnection.connect(DefaultManagerConn >ection.java:332) at > net.sf.asterisk.manager.DefaultManagerConnection.login(DefaultManagerConnec >tion.java:253) at > net.sf.asterisk.manager.DefaultManagerConnection.login(DefaultManagerConnec >tion.java:221) at > csta.server.asterisk.BogusAsteriskConnection.run(BogusAsteriskConnection.ja >va:128) at > csta.server.asterisk.BogusAsteriskConnection.<init>(BogusAsteriskConnection >.java:38) at csta.server.CSTAServer.<init>(CSTAServer.java:96) > at start_CSTAServer.start_application(start_CSTAServer.java:33) > at start_CSTAServer.main(start_CSTAServer.java:18) > > > any ideas? > > thanks > > > ------------------------------------------------------- > This SF.Net email is sponsored by: > Power Architecture Resource Center: Free content, downloads, discussions, > and more. http://solutions.newsforge.com/ibmarch.tmpl > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users -- Jan Ekholm jan...@pl... |
From: Christopher M. <chr...@ol...> - 2005-10-05 13:24:58
|
Hi, I'm trying to port my CSTA implementation so that it works with asterisk. I'm just having some trouble connecting to asterisk with the sample code from the tutorial. There is no firewall set, asterisk is running and the manager is enabled as per the instructions. I get this from the stack trace though........ at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158) at java.net.Socket.connect(Socket.java:452) at java.net.Socket.connect(Socket.java:402) at java.net.Socket.<init>(Socket.java:309) at java.net.Socket.<init>(Socket.java:124) at net.sf.asterisk.io.SocketConnectionFacadeImpl.<init>(SocketConnectionFacadeImpl.java:34) at net.sf.asterisk.manager.DefaultManagerConnection.createSocket(DefaultManagerConnection.java:343) at net.sf.asterisk.manager.DefaultManagerConnection.connect(DefaultManagerConnection.java:332) at net.sf.asterisk.manager.DefaultManagerConnection.login(DefaultManagerConnection.java:253) at net.sf.asterisk.manager.DefaultManagerConnection.login(DefaultManagerConnection.java:221) at csta.server.asterisk.BogusAsteriskConnection.run(BogusAsteriskConnection.java:128) at csta.server.asterisk.BogusAsteriskConnection.<init>(BogusAsteriskConnection.java:38) at csta.server.CSTAServer.<init>(CSTAServer.java:96) at start_CSTAServer.start_application(start_CSTAServer.java:33) at start_CSTAServer.main(start_CSTAServer.java:18) any ideas? thanks |
From: Tobias W. <tob...@ev...> - 2005-10-05 11:37:18
|
Hi, kevin schrieb: well, generally speaking, i don't think there is an exact answer to your questions > > 1. What is the best Linux system to be used? this is primaryly a choice of taste. Debian is a commonly used Distri, but nowadays many switch to Distris like Ubuntu, which is similiar to Debian but has a quicker update cycle. For Beginners often SuSE comes in handy. I have heard that the actual version is quite clean. > 2. Which Java compiler is best suited? (JBuilder, JCreater(Currently > used)) in understand jbuilder and jcreator as IDE (integrated development enviroments) and not as compiles (although they seem to come with an integrated compiler). everything that works is acceptable. if you are in a trying out phase you might want to have an look a Eclipse (www.eclipse.org). > 3. Is there a complete setup manual containing both references to > compiler and OS. all manual according asterisk-java will not refer to any special compiler or OS because it doesn't has to. you should be able to use it with every combination you like, without running into troubles or differences. > > > > I am currently developing on Jcreater and am using Red Hat 9. > if you are happy with it, don't change it :) personally i can't think of any great advantage of another combination. but i really can't judge about Jcreator, because i don't know it ;) tobias |
From: Jan E. <jan...@pl...> - 2005-10-05 11:26:39
|
We use IntelliJ/IDEA and Sun's JDK 1.4 and 1.5 on various Linux and Windows= =20 "distros". IDEA and the JDK aren't picky wrt to environment, use whatever y= ou=20 like. There is no "best" Linux system nor a "best" compiler nor IDE, it's a= ll=20 up to your tastes and needs (and funds too, IntelliJ/IDEA is commercial). On Wednesday 05 October 2005 14:19, kevin wrote: > Hi > > I am a novice when it comes to Java and Asterisk; however I found that > =E2=80=9CAsterisk-Java=E2=80=9D seems to be the best thing I have seen wi= th regard to > Asterisk functionality and communication of such. Wow, it=E2=80=99s truly > amazing, if I can only get it to work. Unfortunately I lack the skills > in both Linux and Java currently, which I slowly improving as I > progress. Please can anyone HELP? > > 1. What is the best Linux system to be used? > 2. Which Java compiler is best suited? (JBuilder, > JCreater(Currently used)) > 3. Is there a complete setup manual containing both references to > compiler and OS. > > I am currently developing on Jcreater and am using Red Hat 9. > > > Regards, > > Kevin Leslie Wardthen > Logitel Telecom Pty Ltd =2D-=20 Jan Ekholm jan...@pl... |
From: kevin <ke...@lo...> - 2005-10-05 11:20:19
|
Hi =20 I am a novice when it comes to Java and Asterisk; however I found that =93Asterisk-Java=94 seems to be the best thing I have seen with regard = to Asterisk functionality and communication of such. Wow, it=92s truly amazing, if I can only get it to work. Unfortunately I lack the skills in both Linux and Java currently, which I slowly improving as I progress. Please can anyone HELP? =20 1. What is the best Linux system to be used? 2. Which Java compiler is best suited? (JBuilder, JCreater(Currently used)) 3. Is there a complete setup manual containing both references to compiler and OS. =20 I am currently developing on Jcreater and am using Red Hat 9.=20 =20 =20 Regards, =20 Kevin Leslie Wardthen Logitel Telecom Pty Ltd =20 --=20 No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.344 / Virus Database: 267.11.9/118 - Release Date: 03/10/2005 =20 |
From: Jan E. <jan...@pl...> - 2005-10-03 12:41:48
|
On Monday 03 October 2005 15:18, Stefan Reuter wrote: > On Fri, 2005-09-30 at 08:57 +0300, Jan Ekholm wrote: > > After one of our guys that at least pretend to know Asterisk did some > > restructuring of the dialplans (for other reasons) it all started to > > work. Redirection now works as it should. Don't ask me what was wrong, I > > have no idea and neither did the guy. > > that really sound weird... maybe it gives some hint about where to start > searching if someone encounters a similar problem :) Yeah, it wasn't fun to suddenly see code start working with no changes to the actual code. The dialplan must've been subtly broken in some place that only mattered to software clients. When I got that working call parking was an easy thing to do, although it's slightly inconvenient to use in practise. -- Jan Ekholm jan...@pl... |
From: Stefan R. <sr...@re...> - 2005-10-03 12:29:35
|
On Fri, 2005-09-30 at 08:57 +0300, Jan Ekholm wrote: > After one of our guys that at least pretend to know Asterisk did some=20 > restructuring of the dialplans (for other reasons) it all started to work= .=20 > Redirection now works as it should. Don't ask me what was wrong, I have n= o=20 > idea and neither did the guy. that really sound weird... maybe it gives some hint about where to start searching if someone encounters a similar problem :) =3DStefan |
From: Stefan R. <sr...@re...> - 2005-10-03 12:17:17
|
> I have a Server App that includes the AGIServer and has communication wit= h > all the Client Apps (the ones that the agents use). This server also is > connected to Asterisk via the Manager api, so I could receive all the eve= nts > and react to them. > When Asterisk receives a call, the AGIServer calls the "service" method o= f > my AGI Script, it answers the call, plays some greetings, and waits for > commands of the Server App. > The communication between the AGI Script and the Server App is made with > network sockets. I have to work a little more in this to make sure that > everything will work the way I'm thinking. if the server app and the agi scripts run in the same virtual machine you dont need any network communication between the two. > The announcement will only be played to the caller, and to do that, I mus= t > release the agent from the call. Also to make the agent available to rece= ive > the next call. if you dont have to reconnect the caller and the agent again after the announcement has been played just using the redirect action will be fine. it will hang up the agent and forward the call to the agi script |
From: Xavier2003 <xav...@em...> - 2005-09-30 23:19:36
|
I found an intersting solution for add System V daemon feature, if someon= e if interessed look@ http://wrapper.tanukisoftware.org/doc/english/introduction.html Thanx, Stefan for Fast Reply, and for a very good program! Regards=20 -- Email.it, the professional e-mail, gratis per te: http://www.email.it/f =20 Sponsor: Scopri subito le nuove tariffe Rc auto Zuritel in vigore dal 1=B0 settem= bre: bastano 7 click per ottenere un preventivo personalizzato. Risparmiare =E8= un gioco da ragazzi. Prova ora! Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=3D3880&d=3D20050= 930 |
From: Xavier2003 <xav...@em...> - 2005-09-30 19:19:02
|
I'm interested in BaseAGIScript Life Cycle, i want understand where decla= re a database connection pool, so to minimize class loading overhead. Regards=20 -- Email.it, the professional e-mail, gratis per te: http://www.email.it/f =20 Sponsor: Natsabe.it la pi=F9 grande erboristeria multimarca online. Solo prodotti di altissima qualit=E0.=20 Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=3D1308&d=3D20050= 930 |
From: Alex <ab...@ga...> - 2005-09-30 13:50:55
|
Hi Stefan: Yes, in fact I'm using both the Manager api and fastagi. Yesterday, I come up with a possible solution to my problem, and it's this (maybe can be of help to someone else): I have a Server App that includes the AGIServer and has communication with all the Client Apps (the ones that the agents use). This server also is connected to Asterisk via the Manager api, so I could receive all the events and react to them. When Asterisk receives a call, the AGIServer calls the "service" method of my AGI Script, it answers the call, plays some greetings, and waits for commands of the Server App. The communication between the AGI Script and the Server App is made with network sockets. I have to work a little more in this to make sure that everything will work the way I'm thinking. The announcement will only be played to the caller, and to do that, I must release the agent from the call. Also to make the agent available to receive the next call. Well... what do you think? Thanks, Alejandro > ok i didnt get that context. > to do what you want you have to use the manager api and fastagi. > what will that client application look like? e.g. how are the calls > (asterisk channels) and the client application session linked? > do you only want the announcement to be played to the caller or to both > the caller and the agent? |
From: Jan E. <jan...@pl...> - 2005-09-30 05:57:09
|
After one of our guys that at least pretend to know Asterisk did some restructuring of the dialplans (for other reasons) it all started to work. Redirection now works as it should. Don't ask me what was wrong, I have no idea and neither did the guy. Oh well, I'm happy it works. :) On Monday 26 September 2005 11:27, Jan Ekholm wrote: > On Friday 23 September 2005 14:37, Jan Ekholm wrote: > > Hi, > > > > I use code similar to this (version 0.2-rc1): > > > > RedirectAction redirect = new RedirectAction (); > > redirect.setChannel ( channel.getName() ); > > redirect.setExten ( "1001" ); > > redirect.setContext ("default"); > > redirect.setPriority (new Integer(1)); > > Weird is that I can do this and it works fine: > > redirect.setChannel ( channel.getLinkedChannel().getName() ); > > This does what it is supposed to do, ie redirect the channel to the new > "1001" extension. Of course, here I redirect the wrong channel (I redirect > the one that answered the original call, not the one that did the original > call), but why that one works and the real one doesn't is beyond me. > > However, I think this is one of those PEBKAC problems, as it seems to me > that Asterisk-Java sends the correct action to Asterisk and generally does > seem to do the right thing. Maybe a channel that has been already > redirected once (to the answering operator) can't be redirected, but that > doesn't add up as I can do the redirect on the actual hardware phone (dial > "#" and "1001") and that works fine. So it's something I probably don't > grok about extensions and/or contexts. > > Personally I wonder why the VoIP/PBX world has got to be so complex... :) -- Jan Ekholm jan...@pl... |
From: Stefan R. <sr...@re...> - 2005-09-29 23:24:10
|
> Hi to all, there are implementations of unix systme V startup/shutdown > script, for debian or Redhat ? > (or use it us xinetd service...) no there are no startup/shutdown scripts for now. Asterisk-Java is most often used as a library for custom applications that provide their own startup/shutdown or are deployed to some container. Nevertheless it is of course possible to run the FastAGI server standalone. > Was veri intersting add this feature, if none is done someone can show = me > how to relize it ? to support proper shutdown you have to write a small java wrapper that starts and stops the DefaultAGIServer and provides a shutdown hook (e.g. via a TCP/IP management connection). > I have another question, someone use Asterisk-Java on high volume calls= ? > (about 30/50 concurrent calls), > there are some benchmarks, how much is roboust FastAgi Server (0.2) > implementation, is suitable for production > use. Asterisk-Java is already in production use at several sites. As for the fastagi part simulations (i.e. using a mocked asterisk server) show that it can easily handle hundreds of concurrent connections. Be sure to tune the connection pool accordingly (poolSize property in fastagi.properties)= . See the tutorial for details. =3DStefan |
From: Stefan R. <sr...@re...> - 2005-09-29 23:19:10
|
ok i didnt get that context. to do what you want you have to use the manager api and fastagi. what will that client application look like? e.g. how are the calls (asterisk channels) and the client application session linked? do you only want the announcement to be played to the caller or to both the caller and the agent? |
From: Xavier2003 <xav...@em...> - 2005-09-29 20:45:49
|
Hi to all, there are implementations of unix systme V startup/shutdown script, for debian or Redhat ? (or use it us xinetd service...) Was veri intersting add this feature, if none is done someone can show me how to relize it ? I have another question, someone use Asterisk-Java on high volume calls ? (about 30/50 concurrent calls), there are some benchmarks, how much is roboust FastAgi Server (0.2) implementation, is suitable for production use. Regards Xavier=20 -- Email.it, the professional e-mail, gratis per te: http://www.email.it/f =20 Sponsor: Fai squillare il cellulare con le suonerie pi=F9 originali Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=3D3114&d=3D20050= 929 |
From: Alex <ab...@ga...> - 2005-09-29 14:34:16
|
Hi Stefan: I can't find the way to control the threads you mention. I'm surely missing something. What I want to do is play some greeting asynchronously in one of the active calls. Imagine that the caller and the agent are connected, and the agent clicks a button in my client application to send some text to the caller. How could I unlink the agent from the call, and play the greeting to the caller? Thanks, Alejandro |
From: Stefan R. <sr...@re...> - 2005-09-28 21:39:24
|
Its much easier... thread handling is done by Asterisk-Java, so each call is served in one thread but uses the same instance of your AGIScript. In 0.2-rc1 the channel is bound to that thread so you dont need to pass it to the answer/play/hangup/... methods, therefore you must not start another thread or you will receive the error you just described. Here is a short example: import java.io.IOException; import net.sf.asterisk.fastagi.AGIChannel; import net.sf.asterisk.fastagi.AGIException; import net.sf.asterisk.fastagi.AGIRequest; import net.sf.asterisk.fastagi.BaseAGIScript; import net.sf.asterisk.fastagi.DefaultAGIServer; public class TestAGI extends BaseAGIScript { public void service(AGIRequest request, AGIChannel channel) throws AGIException { // call local variables go here String phoneNumber; =20 // answer the call answer(); =20 // read phone number, timeout 30 seconds, max length 10 digits phoneNumber =3D getData("privacy-prompt", 30000, 10); =20 // play entered number if (phoneNumber !=3D null) { sayDigits(phoneNumber); } // end the call streamFile("vm-goodbye"); hangup(); } public static void main(String[] args) throws IOException { new DefaultAGIServer().startup(); } } =3DStefan |
From: Alex <ab...@ga...> - 2005-09-28 20:55:27
|
Stefan: Thank you very much for taking the time to answer. I understand what you are saying, but inside the service method, I would be having (for instance) a list of "active calls" in which I would have to store the request and channel objects (received by the service method). And then, how do I play something in a given call? I'm asking this because the methods to answer/play/hangup... in version 0.2 doesn't have the channel parameter anymore. I've already tried to create a thread for each call, inside the service method, and when I issue any of the answer/play/hangup... methods, I get this error message: "Trying to send command from an invalid thread" Looks like AGIConnectionHandler.getChannel() is returning null in that case. Thanks again, Alejandro |
From: Stefan R. <sr...@re...> - 2005-09-28 20:35:46
|
On Wed, 2005-09-28 at 17:04 -0300, Alex wrote: > Hi Stefan: >=20 > To tell you the truth, I allways tought that the AGIServer created one > instance per call. So, it is good to know now that it's not that way. > But this leads me to another question. How do you handle multiple calls w= ith > this architecture? If you do, can you please send me a working example? the easiest way is to declare your call-local variables in the service method instead of using attributes declared at class level. =3DStefan |
From: Alex <ab...@ga...> - 2005-09-28 20:03:18
|
Hi Stefan: To tell you the truth, I allways tought that the AGIServer created one instance per call. So, it is good to know now that it's not that way. But this leads me to another question. How do you handle multiple calls with this architecture? If you do, can you please send me a working example? Thank you very much, Alejandro ----- Original Message ----- From: "Stefan Reuter" <sr...@re...> To: <ast...@li...> Sent: Wednesday, September 28, 2005 4:40 PM Subject: Re: [Asterisk-java-users] FastAGI - creation of new AGIScriptinstance |
From: Stefan R. <sr...@re...> - 2005-09-28 19:40:59
|
> =20 > I have a question about the FastAGI implementation in Asterisk-Java. > When Asterisk sends a request and the AGIServer processes it, does it > create a fresh new instance (object) of my AGIScript class? > Or somehow it's using an old one? Currently there is only one instance of each AGIScript that serves every request so all instance variables are global to all calls. Is this a problem for you? I already thought about a config option to specify that behavior but till now there have been no such requests. =3DStefan |
From: Alex <ab...@ga...> - 2005-09-28 18:54:05
|
Hi again: I have a question about the FastAGI implementation in Asterisk-Java. When Asterisk sends a request and the AGIServer processes it, does it = create a fresh new instance (object) of my AGIScript class? Or somehow it's using an old one? My question arises because when I make a second call, I print an = attribute of my AGIScript class on the first line of the method = "service". It's printing the value of the previous call. Thanks, Alejandro |
From: Jan E. <jan...@pl...> - 2005-09-27 08:32:58
|
On Tuesday 27 September 2005 11:22, Gerwin Bruner wrote: > Hi, > > is there a certain reason why you try to use the manager API for Call > handling? No special reason at all really. As a total newbie to Asterisk I looked at= =20 what Flash Operator Panel did and found that AMI seemed to have the=20 components I wanted for queue handling, calling and generally keeping up to= =20 date with calls, channels and peers. I have no idea wether I could combine AMI with AGI and cherry pick from bot= h.=20 Maybe my own redirection problems could be solved using something from the= =20 AGI world. > Just extend the BaseAGIScript and do your call handling there. > More Info can be found here: > http://asterisk-java.sourceforge.net/tutorial.html > > look at the AGI section. > > Gerwin > > On Sep 27, 2005, at 10:13 AM, Jan Ekholm wrote: > > On Tuesday 27 September 2005 11:00, In=E9s wrote: > >> hello, > >> i'm a student, and i'm a beginner in the asterisk world !!! > >> i've got a few questions, i hope you can help me : > >> - i'm trying to do an application in java, wich receives a call, > >> palys > >> a audio file, wait for digits, then hangs up. > >> but i can't find how to receive the events, and how to asnwer the > >> phone. > > > > RedirectAction can be used to answer the phone, but then you'll > > need to have > > the caller call a queue or similar. I'm not sure if Asterisk-Java > > can work as > > a softphone by itself, I don't think so. The AGI command > > GetDataCommand seems > > to be able to read DTMF stuff, but I haven't used it myself. > > > >> voila mon petit code : > >> public void run () throws IOException, AuthenticationFailedException, > >> TimeoutException, InterruptedException > >> { > >> //boolean x=3Dtrue; > >> > >> //register for events > >> managerConnection.addEventHandler(this); > >> > >> // connect to Asterisk and log in > >> managerConnection.login(); > >> > >> > >> wait(); > >> > >> //and finally log off and disconnect > >> managerConnection.logoff(); > >> > >> } > >> public void handleEvent(ManagerEvent event) > >> { > >> // just print received events > >> System.out.println("this is an event: "+event); > >> String source =3D event.getSource().toString(); > >> System.out.println("Source : "+source); > >> //print type of event > >> System.out.println("Type of the event : > >> "+event.getClass().getSimpleName()); > >> > >> } > >> > >> On 9/26/05, Alex <ab...@ga...> wrote: > >>> Hi: > >>> > >>> My system has the following architecture (in the server side): > >>> > >>> - An app server (connected to the asterisk console) > >>> - An AGI Server (developed with AsteriskJava) > >>> - An AGI Script (executed by the above AGI Server) > >>> > >>> In the client side (Agents answering call center calls): > >>> > >>> - A softphone > >>> - A client program (used to search and register call details) > >>> > >>> Here is the thing: > >>> > >>> - From AGI Server I detect that a call is coming from PSTN and > >>> launch the > >>> AGI Script > >>> - From AGI Script I put the call in the queue and I loose the > >>> control of > >>> the call (here is my first confusion) > >>> - The agent answer the call (using his/her softphone) and I get > >>> the event > >>> from the Asterisk Console with my App Server. > >>> > >>> Now, I need to play something (TTS, wav, etc) to the caller based > >>> on the > >>> client application wich is connected to my App Server. What I > >>> want you to > >>> know is that the information to be played to the caller comes > >>> from an > >>> external source. > >>> > >>> So, my two big questions/confusions are: > >>> > >>> - How can I get the entire control of the call depending on the > >>> status of > >>> the call, for example, if the call is in the queue and I need to > >>> play or > >>> do something with it, where and how I have the control? until > >>> now, when I > >>> put the call in the queue I loss the control until the caller or the > >>> agent hangs the call. > >>> > >>> - Once the call is answered by the Agent, how can I unlink the two > >>> channels (releasing the agent) to let the caller hear the text > >>> that the > >>> agent sent. > >>> > >>> > >>> Thanks in advance, > >>> > >>> Alejandro > >> > >> -- > >> In=E9s MOUSSA > >> =C9l=E8ve ing=E9nieur g=E9nie logiciel > >> 21 rue Henri Marrou > >> Chatenay-Malabry 92290 > >> Tel : 00 33 613984578 > >> ine...@gm... > >> ine...@ec... > >> > >> > >> ------------------------------------------------------- > >> SF.Net email is sponsored by: > >> Tame your development challenges with Apache's Geronimo App Server. > >> Download it for free - -and be entered to win a 42" plasma tv or > >> your very > >> own Sony(tm)PSP. Click here to play: http://sourceforge.net/ > >> geronimo.php > >> _______________________________________________ > >> Asterisk-java-users mailing list > >> Ast...@li... > >> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > > -- > > Jan Ekholm > > jan...@pl... > > > > > > ------------------------------------------------------- > > SF.Net email is sponsored by: > > Tame your development challenges with Apache's Geronimo App Server. > > Download it for free - -and be entered to win a 42" plasma tv or > > your very > > own Sony(tm)PSP. Click here to play: http://sourceforge.net/ > > geronimo.php > > _______________________________________________ > > Asterisk-java-users mailing list > > Ast...@li... > > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > ------------------------------------------------------- > SF.Net email is sponsored by: > Tame your development challenges with Apache's Geronimo App Server. > Download it for free - -and be entered to win a 42" plasma tv or your very > own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users =2D-=20 Jan Ekholm jan...@pl... |