<div dir="ltr">You're a genius, sir! I don't know how I missed the part about ports, but anyway...<div><br></div><div>Looks for "channelvars": {</div>    "UNICASTRTP_LOCAL_PORT": "<b>14880</b>",<div><br></div><div>and then</div><div><br></div><div><font face="monospace">vlc -vvv <a href="https://media-ssl.musicradio.com/LBCUK">https://media-ssl.musicradio.com/LBCUK</a> --sout '#transcode{vcodec=none,acodec=<b>a</b>law,channels=1,samplerate=8000}:rtp{dst=127.0.0.1,port=14880}'</font><br></div><div><br></div><div>Then the rest as before...</div><div><br></div><div>The other change I made was from ulaw to alaw, as ulaw sounded horribly scratchy, particularly with "s" sounds. alaw was much better.</div><div><br></div><div>At last no more dynamic rewriting of moh files and then reloading moh etc etc!</div><div><br></div><div>Thanks again.<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, 4 Jan 2021 at 17:03, Joshua C. Colp <<a href="mailto:jcolp@digium.com">jcolp@digium.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr">On Sun, Jan 3, 2021 at 4:14 PM Jonathan H <<a href="mailto:lardconcepts@gmail.com" target="_blank">lardconcepts@gmail.com</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Very simply, I want to pipe some external audio into a channel (bridge) using the externalMedia channel option.</div><div>Running Asterisk 18 on ubuntu, here's what I did to try and test things out:</div><div><br></div><div>open a console tab</div>vlc -vvv <a href="https://media-ssl.musicradio.com/LBCUK" target="_blank">https://media-ssl.musicradio.com/LBCUK</a> --sout '#transcode{vcodec=none,acodec=ulaw,channels=1,samplerate=8000}:rtp{dst=127.0.0.1,port=5005}'<div><br></div><div>open another console tab  <br>wscat -c "ws://localhost:8088/ari/events?api_key=asterisk:asterisk&app=playback-example"</div><div><br></div><div>open another console tab    <br>curl -v -u asterisk:asterisk -X POST "<a href="http://localhost:8088/ari/channels/externalMedia?external_host=127.0.0.1:5005&channelId=musicChannel&format=ulaw&app=playback-example" target="_blank">http://localhost:8088/ari/channels/externalMedia?external_host=127.0.0.1:5005&channelId=musicChannel&format=ulaw&app=playback-example</a>"<br>curl -v -u asterisk:asterisk -X POST "<a href="http://localhost:8088/ari/bridges/musicBridge?type=mixing" target="_blank">http://localhost:8088/ari/bridges/musicBridge?type=mixing</a>"<br></div><div>then dial in from a phone</div><div>curl -v -u asterisk:asterisk -X GET "<a href="http://localhost:8088/ari/channels" target="_blank">http://localhost:8088/ari/channels</a>"  </div><div>and note the new call channel ID<br>curl -v -u asterisk:asterisk -X POST "<a href="http://localhost:8088/ari/bridges/musicBridge/addChannel?channel=" target="_blank">http://localhost:8088/ari/bridges/musicBridge/addChannel?channel=</a><phone channel from above>,musicChannel"<br></div></div></blockquote><div><br></div><div>You're sending media from Asterisk to VLC, not the other way around, currently. You need to examine the result from the call to channels/externalMedia, this will include the RTP port that Asterisk is listening for media on. You then need to pass this to vlc somehow (I'm not familar with the VLC options) and have it send RTP to that port.</div></div><div><br></div>-- <br><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div style="font-family:tahoma,sans-serif"><div><font color="#073763">Joshua C. Colp</font></div><div><font color="#073763">Asterisk Technical Lead</font></div><div><font color="#073763">Sangoma Technologies</font></div><div><font color="#073763">Check us out at <a href="http://www.sangoma.com/" target="_blank">www.sangoma.com</a> and <a href="http://www.asterisk.org/" target="_blank">www.asterisk.org</a></font></div></div></div></div></div></div></div></div></div></div></div></div>
-- <br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" rel="noreferrer" target="_blank">http://www.api-digital.com</a> --<br>
<br>
Check out the new Asterisk community forum at: <a href="https://community.asterisk.org/" rel="noreferrer" target="_blank">https://community.asterisk.org/</a><br>
<br>
New to Asterisk? Start here:<br>
      <a href="https://wiki.asterisk.org/wiki/display/AST/Getting+Started" rel="noreferrer" target="_blank">https://wiki.asterisk.org/wiki/display/AST/Getting+Started</a><br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
   <a href="http://lists.digium.com/mailman/listinfo/asterisk-users" rel="noreferrer" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a></blockquote></div>