[asterisk-app-dev] AGI stream audio from URI

Matthew Jordan mjordan at digium.com
Fri Jul 20 14:16:10 CDT 2018



> On Jul 20, 2018, at 1:39 PM, Naftoli Gugenheim <naftoligug at gmail.com> wrote:
> 
> I've tried it with .wav. Same result. It doesn't even hit my server.
> 

Can you provide a debug level 5 log (including all higher level verbose+ messages) from Asterisk that shows the playback operation?



> 
> On Fri, Jul 20, 2018, 11:45 AM Matthew Jordan <mjordan at digium.com <mailto:mjordan at digium.com>> wrote:
> 
>> On Jul 15, 2018, at 11:37 PM, Naftoli Gugenheim <naftoligug at gmail.com <mailto:naftoligug at gmail.com>> wrote:
>> 
>> Crickets...
>> 
>> I've tried this now on 15.5.0. Still completely broken.
>> 
>> 
> 
> I suspect you’re encountering behavior that is working as intended.
> 
> Normally, when Asterisk plays back a file, it scans the file system for all files with the provided sound file name. For each file that it finds with a given file extension, it picks the best media file (where best is given by transcoding cost) that matches the channel capabilities. That works great when you have a file system that can be scanned quickly.
> 
> You can probably guess why that approach isn’t used with a remote HTTP server: making a lot of HEAD/GET requests to ‘scan’ the remote server for available file types is not a good idea for a multitude of reasons.
> 
> As such, the remote playback determines the type of file it is playing back from the extension of the resource it downloads from the remote server. If the remote resource doesn’t have an extension, then Asterisk is going to complain that it does not know what type of media it just downloaded.
> 
> That is: if your remote resource was named “sounds/prompts/nine.wav” you’d probably be okay.
> 
> Now, it would be nice if there was a way for Asterisk to be told to expect the remote resource to be in a particular file format, but to my knowledge, that feature hasn’t been added.
> 
> (As an aside, I use this functionality through AGI, so I know it isn’t “completely broken”.)
> 
> 
> 
>> 
>> On Sun, Apr 8, 2018 at 11:28 PM Naftoli Gugenheim <naftoligug at gmail.com <mailto:naftoligug at gmail.com>> wrote:
>> I've come back to this because of issues with the other approach I took.
>> 
>> I've set up everything so that curl http://local.XXX.com/sounds/prompts/nine <http://local.xxx.com/sounds/prompts/nine> hits my dev server, yet passing the same URL to STREAM FILE does not. I still get WARNING[103][C-00000001]: file.c:774 ast_openstream_full: File http://local.mikvahbook.com/sounds/prompts/please%2Dmake%2Da%2Dselection <http://local.mikvahbook.com/sounds/prompts/please%2Dmake%2Da%2Dselection> does not exist in any format, and my server is not being hit.
>> 
>> Please help!
>> 
>> 
>> On Mon, Mar 5, 2018 at 2:49 AM Naftoli Gugenheim <naftoligug at gmail.com <mailto:naftoligug at gmail.com>> wrote:
>> Interesting!
>> 
>> Anyway I've deployed my app, and I left it with filenames. I have a Google Cloud Storage bucket that's mounted via gcsfuse into both the app and to Asterisk. That way they both act like they're working with their own local filesystem but really it's shared but distributed. Maybe I'll change it to use URLs and serve the files from the app in the future. I feel like it's more elegant for the app to own everything and treat asterisk like a stateless service, but there's no immediate reason to change the status quo.
>> 
>> 
>> On Fri, Mar 2, 2018, 2:36 PM Ross Buggins <rbuggins at via.co.uk <mailto:rbuggins at via.co.uk>> wrote:
>> Just monitors for changes in a directory, takes the file, processes it (sends off to a web service) it and then removes it from the local file system
>> 
>>  
>> 
>> From: asterisk-app-dev-bounces at lists.digium.com <mailto:asterisk-app-dev-bounces at lists.digium.com> [mailto:asterisk-app-dev-bounces at lists.digium.com <mailto:asterisk-app-dev-bounces at lists.digium.com>] On Behalf Of Naftoli Gugenheim
>> Sent: 02 March 2018 19:30
>> 
>> 
>> To: Asterisk Application Development discussion <asterisk-app-dev at lists.digium.com <mailto:asterisk-app-dev at lists.digium.com>>
>> Subject: Re: [asterisk-app-dev] AGI stream audio from URI
>> 
>> 
>>  
>> 
>> How does the background service know when something was recorded?
>> 
>>  
>> 
>> _______________________________________________
>> asterisk-app-dev mailing list
>> asterisk-app-dev at lists.digium.com <mailto:asterisk-app-dev at lists.digium.com>
>> http://lists.digium.com/cgi-bin/mailman/listinfo/asterisk-app-dev <http://lists.digium.com/cgi-bin/mailman/listinfo/asterisk-app-dev>
>> _______________________________________________
>> asterisk-app-dev mailing list
>> asterisk-app-dev at lists.digium.com <mailto:asterisk-app-dev at lists.digium.com>
>> http://lists.digium.com/cgi-bin/mailman/listinfo/asterisk-app-dev <http://lists.digium.com/cgi-bin/mailman/listinfo/asterisk-app-dev>
> _______________________________________________
> asterisk-app-dev mailing list
> asterisk-app-dev at lists.digium.com <mailto:asterisk-app-dev at lists.digium.com>
> http://lists.digium.com/cgi-bin/mailman/listinfo/asterisk-app-dev <http://lists.digium.com/cgi-bin/mailman/listinfo/asterisk-app-dev>
> _______________________________________________
> asterisk-app-dev mailing list
> asterisk-app-dev at lists.digium.com
> http://lists.digium.com/cgi-bin/mailman/listinfo/asterisk-app-dev

Matthew Jordan
Digium, Inc. | CTO
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at: http://digium.com & http://asterisk.org

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-app-dev/attachments/20180720/6d071c65/attachment-0001.html>


More information about the asterisk-app-dev mailing list