As I said last week, in the very first reply: “This error indicates that Asterisk doesn’t recognize your SIP trunk, either by IP address or registration.”
Everyone trying to send a call through your PBX needs to have an IP address or username for Asterisk to match against. Since your provider probably isn’t interested in registering to your server, you need to do it by IP address. And yes, if you have calls incoming from 16 IP addresses this means you need to have 16 trunk entries with a matching [font=Courier]host[/font] line in each. Your provider should be able to give you a list of the IP addresses they will send incoming calls from.
The other option is to allow anonymous calls, making sure you are behind a firewall which only lets through those 16 IP addresses to port 5060. Then your trunk can be set to [font=Courier]host=dynamic[/font].
Your advice worked.
I had the similar problem like you as my trunk was registering to another server and calls were coming from multiple servers/IP. I also did not want to enable Guest and Anonymous Inbound SIP Calls hence i created trunk with each IP of provider so that Asterisk knows the IPs. Then the inbound calls worked as expected.
Hi, I have been searching the threads for days to figure out why my FreePBX Distro with Anonymous SIP calls turned off, would not allow inbound, but outbound ok. If I turn on Anonymous SIP then I get hit badly by hackers but I can receive inbound calls. I noticed the Asterisk log was rejecting the PEER connection and the log entry said sip-anonymous, while in the PEER Trunk connections I had it set to context=from-trunk or alternatively from-pstn. I found the logs were thinking it was anonymous… I suspected that the GUI was not saving the context parameters correctly, so I added the a value pair in the SIP ADMIN section (Settings >> Asterisk SIP Settings>>) in the Advanced General Settings of the FreePBX GUI that says context=from-trunk . BINGO, the behavior changed in the logs allowing the SIP PEER to be recognized.
I added this post, because I think someone else is going to have this problem.
No way should you have to do that. Post your trunk settings, something is wrong.
Hi Boss - I went and just removed the advanced SIP settings for the value pair “context=from-trunk” and the inbound still worked!! I was trying to get the Asterisk Log so I could show you. Gimme a refresh time and I will check again tomorrow. I am sure that was the last change I made before the PEER would be recognized as not an anonymous sip call.
I am posting my trunk details now, but it is working without the value pair in the advanced settings. I don’t know what to think at the moment.
Trunks look good I deleted your personal info.
We went silent on inbounds again. I added back the value pair context=from-trunk and it immediately started working again.
I really think that the configs are not updating properly from the GUI to the conf files. But I would have to SSH in to check, which I haven’t done yet.
MOre after Easter! thanks