如何使星号服务器自动响应SIP呼叫? [英] How to make asterisk server automatically response to SIP call?
问题描述
我的目标:我想在星号服务器上使用softphone(3CX电话)注册,并调用服务器并进行星号操作
作为服务器来自动响应某些内容,例如播放歌曲.
我的工作方式:我使用virtualbox安装了asteriskNow,并通过为我的SIP设备设置扩展名来注册了软件电话
(扩展名333).我在 etc/asterisk/extensions.conf 中编写了一个拨号计划.拨号计划是:
[incoming]
exten =>s,1,Answer()
exten =>s,n,Playback(dir-intro-oper)
exten =>s,n,Hangup()
我想要服务器的任何来电,服务器将自动应答并播放预定义的语音(dir-intro-oper.gsm)
然后举手.
但是我遇到的问题是:
我使用网络电话,但我不知道应该拨哪个号码到星号服务器.我应该为
设置分机号吗星号服务器本身?如果是这样,该怎么做?通过设置SIP卡车?将拨号计划写在sip.conf中吗?还是其他?
另一个问题: 我读过与星号相关的书星号,未来的电话",该书告诉我们在extensions.conf
中编写Dialplan.直接,但是我发现服务器中的extensions.conf提醒我们不要直接修改文件,必须使用web-gui
进行修改.那么我应该遵循哪种方式?
在这种情况下,我不使用任何其他硬件电话. 我是星号的新手,请给我一些提示和详细过程.
您使用的"s"扩展名是特殊"的,当Asterisk不知道要做什么时,它将尝试使用该扩展名. >
如果您真的希望通过VoIP电话或ITSP拨打电话,以相同的方式进行处理,请尝试以下操作:
[incoming]
exten =>_X.,1,Answer()
same => n,Playback(dir-intro-oper)
same => n,Hangup()
...,并确保在您设置的SIP电话和SIP中继定义中:
context=incoming
这实际上会强制所有呼叫进入您的上下文,然后无论您拨打什么电话,您始终会匹配分机号码.
请访问 https://wiki.asterisk.org/wiki/display了解更多信息/AST/模式+匹配
My objective: I want to use softphone(3CX phone) register with asterisk server, and make call to the server and asterisk act
as a server to automatically response something, like play a song.
How i did: I installed asteriskNow using virtualbox, and registered the softphone by setting exntension for my SIP device
(extension 333). And i write a dialplan in etc/asterisk/extensions.conf. The dialplan is :
[incoming]
exten =>s,1,Answer()
exten =>s,n,Playback(dir-intro-oper)
exten =>s,n,Hangup()
I want any incoming call to server, the server will automatically answer, and play a pre-defined voice (dir-intro-oper.gsm )
then handup.
But I met the problem is:
I use softphone, and i dont know which number i should dial to the asterisk server. Should i set up a extension number for
asterisk server itself? If so, how to do that? By setting up SIP truck? Write the dialplan in sip.conf? or anything else?
Another questions: I read the asterisk related book"asterisk, the future telephony" which tells us to write dialplan in the extensions.conf
directly, but i found the extensions.conf in the server which alerts us do not modified the file directly, must use web-gui
to modify.So which way i should follow?
In this case, i do not use any other hardware phone. I am a novice on asterisk, please give me some hints and detail procedure.
The "s" extension that you are using is a "special" that when Asterisk doesn't know what to do, it tries to use that.
If you really want any call to the box, either from a VoIP phone or an ITSP to get handled the same way, try this:
[incoming]
exten =>_X.,1,Answer()
same => n,Playback(dir-intro-oper)
same => n,Hangup()
... and make sure that in your SIP phone and SIP trunk definitions that you set:
context=incoming
That literally forces all calls into your context and then no matter what you dial, you always match the extension number.
More reading at https://wiki.asterisk.org/wiki/display/AST/Pattern+Matching
这篇关于如何使星号服务器自动响应SIP呼叫?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!