我正在实现一个分机900,它将音频路由到ALSA设备。我还使用mpd,它通过ALSA播放音乐。
星号15,OpenWrt 18.06
mpd.conf:
log_file "syslog"
bind_to_address "127.0.0.1"
bind_to_address "192.168.1.18"
input {
plugin "curl"
}
audio_output {
type "alsa"
name "sun4icodec"
device "hw:0,0"
mixer_control "Power Amplifier"
}下面是与扩展相关的extensions.conf部分:
;SIP 900
exten => 900,1,NoOp(Testing calls to speakers. Dialing ${EXTEN} from ${CALLERID})
same => n,System(kill -9 `pgrep mpg123`)
same => n,System(amixer set 'Power Amplifier' 80%)
same => n,System(/usr/bin/aplay /var/lib/myapp/sounds/tone3.wav &)
same => n,System(sleep(4))
same => n,NoOp(Testing calls to speakers. Dialing ${EXTEN} from ${CALLERID})
same => n,Dial(CONSOLE/ALSA)
same => n,Hangup()
same => n,System(sleep(1))
same => n,System(amixer set 'Power Amplifier' 80%;)
same => n,System(sleep(4))当加载chan_alsa时,它会锁定ALSA设备,当在mpd上播放某些内容时,我会得到以下错误:
aplay: main:722: audio open error: Resource busy我在VoIP-信息上遇到过这种情况,但我不知道如何实现它,不确定我是否需要绕开软件和/或硬件混合。
发布于 2019-02-25 04:02:20
这意味着你需要允许模拟访问的混合器。
但是你的任务可以通过卫生部轻松地完成。
https://unix.stackexchange.com/questions/502636
复制相似问题