[prev in list] [next in list] [prev in thread] [next in thread] 

List:       asterisk-dev
Subject:    [asterisk-dev] Remote media playback mea culpa
From:       Matthew Jordan <mjordan () digium ! com>
Date:       2016-10-26 14:43:58
Message-ID: CAN2PU+4mUh3-8RNCseehiV+8WT4p77bwUb=Jqq9jHyPGSuu_bw () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Hey all -

At AstriDevCon this year, I noted that while we implemented remote media
playback in Asterisk 14 [1], it didn't yet work with ARI. I was looking at
finishing off this feature for a slightly later release of Asterisk 14, but
as I was playing around with it, I realized that it actually *does* work,
although the way in which you invoke the remote playback is admittedly a
little funky.

When posting a /play operation on a bridge or channel resource, providing
an HTTP or HTTPS URI to a media identifier of type 'sound:' will cause the
Asterisk core to go ahead and pull the media from the provided HTTP/HTTPS
URI. That is, something like this will work:

POST /channels/my_unique_id/play?media=sound:
http://remote_ip_address/foo.wav

(Note that you'd obviously want to URL encode the URI of the media to be
retrieved)

This works as well, of course, with JSON bodies POSTed.

I've updated the feature description accordingly [2].

Note that I do think Ben Langfeld's comments about supporting text/uri-list
is reasonable, and would be useful in the long run. In the short term, at
least, this feature does work from ARI.

Matt

[1] https://wiki.asterisk.org/wiki/display/AST/Asterisk+14+Documentation
[2]
https://wiki.asterisk.org/wiki/display/AST/Asterisk+14+Project+-+URI+Media+Playback

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

[Attachment #5 (text/html)]

<div dir="ltr">Hey all -<div><br></div><div>At AstriDevCon this year, I noted that \
while we implemented remote media playback in Asterisk 14 [1], it didn&#39;t yet work \
with ARI. I was looking at finishing off this feature for a slightly later release of \
Asterisk 14, but as I was playing around with it, I realized that it actually *does* \
work, although the way in which you invoke the remote playback is admittedly a little \
funky.</div><div><br></div><div>When posting a /play operation on a bridge or channel \
resource, providing an HTTP or HTTPS URI to a media identifier of type \
&#39;sound:&#39; will cause the Asterisk core to go ahead and pull the media from the \
provided HTTP/HTTPS URI. That is, something like this will \
work:</div><div><br></div><div>POST /channels/my_unique_id/play?media=sound:<a \
href="http://remote_ip_address/foo.wav">http://remote_ip_address/foo.wav</a></div><div><br></div><div>(Note \
that you&#39;d obviously want to URL encode the URI of the media to be \
retrieved)</div><div><br></div><div>This works as well, of course, with JSON bodies \
POSTed.</div><div><br></div><div>I&#39;ve updated the feature description accordingly \
[2].</div><div><br></div><div>Note that I do think Ben Langfeld&#39;s comments about \
supporting text/uri-list is reasonable, and would be useful in the long run. In the \
short term, at least, this feature does work from \
ARI.</div><div><br></div><div>Matt</div><div><br></div><div>[1]  <a \
href="https://wiki.asterisk.org/wiki/display/AST/Asterisk+14+Documentation">https://wiki.asterisk.org/wiki/display/AST/Asterisk+14+Documentation</a></div><div>[2] \
<a href="https://wiki.asterisk.org/wiki/display/AST/Asterisk+14+Project+-+URI+Media+Pl \
ayback">https://wiki.asterisk.org/wiki/display/AST/Asterisk+14+Project+-+URI+Media+Playback</a></div><div><div><br></div>-- \
<br><div class="gmail_signature">Matthew Jordan<br>Digium, Inc. | CTO<br>445 Jan \
Davis Drive NW - Huntsville, AL 35806 - USA<br>Check us out at: <a \
href="http://digium.com" target="_blank">http://digium.com</a> &amp; <a \
href="http://asterisk.org" target="_blank">http://asterisk.org</a></div> </div></div>



-- 
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-dev

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic