How to make asterisk server automatically response to SIP call?

∥☆過路亽.° 提交于 2019-11-29 17:36:08

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

[incoming1]

exten => 333,1,Answer()
same  => n,Playback(File_name)
same  => n,Hangup()

Go to /etc/asterisk/extension_custom.conf and write your context like this:

and name the context as incoming1 or anything else cause incoming context already exists. I have named it as incoming1:

Now goto /etc/asterisk/sip_additional.conf and edit the context of extension you are going to register on the softphone.

Now register the softphone and you can dial the number 333 and everything will work properly.

![][3]

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!