asterisk-java-users Mailing List for Asterisk-Java Library (Page 127)
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: Henrik B. <hen...@fr...> - 2007-09-06 10:18:02
|
Thank you both for the fast answers. The solution with the ManagerEventListenerProxy does it for me. Gretings Henrik Am Mittwoch, den 05.09.2007, 22:34 +0200 schrieb Stefan Reuter: > Hi, > > you seem to be mixing the live API and the manager API. While this is > generally possible I think it would be better to just stick with the > live API. You are adding a callback to the ConnectEvent, so maybe the > best solution would be to provide a way to register a few more callbacks > like for connect and disconnect in the live API. > > The problem in this case is that a ManagerAction is send from the event > dispatching thread which is not allowed. Generally the live API handles > this problem by using a ManagerEventListenerProxy but by registering > your own listener with the underlying connection you prevent this from > working correctly. > So what you have to do is to decouple receiving the event and sending > the action on your own. One solution is starting a new Thread as > proposed by Martin. Another solution is to use ManagerEventListenerProxy > for your own listener, too. > This might look like this: > > Instead of > > managerConnection.addEventListener( > new ConnectEventListener(asteriskserver)); > > use > > managerConnection.addEventListener(new ManagerEventListenerProxy( > new ConnectEventListener(asteriskserver))); > |
From: Andy B. <and...@pr...> - 2007-09-06 10:07:24
|
On 24/08/2007 09:54, Andy Burns wrote: > I *am* passing a callback to sendaction rather than waiting with a > timeout, and no events are delivered to my listener method until after > the response is delivered to my callback method, then all the "buffered" > events get delivered at once. A belated follow up to this one ... I was running my test app from a command line, with various println output from my main thread and my event listener and response methods intermingled with the "INFO:" logging from asterisk java and evidently this was causing buffering issues. Today I've moved to running my application inside netbeans and it's now clear the events listener calls being delivered in realtime, without waiting for the response callback ... Thanks. |
From: jeff l. <ll...@gm...> - 2007-09-06 02:25:21
|
Hi Martin, Now I'm getting familiar with that, I found the agi instruction set you've mentioned. I think I got what I need to get started. May have problems with manange api later, coz I haven't used it much :-). Thanks, Jeff On 9/6/07, Martin Smith <ma...@be...> wrote: > > Hello Jeff, > > First off, the AGI interface is a different set of commands from the > dialplan. See http://www.voip-info.org/wiki/view/Asterisk+AGI. There is no > "background" command per se in the AGI instruction set. However, you may be > interested in the Exec command to execute an application (the kind that IS > available in the dialplan) -- see http://www.voip-info.org/wiki/view/exec for > that AGI command. With exec, you have access to all of the commands from > http://www.voip-info.org/wiki/index.php?page=Asterisk+-+documentation+of+application+commands > . > > Next, the manager interface *does* have a monitor action. You could also > use that. If this is *all* you want to do, a dialplan would also fit the > bill. If you have more complex requirements, you might want to consider > using AGI and the Manager application. > > Does this help? > > > 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 *jeff li > *Sent:* Tuesday, September 04, 2007 10:34 PM > *To:* ast...@li... > *Subject:* Re: [Asterisk-java-users] how do i record the voice > > Hi Martin, > > Thanks for the reply. > I'm using the Agi interface and I'm talking about asterisk-java. > I want to record the voice, I want to play some background music to the > user, and I want to do it at the same time. > After some time spent on google, I found that there is a "background" > command which returns immediately(non-block), so other commands(such as > record) can be sent to asterisk( and executed when the music is playing). It > looks good. > But still some problems. I did not find any background command in the > asterisk -java implementation. Since the interface is easy, I wrote my own, > and I setup a test to see if it's working, and I got some exception like > this: > > org.asteriskjava.fastagi.InvalidOrUnknownCommandException: Invalid or > unknown command: BACKGROUND "welcome" > at org.asteriskjava.fastagi.internal.AgiChannelImpl.sendCommand ( > AgiChannelImpl.java:105) > at org.asteriskjava.fastagi.AgiOperations.sendCommand( > AgiOperations.java:774) > at org.asteriskjava.fastagi.AgiOperations.background( > AgiOperations.java:66) > at test.HelloAgiScript.service (HelloAgiScript.java:29) > 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:650) > at java.util.concurrent.ThreadPoolExecutor$Worker.run( > ThreadPoolExecutor.java:675) > at java.lang.Thread.run (Thread.java:595) > > Do you know the format of the "background" command or did I do anything > wrong? Thanks in advance. > > > > On 9/5/07, Martin Smith <ma...@be...> wrote: > > > > Hello Jeff, > > > > Are you using the Monitor application (http://www.voip-info.org/wiki/view/Asterisk+cmd+Monitor)? > > Can you record from the start using the dialplan? You're going to have to > > give us some more specifics or an example of what you're trying to do. > > Actually, an example that fails would be preferable. I don't know if you're > > even talking about Asterisk-Java threads or Asterisk threads? Or if you're > > talking about using Agi or the Manager interface? > > > > > > 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 *jeff > > li > > *Sent:* Monday, September 03, 2007 11:55 PM > > *To:* ast...@li... > > *Subject:* [Asterisk-java-users] how do i record the voice > > > > Hey guys, > > > > I'm new to asterisk(-java), and I have some problems when trying to > > recording the voice when some other file is playing( something like karaoke, > > the background music is playing , and you have to record the voice > > simultaneously) , since that the thread seems to be blocked when playing the > > music(i'm using fast agi ). How can I make it? > > > > > > > > -- > > > > Thanks, > > Jeff > > > > > > > > ------------------------------------------------------------------------- > > This SF.net email is sponsored by: Splunk Inc. > > Still grepping through log files to find problems? Stop. > > Now Search log events and configuration files using AJAX and a browser. > > Download your FREE copy of Splunk now >> http://get.splunk.com/ > > _______________________________________________ > > Asterisk-java-users mailing list > > Ast...@li... > > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > > > > > -- > Regards, > Jeff > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > -- Regards, Jeff |
From: Stefan R. <ste...@re...> - 2007-09-05 20:33:50
|
Hi, you seem to be mixing the live API and the manager API. While this is generally possible I think it would be better to just stick with the live API. You are adding a callback to the ConnectEvent, so maybe the best solution would be to provide a way to register a few more callbacks like for connect and disconnect in the live API. The problem in this case is that a ManagerAction is send from the event dispatching thread which is not allowed. Generally the live API handles this problem by using a ManagerEventListenerProxy but by registering your own listener with the underlying connection you prevent this from working correctly. So what you have to do is to decouple receiving the event and sending the action on your own. One solution is starting a new Thread as proposed by Martin. Another solution is to use ManagerEventListenerProxy for your own listener, too. This might look like this: Instead of managerConnection.addEventListener( new ConnectEventListener(asteriskserver)); use managerConnection.addEventListener(new ManagerEventListenerProxy( new ConnectEventListener(asteriskserver))); =3DStefan |
From: Martin S. <ma...@be...> - 2007-09-05 18:23:26
|
Hi Rodrigo, =20 AGI scripts are like an endpoint to connect the call to. If you run a dialplan application like Dial, you've just changed who the call is connected to (no longer your script). You could potentially look at ${DIALSTATUS}, but I don't think the caller will be bridged to your script anymore, so you won't know. You probably want to use the Manager API if you want to transfer the call from your AGI script to another destination AND post-process. =20 >From http://www.voip-info.org/wiki-Asterisk+AGI:=20 =20 ----- Dialing out If the AGI application dials outward by executing Dial, control over the call returns to the dialplan and the script loses contact with the Asterisk server. The script continues to run in the background by itself and is free to clean up and do post-dial processing. =20 If you want your application to initiate a call out without being started through the dialplan: =20 * Asterisk auto-dial out Move (not copy) a file into an Asterisk spool directory and a call will be placed * Asterisk Manager API Use the Originate command. Asterisk Manager API Action Originate ----- =20 =20 =20 Martin Smith, Systems Developer ma...@be... Bureau of Economic and Business Research University of Florida (352) 392-0171 Ext. 221=20 =20 ________________________________ From: ast...@li... [mailto:ast...@li...] On Behalf Of Rodrigo Pimenta Carvalho Sent: Wednesday, September 05, 2007 1:31 PM To: ast...@li... Subject: [Asterisk-java-users] How to identify a timeout from a BaseAgiScritcommand? =09 =09 Hi people. =20 In my java code I wrote: =20 baseAgiScript.exec("Dial","SIP/300|10|r"); =20 Then, my extension 300 rings normally. Whether the call for 300 is not answered, there is a timeout after 10 seconds.=20 =20 However, how can I identify such timeout has really occurred, so that I can program an additional behavior in this case? =20 I need identify a timeout has occurred programmatically. How to codify this in asterisk-java? =20 Any hint will be very helpful. =20 Thanks. =20 Rodrigo =3D=3D=3D=3D=3D=3D=3D=3D=3D=20 |
From: Rodrigo P. C. <pi...@in...> - 2007-09-05 17:31:22
|
Hi people. =20 In my java code I wrote: =20 baseAgiScript.exec("Dial","SIP/300|10|r"); =20 Then, my extension 300 rings normally. Whether the call for 300 is not answered, there is a timeout after 10 seconds.=20 =20 However, how can I identify such timeout has really occurred, so that I can program an additional behavior in this case? =20 I need identify a timeout has occurred programmatically. How to codify this in asterisk-java? =20 Any hint will be very helpful. =20 Thanks. =20 Rodrigo =3D=3D=3D=3D=3D=3D=3D=3D=3D=20 |
From: Martin S. <ma...@be...> - 2007-09-05 16:59:02
|
Henrik, I think you may have spotted a bug. We synchronize access to the list of event listeners from other threads, but since you are adding an event listener in the same thread as the event firing for connection, the list isn't protected by the synchronized keyword. Unfortunately, I can see that fully protecting the list could cause deadlock when you want to edit the list while iterating through it. We probably need to work on this some to get it right. What do you think, Stefan? As a workaround, can you try something like: public void writeGlobalAsteriskVars(){ final AsteriskServer a2 =3D asteriskserver; =09 Runnable r =3D new Runnable() { public void run() { try { a2.setGlobalVariable("EXT", "foobar"); } catch (ManagerCommunicationException e) { =09 System.err.println(e.toString()); }=20 } }; new Thread(r).start(); } Martin Smith, Systems Developer ma...@be... Bureau of Economic and Business Research University of Florida (352) 392-0171 Ext. 221=20 =20 > -----Original Message----- > From: ast...@li...=20 > [mailto:ast...@li...] On=20 > Behalf Of Henrik Buchholz > Sent: Wednesday, September 05, 2007 3:43 AM > To: ast...@li... > Subject: Re: [Asterisk-java-users] Execute Action after=20 > connect or reconnect >=20 > Am Dienstag, den 04.09.2007, 12:19 -0400 schrieb Martin Smith: > > Hello Henrik, > >=20 > > Could you show the list what code you are using to add the=20 > ConnectEvent > > listener, and what you try to do when you receive a new=20 > ConnectEvent? >=20 > sure. thats the connect to the server and the adding of the listener: >=20 > ManagerConnectionFactory factory =3D new > ManagerConnectionFactory(astserver, asteriskuser, asteriskpasswd); > =09 > this.managerConnection =3D factory.createManagerConnection(); >=20 > managerConnection.login(); >=20 > this.asteriskserver =3D new=20 > DefaultAsteriskServer(this.managerConnection); >=20 > managerConnection.addEventListener(new > ConnectEventListener(asteriskserver)); >=20 >=20 > and this is the listener class: >=20 > public class ConnectEventListener implements ManagerEventListener { >=20 > private AsteriskServer asteriskserver; > =09 > public ConnectEventListener(AsteriskServer conn){ > this.asteriskserver =3D conn; > } >=20 > public void onManagerEvent(ManagerEvent event) { > =09 > String eventname =3D event.getClass().getName(); > if=20 > (eventname.equals("org.asteriskjava.manager.event.ConnectEvent")){ > ConnectEvent connevent =3D (ConnectEvent) event; > writeGlobalAsteriskVars(); > } > =09 > } >=20 > public void writeGlobalAsteriskVars(){ > try { > asteriskserver.setGlobalVariable("EXT",=20 > "foobar"); > } catch (ManagerCommunicationException e) { > System.err.println(e.toString()); > }=20 > } > } >=20 >=20 > > Are you modifying the AJ source directly? >=20 > uhh, no wouldn't do that... >=20 > I just commented all other code, so nothing else should try to access > the server via AJ and create a conflict. Interestingly the=20 > asterisk CLI > tells me that the variable was set, although the error occurs in AJ. >=20 > thanks for your help >=20 > Henrik >=20 > >=20 > > > -----Original Message----- > > > From: ast...@li...=20 > > > [mailto:ast...@li...] On=20 > > > Behalf Of Henrik Buchholz > > > Sent: Tuesday, September 04, 2007 11:20 AM > > > To: ast...@li... > > > Subject: [Asterisk-java-users] Execute Action after connect=20 > > > or reconnect > > >=20 > > > Hi, > > >=20 > > > is there a way to execute code after asterisk-java has=20 > > > reconnected to an > > > asterisk server, e.g. set global variables via > > > asteriskserver.setGlobalVariable()? > > >=20 > > > If I execute this after the initial login it works. I=20 > then tried to > > > create an event handler for ConnectEvents to find out when=20 > > > asterisk-java > > > has reconnected. When executing setGlobalVariable=20 > afterwards I always > > > get: > > >=20 > > > Exception in thread "Asterisk-Java=20 > ManagerConnection-0-Reconnect-0" > > > java.util.ConcurrentModificationException=20 > > > at java.util.AbstractList > > > Itr.checkForComodification(AbstractList.java:449) > > > at java.util.AbstractList$Itr.next(AbstractList.java:420) > > > at > > > org.asteriskjava.manager.internal.ManagerConnectionImpl.fireEv > > > ent(ManagerConnectionImpl.java:1204) > > > at > > > org.asteriskjava.manager.internal.ManagerConnectionImpl.doLogi > > > n(ManagerConnectionImpl.java:590) > > > at > > > org.asteriskjava.manager.internal.ManagerConnectionImpl.reconn > > > ect(ManagerConnectionImpl.java:1290) > > > at > > > org.asteriskjava.manager.internal.ManagerConnectionImpl.access > > > $100(ManagerConnectionImpl.java:84) > > > at org.asteriskjava.manager.internal.ManagerConnectionImpl > > > $1.run(ManagerConnectionImpl.java:1160) > > > at java.lang.Thread.run(Thread.java:595) > > >=20 > > > any ideas? > > >=20 > > > Henrik > > >=20 > > >=20 > > >=20 > > > -------------------------------------------------------------- > > > ----------- > > > This SF.net email is sponsored by: Splunk Inc. > > > Still grepping through log files to find problems? Stop. > > > Now Search log events and configuration files using AJAX and=20 > > > a browser. > > > Download your FREE copy of Splunk now >> http://get.splunk.com/ > > > _______________________________________________ > > > Asterisk-java-users mailing list > > > Ast...@li... > > > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > >=20 > >=20 > >=20 > -------------------------------------------------------------- > ----------- > > This SF.net email is sponsored by: Splunk Inc. > > Still grepping through log files to find problems? Stop. > > Now Search log events and configuration files using AJAX=20 > and a browser. > > Download your FREE copy of Splunk now >> http://get.splunk.com/ > > _______________________________________________ > > Asterisk-java-users mailing list > > Ast...@li... > > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >=20 >=20 > -------------------------------------------------------------- > ----------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and=20 > a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >=20 |
From: Martin S. <ma...@be...> - 2007-09-05 16:30:40
|
Hello Jeff, =20 First off, the AGI interface is a different set of commands from the dialplan. See http://www.voip-info.org/wiki/view/Asterisk+AGI. There is no "background" command per se in the AGI instruction set. However, you may be interested in the Exec command to execute an application (the kind that IS available in the dialplan) -- see http://www.voip-info.org/wiki/view/exec for that AGI command. With exec, you have access to all of the commands from http://www.voip-info.org/wiki/index.php?page=3DAsterisk+-+documentation+o= f +application+commands. =20 Next, the manager interface *does* have a monitor action. You could also use that. If this is *all* you want to do, a dialplan would also fit the bill. If you have more complex requirements, you might want to consider using AGI and the Manager application. =20 Does this help? =20 Martin Smith, Systems Developer ma...@be... Bureau of Economic and Business Research University of Florida (352) 392-0171 Ext. 221=20 =20 ________________________________ From: ast...@li... [mailto:ast...@li...] On Behalf Of jeff li Sent: Tuesday, September 04, 2007 10:34 PM To: ast...@li... Subject: Re: [Asterisk-java-users] how do i record the voice =09 =09 Hi Martin, =09 Thanks for the reply. I'm using the Agi interface and I'm talking about asterisk-java. I want to record the voice, I want to play some background music to the user, and I want to do it at the same time.=20 After some time spent on google, I found that there is a "background" command which returns immediately(non-block), so other commands(such as record) can be sent to asterisk( and executed when the music is playing). It looks good.=20 But still some problems. I did not find any background command in the asterisk -java implementation. Since the interface is easy, I wrote my own, and I setup a test to see if it's working, and I got some exception like this:=20 =09 =09 org.asteriskjava.fastagi.InvalidOrUnknownCommandException: Invalid or unknown command: BACKGROUND "welcome" at org.asteriskjava.fastagi.internal.AgiChannelImpl.sendCommand (AgiChannelImpl.java:105) at org.asteriskjava.fastagi.AgiOperations.sendCommand(AgiOperations.java:77 4) at org.asteriskjava.fastagi.AgiOperations.background(AgiOperations.java:66) at test.HelloAgiScript.service (HelloAgiScript.java:29) at org.asteriskjava.fastagi.internal.AgiConnectionHandler.runScript(AgiConn ectionHandler.java:151) at org.asteriskjava.fastagi.internal.AgiConnectionHandler.run(AgiConnection Handler.java :116) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecuto r.java:650) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.ja va:675) at java.lang.Thread.run (Thread.java:595) =09 Do you know the format of the "background" command or did I do anything wrong? Thanks in advance. =09 =09 =09 =09 On 9/5/07, Martin Smith <ma...@be...> wrote:=20 Hello Jeff, =20 Are you using the Monitor application ( http://www.voip-info.org/wiki/view/Asterisk+cmd+Monitor <http://www.voip-info.org/wiki/view/Asterisk+cmd+Monitor> )? Can you record from the start using the dialplan? You're going to have to give us some more specifics or an example of what you're trying to do. Actually, an example that fails would be preferable. I don't know if you're even talking about Asterisk-Java threads or Asterisk threads? Or if you're talking about using Agi or the Manager interface? =20 Martin Smith, Systems Developer ma...@be... Bureau of Economic and Business Research University of Florida (352) 392-0171 Ext. 221=20 =20 ________________________________ From: ast...@li... [mailto:ast...@li...] On Behalf Of jeff li Sent: Monday, September 03, 2007 11:55 PM To: ast...@li... Subject: [Asterisk-java-users] how do i record the voice =09 =09 =09 Hey guys, =09 I'm new to asterisk(-java), and I have some problems when trying to recording the voice when some other file is playing( something like karaoke, the background music is playing , and you have to record the voice simultaneously) , since that the thread seems to be blocked when playing the music(i'm using fast agi ). How can I make it?=20 =09 =20 =09 --=20 =09 Thanks, Jeff =09 =09 =09 ------------------------------------------------------------------------ - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser.=20 Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________=20 Asterisk-java-users mailing list Ast...@li... =09 https://lists.sourceforge.net/lists/listinfo/asterisk-java-users =09 =09 --=20 Regards, Jeff=20 |
From: Stefan R. <ste...@re...> - 2007-09-05 16:20:46
|
Guilherme G=F3es wrote: > How stable is the snapshot ? I've just released 0.3.1 which also includes the fix, so just use that. =3DStefan |
From: Stefan R. <ste...@re...> - 2007-09-05 16:20:00
|
Asterisk-Java 0.3.1, a free Java library for Asterisk PBX integration, has been released. The Asterisk-Java package consists of a set of Java classes that allow you to easily build Java applications that interact with an Asterisk PBX Server. Asterisk-Java supports both interfaces that Asterisk provides for this scenario: The FastAGI protocol and the Manager API. Asterisk-Java 0.3.1 is a maintenance release that solves the following issues: * [AJ-81] - executeCliCommand() always executes "show voicemail users= " * [AJ-86] - getChannelByName doesn't return the latest channel * [AJ-80] - getMeetMeRooms() should only return active rooms * [AJ-68] - Support for Bridge Action * [AJ-74] - Support Strategy property in QueueParamsEvent Asterisk-Java takes advantage of the features of Java 5.0 and therfore requires a Java Virtual Machine of at least version 1.5.0. Asterisk-Java is used in several commercial environments and by the following Open Source projects: * Asterisk-JTAPI JTAPI implementation for Asterisk. http://asterisk-jtapi.sf.net/ * Asterisk-IM A plugin for the Openfire XMPP (jabber) server. It provides integrated presence between your IM client and phone, notification of incoming calls by IM and originate calls from supported IM clients. http://www.igniterealtime.org/projects/openfire/ * Asterisk Desktop Manager (ADM) A desktop application that will allow for automatic on-call volume reduction, one click dial from clipboard, integrated phonebook and more. http://adm.hamnett.org/ Asterisk-Java is available under Apache 2.0 license at http://asterisk-java.org |
From: <gl...@gm...> - 2007-09-05 12:52:52
|
How stable is the snapshot ? On 9/5/07, Stefan Reuter <ste...@re...> wrote: > Guilherme G=F3es wrote: > > But the contents of "l' are the return of the "show mailbox command". > > Am I doing something wrong or is it a bug ? > > Thats a bug which is fixed in the latest snapshot available at > http://maven.reucon.com/public-snapshot/org/asteriskjava/asterisk-java/1.= 0.0-SNAPSHOT/ > > =3DStefan > > > -- > 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: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > --=20 Guilherme Loch G=F3es MSN:gl...@gm... (48) 99115299 |
From: Stefan R. <ste...@re...> - 2007-09-05 12:30:00
|
Guilherme G=F3es wrote: > But the contents of "l' are the return of the "show mailbox command". > Am I doing something wrong or is it a bug ? Thats a bug which is fixed in the latest snapshot available at http://maven.reucon.com/public-snapshot/org/asteriskjava/asterisk-java/1.= 0.0-SNAPSHOT/ =3DStefan --=20 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: <gl...@gm...> - 2007-09-05 12:08:32
|
I'm trying to execute the following code: DefaultAsteriskServer servidorAsterisk =3D new DefaultAsteriskServer("x",y,"z","t"); List l =3D servidorAsterisk.executeCliCommand("zap show status"); But the contents of "l' are the return of the "show mailbox command". Am I doing something wrong or is it a bug ? --=20 Guilherme Loch G=F3es MSN:gl...@gm... (48) 99115299 |
From: Henrik B. <hen...@fr...> - 2007-09-05 07:43:19
|
Am Dienstag, den 04.09.2007, 12:19 -0400 schrieb Martin Smith: > Hello Henrik, > > Could you show the list what code you are using to add the ConnectEvent > listener, and what you try to do when you receive a new ConnectEvent? sure. thats the connect to the server and the adding of the listener: ManagerConnectionFactory factory = new ManagerConnectionFactory(astserver, asteriskuser, asteriskpasswd); this.managerConnection = factory.createManagerConnection(); managerConnection.login(); this.asteriskserver = new DefaultAsteriskServer(this.managerConnection); managerConnection.addEventListener(new ConnectEventListener(asteriskserver)); and this is the listener class: public class ConnectEventListener implements ManagerEventListener { private AsteriskServer asteriskserver; public ConnectEventListener(AsteriskServer conn){ this.asteriskserver = conn; } public void onManagerEvent(ManagerEvent event) { String eventname = event.getClass().getName(); if (eventname.equals("org.asteriskjava.manager.event.ConnectEvent")){ ConnectEvent connevent = (ConnectEvent) event; writeGlobalAsteriskVars(); } } public void writeGlobalAsteriskVars(){ try { asteriskserver.setGlobalVariable("EXT", "foobar"); } catch (ManagerCommunicationException e) { System.err.println(e.toString()); } } } > Are you modifying the AJ source directly? uhh, no wouldn't do that... I just commented all other code, so nothing else should try to access the server via AJ and create a conflict. Interestingly the asterisk CLI tells me that the variable was set, although the error occurs in AJ. thanks for your help Henrik > > > -----Original Message----- > > From: ast...@li... > > [mailto:ast...@li...] On > > Behalf Of Henrik Buchholz > > Sent: Tuesday, September 04, 2007 11:20 AM > > To: ast...@li... > > Subject: [Asterisk-java-users] Execute Action after connect > > or reconnect > > > > Hi, > > > > is there a way to execute code after asterisk-java has > > reconnected to an > > asterisk server, e.g. set global variables via > > asteriskserver.setGlobalVariable()? > > > > If I execute this after the initial login it works. I then tried to > > create an event handler for ConnectEvents to find out when > > asterisk-java > > has reconnected. When executing setGlobalVariable afterwards I always > > get: > > > > Exception in thread "Asterisk-Java ManagerConnection-0-Reconnect-0" > > java.util.ConcurrentModificationException > > at java.util.AbstractList > > Itr.checkForComodification(AbstractList.java:449) > > at java.util.AbstractList$Itr.next(AbstractList.java:420) > > at > > org.asteriskjava.manager.internal.ManagerConnectionImpl.fireEv > > ent(ManagerConnectionImpl.java:1204) > > at > > org.asteriskjava.manager.internal.ManagerConnectionImpl.doLogi > > n(ManagerConnectionImpl.java:590) > > at > > org.asteriskjava.manager.internal.ManagerConnectionImpl.reconn > > ect(ManagerConnectionImpl.java:1290) > > at > > org.asteriskjava.manager.internal.ManagerConnectionImpl.access > > $100(ManagerConnectionImpl.java:84) > > at org.asteriskjava.manager.internal.ManagerConnectionImpl > > $1.run(ManagerConnectionImpl.java:1160) > > at java.lang.Thread.run(Thread.java:595) > > > > any ideas? > > > > Henrik > > > > > > > > -------------------------------------------------------------- > > ----------- > > This SF.net email is sponsored by: Splunk Inc. > > Still grepping through log files to find problems? Stop. > > Now Search log events and configuration files using AJAX and > > a browser. > > Download your FREE copy of Splunk now >> http://get.splunk.com/ > > _______________________________________________ > > Asterisk-java-users mailing list > > Ast...@li... > > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users |
From: Info E. C. <in...@er...> - 2007-09-05 07:00:57
|
Info ERS Consulting a écrit : > <div class="moz-text-flowed" style="font-family: -moz-fixed">Hi, > > I encounter strange behaviour with ParkAction. > It works fine beetwen two SIP extension behind Asterisk, it works with > a call from outside to a local SIP account but when I try it with a > call from inside to an outbound number, the ParkActionhannel hang up > the remote number.. > > It works using "##70" (70 for the parking) digit on the phone, in any > case.. seems that the problem comes from ParkAction. > > Anyone could help? > > Thanks > > > </div> Hello again, pb is resolved, but I didn't found out why! It works fine now without any change, maybe a problem with my external SIP account (from my VoIP provider). Thanks |
From: jeff l. <ll...@gm...> - 2007-09-05 02:33:45
|
Hi Martin, Thanks for the reply. I'm using the Agi interface and I'm talking about asterisk-java. I want to record the voice, I want to play some background music to the user, and I want to do it at the same time. After some time spent on google, I found that there is a "background" command which returns immediately(non-block), so other commands(such as record) can be sent to asterisk( and executed when the music is playing). It looks good. But still some problems. I did not find any background command in the asterisk -java implementation. Since the interface is easy, I wrote my own, and I setup a test to see if it's working, and I got some exception like this: org.asteriskjava.fastagi.InvalidOrUnknownCommandException: Invalid or unknown command: BACKGROUND "welcome" at org.asteriskjava.fastagi.internal.AgiChannelImpl.sendCommand( AgiChannelImpl.java:105) at org.asteriskjava.fastagi.AgiOperations.sendCommand( AgiOperations.java:774) at org.asteriskjava.fastagi.AgiOperations.background( AgiOperations.java:66) at test.HelloAgiScript.service(HelloAgiScript.java:29) 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:650) at java.util.concurrent.ThreadPoolExecutor$Worker.run( ThreadPoolExecutor.java:675) at java.lang.Thread.run(Thread.java:595) Do you know the format of the "background" command or did I do anything wrong? Thanks in advance. On 9/5/07, Martin Smith <ma...@be...> wrote: > > Hello Jeff, > > Are you using the Monitor application ( > http://www.voip-info.org/wiki/view/Asterisk+cmd+Monitor)? Can you record > from the start using the dialplan? You're going to have to give us some more > specifics or an example of what you're trying to do. Actually, an example > that fails would be preferable. I don't know if you're even talking about > Asterisk-Java threads or Asterisk threads? Or if you're talking about using > Agi or the Manager interface? > > > 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 *jeff li > *Sent:* Monday, September 03, 2007 11:55 PM > *To:* ast...@li... > *Subject:* [Asterisk-java-users] how do i record the voice > > Hey guys, > > I'm new to asterisk(-java), and I have some problems when trying to > recording the voice when some other file is playing( something like karaoke, > the background music is playing , and you have to record the voice > simultaneously) , since that the thread seems to be blocked when playing the > music(i'm using fast agi ). How can I make it? > > > > -- > > Thanks, > Jeff > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > -- Regards, Jeff |
From: Martin S. <ma...@be...> - 2007-09-04 16:42:08
|
Hello Henrik, Could you show the list what code you are using to add the ConnectEvent listener, and what you try to do when you receive a new ConnectEvent? Are you modifying the AJ source directly? Martin Smith, Systems Developer ma...@be... Bureau of Economic and Business Research University of Florida (352) 392-0171 Ext. 221=20 =20 > -----Original Message----- > From: ast...@li...=20 > [mailto:ast...@li...] On=20 > Behalf Of Henrik Buchholz > Sent: Tuesday, September 04, 2007 11:20 AM > To: ast...@li... > Subject: [Asterisk-java-users] Execute Action after connect=20 > or reconnect >=20 > Hi, >=20 > is there a way to execute code after asterisk-java has=20 > reconnected to an > asterisk server, e.g. set global variables via > asteriskserver.setGlobalVariable()? >=20 > If I execute this after the initial login it works. I then tried to > create an event handler for ConnectEvents to find out when=20 > asterisk-java > has reconnected. When executing setGlobalVariable afterwards I always > get: >=20 > Exception in thread "Asterisk-Java ManagerConnection-0-Reconnect-0" > java.util.ConcurrentModificationException=20 > at java.util.AbstractList > Itr.checkForComodification(AbstractList.java:449) > at java.util.AbstractList$Itr.next(AbstractList.java:420) > at > org.asteriskjava.manager.internal.ManagerConnectionImpl.fireEv > ent(ManagerConnectionImpl.java:1204) > at > org.asteriskjava.manager.internal.ManagerConnectionImpl.doLogi > n(ManagerConnectionImpl.java:590) > at > org.asteriskjava.manager.internal.ManagerConnectionImpl.reconn > ect(ManagerConnectionImpl.java:1290) > at > org.asteriskjava.manager.internal.ManagerConnectionImpl.access > $100(ManagerConnectionImpl.java:84) > at org.asteriskjava.manager.internal.ManagerConnectionImpl > $1.run(ManagerConnectionImpl.java:1160) > at java.lang.Thread.run(Thread.java:595) >=20 > any ideas? >=20 > Henrik >=20 >=20 >=20 > -------------------------------------------------------------- > ----------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and=20 > a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >=20 |
From: Martin S. <ma...@be...> - 2007-09-04 16:42:07
|
Hello Jeff, =20 Are you using the Monitor application (http://www.voip-info.org/wiki/view/Asterisk+cmd+Monitor)? Can you record from the start using the dialplan? You're going to have to give us some more specifics or an example of what you're trying to do. Actually, an example that fails would be preferable. I don't know if you're even talking about Asterisk-Java threads or Asterisk threads? Or if you're talking about using Agi or the Manager interface? =20 Martin Smith, Systems Developer ma...@be... Bureau of Economic and Business Research University of Florida (352) 392-0171 Ext. 221=20 =20 ________________________________ From: ast...@li... [mailto:ast...@li...] On Behalf Of jeff li Sent: Monday, September 03, 2007 11:55 PM To: ast...@li... Subject: [Asterisk-java-users] how do i record the voice =09 =09 Hey guys, =09 I'm new to asterisk(-java), and I have some problems when trying to recording the voice when some other file is playing( something like karaoke, the background music is playing , and you have to record the voice simultaneously) , since that the thread seems to be blocked when playing the music(i'm using fast agi ). How can I make it?=20 =09 =20 =09 --=20 =09 Thanks, Jeff =09 =09 |
From: Henrik B. <hen...@fr...> - 2007-09-04 15:20:39
|
Hi, is there a way to execute code after asterisk-java has reconnected to an asterisk server, e.g. set global variables via asteriskserver.setGlobalVariable()? If I execute this after the initial login it works. I then tried to create an event handler for ConnectEvents to find out when asterisk-java has reconnected. When executing setGlobalVariable afterwards I always get: Exception in thread "Asterisk-Java ManagerConnection-0-Reconnect-0" java.util.ConcurrentModificationException at java.util.AbstractList Itr.checkForComodification(AbstractList.java:449) at java.util.AbstractList$Itr.next(AbstractList.java:420) at org.asteriskjava.manager.internal.ManagerConnectionImpl.fireEvent(ManagerConnectionImpl.java:1204) at org.asteriskjava.manager.internal.ManagerConnectionImpl.doLogin(ManagerConnectionImpl.java:590) at org.asteriskjava.manager.internal.ManagerConnectionImpl.reconnect(ManagerConnectionImpl.java:1290) at org.asteriskjava.manager.internal.ManagerConnectionImpl.access $100(ManagerConnectionImpl.java:84) at org.asteriskjava.manager.internal.ManagerConnectionImpl $1.run(ManagerConnectionImpl.java:1160) at java.lang.Thread.run(Thread.java:595) any ideas? Henrik |
From: jeff l. <ll...@gm...> - 2007-09-04 03:54:32
|
Hey guys, I'm new to asterisk(-java), and I have some problems when trying to recording the voice when some other file is playing( something like karaoke, the background music is playing , and you have to record the voice simultaneously) , since that the thread seems to be blocked when playing the music(i'm using fast agi ). How can I make it? -- Thanks, Jeff |
From: Bruno K. <kon...@wa...> - 2007-09-03 13:31:05
|
Hello, I would like to ask if someone could provide a log of Asterisk-java events of an incoming call from an external number to an internal extension inside Asterisk (for example +33160124567 calls extension 123 inside Asterisk). I cannot make such a log because I do not have a BRI/PRI interface. If someone can help, I would appreciate a lot. Thanks, Bruno Konik |
From: Info E. C. <in...@er...> - 2007-08-31 09:44:53
|
Hi, I encounter strange behaviour with ParkAction. It works fine beetwen two SIP extension behind Asterisk, it works with a call from outside to a local SIP account but when I try it with a call from inside to an outbound number, the ParkActionhannel hang up the remote number.. It works using "##70" (70 for the parking) digit on the phone, in any case.. seems that the problem comes from ParkAction. Anyone could help? Thanks |
From: Andy B. <and...@pr...> - 2007-08-24 08:54:07
|
On 24/08/2007 02:12, Stefan Reuter wrote: > In this case you sould send the originate action asynchronously (i.e. > provide a callback to sendAction), then nothing will be blocked. Thank you, but perhaps I didn't describe my code well enough. I *am* passing a callback to sendaction rather than waiting with a timeout, and no events are delivered to my listener method until after the response is delivered to my callback method, then all the "buffered" events get delivered at once. > As an alternative you might want to look at the originateAsync methods > in DefaultAsteriskServer. I wasn't sure how mature those classes were? |
From: Stefan R. <ste...@re...> - 2007-08-24 01:11:36
|
In this case you sould send the originate action asynchronously (i.e. provide a callback to sendAction), then nothing will be blocked. As an alternative you might want to look at the originateAsync methods in DefaultAsteriskServer. =3DStefan Andy Burns wrote: > Using asterisk-java 0.3 to talk to the Manager API of asterisk 1.4 >=20 > I based my code off the tutorial and have expanded from there >=20 > I connect to the manager > add an event handler which just prints out the event > send an originateaction with a callback handler > the callback handler prints out the response > the action has a 30 second timeout set > if the origiated call is connected my extension will play an asterisk > sound file and then hangup > all this works ok >=20 > now I'm trying to track the progress of the call through the response > callback and the events delivered to my listener >=20 > For example when the originate action is sent, I do NOT answer the > external SIP call >=20 > after the timout period I get my callback with an "Error" response and > with "Originate failed" as the message, this is expected. >=20 > However only after the response callback do I get the stream of events > to my listener for > NewChannelEvent,NewCallerIdEvent,NewStateEvent(Ringing) and finally > HangupEvent >=20 > Should events be delivered synchronously, rather than being blocked by > the pending response to my action? >=20 > If so is this a manager API limitation or an asterisk-java limitiation?= >=20 > Thanks for any help >=20 >=20 >=20 > -----------------------------------------------------------------------= -- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser.= > Download your FREE copy of Splunk now >> http://get.splunk.com/ >=20 >=20 > -----------------------------------------------------------------------= - >=20 > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users --=20 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: Andy B. <and...@pr...> - 2007-08-23 17:19:36
|
Using asterisk-java 0.3 to talk to the Manager API of asterisk 1.4 I based my code off the tutorial and have expanded from there I connect to the manager add an event handler which just prints out the event send an originateaction with a callback handler the callback handler prints out the response the action has a 30 second timeout set if the origiated call is connected my extension will play an asterisk sound file and then hangup all this works ok now I'm trying to track the progress of the call through the response callback and the events delivered to my listener For example when the originate action is sent, I do NOT answer the external SIP call after the timout period I get my callback with an "Error" response and with "Originate failed" as the message, this is expected. However only after the response callback do I get the stream of events to my listener for NewChannelEvent,NewCallerIdEvent,NewStateEvent(Ringing) and finally HangupEvent Should events be delivered synchronously, rather than being blocked by the pending response to my action? If so is this a manager API limitation or an asterisk-java limitiation? Thanks for any help |