asterisk-java-users Mailing List for Asterisk-Java Library (Page 173)
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: Andrew W. <an...@ji...> - 2005-08-03 21:13:22
|
All, The 1.0 beta1 of the Asterisk-IM Jive Messenger XMPP (jabber) server plugin has been released today. Asterisk-IM has been built using the Asterisk-Java API. Asterisk-IM provides the following features: * Integrated presence between your IM client and phone. * Notification of incoming calls by IM. * Originate calls from the IM client. Please check it out at http://jivesoftware.org/asterisk-im All feedback is welcome. cheers, Andrew Wright |
From: Peter H. <pe...@li...> - 2005-07-27 10:50:19
|
Another question related to receiving dtmf. I'm trying to emulate "Background" functionality when streaming audio... I'm playing audio, while expecting dtmf input. However, sometimes the dt= mf=20 is not picked up by my implementation of AgiScript. Here's a simplified version of the code: int attempts=3D0; String validResponse=3D"0123456789"; while (attempts<=3D3) { attempts++; char responseCode; responseCode =3D streamFile(channel, "tt-weasels",=20 validResponses); if (responseCode =3D=3D '1') break; responseCode =3D streamFile(channel, "silence/5",=20 validResponses); if (responseCode =3D=3D '1') break; } Any thoughts? Thanks, Peter ----- Original Message -----=20 From: "Peter Hsu" <pe...@li...> To: <ast...@li...> Sent: Wednesday, July 27, 2005 1:29 AM Subject: [Asterisk-java-users] FastAGI question > Thanks Stefan, > > A question about the FastAGI stuff in general. Many of the functions=20 > provided by AbstractAGIScript allow DTMF input to be received from the=20 > server. > > Is there a way to catch multiple dtmf input instead of a single charact= er? > > i.e. I can wait for any digit from 0-9, but I can't wait for '10'.. > > Thanks, > Peter > > ----- Original Message -----=20 > From: "Stefan Reuter" <sr...@re...> > To: <ast...@li...> > Sent: Tuesday, July 26, 2005 6:29 AM > Subject: Re: [Asterisk-java-users] Originate Failure Events > > >> Hi Peter, >> >>> Is there any way to tell what the cause of an originate failure is? >> >> i don't think there currently is an easy one. >> Maybe you can observe the NewStateEvents that of the channel... >> but it is not an attribute that is supported out of the box. >> >> =3DStefan >> >> >> >> ------------------------------------------------------- >> SF.Net email is sponsored by: Discover Easy Linux Migration Strategies >> from IBM. Find simple to follow Roadmaps, straightforward articles, >> informative Webcasts and more! Get everything you need to get up to >> speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id=16492&op=CCk >> _______________________________________________ >> Asterisk-java-users mailing list >> Ast...@li... >> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >> > > > > ------------------------------------------------------- > SF.Net email is sponsored by: Discover Easy Linux Migration Strategies > from IBM. Find simple to follow Roadmaps, straightforward articles, > informative Webcasts and more! Get everything you need to get up to > speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id=16492&op=CCk > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >=20 |
From: Stefan R. <sr...@re...> - 2005-07-27 10:11:21
|
> A question about the FastAGI stuff in general. Many of the functions > provided by AbstractAGIScript allow DTMF input to be received from the > server. > Is there a way to catch multiple dtmf input instead of a single charact= er? > i.e. I can wait for any digit from 0-9, but I can't wait for '10'.. Most of Asterisk's AGI commands can be interrupted by pressing a DTMF dig= it. Which - if any - DTMF digits should cause an interruption can be specifie= d via the escapeDigits parameter of many of AbstractAGIScript's methods. Th= e singe character that those methods return corresponds to the digit that has been pressed to interrupt the command. There is no way to say "Abort this command only if user presses DTMF digi= t 2 after he pressed DTMF digit 1". If you want to read DTMF digits for further processing, you can use the GetDataCommand. See http://asterisk-java.sourceforge.net/apidocs/net/sf/asterisk/fastagi/comm= and/GetDataCommand.html The corresponding getData() methods are available in Asterisk-Java CVS-HEAD, but you can as well use the GetDataCommand with Asterisk-Java 0.1 vial channel.sendCommand() =3DStefan |
From: Peter H. <pe...@li...> - 2005-07-27 08:27:17
|
Thanks Stefan, A question about the FastAGI stuff in general. Many of the functions=20 provided by AbstractAGIScript allow DTMF input to be received from the=20 server. Is there a way to catch multiple dtmf input instead of a single character= ? i.e. I can wait for any digit from 0-9, but I can't wait for '10'.. Thanks, Peter ----- Original Message -----=20 From: "Stefan Reuter" <sr...@re...> To: <ast...@li...> Sent: Tuesday, July 26, 2005 6:29 AM Subject: Re: [Asterisk-java-users] Originate Failure Events > Hi Peter, > >> Is there any way to tell what the cause of an originate failure is? > > i don't think there currently is an easy one. > Maybe you can observe the NewStateEvents that of the channel... > but it is not an attribute that is supported out of the box. > > =3DStefan > > > > ------------------------------------------------------- > SF.Net email is sponsored by: Discover Easy Linux Migration Strategies > from IBM. Find simple to follow Roadmaps, straightforward articles, > informative Webcasts and more! Get everything you need to get up to > speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id=16492&op=CCk > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >=20 |
From: Peter H. <pe...@li...> - 2005-07-27 08:25:16
|
MessageDov, Yes, I'm guessing... I haven't looked at freetts, but you can take a look at their sample = java files to see how they generate the audio files. You'd need to use = the FastAGI asterisk-java stuff to play the file. You'd also need to be able to save files to the asterisk server in one = way or another. The easiest way is to have all this running on the = asterisk server. Save the file output to asterisk's sound directory. From there, it's pretty straightforward, just do a streamFile(channel, = "file name"); from your agi script implementation. =20 Peter ----- Original Message -----=20 From: Dov Bigio=20 To: ast...@li...=20 Sent: Tuesday, July 26, 2005 6:15 PM Subject: [Asterisk-java-users] java tts with asterisk-java Hi, Is there a way to use FreeTTS (http://freetts.sourceforge.net/) with = Asterisk Java and send the output sound to a channel? Thank you! Dov |
From: Dov B. <dov...@te...> - 2005-07-27 01:16:09
|
Hi, Is there a way to use FreeTTS (http://freetts.sourceforge.net/) with Asterisk Java and send the output sound to a channel? Thank you! Dov |
From: Stefan R. <sr...@re...> - 2005-07-26 13:29:37
|
Hi Peter, > Is there any way to tell what the cause of an originate failure is? i don't think there currently is an easy one. Maybe you can observe the NewStateEvents that of the channel... but it is not an attribute that is supported out of the box. =3DStefan |
From: Stefan R. <sr...@re...> - 2005-07-26 13:25:23
|
> No, it's more likely that I miss something. I haven't yet used > OriginateAction > in real code, just tried to grok what the parameters do. I believe you > when > you say it can be done. :) I'll just dive in and start using > OriginateAction > and play with the different parameters. The whole world of SIP can be a > bit confusing sometimes. Just try it. set channel to the channel you use to dial your sip client, like setChannel("SIP/username"); then set context, extension and priority to the dial plan entry that will dial the third party like setContext("outbound"); setExtension("123456"); // number of the third party setPriority(new Integer(1)); and finally set async to Boolean.TRUE if you are interested in the OriginateSuccess and OriginateFailure events. > Ah, I'll certainly have a closer look at ADM. The code looks very clean > (just > as Asterisk-Java) and I guess it can teach me a trick or two. Thanks fo= r > the > pointer! Thanks, thats nice to hear :) =3DStefan |
From: Jan E. <jan...@pl...> - 2005-07-26 13:11:45
|
On Tuesday 26 July 2005 15:59, Stefan Reuter wrote: > Hi Jan, > > > I'm looking at initiating a call to a > > third party (using OriginateAction) and then transfer the call to a VoIP > > client application that the user already runs. > > What do you need the redirect for? If you want to connect the third party > to the VoIP application (i.e. hard or softphone) you might do this > directly with the OriginateAction... maybe I am missing something here. No, it's more likely that I miss something. I haven't yet used OriginateAction in real code, just tried to grok what the parameters do. I believe you when you say it can be done. :) I'll just dive in and start using OriginateAction and play with the different parameters. The whole world of SIP can be a bit confusing sometimes. > > Has anyone tried this and got it to work? Doing it like this would allow > > me to initiate calls from within my application and basically have it > > work with any SIP client. > > Nevertheless you can certainly use the RedirectAction. Last time I used it > was a few days ago for the upcoming Asterisk Desktop Manager (ADM). You > can browse the relevant sources at > http://adm.hamnett.org/fisheye/viewrep/ADM/adm/src/org/hamnett/adm/asterisk >/impl/AsteriskPlugin.java?r=1.23 dial() and redirect() methods start around > line 200. > > ADM allows you to originate calls to your phone (or sip client or what > ever) via OriginateAction (ADM calls that Quick Dial) and allows you to > redirect any active call to or from your phone to another extension (via > RedirectAction). So maybe that might be an example for you to look at. Ah, I'll certainly have a closer look at ADM. The code looks very clean (just as Asterisk-Java) and I guess it can teach me a trick or two. Thanks for the pointer! -- Jan Ekholm jan...@pl... |
From: Stefan R. <sr...@re...> - 2005-07-26 12:59:12
|
Hi Jan, > I'm looking at initiating a call to a > third party (using OriginateAction) and then transfer the call to a VoI= P > client application that the user already runs. What do you need the redirect for? If you want to connect the third party to the VoIP application (i.e. hard or softphone) you might do this directly with the OriginateAction... maybe I am missing something here. > Has anyone tried this and got it to work? Doing it like this would allo= w > me to initiate calls from within my application and basically have it > work with any SIP client. Nevertheless you can certainly use the RedirectAction. Last time I used i= t was a few days ago for the upcoming Asterisk Desktop Manager (ADM). You can browse the relevant sources at http://adm.hamnett.org/fisheye/viewrep/ADM/adm/src/org/hamnett/adm/asteri= sk/impl/AsteriskPlugin.java?r=3D1.23 dial() and redirect() methods start around line 200. ADM allows you to originate calls to your phone (or sip client or what ever) via OriginateAction (ADM calls that Quick Dial) and allows you to redirect any active call to or from your phone to another extension (via RedirectAction). So maybe that might be an example for you to look at. Happy coding, Stefan |
From: Jan E. <jan...@pl...> - 2005-07-26 12:42:31
|
Hi, The subject basically says it all. :) I'm looking at initiating a call to a third party (using OriginateAction) and then transfer the call to a VoIP client application that the user already runs. Being a bit of a newbie I guess this is doable using the REFER SIP command, but I don't know if it is currently doable using Asterisk-Java. RedirectAction sounds like it could be what I want, as it matches the AMI Redirect action: http://www.voip-info.org/tiki-index.php?page=Asterisk+Manager+API+Action+Redirect Has anyone tried this and got it to work? Doing it like this would allow me to initiate calls from within my application and basically have it work with any SIP client. -- Jan Ekholm jan...@pl... |
From: Peter H. <pe...@li...> - 2005-07-25 21:45:04
|
Is there any way to tell what the cause of an originate failure is? Specifically, I'd like to be able to find out if the provider accepted the call and the there was a timeout waiting for the user to answer or if the provider accepted the call, but was unable to process it for other reasons. (i.e. i should try a different provider) Peter |
From: dovb <do...@te...> - 2005-07-25 01:04:59
|
Sorry!!!! I saw the error, and fixed it! Thank you Dov -----Original Message----- From: ast...@li... [mailto:ast...@li...] On Behalf Of Stefan Reuter Sent: s=E1bado, 23 de julho de 2005 06:11 To: ast...@li... Subject: RE: [Asterisk-java-users] RE: connection reset > Sorry to insist on this... But I have tried several times, even no problem i will reply again. you sill the same error in your script. > simplifying the already simple test, and it still doesn't work! that while loop is totally crazy plus it doesnt strip the # so you are still sending the # to asterisk. this gets asterisk into trouble because there is no sound file for a # digit. you can still see this on asterisk's console (please look there using a high verbosity level!): -- Playing 'digits/1' (language 'en') -- Playing 'digits/2' (language 'en') -- Playing 'digits/3' (language 'en') Jul 23 16:59:28 WARNING[801]: file.c:475 ast_openstream: File digits/# does notexist in any format Jul 23 16:59:28 WARNING[801]: file.c:779 ast_streamfile: Unable to open digits/# (format ulaw): No such file or directory that causes asterisk to hangup the channel and thats what Asterisk-Java reports (actually it notices the hangup not until you try to send the next command thats why it stll prints the "will play agent-newlocation again"). Please fix your java code! suggestion: public void service(AGIRequest request, AGIChannel channel) throws AGIException { // Answer the channel... answer(channel); System.out.println("will play agent-newlocation"); streamFile(channel, "agent-newlocation"); String read =3D ""; AGIReply reply =3D null; StringBuffer result =3D new StringBuffer(); while (!read.equals("#")) { WaitForDigitCommand wc =3D new WaitForDigitCommand(); try { reply =3D channel.sendCommand(wc); } catch (AGIException e) { e.printStackTrace(); System.exit(0); } String resp =3D (String) reply.getResult(); int number =3D new Integer(resp).intValue(); char c =3D (char) number; read =3D new Character(c).toString(); // don't add the # sign! if (!read.equals("#")) { result.append(read); } } SayDigitsCommand sc =3D new SayDigitsCommand(result.toString()); AGIReply rep =3D channel.sendCommand(sc); System.out.println("will play agent-newlocation again"); streamFile(channel, "agent-newlocation"); hangup(channel); } =3DStefan |
From: Stefan R. <sr...@re...> - 2005-07-23 09:12:20
|
> Sorry to insist on this... But I have tried several times, even no problem i will reply again. you sill the same error in your script. > simplifying the already simple test, and it still doesn't work! that while loop is totally crazy plus it doesnt strip the # so you are still sending the # to asterisk. this gets asterisk into trouble because there is no sound file for a # digit. you can still see this on asterisk's console (please look there using a high verbosity level!): -- Playing 'digits/1' (language 'en') -- Playing 'digits/2' (language 'en') -- Playing 'digits/3' (language 'en') Jul 23 16:59:28 WARNING[801]: file.c:475 ast_openstream: File digits/# does notexist in any format Jul 23 16:59:28 WARNING[801]: file.c:779 ast_streamfile: Unable to open digits/# (format ulaw): No such file or directory that causes asterisk to hangup the channel and thats what Asterisk-Java reports (actually it notices the hangup not until you try to send the next command thats why it stll prints the "will play agent-newlocation again"). Please fix your java code! suggestion: public void service(AGIRequest request, AGIChannel channel) throws AGIException { // Answer the channel... answer(channel); System.out.println("will play agent-newlocation"); streamFile(channel, "agent-newlocation"); String read =3D ""; AGIReply reply =3D null; StringBuffer result =3D new StringBuffer(); while (!read.equals("#")) { WaitForDigitCommand wc =3D new WaitForDigitCommand(); try { reply =3D channel.sendCommand(wc); } catch (AGIException e) { e.printStackTrace(); System.exit(0); } String resp =3D (String) reply.getResult(); int number =3D new Integer(resp).intValue(); char c =3D (char) number; read =3D new Character(c).toString(); // don't add the # sign! if (!read.equals("#")) { result.append(read); } } SayDigitsCommand sc =3D new SayDigitsCommand(result.toString()); AGIReply rep =3D channel.sendCommand(sc); System.out.println("will play agent-newlocation again"); streamFile(channel, "agent-newlocation"); hangup(channel); } =3DStefan |
From: dovb <do...@te...> - 2005-07-23 04:53:08
|
Hi Stephan, Sorry to insist on this... But I have tried several times, even simplifying the already simple test, and it still doesn't work! In the example code below, after I dial "123#" I hear it saying 1,2,3 and just after printing "will play agent-newlocation again", I still get the following message: 23/07/2005 01:49:28 net.sf.asterisk.util.impl.JavaLoggingLog error SEVERE: AGIException while handling request: Unable to read reply from Asterisk: Connection reset The connection is then Hangup... What else could be wrong??? The file "agent-newlocation" exists, since it plays correctly on the first time! Thank you again! Dov public void service(AGIRequest request, AGIChannel channel) throws AGIException { // Answer the channel... answer(channel); System.out.println("will play agent-newlocation"); streamFile(channel, "agent-newlocation"); String read = ""; AGIReply reply = null; StringBuffer result = new StringBuffer(); while (!read.equals("#")) { WaitForDigitCommand wc = new WaitForDigitCommand(); try { reply = channel.sendCommand(wc); } catch (AGIException e) { e.printStackTrace(); System.exit(0); } String resp = (String) reply.getResult(); int number = new Integer(resp).intValue(); char c = (char) number; read = new Character(c).toString(); result.append(read); } SayDigitsCommand sc = new SayDigitsCommand(result.toString()); AGIReply rep = channel.sendCommand(sc); System.out.println("will play agent-newlocation again"); streamFile(channel, "agent-newlocation"); hangup(channel); } |
From: Stefan R. <sr...@re...> - 2005-07-20 05:41:53
|
Sorry i am still unable to reproduce that bug. Everything works fine here using either Asterisk CVS-HEAD or 1.0.7. =3DStefan On Mon, 2005-07-18 at 12:17 -0300, Dov Bigio wrote: > Yeah.. that was it. >=20 > But the problem I had under AsteriskWin32 still happens here under Linux = red > hat + asterisk 1.0.9... >=20 > After printing "cc1", my application fails with the following: >=20 > aa123# > bb123# > cc0 > cc1 > 18/07/2005 12:15:20 net.sf.asterisk.util.impl.JavaLoggingLog error > SEVERE: AGIException while handling request: Channel was hang up. >=20 > Thank you > Dov >=20 > answer(channel); > String result =3D getNumber(channel); > SayDigitsCommand sc =3D new SayDigitsCommand(result); > System.out.println("aa" + result); > AGIReply rep =3D channel.sendCommand(sc); > System.out.println("bb" + result); >=20 > if (result.substring(0, result.length() - 1).equals("123")) > { > System.out.println("cc0"); > SayNumberCommand cmd =3D new SayNumberCommand(new > Integer("123").toString()); > System.out.println("cc1"); > channel.sendCommand(cmd); > System.out.println("cc2"); > } >=20 >=20 > ----- Original Message -----=20 > From: "Stefan Reuter" <sr...@re...> > To: <ast...@li...> > Sent: Monday, July 18, 2005 12:00 PM > Subject: Re: [Asterisk-java-users] RE: Asterisk-java-users digest, Vol > 1#52 - 2 msgs >=20 >=20 > Hi, >=20 > > WARNING: Uncaught exception in Thread AGIServer-TaskThread-0 > > java.lang.IncompatibleClassChangeError > > at com.dov.TrataAGI.getNumber(TrataAGI.java:72) > > at com.dov.TrataAGI.service(TrataAGI.java:22) > > at > > > net.sf.asterisk.fastagi.AGIConnectionHandler.run(AGIConnectionHandler.jav= a:1 > > 02) > > at > > net.sf.asterisk.util.ThreadPool$TaskThread.run(ThreadPool.java:164) >=20 > without having a look at this in detail a IncompatibleClassChangeError > sounds like you didn't compile your classes against the version of > Asterisk-Java that you are now running. > Compile your .java files again using the same asterisk-java.jar you will > later use when running the application. >=20 > =3DStefan >=20 >=20 >=20 > ------------------------------------------------------- > SF.Net email is sponsored by: Discover Easy Linux Migration Strategies > from IBM. Find simple to follow Roadmaps, straightforward articles, > informative Webcasts and more! Get everything you need to get up to > speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id=16492&op=3Dick > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >=20 >=20 >=20 > ------------------------------------------------------- > SF.Net email is sponsored by: Discover Easy Linux Migration Strategies > from IBM. Find simple to follow Roadmaps, straightforward articles, > informative Webcasts and more! Get everything you need to get up to > speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id=16492&op=3Dclick > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users |
From: Dov B. <do...@te...> - 2005-07-18 15:19:18
|
Yeah.. that was it. But the problem I had under AsteriskWin32 still happens here under Linux = red hat + asterisk 1.0.9... After printing "cc1", my application fails with the following: aa123# bb123# cc0 cc1 18/07/2005 12:15:20 net.sf.asterisk.util.impl.JavaLoggingLog error SEVERE: AGIException while handling request: Channel was hang up. Thank you Dov answer(channel); String result =3D getNumber(channel); SayDigitsCommand sc =3D new SayDigitsCommand(result); System.out.println("aa" + result); AGIReply rep =3D channel.sendCommand(sc); System.out.println("bb" + result); if (result.substring(0, result.length() - 1).equals("123")) { System.out.println("cc0"); SayNumberCommand cmd =3D new SayNumberCommand(new Integer("123").toString()); System.out.println("cc1"); channel.sendCommand(cmd); System.out.println("cc2"); } ----- Original Message -----=20 From: "Stefan Reuter" <sr...@re...> To: <ast...@li...> Sent: Monday, July 18, 2005 12:00 PM Subject: Re: [Asterisk-java-users] RE: Asterisk-java-users digest, Vol 1#52 - 2 msgs Hi, > WARNING: Uncaught exception in Thread AGIServer-TaskThread-0 > java.lang.IncompatibleClassChangeError > at com.dov.TrataAGI.getNumber(TrataAGI.java:72) > at com.dov.TrataAGI.service(TrataAGI.java:22) > at > net.sf.asterisk.fastagi.AGIConnectionHandler.run(AGIConnectionHandler.jav= a:1 > 02) > at > net.sf.asterisk.util.ThreadPool$TaskThread.run(ThreadPool.java:164) without having a look at this in detail a IncompatibleClassChangeError sounds like you didn't compile your classes against the version of Asterisk-Java that you are now running. Compile your .java files again using the same asterisk-java.jar you will later use when running the application. =3DStefan ------------------------------------------------------- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id=16492&op=3Dick _______________________________________________ Asterisk-java-users mailing list Ast...@li... https://lists.sourceforge.net/lists/listinfo/asterisk-java-users |
From: Stefan R. <sr...@re...> - 2005-07-18 15:00:46
|
Hi, > WARNING: Uncaught exception in Thread AGIServer-TaskThread-0 > java.lang.IncompatibleClassChangeError > at com.dov.TrataAGI.getNumber(TrataAGI.java:72) > at com.dov.TrataAGI.service(TrataAGI.java:22) > at > net.sf.asterisk.fastagi.AGIConnectionHandler.run(AGIConnectionHandler.j= ava:1 > 02) > at > net.sf.asterisk.util.ThreadPool$TaskThread.run(ThreadPool.java:164) without having a look at this in detail a IncompatibleClassChangeError sounds like you didn't compile your classes against the version of Asterisk-Java that you are now running. Compile your .java files again using the same asterisk-java.jar you will later use when running the application. =3DStefan |
From: Dov B. <do...@te...> - 2005-07-18 14:47:11
|
Hi Stephan, I ran that AGI code under Linux, with Asterisk 1.0.9, and got the following exception on the AGI Console: WARNING: Uncaught exception in Thread AGIServer-TaskThread-0 java.lang.IncompatibleClassChangeError at com.dov.TrataAGI.getNumber(TrataAGI.java:72) at com.dov.TrataAGI.service(TrataAGI.java:22) at net.sf.asterisk.fastagi.AGIConnectionHandler.run(AGIConnectionHandler.java:1 02) at net.sf.asterisk.util.ThreadPool$TaskThread.run(ThreadPool.java:164) I didn't have time to investigate it yet... but I am sending to you meanwhile just fyi. Thanks! Dov On Fri, 2005-07-15 at 22:34 -0300, dovb wrote: > Actually, at home I am using AsteriskWin32, since here I have a > Windows-based machine... > It is supposed to emulate Asterisk 1.0.7 over Cygwin. > Is it possible that AsteriskWin32 doesn't behave well? I don't have any experience with Asterisk on the Windows platform. > I'll test my code at the office to see whether it would work on a Linux > Red Hat machine! That sounds like a good idea so we can nail down the problem either to AsteriskWin32 or Asterisk-Java. =Stefan ----- Original Message ----- From: "Stefan Reuter" <sr...@re...> To: <ast...@li...> Sent: Saturday, July 16, 2005 8:52 AM Subject: Re: [Asterisk-java-users] RE: Asterisk-java-users digest, Vol 1 #52 - 2 msgs |
From: Stefan R. <sr...@re...> - 2005-07-18 11:58:41
|
Hi Peter, > but it would be > nice if the manager could catch that loss of connection as well, in cas= e > of network outtages (or something). agreed. I thought we would always get an IOException at least when trying to write to the socket while the connection is lost. That works fine righ= t now if Asterisk is shutdown and restarted. I will take a closer look at what happens when I just unplug the network cable from my Asterisk server when I get some time but its not 1st prio. I'll keep you informed on the results. > Aside from this issue, asterisk-java is great - thanks. thats nice to hear :) =3DStefan |
From: Stefan R. <sr...@re...> - 2005-07-18 11:44:16
|
Hi, >>Jul 18, 2005 2:55:14 AM net.sf.asterisk.util.impl.JavaLoggingLog error >>SEVERE: Resource bundle fastagi-mapping is missing. [...] >>i've placed fastagi-mapping.properties ,asterisk-java.jar and java fil= es >> in the same folder as mentioned in the tutorial .... >>http://asterisk-java.sourceforge.net/tutorial.html >> >>but i m getting error ... plz tell me how to resolve this this error indicates that Asterisk-Java didn't find your fastagi-mapping.properties file. did you start java using java -cp asterisk-java.jar:. net.sf.asterisk.fastagi.DefaultAGIServer ? you can also set the CLASSPATH variable if thats easier: export CLASSPATH=3D/path/to/asterisk-java.jar:/another/path java net.sf.asterisk.fastagi.DefaultAGIServer (example asumes you are on Linux) asuming you asterisk-java.jar is in /path/to and your fastagi-mapping.properties and class files are in /another/path. =3DStefan |
From: SYED A. A. <ad...@ho...> - 2005-07-18 11:24:30
|
<html><div style='background-color:'><DIV class=RTE> <P><BR><BR></P><BR><BR><BR><BR>><BR>><BR>>salam .... if anyone uses fastagi then plz help me...<BR>><BR>>The AGISERVER starts successfully:<BR>><BR>>Jul 18, 2005 2:54:50 AM net.sf.asterisk.util.impl.JavaLoggingLog info<BR>>INFO: Thread pool started.<BR>>Jul 18, 2005 2:54:51 AM net.sf.asterisk.util.impl.JavaLoggingLog info<BR>>INFO: Listening on *:4573.<BR>><BR>>but I m getting this error when i call extension<BR>><BR>><BR>>Jul 18, 2005 2:55:13 AM net.sf.asterisk.util.impl.JavaLoggingLog info<BR>>INFO: Received connection.<BR>>Jul 18, 2005 2:55:14 AM net.sf.asterisk.util.impl.JavaLoggingLog error<BR>>SEVERE: Resource bundle fastagi-mapping is missing.<BR>>Jul 18, 2005 2:55:14 AM net.sf.asterisk.util.impl.JavaLoggingLog error<BR>>SEVERE: No script configured for agi://192.168.15.213/hello.agi<BR>><BR>>i've placed fastagi-mapping.properties ,asterisk-java.jar and java files in the same folder as mentioned in the tutorial ....<BR>>http://asterisk-java.sourceforge.net/tutorial.html<BR>><BR>>but i m getting error ... plz tell me how to resolve this<BR>><BR>><BR>>__________________________________________________<BR>>Do You Yahoo!?<BR>>Tired of spam? Yahoo! Mail has the best spam protection around<BR>>http://mail.yahoo.com<BR></DIV></div><br clear=all><hr>Express yourself instantly with MSN Messenger! <a href="http://g.msn.com/8HMBEN/2737??PS=47575" target="_top">MSN Messenger</a> Download today it's FREE!</html> |
From: Stefan R. <sr...@re...> - 2005-07-17 01:03:21
|
Hi, I just finished to implement support for what I call EventGeneratingActions in Asterisk-Java. Let me explain what that means. The problem: An increasing number of Actions in Asterisk's Manager API doesn't send their result in the Response but generate a series of Events that contain the payload. An old example of this is the StatusAction. It sends a Response indicating success and a StatusEvent for each active channel and finally a StatusCompleteEvent to indicate that all StatusEvents have been sent. This concept is also used in newer Actions in Asterisk CVS-HEAD like the AgentsAction or the DBGetAction. The concept is always the same: =3D> send action <=3D receive response (only indicating success) <=3D receive events <=3D receive action complete event The Events are linked to the Action that generated them by a common actionId attribute. The problem is that when using Asterisk-Java processing these Actions has been a nightmare. You had to register an event handler, send the Action and instruct the event handler to collect the corresponding events and finally put them together. An example of this nightmare is the initialize phase in DefaultAsteriskManager in Asterisk-Java 0.1. The solution: Now Asterisk-Java provides support for EventGeneratingActions at ManagerConnection level. There is a new EventGeneratingAction interface that is implemented by all ManagerAction classes that result in events being sent. It extends the ManagerAction interface by a method called getActionCompleteEventClass() that returns the class of the event that indicates completion. The ManagerConnection interface now includes two synchronous sendEventGeneratingAction() methods that return the Response and all Events that have been received in response to the Action. If you are interested have a look at the latest snapshot of Asterisk-Java available at=20 http://maven.reucon.com/maven/asterisk-java/distributions/ or browse the updated Asterisk-Java sources at http://asterisk-java.sourceforge.net/xref/index.html The latest implementation of DefaultAsteriskManager already uses this new feature of ManagerConnection and is much cleaner now. A little hack (see EventTimeoutException in net.sf.asterisk.manager if you are interested) also solves the queue initialization problem in DefaultAsteriskManager with buggy (i.e. current stable) Asterisk servers. =3DStefan |
From: Peter H. <pe...@li...> - 2005-07-16 20:27:04
|
Stefan, You're right - it was a firewall setting. I'm confident that the PingThread solution will solve my problem... that was my next option after checking if I was missing some configuration setting. The PingThread should also help avoid the 2nd problem, because the manager should try to reconnect if it's disconnected, I'm guessing, but it would be nice if the manager could catch that loss of connection as well, in case of network outtages (or something). Aside from this issue, asterisk-java is great - thanks. Peter ----- Original Message ----- From: "Stefan Reuter" <sr...@re...> To: <ast...@li...> Sent: Saturday, July 16, 2005 12:43 PM Subject: Re: [Asterisk-java-users] Manager API logged off automatically > Before I continue, I should mention that I'm using the 0.10 release and > asterisk 1.0.9 - in case that throws up any flags. Also, I am running the > manager API from a remote machine at the moment. Thats fine, same here :) > The Manager API gets logged off in under 10 minutes. It seems to be > pretty > consistent at 7 minutes, but I can't get an exact snapshot of the time. The only difference to my setup might be that I have constant traffic on my ManagerConnection due to SIP and IAX peer, registry, whatever events. That doesn't seem to be the case with you as there is no activity in log between 2005-07-16 09:21:33,828 and 2005-07-16 09:31:04,062. Maybe there is some kind of networking device between you and the Asterisk server (a firewall?) that kills the connection. What you can do is to send PingActions to Asterisk to generate this traffic. I attached an example of such a PingThread that might be useful for you. Use it as follows: c = new ManagerConnectionFactory().getManagerConnection(...); c.login(); PingThread pingThread = new PingThread(c); pingThread.start(); [...] pingThread.die(); c.logoff(); > On the same topic, there is another issue that presents itself when the > manager is in this state. When I send a subsequent action, the Manager > will > reconnect, but the action will always timeout. I've set the timeout value > on the action to an arbitrarily high amount. However, the action will > always time out when sent in this state. Hmmmmm lets see if the PingThread solves your problem and if not dive into this issue as well. =Stefan |
From: Stefan R. <sr...@re...> - 2005-07-16 19:44:13
|
> Before I continue, I should mention that I'm using the 0.10 release and > asterisk 1.0.9 - in case that throws up any flags. Also, I am running the > manager API from a remote machine at the moment. Thats fine, same here :) > The Manager API gets logged off in under 10 minutes. It seems to be pretty > consistent at 7 minutes, but I can't get an exact snapshot of the time. The only difference to my setup might be that I have constant traffic on my ManagerConnection due to SIP and IAX peer, registry, whatever events. That doesn't seem to be the case with you as there is no activity in log between 2005-07-16 09:21:33,828 and 2005-07-16 09:31:04,062. Maybe there is some kind of networking device between you and the Asterisk server (a firewall?) that kills the connection. What you can do is to send PingActions to Asterisk to generate this traffic. I attached an example of such a PingThread that might be useful for you. Use it as follows: c = new ManagerConnectionFactory().getManagerConnection(...); c.login(); PingThread pingThread = new PingThread(c); pingThread.start(); [...] pingThread.die(); c.logoff(); > On the same topic, there is another issue that presents itself when the > manager is in this state. When I send a subsequent action, the Manager will > reconnect, but the action will always timeout. I've set the timeout value > on the action to an arbitrarily high amount. However, the action will > always time out when sent in this state. Hmmmmm lets see if the PingThread solves your problem and if not dive into this issue as well. =Stefan |