A E [Gmail]
2011-Jun-06 19:31 UTC
[asterisk-users] Subject Change: Playback/background App over Network (was: AGI STREAM FILE not working?)
On Mon, Jun 6, 2011 at 10:10 AM, Steve Edwards <asterisk.org at sedwards.com>wrote:> On Mon, Jun 6, 2011 at 2:26 AM, Steve Edwards <asterisk.org at sedwards.com> >> wrote: >> >> I strongly suggest using an existing library for the language of your >> choice. >> > > On Mon, 6 Jun 2011, A E [Gmail] wrote: > > Copy that. Not planning to write an AGI script in bash actually...it will >> be written in C# running on a remote system. >> >> How / what is the best way to stream audio files (not MOH/Internet >> Radio/TV and what not) inside a dialplan using AGI without comprising >> performance/adding latency too much. >> > > Well, C# means you're getting your data from a Windows host, so I'd fix > that first :) > > now now. It works pretty well actually, can implement extremely complicatedlogic, multi-threaded, can run as a service, and integrates with the web-app which is all in asp.net etc. anyway, moving on> Without knowing all the details, the options I see are: > > ) Transfer the file using HTTP, FTP, SCP, etc. You'll have to wait until > the entire file is transferred before you can start playing. > > ) 'Stream' the file using a shared file system like NFS or Samba. If the > 'source' and 'target' hosts are on different continents this may not be > practical. If they are in the same rack... > > ) Stream the file using a custom application. app_playback.c is only about > 550 lines (1.8.0) which includes all the standard application 'boilerplate' > for help, cli interface, loading, unloading, etc. as well as all of > playback's little buddies like SayAlpha, SayDigits, SayNumber, etc. so a > custom application cribbed from app_playback.c should only be 100 lines or > so. > >Right. Had thought about all of those, but looking for something along the lines of an application that can be invoked from inside the AGI socket connection i.e. picking a file over the network from a fast/lite http server (ala lighthttpd/nginx) and "streaming" it into the channel. So kind of like a 'Playback/Background over the network' kind of an app so one doesn't have to worry about bringing the file over, using NFS/SAMBA fileshares, caching and thus avoiding excessive file i/o. Does the MP3Player application do that? We could do that but ideally I'd like to avoid any transcoding etc. so we can create and save files in a ulaw/g729 etc formats and then just stream them avoiding all latency, file i/o, CPU issues. You're right, playback/background could be modified, unfortunately I'm not a C developer, so I might not be able to do it. But if someone knows of something that does the above from inside an AGI connection, that'd be awesome. Thanks so much -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20110606/165ebddd/attachment.htm>