从分机发起呼叫
可以从分机发起呼叫吗?我的分机如下所示:
[read_text]
exten => s,1,Answer( )
exten => s,n,Dial(SIP/1,G(99))
exten => s,n,Dial(SIP/2,G(99))
exten => s,n,Goto(1)
exten => s,100,System(echo '${text}' | /usr/bin/espeak --stdout |sox -t wav - -r 8000 /tmp/voice.wav)
exten => s,n,Playback(/tmp/voice)
exten => s,n,System(rm /tmp/voice.wav)
exten => s,n,Hangup( )
因此,如果 SIP/1 或 SIP/2 应答,它会播放文本并挂断,如果没有人应答,它会继续拨号 我尝试制作通话文件,但它需要设置一些通道,我尝试使用本地,但不成功。 我还发现有队列,但找不到从呼叫文件发起对队列的呼叫的方法。我对星号很陌生。
It is possible to initiate call from extension? My extension is look like the following:
[read_text]
exten => s,1,Answer( )
exten => s,n,Dial(SIP/1,G(99))
exten => s,n,Dial(SIP/2,G(99))
exten => s,n,Goto(1)
exten => s,100,System(echo '${text}' | /usr/bin/espeak --stdout |sox -t wav - -r 8000 /tmp/voice.wav)
exten => s,n,Playback(/tmp/voice)
exten => s,n,System(rm /tmp/voice.wav)
exten => s,n,Hangup( )
So if SIP/1 or SIP/2 answers, It plays text and hangup, if nobody answer it continues to Dial
I tried to make call file, but it requires some channel to be setup, I tried to use Local, but unsuccess.
I also found that there are queues, but can't find a way to initiate call to queue from call file. I'm very new to asterisk.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您尝试做的事情可能会从拨号计划中变得非常混乱。尝试按照以下方式进行操作:
g
将继续在拨号方案中,并调用下一个分机G()
将跳转到read_text,s,1
如果呼叫已应答,并结束搜索大致如下:
有关呼叫文件的更多信息,请参见:http:// www.voip-info.org/wiki/view/Asterisk+auto-dial+out。在调用文件中使用
Set: foo=bar
来设置${text}
What your trying to do can get pretty messy from the dialplan. Try something along these lines:
g
will continue in the dialplan if the call isn't answered, and call the next extensionG()
will jump toread_text,s,1
if the call IS answered, and end the huntSomething along these lines:
More on call files here: http://www.voip-info.org/wiki/view/Asterisk+auto-dial+out. Use
Set: foo=bar
in the call file to set${text}