Re: AGI stream audio from URI

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On Jul 15, 2018, at 11:37 PM, Naftoli Gugenheim <naftoligug@xxxxxxxxx> 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@xxxxxxxxx> 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 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 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@xxxxxxxxx> 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@xxxxxxxxx> 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@xxxxxxxxxxxxxxxx [mailto:asterisk-app-dev-bounces@xxxxxxxxxxxxxxxx] On Behalf Of Naftoli Gugenheim
Sent: 02 March 2018 19:30


To: Asterisk Application Development discussion <asterisk-app-dev@xxxxxxxxxxxxxxxx>
Subject: Re: AGI stream audio from URI


 

How does the background service know when something was recorded?

 

_______________________________________________
asterisk-app-dev mailing list
asterisk-app-dev@xxxxxxxxxxxxxxxx
http://lists.digium.com/cgi-bin/mailman/listinfo/asterisk-app-dev
_______________________________________________
asterisk-app-dev mailing list
asterisk-app-dev@xxxxxxxxxxxxxxxx
http://lists.digium.com/cgi-bin/mailman/listinfo/asterisk-app-dev

_______________________________________________
asterisk-app-dev mailing list
asterisk-app-dev@xxxxxxxxxxxxxxxx
http://lists.digium.com/cgi-bin/mailman/listinfo/asterisk-app-dev

[Index of Archives]     [Asterisk SS7]     [Asterisk Announcements]     [Asterisk Users]     [PJ SIP]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Linux API]

  Powered by Linux