Streaming 在Asterisk中将在线广播电台作为音乐播放

Streaming 在Asterisk中将在线广播电台作为音乐播放,streaming,media,asterisk,icecast,internet-radio,Streaming,Media,Asterisk,Icecast,Internet Radio,有没有办法(工具或任何想法)在Asterisk中播放电台(通过IceCast流媒体播放)作为一种音乐保留?,我有一个流媒体服务器和Asterisk服务器独立运行,工作得非常好,只有我想将两者结合起来 请帮忙,提前谢谢 我的操作系统:Linux-Centos 我的音乐暂停课程: 模式=自定义 application=/usr/bin/sox mystreamingurl-b64000-r44100-togg- 此脚本产生正常且嘈杂的声音,与流媒体服务器(IceCas)产生的声音完全不同。星号的内部

有没有办法(工具或任何想法)在Asterisk中播放电台(通过IceCast流媒体播放)作为一种音乐保留?,我有一个流媒体服务器和Asterisk服务器独立运行,工作得非常好,只有我想将两者结合起来

请帮忙,提前谢谢

我的操作系统:Linux-Centos

我的音乐暂停课程:

模式=自定义

application=/usr/bin/sox mystreamingurl-b64000-r44100-togg-


此脚本产生正常且嘈杂的声音,与流媒体服务器(IceCas)产生的声音完全不同。

星号的内部声音格式为8khz单声道PCM

您应该直接为sox指定用于输入和输出的输出格式

另外,sox不是流媒体工具,您应该使用类似MPlayer的东西


使用MPG123播放器,工作起来很有魅力

Udated卫生部等级

mode=自定义
application=/usr/bin/mpg123-q-r8000-f8192-mono-shttp://mystreamingurl

使用MPG123播放器,工作起来像一个迷人的MOH职业:
模式=自定义应用程序=/usr/bin/MPG123-q-r 8000-f 8192-mono-shttp://mystreamingurl
#!/bin/bash

if -n "`ls /tmp/asterisk-moh-pipe.*`" ; then
rm /tmp/asterisk-moh-pipe.*
fi

PIPE="/tmp/asterisk-moh-pipe.$$"
mknod $PIPE p

mplayer http://address_of_radio_station -really-quiet -quiet -ao pcm:file=$PIPE -af resample=8000,channels=1,format=mulaw 2>/dev/null | cat $PIPE 2>/dev/null
rm $PIPE