asterisk-java-users Mailing List for Asterisk-Java Library (Page 178)
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: Stefan R. <sr...@re...> - 2005-04-09 11:22:29
|
Hi, I prepared a first release candidate of asterisk-java. Please have a look at it and provide some feedback, so I can release a final 0.1 release at the end of april. The release candidate is available from sourceforge at http://sourceforge.net/projects/asterisk-java/ =Stefan |
From: Stefan R. <sr...@re...> - 2005-04-06 19:16:27
|
I added parameters to AGIRequest in Asterisk-java's latest CVS. On Wed, 2005-04-06 at 16:58 +0800, Dax Reyes wrote: [snip] > Yes, I am just basing my 'porting' on the fast-agi 'welcome' example > so I am assuming that by adding that functionality, inside the > method 'service' , I can add something like > > if (transcode == "dcx") [snip] You can do it like this: if ("dcx".equals(request.getParameter("transcode")) ... > Also what happens if two or more parameters/arguments get passed? > exten => s,2,FastAGI(agi://server/testscript?arg1=dcx&arg2=something) The implementation follows the notation of HTTP parameters. So you can use as many parameters as you like and you can even assign a parameter multiple values that can be retrieved as an array of Strings via getParameterValues. Please check out the lastest snapshot on http://maven.reucon.com/maven/asterisk-java/distributions/ and tell me if it works for you. Thanks, Stefan |
From: Dax R. <ra...@gm...> - 2005-04-06 08:58:19
|
On Apr 6, 2005 2:44 PM, Stefan Reuter <sr...@re...> wrote: <snipped> > currently FastAGI does not support passing parameters, but it is quite > easy to add this functionality. > Would something like > > exten => s,2,FastAGI(agi://server/testscript?transcode=dcx) > > help you? > Yes, I am just basing my 'porting' on the fast-agi 'welcome' example so I am assuming that by adding that functionality, inside the method 'service' , I can add something like if (transcode == "dcx") streamFile(channel, "welcome"); else if (transcode == "dcy") streamFile(channel,"notwelcome"); else streamFile(channel,"unknown"); Also what happens if two or more parameters/arguments get passed? exten => s,2,FastAGI(agi://server/testscript?arg1=dcx&arg2=something) > =Stefan > Thanks :-) , Dax |
From: Stefan R. <sr...@re...> - 2005-04-06 06:45:05
|
Hi, On Wed, 2005-04-06 at 14:23 +0800, Dax Reyes wrote: > exten => s,2,agi,testscript.py|--transcode=dcx > Im using pyst (agi python). Im trying to port it to java and use > fastagi module of asterisk-java > Im just wondering how can I pass parameters? currently FastAGI does not support passing parameters, but it is quite easy to add this functionality. Would something like exten => s,2,FastAGI(agi://server/testscript?transcode=dcx) help you? =Stefan |
From: Dax R. <ra...@gm...> - 2005-04-06 06:23:48
|
Hello, I have something like this in extensions.conf [Test] exten => s,1,Playback(Intro) exten => s,2,agi,testscript.py|--transcode=dcx exten => s,3,Hangup Im using pyst (agi python). Im trying to port it to java and use fastagi module of asterisk-java Im just wondering how can I pass parameters? TIA, Dax |
From: Stefan R. <sr...@re...> - 2005-03-31 23:01:54
|
Hi Alex, > 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. I just implemented this as described before. If commons-logging is available it will be used, if not no logging is done. So now you only need to include the asterisk-java jar file if you dont need any logging. Please check the latest snapshot available from http://maven.reucon.com/maven/asterisk-java/distributions/ that includes this change. =Stefan |
From: Stefan R. <sr...@re...> - 2005-03-31 20:42:08
|
On Thu, 2005-03-31 at 11:04 -0800, Steve Drach wrote: > I think the blank is in the wrong place -- >=20 > diff -r1.1 ReplyBuilderImpl.java > 41c41 > < .compile("^200 result=3D\\S+( \\(.*\\) )?(.+)$"); > --- > > .compile("^200 result=3D\\S+ (\\(.*\\) )?(.+)$"); >=20 Yep, i fixed it in latest CVS though it had no impact. The additional space included in the first group is stripped of by applying the ADDITIONAL_ATTRIBUTE_PATTERN "(\\S+)=3D(\\S+)" later on. =3DStefan |
From: Steve D. <Ste...@Su...> - 2005-03-31 19:04:48
|
I think the blank is in the wrong place -- diff -r1.1 ReplyBuilderImpl.java 41c41 < .compile("^200 result=\\S+( \\(.*\\) )?(.+)$"); --- > .compile("^200 result=\\S+ (\\(.*\\) )?(.+)$"); |
From: Stefan R. <sr...@re...> - 2005-03-31 13:49:01
|
> > The raw reply string is only printed in case of a failure. > Yep, and that is functionality not easily obtained. Note there are=20 > other issues > that make a "port" difficult. Now I understand your issues. Porting existing AGI scripts from say Perl to Java was not a scenario is looked at when designing Asterisk-java. > One is throwing an exception if status 520 (or was it 510) is returned. The exceptions for 510 and 520 were introduced to free the developer from having to check the status code after every command sent to Asterisk. > Another, but only because it is time consuming, is listing the request > environment key/values.=20 You are right access to the environment variables via a Map might indeed be a nice convenience functionality especially in the development phase. > If I had my way, and I guess I could, I'd get rid of ReplyBuilder=20 > altogether. I'd hand > the list of lines to AGIReply in it's constructor and let them stay=20 > cached in AGIReply, > giving access to (at least the first) line outside of the object. The=20 > current getters would > become convenience methods that perform lazy evaluations if they are=20 > called. Of > course the results are cached, not computed everytime. No need for=20 > setters. Frankly > I'm not sure why you chose to build the reply outside of the reply=20 > object. > One could probably get rid of RequestBuilder in the same way. The builder approach results from the implementation of the Manager API. Building a ManagerEvent involves choosing the right event class and filling the attributes via reflection. Therefore i choose to implement the objects passed to Asterisk as dump value objects with no logic. The FastAGI implementation does follow this approach for the AGIRequest and AGIReply but not for the AGICommand. So it's not really consistent. Your proposed approach would remove these two builders, remove the - possible confusing - setters and allow easy access to the raw data. It would also improve performance (though that might not be much of an issue compared to the network communication involved). Right now I don't see any drawbacks. > Perhaps I should put my thoughts into code and forward it to the=20 > mailing list for consideration/discussion. If you want to submit a patch I am happy to drop the builders for FastAGI and follow your proposal. =3DStefan |
From: Stefan R. <sr...@re...> - 2005-03-31 12:07:22
|
On Tue, 2005-03-22 at 23:04 +0000, Stefan Reuter wrote: >=20 > > But is it guaranteed > > that for each channel receiving a LinkEvent there will be a > > corresponding UnlinkEvent? >=20 > To answer your question I must look at the asterisk source code - > documentation of asterisks manager api is not that reliable yet ;) > I will check this next week when I am back. I didn't find exact evidence that guarantees this behavior but if Asterisk does not provide a corresponding UnlinkEvent i would consider this a bug in Asterisk. Actually i never observed a missing UnlinkEvent so i guess your code is reasonably safe. =3DStefan |
From: Stefan R. <sr...@re...> - 2005-03-31 11:44:37
|
On Wed, 2005-03-30 at 13:13 -0600, Alex Malinovich wrote: > On Tue, 2005-03-22 at 22:59 +0000, Stefan Reuter wrote: > --snip-- > > The dependency on commons-lang should be removed in latest CVS. I am no= t > > aware on a dependency of commons-logging on commons-lang. >=20 > At the time that I was building the packages, there was a commons-lang > function (something similiar to toString, but I forget the exact name) > that was being called inside commons-logging. I grepped the source code of commons-logging 1.0.4 for the string "commons.lang" and found no match. Therefore I suppose recent versions of commons-logging do no longer depend on commons-lang. > > I will look at the code again when i am back home next week and decide = if > > its possible to borrow the stuff for switching the logging api between = jdk > > and log4j and remove that dependency as well. >=20 > I don't know if there's any simple way to do this. For test, the logging > functionality is definitely useful. However, when it comes time to > distribute the program, having to add two extra dependencies that will > NEVER actually be used is kind of frustrating. Sure I understand your concerns. 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. Will this change help you? > So far, I've had very positive experiences with the library. The > application that I'm using it in has made it up to v0.97d and has been > stable for over a week. (We use it all day every day during the week > here at the office.) Thats nice to hear and makes me more confident of providing a non-crappy release candidat :) r > I have also received approval from my company to release the > publicly under the GPL. As soon as I have some time to clean up the code > and put in appropriate GPL blurbs in all the source I'm going to look at > getting the project put up on sourceforge for continued development. When you have more information available on that let us now - it will be the first open source software using Asterisk-java i know of. > At that point, I would be VERY interested in having release candidates > available for asterisk-java so that I can easily say something like, > v0.97d depends on asterisk-java rc1, v1.0 depends on asterisk-java rc3 > (or 0.2 rc1, etc.). Sure. I will try my best to provide it asap. I will change the logging dependency as described above and start packaging. Did you have a look at the maven built snapshot releases on http://maven.reucon.com/maven/asterisk-java/distributions/ ? =3DStefan |
From: Alex M. <al...@go...> - 2005-03-30 19:13:44
|
On Tue, 2005-03-22 at 22:59 +0000, Stefan Reuter wrote: --snip-- > The dependency on commons-lang should be removed in latest CVS. I am not > aware on a dependency of commons-logging on commons-lang. At the time that I was building the packages, there was a commons-lang function (something similiar to toString, but I forget the exact name) that was being called inside commons-logging. > I will look at the code again when i am back home next week and decide if > its possible to borrow the stuff for switching the logging api between jd= k > and log4j and remove that dependency as well. I don't know if there's any simple way to do this. For test, the logging functionality is definitely useful. However, when it comes time to distribute the program, having to add two extra dependencies that will NEVER actually be used is kind of frustrating. > Please help me with some testing of the library and post your results > (positive and negative experiences to the list). > If you wish we can start with a release candidate within the next two or > three weeks. So far, I've had very positive experiences with the library. The application that I'm using it in has made it up to v0.97d and has been stable for over a week. (We use it all day every day during the week here at the office.) I have also received approval from my company to release the program publicly under the GPL. As soon as I have some time to clean up the code and put in appropriate GPL blurbs in all the source I'm going to look at getting the project put up on sourceforge for continued development. At that point, I would be VERY interested in having release candidates available for asterisk-java so that I can easily say something like, v0.97d depends on asterisk-java rc1, v1.0 depends on asterisk-java rc3 (or 0.2 rc1, etc.). --=20 Alex Malinovich Golden Technologies, Inc. (219) 462-7200 x 216 http://www.golden-tech.com |
From: Steve D. <Ste...@Su...> - 2005-03-30 18:22:32
|
> What do you exactly need the raw reply for? You answered it at the end of the next paragraph. > When looking at the fastagi-test script supplied with asterisk the > checkresult subroutine checks the status code and the result. > All parts of the reply are available in AGIReply, so these two checks > could be implemented using getStatusCode() == SC_SUCCESS and checking > for getResult() to be a String representation of an Integer. > The raw reply string is only printed in case of a failure. Yep, and that is functionality not easily obtained. Note there are other issues that make a "port" difficult. One is throwing an exception if status 520 (or was it 510) is returned. Another, but only because it is time consuming, is listing the request environment key/values. Remember, I was doing this to help me learn Asterisk-Java. It pointed up some issues. I'm not sure if they are important or not. > If it is a real requirement to have the raw reply available I can > easily > add it I can't say it's a "real" requirement, more like a "nice to have". > as you suggested but as the purpose of asterisk-java is to hide > the raw protocol from the Java developer I am not sure it really makes > much sense. > What do you think? I see the value in that. But I also think it's valuable to have access to the underlying raw data in case someone needs it in an unanticipated way. If I had my way, and I guess I could, I'd get rid of ReplyBuilder altogether. I'd hand the list of lines to AGIReply in it's constructor and let them stay cached in AGIReply, giving access to (at least the first) line outside of the object. The current getters would become convenience methods that perform lazy evaluations if they are called. Of course the results are cached, not computed everytime. No need for setters. Frankly I'm not sure why you chose to build the reply outside of the reply object. One could probably get rid of RequestBuilder in the same way. Perhaps I should put my thoughts into code and forward it to the mailing list for consideration/discussion. Thanks for a nice framework! Steve |
From: Stefan R. <sr...@re...> - 2005-03-30 01:35:28
|
Hi Steve, On Tue, 2005-03-29 at 16:21 -0800, Steve Drach wrote: > I've looked at it a little bit more and I now understand that "result" > is the part of the > string after "result=" in the reply, so the code as it stands is > correct. I fixed the javadoc for getResult to make this more obvious - the old comment was in fact a bit short :) > The problem > I'm facing is there is no way to get the raw reply string out of > AGIReply, and that is > what I need to duplicate the functionality of fastagi-test. I see two > solutions to this: > (1) save the raw reply first line in a new attribute in AGIReply, or > (2) change the > toString method to produce a canonical raw first line, or some > combination of both. What do you exactly need the raw reply for? When looking at the fastagi-test script supplied with asterisk the checkresult subroutine checks the status code and the result. All parts of the reply are available in AGIReply, so these two checks could be implemented using getStatusCode() == SC_SUCCESS and checking for getResult() to be a String representation of an Integer. The raw reply string is only printed in case of a failure. If it is a real requirement to have the raw reply available I can easily add it as you suggested but as the purpose of asterisk-java is to hide the raw protocol from the Java developer I am not sure it really makes much sense. What do you think? =Stefan |
From: Steve D. <Ste...@Su...> - 2005-03-30 00:22:50
|
I've looked at it a little bit more and I now understand that "result" is the part of the string after "result=" in the reply, so the code as it stands is correct. The problem I'm facing is there is no way to get the raw reply string out of AGIReply, and that is what I need to duplicate the functionality of fastagi-test. I see two solutions to this: (1) save the raw reply first line in a new attribute in AGIReply, or (2) change the toString method to produce a canonical raw first line, or some combination of both. On Mar 29, 2005, at 3:31 PM, Steve Drach wrote: > Hi, > > As my first AGIScript, I thought I'd duplicate the agi/fastagi-test > perl script included with the > asterisk souce code. In doing so, I think I found a problem with > ReplyBuilderImpl.java. > > At line 75, it says "reply.setResult(matcher.group(1));" > > I don't think that's what you want, or I don't understand the > attributes of AGIReply. I think > in the above line you want to setResultCode, and before any matches > are done, you > want to setResult(firstLine). Otherwise, there is no way to get the > entire result back. > |
From: Steve D. <Ste...@Su...> - 2005-03-29 23:31:29
|
Hi, As my first AGIScript, I thought I'd duplicate the agi/fastagi-test perl script included with the asterisk souce code. In doing so, I think I found a problem with ReplyBuilderImpl.java. At line 75, it says "reply.setResult(matcher.group(1));" I don't think that's what you want, or I don't understand the attributes of AGIReply. I think in the above line you want to setResultCode, and before any matches are done, you want to setResult(firstLine). Otherwise, there is no way to get the entire result back. |
From: Stefan R. <sr...@re...> - 2005-03-22 23:04:45
|
> But is it guaranteed > that for each channel receiving a LinkEvent there will be a > corresponding UnlinkEvent? To answer your question I must look at the asterisk source code - documentation of asterisks manager api is not that reliable yet ;) I will check this next week when I am back. stefan |
From: Stefan R. <sr...@re...> - 2005-03-22 22:59:20
|
Hi, sorry for the late reply but i am currently on holiday until tuesday next week. I understand your need for a clear indication of dependencies for a library like asterisk-java. The current approach is to only rely on commons-logging as it ensures complience with jdk 1.3 (which is missing logging and needs log4j) and allows using jdk provided logging or logging via log4j (which is nice when running jboss for example) when using jdk 1.4 or 1.5. > Yup. In my case at least, I needed not only commons-logging which does > the actual logging, but also commons-lang because commons-logging calls > some methods out of commons-lang while it's running. Quite annoying. The dependency on commons-lang should be removed in latest CVS. I am not aware on a dependency of commons-logging on commons-lang. I will look at the code again when i am back home next week and decide if its possible to borrow the stuff for switching the logging api between jdk and log4j and remove that dependency as well. Finally to answer your original question: I plan to release a 0.1 version at the end of april. Please help me with some testing of the library and post your results (positive and negative experiences to the list). If you wish we can start with a release candidate within the next two or three weeks. nice greetings from a sunny place in a wlan covered garden ;) stefan |
From: Alex M. <al...@go...> - 2005-03-18 18:37:39
|
In the documentation for LinkEvent there's a note that it is possible to receive multiple LinkEvents for a call. This is ok. But is it guaranteed that for each channel receiving a LinkEvent there will be a corresponding UnlinkEvent? In other words, is there any possibility that code like the following could cause the openCalls Vector to have a 'left over' channel name? (Assuming that a channel switching between being Channel1 and Channel2 isn't an issue.) openCalls.add(linkEvent.getChannel1()); ... openCalls.remove(unlinkEvent.getChannel1()); --=20 Alex Malinovich Golden Technologies, Inc. (219) 462-7200 x 216 http://www.golden-tech.com |
From: Alex M. <al...@go...> - 2005-03-18 14:33:09
|
On Thu, 2005-03-17 at 19:57 -0600, Chris Howard wrote: > On Mar 17, 2005, at 7:12 PM, Alex Malinovich wrote: >=20 > >> > > > > Ok, I've managed to make my own jar and have it work. Unfortunately, it > > also requires me to distribute both commons-logging and commons-lang > > with the application. All together, this adds almost an entire megabyte > > to the size of the distributed application. And since this is a Java=20 > > Web > > Start program, that's going to end up being rather slow in the future. > > > > So with that said, is there any simple way to completely remove the=20 > > NEED > > for logging in asterisk-java? Something other than going through the > > entire source and removing every call to the logging facilities by hand > > of course. > > > Alex, > I had the same problem and it seem to be that the Jars for the =20 > logging was missing some of the classes required. Yup. In my case at least, I needed not only commons-logging which does the actual logging, but also commons-lang because commons-logging calls some methods out of commons-lang while it's running. Quite annoying. --=20 Alex Malinovich Golden Technologies, Inc. (219) 462-7200 x 216 http://www.golden-tech.com |
From: Chris H. <ch...@as...> - 2005-03-18 01:59:22
|
On Mar 17, 2005, at 7:12 PM, Alex Malinovich wrote: >> > > Ok, I've managed to make my own jar and have it work. Unfortunately, it > also requires me to distribute both commons-logging and commons-lang > with the application. All together, this adds almost an entire megabyte > to the size of the distributed application. And since this is a Java > Web > Start program, that's going to end up being rather slow in the future. > > So with that said, is there any simple way to completely remove the > NEED > for logging in asterisk-java? Something other than going through the > entire source and removing every call to the logging facilities by hand > of course. > Alex, I had the same problem and it seem to be that the Jars for the logging was missing some of the classes required. Chris |
From: Alex M. <al...@go...> - 2005-03-18 01:12:36
|
On Thu, 2005-03-17 at 17:37 -0600, Alex Malinovich wrote: > What are the odds of getting some nice, pre-packaged jars of > asterisk-java anytime in the near future? I'm ready to do a limited > rollout of my application here internally, but I need to distribute > asterisk-java with it. And since it's all being done with Java Web Start > I need a clean jar I can include. >=20 > I've tried making some of my own, but I keep having problems with the > logging libraries being missing. If I include them in, the application > just hangs. And javaws doesn't give me any errors that I can see, which > makes it difficult to diagnose. Ok, I've managed to make my own jar and have it work. Unfortunately, it also requires me to distribute both commons-logging and commons-lang with the application. All together, this adds almost an entire megabyte to the size of the distributed application. And since this is a Java Web Start program, that's going to end up being rather slow in the future. So with that said, is there any simple way to completely remove the NEED for logging in asterisk-java? Something other than going through the entire source and removing every call to the logging facilities by hand of course. --=20 Alex Malinovich Golden Technologies, Inc. (219) 462-7200 x 216 http://www.golden-tech.com |
From: Alex M. <al...@go...> - 2005-03-17 23:37:27
|
What are the odds of getting some nice, pre-packaged jars of asterisk-java anytime in the near future? I'm ready to do a limited rollout of my application here internally, but I need to distribute asterisk-java with it. And since it's all being done with Java Web Start I need a clean jar I can include. I've tried making some of my own, but I keep having problems with the logging libraries being missing. If I include them in, the application just hangs. And javaws doesn't give me any errors that I can see, which makes it difficult to diagnose. --=20 Alex Malinovich Golden Technologies, Inc. (219) 462-7200 x 216 http://www.golden-tech.com |
From: Stefan R. <sr...@re...> - 2005-03-15 18:32:55
|
On Tue, 2005-03-15 at 11:16 -0600, Chris Howard wrote: > Thanks for your help. I named the class UserEventASGHold and all is=20 > working well. ok. i just had a look at my sources to verify whats going on there :) if the class name ends with "event" (ignoring case) that part is stripped of, if not it is takes the full class name. I added support for user events to latest cvs so if your event extends UserEvent and does not start with "userevent" that string is prepended. so you can name your class ASGHold, ASGHoldEvent, UserEventASGHold or even UserEventASGHoldEvent with latest CVS. I would prefer ASGHoldEvent for a uniform naming schema. > It looks like there are alot of changes is the connection classes. When = I=20 > decide to upgrade to the latest codebase can I expect a speed increase :)= =20 Speed has not yet been optimized. I think the biggest "problem" is currently that the ManagerEventHandlers are called within the same thread as the events are received. So if you do a lot of processing in your handleEvent() methods that will block any other events from being received and (if you registered more than one EventHandler) other EventHandlers from being called timely. There is no easy solution to this because events must be dispatched in the right order. One possible solution is to use a separate Thread for each registered EventHandler. Do you encounter speed problems right now? Do you use multiple EventHandlers? > Also I noticed that NewExtenEvent are very chatty. Would it be faster to= =20 > not register that event if I'm not using it? Yes that might improve speed but if you check for the events you are interested in early in the handleEvent() method and return fast if not interested handling these additional events should not be much of an issue. Note that not registering events received from Asterisk will fill your logs with warnings about that. For the 0.1 release i plan to add an=20 addEventHandler(ManagerEventHandler eventHandler, ManagerEventFilter filer) method to the ManagerConnection so you can indicate which events you are interested in and Asterisk-java will not bother you with the irrelevant ones. =3DStefan |
From: Stefan R. <sr...@re...> - 2005-03-15 16:48:53
|
> > Created my own user event > > public class UserEventASGHold extends UserEvent >=20 > Your class must be named ASGHoldEvent just the name of the event you > will send with the appendix Event. I just had a look at the asterisk sources to verify that and indeed asterisk prefixes user events with UserEvent. So for now your class should be named UserEventASGHoldEvent - which really sucks. |