I am trying to configure an Asterisk (Elastix) box to receive SIP calls from a provider without requiring allowguest=yes to be enabled in sip.conf.

Basically the SIP trunk provider uses multiple IPs to send the calls to our PBX and so without the matching host= field, the call is dropped. However, by enabling allowguest=yes, anyone can send calls to our PBX. We could firewall the PBX to only allow incoming SIP from our provider but this stops our SIP handsets from being able to register anywhere in the world.

This must be a common issue, and I can see in the past that Asterisk hasn't got support for saying host={subnet} or multiple host= entries. Is this still the case? How should I get around this issue?


Correct solution - ask provider all ips and add all as trunk1-trunk2...trunkX


I think you can set host=dynamic and restric access with permit/deny clauses, as in:

deny=             ; deny access
permit= ; allow subnet

Also, you can easily setup an iptables chain to restrict access to the 5060 port (or whatever your SIP port is), which you should do anyway.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.