asterisk-java-users Mailing List for Asterisk-Java Library (Page 106)
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: Matias B. <mr...@li...> - 2008-08-06 08:01:58
|
Thanks Stefan, This is the subclass in jython hope you don't mind :) .. I am using jython perfectly with your other classess :) class SMS_tx (AbstractManagerAction): serialVersionUID = 8194597741743334705L def __init__(self): self.To= "+17862399999" self.content="Default content" def getAction(self): return "vgsm_sms_tx" def setTo(self,smsto): self.To = smsto def getTo(self): return self.To def setContent(self,message): self.content = message def getContent(self): return self.content def setContentType(self): self.contenttype="text/plain" def getcontentType(self): return self.contenttype def setTimeOut(self): self.timeout=30000 Cheers! MRB On Wed, Aug 6, 2008 at 1:54 AM, Stefan Reuter <ste...@re...>wrote: > Matias, > > Can you show us your implementation of the custom action and the code you > are using to send it to Asterisk? > > =Stefan > > On Wed, 6 Aug 2008 00:42:42 -0600, "Matias Barletta" <mr...@li...> > wrote: > > Hi List!... > > > > Trying to create a Custom Action for sending vgsm_sms_tx actions... > > > > I use AbstractManagerAction, and have 2 properties (To and Content - > > string > > both) but I cannot make it work... > > > > Debugging the manager it complains about the " Message: To: Header > > Missing" > > > > Is that word "To" reserved? I am forgetting something?? > > > > Thanks for the guide! > > > > Cheers > > MRB > -- > reuter network consulting > Neusser Str. 110 > 50760 Koeln > Germany > Telefon: +49 221 1305699-0 > Telefax: +49 221 1305699-90 > E-Mail: ste...@re... > Jabber: ste...@re... > > Steuernummern 215/5140/1791 USt-IdNr. DE220701760 > > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge > Build the coolest Linux based applications with Moblin SDK & win great > prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > -- Matias Barletta |
From: Stefan R. <ste...@re...> - 2008-08-06 07:55:20
|
Matias, Can you show us your implementation of the custom action and the code you are using to send it to Asterisk? =Stefan On Wed, 6 Aug 2008 00:42:42 -0600, "Matias Barletta" <mr...@li...> wrote: > Hi List!... > > Trying to create a Custom Action for sending vgsm_sms_tx actions... > > I use AbstractManagerAction, and have 2 properties (To and Content - > string > both) but I cannot make it work... > > Debugging the manager it complains about the " Message: To: Header > Missing" > > Is that word "To" reserved? I am forgetting something?? > > Thanks for the guide! > > Cheers > MRB -- reuter network consulting Neusser Str. 110 50760 Koeln Germany Telefon: +49 221 1305699-0 Telefax: +49 221 1305699-90 E-Mail: ste...@re... Jabber: ste...@re... Steuernummern 215/5140/1791 USt-IdNr. DE220701760 |
From: Matias B. <mr...@li...> - 2008-08-06 06:42:34
|
Hi List!... Trying to create a Custom Action for sending vgsm_sms_tx actions... I use AbstractManagerAction, and have 2 properties (To and Content - string both) but I cannot make it work... Debugging the manager it complains about the " Message: To: Header Missing" Is that word "To" reserved? I am forgetting something?? Thanks for the guide! Cheers MRB |
From: Martin S. <ma...@be...> - 2008-08-05 15:39:46
|
Hello again, Please see our FAQ at http://asterisk-java.org/development/faq.html <blocked::http://asterisk-java.org/development/faq.html> -- you want the question "Can I send media or files through Manager interface?" The short answer is that the manager interface cannot send media by itself (with Asterisk-Java or any other library that uses the manager interface). This is a current limitation of Asterisk. There are plenty of other ways you can direct ChanSpy to send the spied-call to another phone, or manipulate the recorded file if your Java program has access to the file system of the Asterisk machine. Cheers, Martin Smith, Systems Developer ma...@be... Bureau of Economic and Business Research University of Florida (352) 392-0171 Ext. 221 ________________________________ From: jos...@gm... [mailto:jos...@gm...] On Behalf Of José Luis Trindade Sent: Tuesday, August 05, 2008 9:46 AM To: Martin Smith Cc: ast...@li... Subject: Re: [Asterisk-java-users] ChanSpy ... howto? Hi Martin, Thx a lot for your support!, yeap I'vee been reading the api for the "MonitorAction", but that method it'ts just to record a communication, what I need actually it's just hear (and may be interact in the communication) the channel.. is it possible?.. do you have any example? Regards, José Luis 2008/8/4 Martin Smith <ma...@be...> Ah! I almost forgot, to execute it: The Manager API calls it the "MonitorAction" which probably is called that because of the Manager interface itself using similar terms. The Live API places control of it under methods on the AsteriskChannel interface, like changeMonitoring() or startMonitoring(). Cheers, Martin Smith, Systems Developer ma...@be... Bureau of Economic and Business Research University of Florida (352) 392-0171 Ext. 221 ________________________________ From: ast...@li... [mailto:ast...@li...] On Behalf Of José Luis Trindade Sent: Monday, August 04, 2008 3:06 PM To: ast...@li... Subject: [Asterisk-java-users] ChanSpy ... howto? Hello world, I keep going with my research with asterisk and java. Now my "problem" is the chanspy command, is there an example or sth like that?.. I had configured it in the asterisk (I believe so) but I have no idea of how to "execute" it from java, any suggestion?.. Thx in advance.. Regards, José Luis |
From: J. L. T. <ti...@ad...> - 2008-08-05 13:45:38
|
Hi Martin, Thx a lot for your support!, yeap I'vee been reading the api for the "MonitorAction", but that method it'ts just to record a communication, what I need actually it's just hear (and may be interact in the communication) the channel.. is it possible?.. do you have any example? Regards, José Luis 2008/8/4 Martin Smith <ma...@be...> > Ah! > > I almost forgot, to execute it: > > The Manager API calls it the "MonitorAction" which probably is called that > because of the Manager interface itself using similar terms. > > The Live API places control of it under methods on the AsteriskChannel > interface, like changeMonitoring() or startMonitoring(). > > Cheers, > > > Martin Smith, Systems Developer > ma...@be... > Bureau of Economic and Business Research > University of Florida > (352) 392-0171 Ext. 221 > > > ------------------------------ > *From:* ast...@li... [mailto: > ast...@li...] *On Behalf Of *José > Luis Trindade > *Sent:* Monday, August 04, 2008 3:06 PM > *To:* ast...@li... > *Subject:* [Asterisk-java-users] ChanSpy ... howto? > > Hello world, > > I keep going with my research with asterisk and java. Now my "problem" > is the chanspy command, is there an example or sth like that?.. I had > configured it in the asterisk (I believe so) but I have no idea of how to > "execute" it from java, any suggestion?.. > > Thx in advance.. > > Regards, > José Luis > > |
From: Martin S. <ma...@be...> - 2008-08-04 19:28:58
|
Ah! I almost forgot, to execute it: The Manager API calls it the "MonitorAction" which probably is called that because of the Manager interface itself using similar terms. The Live API places control of it under methods on the AsteriskChannel interface, like changeMonitoring() or startMonitoring(). Cheers, Martin Smith, Systems Developer ma...@be... Bureau of Economic and Business Research University of Florida (352) 392-0171 Ext. 221 ________________________________ From: ast...@li... [mailto:ast...@li...] On Behalf Of José Luis Trindade Sent: Monday, August 04, 2008 3:06 PM To: ast...@li... Subject: [Asterisk-java-users] ChanSpy ... howto? Hello world, I keep going with my research with asterisk and java. Now my "problem" is the chanspy command, is there an example or sth like that?.. I had configured it in the asterisk (I believe so) but I have no idea of how to "execute" it from java, any suggestion?.. Thx in advance.. Regards, José Luis |
From: Martin S. <ma...@be...> - 2008-08-04 19:27:07
|
Hello José Luis, Are you just looking for documentation on how ChanSpy works? Check out http://www.voip-info.org/wiki-Asterisk+cmd+ChanSpy It should map pretty directly to the way Asterisk-Java abstracts parameters to it :) Cheers, Martin Smith, Systems Developer ma...@be... Bureau of Economic and Business Research University of Florida (352) 392-0171 Ext. 221 ________________________________ From: ast...@li... [mailto:ast...@li...] On Behalf Of José Luis Trindade Sent: Monday, August 04, 2008 3:06 PM To: ast...@li... Subject: [Asterisk-java-users] ChanSpy ... howto? Hello world, I keep going with my research with asterisk and java. Now my "problem" is the chanspy command, is there an example or sth like that?.. I had configured it in the asterisk (I believe so) but I have no idea of how to "execute" it from java, any suggestion?.. Thx in advance.. Regards, José Luis |
From: J. L. T. <ti...@ad...> - 2008-08-04 19:06:21
|
Hello world, I keep going with my research with asterisk and java. Now my "problem" is the chanspy command, is there an example or sth like that?.. I had configured it in the asterisk (I believe so) but I have no idea of how to "execute" it from java, any suggestion?.. Thx in advance.. Regards, José Luis |
From: Marcelo F. <mar...@co...> - 2008-08-01 14:31:50
|
Thanks again, Yes, you're right ... it's better to keep separate ... Thanks very much for your help ... ----- Original Message ----- From: "Stefan Reuter" <ste...@re...> Sent: Fri, August 1, 2008 2:56 Subject:Re: [Asterisk-java-users] Mapping not found Marcelo Freitas wrote: > Now it's working ... I moved everything to one same folder ... but I think > that what I was also doing wrong is that I was not loading the AgiServer > with the -cp option loading the .jar files. I thought that setting the > CLASSPATH through etc/profile was enough ... Setting the CLASSPATH environment variable is ok, too. It's the same as using the -cp switch. I've done some changes to Asterisk-Java so that the latest snapshot of 1.0.0 should even work with your old configuration but it is usually not to add custom libraries to the JVM installation. Keeping them along with your application makes updating the JVM easier and allows you to use different versions of the library for different applications. > But now it's working ... thanks Great. =Stefan ----- End of original message ----- |
From: Stefan R. <ste...@re...> - 2008-08-01 06:56:15
|
Marcelo Freitas wrote: > Now it's working ... I moved everything to one same folder ... but I think > that what I was also doing wrong is that I was not loading the AgiServer > with the -cp option loading the .jar files. I thought that setting the > CLASSPATH through etc/profile was enough ... Setting the CLASSPATH environment variable is ok, too. It's the same as using the -cp switch. I've done some changes to Asterisk-Java so that the latest snapshot of 1.0.0 should even work with your old configuration but it is usually not to add custom libraries to the JVM installation. Keeping them along with your application makes updating the JVM easier and allows you to use different versions of the library for different applications. > But now it's working ... thanks Great. =Stefan |
From: Stefan R. <ste...@re...> - 2008-07-31 18:32:44
|
Marcelo Freitas wrote: > - My classes are in a package that I've put in the lib directory of > JAVA_HOME. This lib directory is in the CLASSPATH. [..] > So, this is my environment but my script is not loaded. Can somebody > point me what I'm doing wrong ? You should not put the asterisk-java jar file under $JAVA_HOME (jre/lib/ext or similar) but put it along with your class file and the mapping properties file on the user classpath. Just like in the example. Is there any requirement for you to put it unter $JAVA_HOME? =Stefan -- reuter network consulting Neusser Str. 110 50760 Koeln Germany Telefon: +49 221 1305699-0 Telefax: +49 221 1305699-90 E-Mail: ste...@re... Jabber: ste...@re... WWW: http://www.reucon.com Steuernummern 215/5140/1791 USt-IdNr. DE220701760 |
From: <vo...@oc...> - 2008-07-29 18:20:23
|
You may want to listen for HangupEvent (see http://asterisk-java.org/development/apidocs/org/asteriskjava/manager/event/HangupEvent.html) by implementing AbstractManagerEventListener (http://asterisk-java.org/development/apidocs/org/asteriskjava/manager/AbstractManagerEventListener.html) So implement listener in your AGI. - store the AGI channelId in instance variable - in protected void handleEvent(HangupEvent event) check if it is your channel being hung-up and set the flag. - check it every time you need: before, after instead - Make sure there are no concurrency issues Igor Ostaptchenko Octanix Canada Inc +1-416-628-9314 x2021 voip on octanix.com > -------- Original Message -------- > Subject: Re: [Asterisk-java-users] Hangup Detection > From: Deric Page <der...@us...> > Date: Mon, July 28, 2008 3:25 pm > To: ast...@li... > > > > -----Original Message----- > > From: Martin Smith [mailto:ma...@be...] > > Sent: Monday, July 28, 2008 2:07 PM > > To: Deric Page; ast...@li... > > Subject: RE: [Asterisk-java-users] Hangup Detection > > > > Hi Deric, > > > > It sounds like you're overriding > > org.asteriskjava.fastagi.internal.AgiChannelImpl. Is that correct? > > > [Deric Page] > No, I don't have an override for that. > > > If so, I think you've got a bad assumption -- the hangup() method you're > > overriding should *not* be called on a hungup channel. It's a > > helper-method to command the channel to hangup, so by calling it twice, > > you're asking an already-hungup channel to hang up again. > > > [Deric Page] > Actually, in the method in which I was calling getData, I had the following > catch: > > catch (Exception e) { > e.printStackTrace(System.out); > if (e.getMessage().contains("Channel hung up") hangup(); > } > > I have, however, removed the if-statement. Now, the only call I have to > hangup() occurs at the end of my script as per the 'Hello AGI' tutorial > http://asterisk-java.org/development/tutorial.html. > > > You've mentioned that your getData() call is what hands you the first > > exception. How soon before that do you check if the channel is up? I > > would expect your getChannelStatus() to fail the same way your hangup() > > fails, as they both send commands that won't go through. > > > [Deric Page] > I check the channel status in 3 places, when I first start the script, > immediately before I call getData() and at the end of the script, just before > the hangup() command. I just tested this again, and you're right, it is > throwing the 'Broken Pipe' command on the getChannelStatus() line and not on the > following line. > > Thanks, > > Deric > der...@ni... > > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users |
From: Deric P. <der...@us...> - 2008-07-28 19:24:09
|
> -----Original Message----- > From: Martin Smith [mailto:ma...@be...] > Sent: Monday, July 28, 2008 2:07 PM > To: Deric Page; ast...@li... > Subject: RE: [Asterisk-java-users] Hangup Detection > > Hi Deric, > > It sounds like you're overriding > org.asteriskjava.fastagi.internal.AgiChannelImpl. Is that correct? > [Deric Page] No, I don't have an override for that. > If so, I think you've got a bad assumption -- the hangup() method you're > overriding should *not* be called on a hungup channel. It's a > helper-method to command the channel to hangup, so by calling it twice, > you're asking an already-hungup channel to hang up again. > [Deric Page] Actually, in the method in which I was calling getData, I had the following catch: catch (Exception e) { e.printStackTrace(System.out); if (e.getMessage().contains("Channel hung up") hangup(); } I have, however, removed the if-statement. Now, the only call I have to hangup() occurs at the end of my script as per the 'Hello AGI' tutorial http://asterisk-java.org/development/tutorial.html. > You've mentioned that your getData() call is what hands you the first > exception. How soon before that do you check if the channel is up? I > would expect your getChannelStatus() to fail the same way your hangup() > fails, as they both send commands that won't go through. > [Deric Page] I check the channel status in 3 places, when I first start the script, immediately before I call getData() and at the end of the script, just before the hangup() command. I just tested this again, and you're right, it is throwing the 'Broken Pipe' command on the getChannelStatus() line and not on the following line. Thanks, Deric der...@ni... |
From: Martin S. <ma...@be...> - 2008-07-28 19:07:16
|
Hi Deric, It sounds like you're overriding org.asteriskjava.fastagi.internal.AgiChannelImpl. Is that correct? If so, I think you've got a bad assumption -- the hangup() method you're overriding should *not* be called on a hungup channel. It's a helper-method to command the channel to hangup, so by calling it twice, you're asking an already-hungup channel to hang up again. You've mentioned that your getData() call is what hands you the first exception. How soon before that do you check if the channel is up? I would expect your getChannelStatus() to fail the same way your hangup() fails, as they both send commands that won't go through. Cheers, Martin Smith, Systems Developer ma...@be... Bureau of Economic and Business Research University of Florida (352) 392-0171 Ext. 221 > -----Original Message----- > From: ast...@li... > [mailto:ast...@li...] On > Behalf Of Deric Page > Sent: Monday, July 28, 2008 2:28 PM > To: ast...@li... > Subject: Re: [Asterisk-java-users] Hangup Detection > > > -----Original Message----- > > From: Martin Smith [mailto:ma...@be...] > > Sent: Monday, July 28, 2008 11:59 AM > > To: Deric Page; ast...@li... > > Subject: RE: [Asterisk-java-users] Hangup Detection > > > > Have you looked into what kind of exception you're > catching? I'm curious > > if it's really a broken pipe exception, or if that's just what the > > toString() for it prints as a nested exception. > > > Actually, it looks like I'm getting two errors: First is a > 'Channel Hung Up' > from my speakPrompt method on the line where I call > getData(). The second, > 'Broken Pipe', occurs in my override of the hangup() method > [called when > speakPrompt get's the 'Channel Hung Up' error]. All my > hangup() override does > is call to super.hangup() and log any errors that occur. > > Here are the stack traces from the two errors: > > > ****First Error**** > > org.asteriskjava.fastagi.AgiHangupException: Channel was hung up. > at > org.asteriskjava.fastagi.internal.AgiReaderImpl.readReply(AgiR > eaderImpl.java:98) > at > org.asteriskjava.fastagi.internal.AgiChannelImpl.sendCommand(A > giChannelImpl.java:100) > at > org.asteriskjava.fastagi.internal.AgiChannelImpl.getData(AgiCh > annelImpl.java:178) > at > org.asteriskjava.fastagi.AgiOperations.getData(AgiOperations.java:191) > at PayByPhoneScript.speakPrompt(PayByPhoneScript.java:225) > at PayByPhoneScript.getAccountFromCaller(PayByPhoneScript.java:267) > at PayByPhoneScript.getServices(PayByPhoneScript.java:73) > at PayByPhoneScript.service(PayByPhoneScript.java:54) > at > org.asteriskjava.fastagi.internal.AgiConnectionHandler.runScri > pt(AgiConnectionHandler.java:151) > at > org.asteriskjava.fastagi.internal.AgiConnectionHandler.run(Agi > ConnectionHandler.java:116) > at > java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadP > oolExecutor.java:885) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolE > xecutor.java:907) > at java.lang.Thread.run(Thread.java:619) > > > ****Second Error**** > org.asteriskjava.fastagi.AgiNetworkException: Unable to send > command to > Asterisk: Broken pipe > at > org.asteriskjava.fastagi.internal.AgiWriterImpl.sendCommand(Ag > iWriterImpl.java:51) > at > org.asteriskjava.fastagi.internal.AgiChannelImpl.sendCommand(A > giChannelImpl.java:99) > at > org.asteriskjava.fastagi.internal.AgiChannelImpl.hangup(AgiCha > nnelImpl.java:121) > at > org.asteriskjava.fastagi.AgiOperations.hangup(AgiOperations.java:68) > at PayByPhoneScript.hangup(PayByPhoneScript.java:170) > at PayByPhoneScript.speakPrompt(PayByPhoneScript.java:229) > at PayByPhoneScript.getAccountFromCaller(PayByPhoneScript.java:267) > at PayByPhoneScript.getServices(PayByPhoneScript.java:73) > at PayByPhoneScript.service(PayByPhoneScript.java:54) > at > org.asteriskjava.fastagi.internal.AgiConnectionHandler.runScri > pt(AgiConnectionHandler.java:151) > at > org.asteriskjava.fastagi.internal.AgiConnectionHandler.run(Agi > ConnectionHandler.java:116) > at > java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadP > oolExecutor.java:885) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolE > xecutor.java:907) > at java.lang.Thread.run(Thread.java:619) > Caused by: java.net.SocketException: Broken pipe > at java.net.SocketOutputStream.socketWrite0(Native Method) > at > java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92) > at java.net.SocketOutputStream.write(SocketOutputStream.java:136) > at sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:202) > at sun.nio.cs.StreamEncoder.implFlushBuffer(StreamEncoder.java:272) > at sun.nio.cs.StreamEncoder.implFlush(StreamEncoder.java:276) > at sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:122) > at java.io.OutputStreamWriter.flush(OutputStreamWriter.java:212) > at java.io.BufferedWriter.flush(BufferedWriter.java:236) > at > org.asteriskjava.util.internal.SocketConnectionFacadeImpl.flus > h(SocketConnectionFacadeImpl.java:101) > at > org.asteriskjava.fastagi.internal.AgiWriterImpl.sendCommand(Ag > iWriterImpl.java:47) > ... 13 more > > Thanks again, > > Deric > der...@ni... > > > -------------------------------------------------------------- > ----------- > This SF.Net email is sponsored by the Moblin Your Move > Developer's challenge > Build the coolest Linux based applications with Moblin SDK & > win great prizes > Grand prize is a trip for two to an Open Source event > anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > |
From: Deric P. <der...@us...> - 2008-07-28 18:27:00
|
> -----Original Message----- > From: Martin Smith [mailto:ma...@be...] > Sent: Monday, July 28, 2008 11:59 AM > To: Deric Page; ast...@li... > Subject: RE: [Asterisk-java-users] Hangup Detection > > Have you looked into what kind of exception you're catching? I'm curious > if it's really a broken pipe exception, or if that's just what the > toString() for it prints as a nested exception. > Actually, it looks like I'm getting two errors: First is a 'Channel Hung Up' from my speakPrompt method on the line where I call getData(). The second, 'Broken Pipe', occurs in my override of the hangup() method [called when speakPrompt get's the 'Channel Hung Up' error]. All my hangup() override does is call to super.hangup() and log any errors that occur. Here are the stack traces from the two errors: ****First Error**** org.asteriskjava.fastagi.AgiHangupException: Channel was hung up. at org.asteriskjava.fastagi.internal.AgiReaderImpl.readReply(AgiReaderImpl.java:98) at org.asteriskjava.fastagi.internal.AgiChannelImpl.sendCommand(AgiChannelImpl.java:100) at org.asteriskjava.fastagi.internal.AgiChannelImpl.getData(AgiChannelImpl.java:178) at org.asteriskjava.fastagi.AgiOperations.getData(AgiOperations.java:191) at PayByPhoneScript.speakPrompt(PayByPhoneScript.java:225) at PayByPhoneScript.getAccountFromCaller(PayByPhoneScript.java:267) at PayByPhoneScript.getServices(PayByPhoneScript.java:73) at PayByPhoneScript.service(PayByPhoneScript.java:54) at org.asteriskjava.fastagi.internal.AgiConnectionHandler.runScript(AgiConnectionHandler.java:151) at org.asteriskjava.fastagi.internal.AgiConnectionHandler.run(AgiConnectionHandler.java:116) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907) at java.lang.Thread.run(Thread.java:619) ****Second Error**** org.asteriskjava.fastagi.AgiNetworkException: Unable to send command to Asterisk: Broken pipe at org.asteriskjava.fastagi.internal.AgiWriterImpl.sendCommand(AgiWriterImpl.java:51) at org.asteriskjava.fastagi.internal.AgiChannelImpl.sendCommand(AgiChannelImpl.java:99) at org.asteriskjava.fastagi.internal.AgiChannelImpl.hangup(AgiChannelImpl.java:121) at org.asteriskjava.fastagi.AgiOperations.hangup(AgiOperations.java:68) at PayByPhoneScript.hangup(PayByPhoneScript.java:170) at PayByPhoneScript.speakPrompt(PayByPhoneScript.java:229) at PayByPhoneScript.getAccountFromCaller(PayByPhoneScript.java:267) at PayByPhoneScript.getServices(PayByPhoneScript.java:73) at PayByPhoneScript.service(PayByPhoneScript.java:54) at org.asteriskjava.fastagi.internal.AgiConnectionHandler.runScript(AgiConnectionHandler.java:151) at org.asteriskjava.fastagi.internal.AgiConnectionHandler.run(AgiConnectionHandler.java:116) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907) at java.lang.Thread.run(Thread.java:619) Caused by: java.net.SocketException: Broken pipe at java.net.SocketOutputStream.socketWrite0(Native Method) at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92) at java.net.SocketOutputStream.write(SocketOutputStream.java:136) at sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:202) at sun.nio.cs.StreamEncoder.implFlushBuffer(StreamEncoder.java:272) at sun.nio.cs.StreamEncoder.implFlush(StreamEncoder.java:276) at sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:122) at java.io.OutputStreamWriter.flush(OutputStreamWriter.java:212) at java.io.BufferedWriter.flush(BufferedWriter.java:236) at org.asteriskjava.util.internal.SocketConnectionFacadeImpl.flush(SocketConnectionFacadeImpl.java:101) at org.asteriskjava.fastagi.internal.AgiWriterImpl.sendCommand(AgiWriterImpl.java:47) ... 13 more Thanks again, Deric der...@ni... |
From: Martin S. <ma...@be...> - 2008-07-28 16:58:53
|
Hi Deric, No -- you're using AGI the way it was intended. The Manager API is intended for a larger across-the-system view of what's going on in the PBX on all channels. Have you looked into what kind of exception you're catching? I'm curious if it's really a broken pipe exception, or if that's just what the toString() for it prints as a nested exception. Martin Smith, Systems Developer ma...@be... Bureau of Economic and Business Research University of Florida (352) 392-0171 Ext. 221 > -----Original Message----- > From: ast...@li... > [mailto:ast...@li...] On > Behalf Of Deric Page > Sent: Monday, July 28, 2008 12:50 PM > To: ast...@li... > Subject: Re: [Asterisk-java-users] Hangup Detection > > > -----Original Message----- > > From: ast...@li... > [mailto:asterisk- > > jav...@li...] On Behalf Of Martin Smith > > Sent: Monday, July 28, 2008 11:21 AM > > To: der...@us...; ast...@li... > > Subject: Re: [Asterisk-java-users] Hangup Detection > > > > Hi Deric, > > > > First, status 6 is going to be documented at: > > > http://asterisk-java.org/0.3.1/apidocs/org/asteriskjava/fastag > i/AgiChann > > el.html#getChannelStatus() > > > > Next, there will always be some small chance that you're getting a > > hangup *after* you check if the channel is hungup. In this case, you > > will probably have to execute a command to find out. > getChannelStatus() > > sends a command to the server, so I'd expect it to fail if > the channel > > was hungup, just like any of your other commands would fail. > > > Actually, the command still returns a status of 6, even after > I've gotten the > error, so long as the script hasn't hung up on its end. > > > Perhaps something else is going on, or you're catching the > exception? > > > I am catching the exception. I was just hoping for a way to > handle hangups a > bit more proactively. I know the Manager API has a > HangupEvent class, but I'm > unclear on how to do the other fairly basic tasks through > Manager (like > streamFile and getData) as the tutorials don't do that for > Manager and I > couldn't find any equivalents to those methods in the Manager > API docs (though > I'll freely admit I could have missed them). > > Thanks, > > Deric > der...@ni... > > > -------------------------------------------------------------- > ----------- > This SF.Net email is sponsored by the Moblin Your Move > Developer's challenge > Build the coolest Linux based applications with Moblin SDK & > win great prizes > Grand prize is a trip for two to an Open Source event > anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > |
From: Deric P. <der...@us...> - 2008-07-28 16:48:29
|
> -----Original Message----- > From: ast...@li... [mailto:asterisk- > jav...@li...] On Behalf Of Martin Smith > Sent: Monday, July 28, 2008 11:21 AM > To: der...@us...; ast...@li... > Subject: Re: [Asterisk-java-users] Hangup Detection > > Hi Deric, > > First, status 6 is going to be documented at: > http://asterisk-java.org/0.3.1/apidocs/org/asteriskjava/fastagi/AgiChann > el.html#getChannelStatus() > > Next, there will always be some small chance that you're getting a > hangup *after* you check if the channel is hungup. In this case, you > will probably have to execute a command to find out. getChannelStatus() > sends a command to the server, so I'd expect it to fail if the channel > was hungup, just like any of your other commands would fail. > Actually, the command still returns a status of 6, even after I've gotten the error, so long as the script hasn't hung up on its end. > Perhaps something else is going on, or you're catching the exception? > I am catching the exception. I was just hoping for a way to handle hangups a bit more proactively. I know the Manager API has a HangupEvent class, but I'm unclear on how to do the other fairly basic tasks through Manager (like streamFile and getData) as the tutorials don't do that for Manager and I couldn't find any equivalents to those methods in the Manager API docs (though I'll freely admit I could have missed them). Thanks, Deric der...@ni... |
From: Martin S. <ma...@be...> - 2008-07-28 16:21:13
|
Hi Deric, First, status 6 is going to be documented at: http://asterisk-java.org/0.3.1/apidocs/org/asteriskjava/fastagi/AgiChann el.html#getChannelStatus() Next, there will always be some small chance that you're getting a hangup *after* you check if the channel is hungup. In this case, you will probably have to execute a command to find out. getChannelStatus() sends a command to the server, so I'd expect it to fail if the channel was hungup, just like any of your other commands would fail. Perhaps something else is going on, or you're catching the exception? Martin Smith, Systems Developer ma...@be... Bureau of Economic and Business Research University of Florida (352) 392-0171 Ext. 221 > -----Original Message----- > From: ast...@li... > [mailto:ast...@li...] On > Behalf Of Deric Page > Sent: Monday, July 28, 2008 11:09 AM > To: ast...@li... > Subject: [Asterisk-java-users] Hangup Detection > > CentOS 5 > Asterisk 1.4 > Asterisk-Java 0.3.1 > Java 1.6 > > I?m at a loss. I?ve just gotten started with Asterisk-Java > and I?m running into > a problem in telling whether or not a channel has already > been hung up. I?m > writing a simple script extended off of the BaseAgiScript > that prompts the > caller for an account # and reads back some basic > information. This part is all > working fine. However, if the caller hangs up in the middle > of the script, the > script continues to process until it performs the GetData() > command, which > throws a ?Broken pipe? exception which shuts down the script and the > Asterisk-Java server. I?ve been searching for a way to check > for the channel > being hung up, but the getChannelStatus() command seems to > always return a > status of ?6?. I feel as though I must be missing something obvious. > > -- > Deric Page > der...@ni... > > > -------------------------------------------------------------- > ----------- > This SF.Net email is sponsored by the Moblin Your Move > Developer's challenge > Build the coolest Linux based applications with Moblin SDK & > win great prizes > Grand prize is a trip for two to an Open Source event > anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > |
From: Deric P. <der...@us...> - 2008-07-28 15:07:50
|
CentOS 5 Asterisk 1.4 Asterisk-Java 0.3.1 Java 1.6 I?m at a loss. I?ve just gotten started with Asterisk-Java and I?m running into a problem in telling whether or not a channel has already been hung up. I?m writing a simple script extended off of the BaseAgiScript that prompts the caller for an account # and reads back some basic information. This part is all working fine. However, if the caller hangs up in the middle of the script, the script continues to process until it performs the GetData() command, which throws a ?Broken pipe? exception which shuts down the script and the Asterisk-Java server. I?ve been searching for a way to check for the channel being hung up, but the getChannelStatus() command seems to always return a status of ?6?. I feel as though I must be missing something obvious. -- Deric Page der...@ni... |
From: Stefan R. <ste...@gm...> - 2008-07-27 00:33:11
|
> Hum, then I'll place the Processor.class at the same directory where is > the asterisk-java.jar library. Where did you place the asterisk-java jar file? what does echo $CLASSPATH show? |
From: Jorge L. <hyn...@ya...> - 2008-07-27 00:22:43
|
HI. It was just a question since I haven't be able to make this work. So the mind starts to divagate, actually my class without implementing asterisk java is taking 500 ms which is a regular number, I want it to take less and I though AND think that the solution might be Asterisk-java. Thanks for the reply. --- On Sat, 7/26/08, Stefan Reuter <ste...@gm...> wrote: From: Stefan Reuter <ste...@gm...> Subject: Re: [Asterisk-java-users] Asterisk-java jar can be loaded locally not using FastAGI Protocol To: ast...@li... Date: Saturday, July 26, 2008, 6:53 PM No, Asterisk-Java only supports FastAGI. Why would you prefer booting a Java VM for every request instead of one long running process? =Stefan On Sun, Jul 27, 2008 at 1:47 AM, Jorge Libreros <hyn...@ya...> wrote: > Hi everyone. > > > I was wondering .. ( I know that it might be like a step back ) if can be > achieve to run as a common AGI aplication developed with Asterisk -java > library.. like .. > > #!/bin/sh > /usr/lib/java/bin/java -jar appDeveloped.jar > > If it's possible .. how can it be done?? > > Thanks. > > Mario > > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great > prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li...urceforge..net > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Asterisk-java-users mailing list Ast...@li... https://lists.sourceforge.net/lists/listinfo/asterisk-java-users |
From: Stefan R. <ste...@gm...> - 2008-07-26 23:54:01
|
Well that means your classpath does not include the current directory or you are not starting Asterisk-Java from the directory that contains your AGI script class. On Fri, Jul 25, 2008 at 3:34 PM, Jorge Libreros <hyn...@ya...> wrote: > Mr. Stefan > > No, it doesn't work either. > > This is the output. > > Jul 24, 2008 7:59:26 PM org.asteriskjava.fastagi.DefaultAgiServer startup > INFO: Received connection from /127.0.0.1 > Jul 24, 2008 7:59:26 PM > org.asteriskjava.fastagi.ResourceBundleMappingStrategy loadResourceBundle > INFO: Resource bundle 'fastagi-mapping' not found. > Jul 24, 2008 7:59:26 PM org.asteriskjava.fastagi.AbstractMappingStrategy > createAgiScriptInstance > SEVERE: Unable to create AgiScript instance of type Procesador: Class > not found, make sure the class exists and is available on the CLASSPATH > Jul 24, 2008 7:59:26 PM > org.asteriskjava.fastagi.internal.AgiConnectionHandler run > SEVERE: No script configured for URL > 'agi://localhost/Procesador' > (script 'Procesador') > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great > prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > |
From: Stefan R. <ste...@gm...> - 2008-07-26 23:52:57
|
No, Asterisk-Java only supports FastAGI. Why would you prefer booting a Java VM for every request instead of one long running process? =Stefan On Sun, Jul 27, 2008 at 1:47 AM, Jorge Libreros <hyn...@ya...> wrote: > Hi everyone. > > > I was wondering .. ( I know that it might be like a step back ) if can be > achieve to run as a common AGI aplication developed with Asterisk -java > library.. like .. > > #!/bin/sh > /usr/lib/java/bin/java -jar appDeveloped.jar > > If it's possible .. how can it be done?? > > Thanks. > > Mario > > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great > prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > |
From: Jorge L. <hyn...@ya...> - 2008-07-26 23:47:25
|
Hi everyone. I was wondering .. ( I know that it might be like a step back ) if can be achieve to run as a common AGI aplication developed with Asterisk -java library.. like .. #!/bin/sh /usr/lib/java/bin/java -jar appDeveloped.jar If it's possible .. how can it be done?? Thanks. Mario |
From: Jorge L. <hyn...@ya...> - 2008-07-25 13:34:04
|
Mr. Stefan No, it doesn't work either. This is the output. Jul 24, 2008 7:59:26 PM org.asteriskjava.fastagi.DefaultAgiServer startup INFO: Received connection from /127.0.0.1 Jul 24, 2008 7:59:26 PM org.asteriskjava.fastagi.ResourceBundleMappingStrategy loadResourceBundle INFO: Resource bundle 'fastagi-mapping' not found. Jul 24, 2008 7:59:26 PM org.asteriskjava.fastagi.AbstractMappingStrategy createAgiScriptInstance SEVERE: Unable to create AgiScript instance of type Procesador: Class not found, make sure the class exists and is available on the CLASSPATH Jul 24, 2008 7:59:26 PM org.asteriskjava.fastagi.internal.AgiConnectionHandler run SEVERE: No script configured for URL 'agi://localhost/Procesador' (script 'Procesador') |