我有一个问题: 在Asterisk脚本中,我通过命令拨号(SIP / xxx)执行从A到B的呼叫。 我想在和B谈话时播放音乐。
功能拨号仅支持音乐开始呼叫或结束呼叫: https://www.voip-info.org/wiki/view/Asterisk+cmd+Dial
如果你知道,请帮助我。
答案 0 :(得分:0)
有两种可能的变种
1)拨号命令L param在呼叫结束前的某个时间播放文件,并带有重复选项
L(x[:y[:z]]):
x - Maximum call time, in milliseconds
y - Warning time, in milliseconds
z - Repeat time, in milliseconds
Limit the call to <x> milliseconds. Play a warning when <y> milliseconds
are left. Repeat the warning every <z> milliseconds until time expires.
This option is affected by the following variables:
${LIMIT_PLAYAUDIO_CALLER}:
yes
no
If set, this variable causes Asterisk to play the
prompts to the caller.
${LIMIT_PLAYAUDIO_CALLEE}:
yes
no
If set, this variable causes Asterisk to play the
prompts to the callee.
${LIMIT_TIMEOUT_FILE}:
filename
If specified, <filename> specifies the sound prompt
to play when the timeout is reached. If not set, the time remaining
will be announced.
${LIMIT_CONNECT_FILE}:
filename
If specified, <filename> specifies the sound prompt
to play when the call begins. If not set, the time remaining will
be announced.
${LIMIT_WARNING_FILE}:
filename
If specified, <filename> specifies the sound prompt
to play as a warning when time <x> is reached. If not set, the
time remaining will be announced.
2)您可以通过ChanSpy wisper功能连接到当前呼叫来指定新频道,一条腿到文件,另一条腿。 https://www.voip-info.org/wiki/view/Asterisk+cmd+ChanSpy