如何在pjsip和Asterisk 13中允许入站呼叫? [英] How to allow inbound calls in pjsip and Asterisk 13?

查看:718
本文介绍了如何在pjsip和Asterisk 13中允许入站呼叫?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经用PJProject 2.5.5配置了Asterisk 13.13.1,并启用了PJSIP作为SIP驱动程序(无需编译chan_sip).

I have configured Asterisk 13.13.1 with PJProject 2.5.5 and enable PJSIP as SIP driver (without compiling chan_sip).

我已经配置了完整的系统,并且可以正常工作,但是我在拨入电话时遇到了一些问题.我的主机没有连接多少号码,当我从任何公用号码拨打电话时,我在星号远程控制台上注意到此信息:

I have the fully configured system and it's working but I have some problems with incoming calls. I have few numbers connected with my host and when I calling from any public number I noticed this info on asterisk remote console:

[Feb 24 14:27:16] NOTICE[5291]: res_pjsip/pjsip_distributor.c:525 log_failed_request: Request 'INVITE' from '"zzzzz" <sip:zzzzz@192.168.34.1>' failed for '192.168.34.1:5062' (callid: 0e07e7607f8f62dd225347363173bb9f@192.168.34.1:5062) - No matching endpoint found

如果我将拨打我的星号的电话号码添加到端点,那么它就可以正常工作-我可以接听此电话.

And if I add the number which is calling to my Asterisk to endpoints then it's working - I can pick up this call.

如何增加允许所有入站呼叫的可能性?

How to add the possibility to allow all inbound calls?

推荐答案

您需要创建一个匿名终结点,以接受来自未知终结点的入站呼叫.

You need to create an anonymous endpoint to accept inbound calls from unknown endpoints.

请注意,添加匿名终结点会将系统打开到扩展扫描攻击中,在此情况下,扫描程序会尝试找出系统中已配置的扩展.他们这样做是为了通过广告呼叫向您发送垃圾邮件,或者利用呼叫转移来拨打长途电话号码,或者是出于其他不可告人的动机.

Be aware that adding an anonymous endpoint opens the system to extension scanning attacks where scanners try to find out which extensions you have configured in your system. They do this either to spam you with advertising calls, or exploit call transferring to call long distance numbers, or for some other ulterior motive.

创建匿名端点后,将其与扩展所使用的上下文关联起来.这样可以防止他们通过您的中继线拨打长途电话.

After creating an anonymous endpoint, associate it with a context different from that used by your extensions. This prevents them from dialing long-distance through your trunks.

要在pjsip.conf中添加匿名端点,请添加以下行:

To add an anonymous endpoint in pjsip.conf, add the following lines:

[anonymous]
type=endpoint
context=anonymous
disallow=all
allow=speex,g726,g722,ilbc,gsm,alaw

在拨号计划extensions.conf中:

[anonymous]
exten => _XXXXX,1,GotoIf(${DIALPLAN_EXISTS(local-extensions,${EXTEN},1)}?local-extensions,${EXTEN},1)
 same => n,Hangup(1)

local-extensions是列出您的本地扩展名的上下文.

local-extensions is the context listing your local extensions.

这篇关于如何在pjsip和Asterisk 13中允许入站呼叫?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆