OpenSIPS 2.4 call forbidden

ぃ、小莉子 提交于 2019-12-06 13:35:58

问题


I discovered OpenSIPS and all the possibilities a few days ago. I would just use it as a simple SIP proxy to get started. Proxy between my designated UAC and my UAS (asterisk, not natted). The goal is to use a proxy to prevent bot attacks on my UAS.

After installing OpenSIPS, I tried to configure my XLITE (natted) by simply adding the proxy URL in the configuration. It works, I register and I can see in my UAS peers my extensions with proxy IP. But when I make a call, I got a forbidden error. In debug mode, the log does not talk to me, I see a lot of information but nothing about this error.

I did not make any changes to the default configuration script. Is this behavior normal?

I also tried with VM on public IP as UAC (so not named), same thing.

Thank you for your help.

Olivier


回答1:


Most likely, your SIP INVITE is hitting this block:

if (!is_myself("$rd")) {                                                                                  
    send_reply("403", "Relay Forbidden");                                                                  
    exit;                                                                                                 
}

What this means is that your OpenSIPS does not consider itself responsible for the domain (or IP) that your SIP UA has placed in the Request-URI and is trying to route towards. To fix this, just whitelist the Asterisk IP as a local (recognized) domain using the alias statement:

listen = udp:*:5060   
alias = 1.1.1.1


来源:https://stackoverflow.com/questions/52838765/opensips-2-4-call-forbidden

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