[asterisk-dev] Audio to/from Asterisk
Seán C. McCord
ulexus at gmail.com
Tue Oct 16 11:12:58 CDT 2018
Agreeing with Dan, and as I mentioned in the DevCon, app_audiosocket is the
_wrong_ solution; it was simply an expedient solution. A channel interface
seems to me to be the best approach, especially for interop with ARI.
Maybe something as simple as chan_websocket would be sufficient (building
on audiosocket, if there isn't already a better way). Websocket, being
bidirectional and connection-oriented, falls well within the general needs
which audiosocket was designed for. It's a bit more work to serve a
websocket than a plain old TCP socket, but not _that_ much more.
One of the flexibility features that the current app_audiosocket maintains
is a run-time-selectable endpoint, which would be contrary to the existing
channel drivers' designs. However, since this would always be an
internally-initiated connection (not for receiving connections from the
outside), I don't see this as the security risk that it may otherwise be.
It could be argued, of course, that you could just use the existing WebRTC
for this. The problem is that it is needlessly complicated and requires
much adaptation to just simply pipe audio in and out for arbitrary
(non-voIP) use. For the stuff I'm interested in, I _just_ want the
bidirectional audio stream, a tag/label, and nothing else. The simpler the
Asterisk-side interface, the better.
On Tue, Oct 16, 2018 at 10:53 AM Dan Jenkins <dan at nimblea.pe> wrote:
> Thanks for the reminder Matt.
>
> The minutes from devcon can be found here if anyone is interested -
> https://wiki.asterisk.org/wiki/display/AST/astridevcon+2018+minutes
>
> At devcon we talked about the growing need to be able to read audio from a
> channel and be able to pump audio back into a channel too from third party
> applications. Historically we'd use app_jack or file descriptors in AGI etc
> etc, but none of this really works very well for how a lot of us now build
> applications - using ARI we build applications which run outside of
> Asterisk's host OS and we don't have access to files/file descriptors etc
> etc so we now want to be able to get access to this audio data via other
> means (as well as not using Dialplan applications)
>
> Sean mentioned he'd made something that did a lot of what we wanted in his
> "audiosocket" application - however its only a dialplan application which
> isnt much use when it comes to apps built with ARI.
>
> We proposed a combination of a few ideas and this is where we should
> probably have a discussion. My first idea was to be able to stream a
> channel's audio via a http endpoint in the ARI which is great for taking
> audio and piping it off to another provider to do speech recognition for
> example.... but its no good for sending generated audio back into a channel
> - at which point the conversation about audiosocket was brought up - other
> than it being a tiny bit harder to get set up and get started, this is a
> much better all round solution. I'd love to be able to pass into the ARI,
> send audio to this IP at this port number, or doing a GET request to get
> the IP and port for our app to go and connect to.
>
> All of us at devcon would love to hear more about what other real world
> scenarios and what would really work for everyone. But for me, I'd plus 1
> either of those ARI slutions where I either tell asterisk where to send the
> audio on a tcp socket, or i get told via the ARI where to connect to.
>
> Dan
>
> On Tue, Oct 16, 2018 at 2:16 PM Matt Fredrickson <creslin at digium.com>
> wrote:
>
>> On Tue, Oct 9, 2018 at 12:09 PM Seán C. McCord <ulexus at gmail.com> wrote:
>> >
>> > Because several people raised the issue at DevCon, I figured it may be
>> worth mentioning this: app_audiosocket. I haven't submitted it mainly due
>> to the thought that no one else would fine it interesting. There exist
>> other, similar ways to get audio out: app_jack, app_unimrcp, etc. I built
>> this because of some special needs, and it is very convenient due to its
>> extremely light weight.
>> >
>> > Regardless, should anyone be interested, here it is:
>> >
>> > https://github.com/CyCoreSystems/audiosocket
>> >
>> > The idea is to create a TCP socket to somewhere, pass some extremely
>> simple metadata (a UUID), and broker audio between the channel and the
>> socket. It is as simple as possible.
>>
>> For those who aren't aware, getting this pushed out to the -dev list
>> was an AstriDevCon 2018 takeaway action item with regards to interop
>> with web-based speech recognition APIs. I'd love to see more
>> discussion and work on this topic, as I think that there stands much
>> to be improved in Asterisk to better interoperate with some of the
>> major speech recognition vendors.
>>
>> --
>> Matthew Fredrickson
>> Digium - A Sangoma Company | Asterisk Project Lead
>> 445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
>>
>> --
>> _____________________________________________________________________
>> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>>
>> Astricon is coming up October 9-11! Signup is available at:
>> https://www.asterisk.org/community/astricon-user-conference
>>
>> asterisk-dev mailing list
>> To UNSUBSCRIBE or update options visit:
>> http://lists.digium.com/mailman/listinfo/asterisk-dev
>
> --
> _____________________________________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> Astricon is coming up October 9-11! Signup is available at:
> https://www.asterisk.org/community/astricon-user-conference
>
> asterisk-dev mailing list
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-dev
--
Seán C McCord
CyCore Systems, Inc
+1 888 240 0308
PGP/GPG: http://cycoresys.com/scm.asc
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20181016/e34cba63/attachment-0001.html>
More information about the asterisk-dev
mailing list