"Rejecting unknown SIP connection"

Hi,

I’m trying to setup FreePBX using Twilio for SIP trunking. Outgoing calls work but calls to the PBX fail with the following log message:

[2017-09-26 08:20:19] WARNING[6271][C-00000009] Ext. s: “Rejecting unknown SIP connection from 54.172.60.0”

Twilio has 4 originating IP addresses and I’ve created trunks for all of them. Incoming SIP settings for the trunk corresponding to the rejected IP address are:

host=54.172.60.0
type=user
context=from-trunk

I have also tried setting a username, nat yes or no, insecure=port,invite, etc, but none of this helped.

Advice on this would be much appreciated, I really have no idea why it’s not working. Thanks in advance.

Matthew Fleming

The type parameter for SIP peers indicates how inbound SIP invites are authenticated. Type user matches against username and secret whereas type peer matches against ip address and port. You want your type(s) to be peer(s) for this application.