asterisk-java-users Mailing List for Asterisk-Java Library (Page 177)
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: Camila F. <mil...@ya...> - 2005-04-25 11:58:11
|
Hi, I´m new in this list and I would like to ask a question. I want to logoff an agent, but I´m not the agent.I think it is possible with AGI but I would like to know if there is any other way, without using the AGIs classes. Thanks for the help Camila __________________________________________________ Converse com seus amigos em tempo real com o Yahoo! Messenger http://br.download.yahoo.com/messenger/ |
From: Chad K. <ch...@cm...> - 2005-04-25 06:02:32
|
Stefan Reuter wrote: > On Fri, 2005-04-22 at 21:59 -0500, Chad Kitching wrote: > > The ResourceBundle just seemed to fit quite well > as a default implementation for the Java platform. I know how the correct implementation for .net should look like, but it would require some thinking about how to implement it properly. I don't really foresee me writing AGI apps with Mono, so I don't think it'll get much attention. > I think of a abstract interface on top of the Manager API that could be > implemented in any language. My first attempt to do this is the > AsteriskManager interface but as you see it is rudementary at least. I can't complain. Even if the AsteriskManager object doesn't export all the features that are available, the underlying objects do exceptionally well. I particularily like the implementation of the event and action objects because I don't think it would've occured to me to use reflection to populate them. > There is a guy on the asterisk-dev mailing list who wants to provide > some kind of web services, maybe we can agree on a common interface... > > Any ideas? That would be great, although I have to admit I've never really used or designed any web services. To be honest, my intended use for this would be for a desktop call control application, particularily for analog zap phones. To that end, I require channel call tracking (which asterisk-java already does), channel state change notifications (which is not implemented, but easy to add), and extension transfer/originate/park/etc actions (again, easy to add). I would be happy to help out on any such project in any way I could, though. Chad Kitching |
From: Stefan R. <sr...@re...> - 2005-04-23 15:52:29
|
On Fri, 2005-04-22 at 21:59 -0500, Chad Kitching wrote: > The fastagi code still needs work because there's no > direct equiv to a ResourceBundle in the CLI The general idea here is the MappingStrategy interface that can be implemented in a variety of ways. Choose whatever fits the configuration system used with .net. The ResourceBundle just seemed to fit quite well as a default implementation for the Java platform. > I noticed several of the objects appear to be serializable, so was > RMI/IIOP planned? Yes i am currently using it with a thin wrapper that allows connection via JMS (Java Messaging System). There I pass Events, Actions and Responses around so it makes sense to have them serializable. > I believe that I will eventually need remoting in the > C# version (the raw manager API is too chatty, and has pretty coarse > security settings, so I don't really favor the simple proxies for this), > so I'm wondering how far I may need to diverge from the Java version's API. I think of a abstract interface on top of the Manager API that could be implemented in any language. My first attempt to do this is the AsteriskManager interface but as you see it is rudementary at least. There is a guy on the asterisk-dev mailing list who wants to provide some kind of web services, maybe we can agree on a common interface... Any ideas? =Stefan |
From: Chad K. <ch...@cm...> - 2005-04-23 02:59:14
|
Stefan Reuter wrote: > On Thu, 2005-04-21 at 18:05 -0500, Chad Kitching wrote: > >>I converted some of asterisk-java to C#, and in the process, >>I may have run across a possible bug. > > do you plan to release your port as open source? Yes, I plan to. At this point, I only have the manager API portion of the code working (although I've only tested the event reception and status action). The fastagi code still needs work because there's no direct equiv to a ResourceBundle in the CLI (I don't have any need for FastAGI at this point, especially from C#, so it's a low priority for me). I noticed several of the objects appear to be serializable, so was RMI/IIOP planned? I believe that I will eventually need remoting in the C# version (the raw manager API is too chatty, and has pretty coarse security settings, so I don't really favor the simple proxies for this), so I'm wondering how far I may need to diverge from the Java version's API. >>Either a different separator between the internal >>actionid and the object actionid needs to be used, or the util functions >>should perhaps start scanning at the second character instead of the first. > > I fixed in in CVS and replaced the delimiter with a '#'. I've done the same in my port. Works great. |
From: Stefan R. <sr...@re...> - 2005-04-21 23:36:35
|
On Thu, 2005-04-21 at 18:05 -0500, Chad Kitching wrote: > I'm sure I'll get harassed for this, but no not at all, we all get enough harassment from the pure c folks implementing asterisk :) > I converted some of asterisk-java to C#, and in the process, > I may have run across a possible bug. do you plan to release your port as open source? > DefaultManagerConnection uses the hashcode of the object in > createInternalActionId, however, the Java specs do not specify that > hashcodes must be positive, so if a VM provides a negative value for > this function, Util.{get,strip}InternalActionId will fail to work, and > will return null. Yes you are right. Though I didn't encounter any negative hash codes yet... > Either a different separator between the internal > actionid and the object actionid needs to be used, or the util functions > should perhaps start scanning at the second character instead of the first. I fixed in in CVS and replaced the delimiter with a '#'. > Now, I have no idea if any JVM is actually affected by this, and my > conversion job worked fine on Microsoft's CLR, but failed on Mono > because of the hashing implementation differences. Yep - as I said i never encountered in on Sun's JVM or JRockit but the spec clearly allows any int. Thanks for your hint. =Stefan |
From: Chad K. <ch...@cm...> - 2005-04-21 23:05:49
|
I'm sure I'll get harassed for this, but I converted some of asterisk-java to C#, and in the process, I may have run across a possible bug. DefaultManagerConnection uses the hashcode of the object in createInternalActionId, however, the Java specs do not specify that hashcodes must be positive, so if a VM provides a negative value for this function, Util.{get,strip}InternalActionId will fail to work, and will return null. Either a different separator between the internal actionid and the object actionid needs to be used, or the util functions should perhaps start scanning at the second character instead of the first. Now, I have no idea if any JVM is actually affected by this, and my conversion job worked fine on Microsoft's CLR, but failed on Mono because of the hashing implementation differences. Chad Kitching |
From: Stefan R. <sr...@re...> - 2005-04-20 22:50:25
|
On Fri, 2005-04-15 at 16:14 -0700, Steve Drach wrote: > Attached are two files: > > net/sf/asterisk/util/LogFactory.java (modified) > net/sf/asterisk/util/JavaLoggingLog.java (new) Thanks - I included your patch into CVS. I think the two most relevant APIs for logging are log4j and java.util.logging. With the native java.util.logging support now available in asterisk-java I decided to drop commons-logging completly. Asterisk-java now looks for log4j and if available uses it, otherwise it uses java.util.logging and if thats not available it logs nothing at all. Using commons-logging caused some problems with the approach I choose (i.e. wrapping it). When commons-logging used log4j it was unable to determine the correct class name for logging. It always used the name of the wrapper class instead of the class that caused the logging. This problem is now gone due to the direct usage of log4j. =Stefan |
From: Steve D. <Ste...@Su...> - 2005-04-15 23:14:55
|
Attached are two files: net/sf/asterisk/util/LogFactory.java (modified) net/sf/asterisk/util/JavaLoggingLog.java (new) |
From: Stefan R. <sr...@re...> - 2005-04-15 17:07:12
|
> Yep, the changes finally showed up. It appears that the ReplyBuilder > interface was not removed. Oops I missed that one. fixed it. =Stefan |
From: Steve D. <Ste...@Su...> - 2005-04-15 16:47:57
|
>It takes some time until the >sourceforge's public CVS servers get >synced with the latest changes. >In the meantime you can try the >snapshot available from >asterisk-java's homepage. >AFAIR the URL is >http://maven.reucon.net/maven/asterisk-java/distributions > > Yep, the changes finally showed up. It appears that the ReplyBuilder interface was not removed. |
From: Stefan R. <sr...@re...> - 2005-04-15 15:59:00
|
> This isn't a bug. It's the "broken" way that asterisk handles the > status request. One would think that a request would receive a > response and not generate events. yes, thats an asterisk issue. There has been some discussion on the asterisk-dev mailing list about this, but it has not yet resulted in a change. Actually the "Status" action behaves kinda better than the actions for queues and agents. It sends a number of StatusEvents (one for each channel) and finally a StatusCompleteEvent. The completion event is missing for queues and the like so you never know if it is really done. With asterisk-java you can use the DefaultAsteriskManager and its getChannels() method to get an up to date list of all channels. The DefaultAsteriskManager handles all the Status event stuff and also the events that indicate changes of an active channel like NewExtenEvent or HangupEvent. Have a look at it if you like to. =Stefan |
From: Chris H. <ch...@as...> - 2005-04-15 14:16:11
|
----- Original Message -----=20 From: Dov Bigio=20 To: asterisk-java-users=20 Sent: Friday, April 15, 2005 8:06 AM Subject: [Asterisk-java-users] asterisk-java, ports Hi, I've been doing some tests, not exactly with asterisk-java, but with a = perl script that keeps sending "show agents" and "show channels" to port = 5038, gets the response, parses it and submit to a MySQL Database. Then = I have a Java application that reads from the database and display this = information to the end-user. The problem I have is that sometimes, after I send a "show channels" = command and wait for the response I get some asterisk events, which are = not valid responses to my request. I guess this happens because Asterisk uses the same port for events = and the manager API. Is this a common error? Is there a way to avoid it? If I did the parsing application using asterisk-java instead of Pearl, = would I still be vulnerable to this kind of error? This isn't a bug. It's the "broken" way that asterisk handles the = status request. One would think that a request would receive a response = and not generate events. Chris |
From: Dov B. <do...@te...> - 2005-04-15 13:06:28
|
Hi, I've been doing some tests, not exactly with asterisk-java, but with a pe= rl script that keeps sending "show agents" and "show channels" to port 50= 38, gets the response, parses it and submit to a MySQL Database. Then I h= ave a Java application that reads from the database and display this info= rmation to the end-user. The problem I have is that sometimes, after I send a "show channels" comm= and and wait for the response I get some asterisk events, which are not v= alid responses to my request. I guess this happens because Asterisk uses the same port for events and t= he manager API. Is this a common error? Is there a way to avoid it? If I did the parsing application using asterisk-java instead of Pearl, wo= uld I still be vulnerable to this kind of error? Thank you Dov |
From: Stefan R. <ste...@po...> - 2005-04-15 07:36:02
|
> Hmm, I must not have CVS HEAD then, since I don't see any changes in > AGIRequestImpl, at least. It takes some time until the sourceforge's public CVS servers get synced with the latest changes. In the meantime you can try the snapshot available from asterisk-java's homepage. AFAIR the URL is http://maven.reucon.net/maven/asterisk-java/distributions =Stefan |
From: Steve D. <Ste...@Su...> - 2005-04-15 07:04:34
|
Stefan Reuter wrote: >On Thu, 2005-04-14 at 19:57 -0700, Steve Drach wrote: > > >>As we discussed I proposed getting rid of ReplyBuilder and >>RequestBuilder and folding their functionality into the AGIReply and >>AGIRequest(impl) classes. >> >> > >Thanks for your patch. I adjusted my test cases and commited your >changes to CVS HEAD. > > Hmm, I must not have CVS HEAD then, since I don't see any changes in AGIRequestImpl, at least. |
From: Stefan R. <sr...@re...> - 2005-04-15 04:23:00
|
On Thu, 2005-04-14 at 19:57 -0700, Steve Drach wrote: > As we discussed I proposed getting rid of ReplyBuilder and > RequestBuilder and folding their functionality into the AGIReply and > AGIRequest(impl) classes. Thanks for your patch. I adjusted my test cases and commited your changes to CVS HEAD. > Speaking of which, why does request have an > interface and implementation and reply doesn't? There was no appropriate reason to do so therefore I split the AGIReply into interface and implementation just like AGIRequest. =Stefan |
From: Steve D. <Ste...@Su...> - 2005-04-15 02:58:26
|
As we discussed I proposed getting rid of ReplyBuilder and RequestBuilder and folding their functionality into the AGIReply and AGIRequest(impl) classes. Speaking of which, why does request have an interface and implementation and reply doesn't? I removed the following files: net/sf/asterisk/fastagi/ReplyBuilder.java net/sf/asterisk/fastagi/RequestBuilder.java net/sf/asterisk/fastagi/impl/ReplyBuilderImpl.java net/sf/asterisk/fastagi/impl/RequestBuilderImpl.java I modified: net/sf/asterisk/fastagi/AGIRequest.java net/sf/asterisk/fastagi/impl/AGIReaderImpl.java net/sf/asterisk/fastagi/impl/AGIRequestImpl.java net/sf/asterisk/fastagi/reply/AGIReply.java Note, I could have done more caching in the caller ID methods, but decided it was probably not necessary. The modified files are in the attached tar.gz file (sourceforge blocks zip files). |
From: Steve D. <Ste...@Su...> - 2005-04-14 21:57:12
|
>> After updating asterisk-java with the changes I sent yesterday, > I didn't get any changes. Did you post them to the mailing list? Yes, I did as a zip file attachment. Is there an issues with doing that? What is suggested way to post them? >> the aformentioned port was straight forward as seen below. > This looks quite good. If you agree I would like to include it as an > example in the distribution of Asterisk-java after applying the changes > you suggested. Sure, you can post it as an example. |
From: Steve D. <Ste...@Su...> - 2005-04-14 20:12:40
|
>> Why not just use the logging built into Java? It does the same thing >> in this simple case. > > You are right, using Java's builtin logging is an alternative. > I see two problems with this approach though: > > 1. Asterisk-java using Java's logging would require JDK 1.4 at least. > Currently it also works with 1.3. > 2. Some application servers and servlet containers (e.g. JBoss) are > using log4j for logging. Commons-logging uses log4j when available, > too. > So when using Asterisk-java within such a container logs are easily > integrated. I am not sure this works equally well when using Java's > logging without a wrapper around. OK. Then put java.util.logging, before the null log. So if commons is there, that is used, otherwise if jul is there that is used, otherwise use null log. I'll submit a patch. |
From: Stefan R. <sr...@re...> - 2005-04-11 23:49:56
|
On Mon, 2005-04-11 at 14:30 -0700, Steve Drach wrote: > After updating asterisk-java with the changes I sent yesterday, I didn't get any changes. Did you post them to the mailing list? > the aformentioned port was straight forward as seen below. This looks quite good. If you agree I would like to include it as an example in the distribution of Asterisk-java after applying the changes you suggested. =3DStefan |
From: Stefan R. <sr...@re...> - 2005-04-11 23:48:02
|
On Mon, 2005-04-11 at 14:38 -0700, Steve Drach wrote: > Why not just use the logging built into Java? It does the same thing > in this simple case. You are right, using Java's builtin logging is an alternative. I see two problems with this approach though: 1. Asterisk-java using Java's logging would require JDK 1.4 at least. Currently it also works with 1.3. 2. Some application servers and servlet containers (e.g. JBoss) are using log4j for logging. Commons-logging uses log4j when available, too. So when using Asterisk-java within such a container logs are easily integrated. I am not sure this works equally well when using Java's logging without a wrapper around. =3DStefan |
From: Stefan R. <sr...@re...> - 2005-04-11 23:43:41
|
On Mon, 2005-04-11 at 14:45 -0700, Steve Drach wrote: > SCRIPT_PATTERN is defined as "^([^\\?]*)\\?(.*)$" >=20 > This will match the empty string before the question mark. I think the=20 > pattern should be > ^([^\\?]+) etc. >=20 > Likewise PARAMETER_PATTERN is "^(.*)=3D(.*)$", again matching the empty=20 > string before > an equal sign Thanks for your hint. I changed the patterns in CVS. =3DStefan |
From: Steve D. <Ste...@Su...> - 2005-04-11 21:48:08
|
SCRIPT_PATTERN is defined as "^([^\\?]*)\\?(.*)$" This will match the empty string before the question mark. I think the pattern should be ^([^\\?]+) etc. Likewise PARAMETER_PATTERN is "^(.*)=(.*)$", again matching the empty string before an equal sign |
From: Steve D. <Ste...@Su...> - 2005-04-11 21:38:17
|
> After further investigation I think the easiest way to go is to use a > very thin wrapper around commons-logging"s LogFactory that determines > via reflection if the commons-logging classes are available. If they > are available on the classpath a commons-logging Log object (in fact a > proxy for it) will be returned otherwise a NullLog will be returned > that does nothing. So we will still have a compile time dependency on > commons-logging but at runtime logging is just switched off if > commons-logging is not available. Why not just use the logging built into Java? It does the same thing in this simple case. |
From: Steve D. <Ste...@Su...> - 2005-04-11 21:30:23
|
After updating asterisk-java with the changes I sent yesterday, the aformentioned port was straight forward as seen below. import java.util.*; import net.sf.asterisk.fastagi.*; import net.sf.asterisk.fastagi.command.*; import net.sf.asterisk.fastagi.reply.*; /* * Created on Apr 7, 2005 * * TODO To change the template for this generated file go to * Window - Preferences - Java - Code Style - Code Templates */ /** * @author drach * * TODO To change the template for this generated type comment go to * Window - Preferences - Java - Code Style - Code Templates */ public class TestFastAGI extends AbstractAGIScript { private int tests, pass, fail; private int s, p; private void print(String s) { System.err.print(s); } private void checkResult(AGIReply reply) { tests++; if (reply.getStatus() == 200) { if (reply.getResult() == null) { print("FAIL (" + reply.getFirstLine() + ")\n"); fail++; } else { print("PASS (" + reply.getResult() + ")\n"); pass++; } } else { print("FAIL (unexpected result '" + reply.getFirstLine() + "')\n"); fail++; } } public void service(AGIRequest request, AGIChannel channel) throws AGIException { Map values; Iterator i; SortedSet keys = new TreeSet(); keys.addAll((values = request.getRequest()).keySet()); print("AGI Environment Dump from --\n"); i = keys.iterator(); while (i.hasNext()) { String key; key = (String)i.next(); print(" -- " + key + " = " + (String)values.get(key) + "\n"); } print("1. Testing 'sendfile'..."); checkResult(channel.sendCommand(new StreamFileCommand("beep"))); print("2. Testing 'sendtext'..."); checkResult(channel.sendCommand(new SendTextCommand("hello world"))); print("3. Testing 'sendimage'..."); checkResult(channel.sendCommand(new SendImageCommand("asterisk-image"))); print("4. Testing 'saynumber'..."); checkResult(channel.sendCommand(new SayNumberCommand("192837465"))); print("5. Testing 'waitdtmf'..."); checkResult(channel.sendCommand(new WaitForDigitCommand(1000))); print("6. Testing 'record'..."); checkResult(channel.sendCommand(new RecordFileCommand("testagi", "gsm", "1234", 3000))); print("6a. Testing 'record' playback..."); checkResult(channel.sendCommand(new StreamFileCommand("testagi"))); print("================== Complete ======================\n"); print(tests + " tests completed, " + pass + " passed, " + fail + " failed\n"); print("==================================================\n"); } } |