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