Re: [Asterisk-java-users] how do i record the voice
Brought to you by:
srt
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 |