Hello,
I have installed FreePBX , I have defined a CHAN_SIP trunk and I have managed to place calls from FreePBX to outside world using that trunk (at outgoing section there are a lot of parameters but it’s working)
Stupid situation that on incoming section where is only one string , does not work and I cannot receive calls.
I have left “Allow SIP Guests” to on and “allow anonymous sip calls " to no.
I am getting always annoying " Failed to authenticate on REGISTER to”
How could I troubleshoot this ?
Trunk it’s defined as chan_sip .
I guess that I am using registration . I guess that credentials and config string it’s completed well since outgoing ok.
I was guessing / suspecting / digging around NAT configuration . My little NTW setup looks like
Internet (pbx agents) -> pfsense ->192.168.1.23 ETH1 ->FreePBX
SIpTrunkPRovider-> ONT box → 192.168.32.110-> ETH0->FreePBX
I have declared 2 static routes toward my SIP trunk provider. all ntw setup it’s detected like in picture below in settings>asterisk sip settings.
Your trunk definition has to allow for the incoming connections. It sounds like your provider is using IP Authentication to send the calls to your machine. If that’s the case, you need to look at what IP addresses the calls are coming from. Once you know those addresses, you will need to do one of the following:
In Chan-SIP, set up a trunk for each and every IP address. The settings will be the same for each one, they just need to identify the IP address of your provider’s server.
In PJ-SIP, set up your trunk and on the Advanced Settings page, add the list of all of your provider’s IP address in the “Permit” field (about 6 lines down from the top).
@cynjut thank you for suggestion !
I am using chan-SIP. PJSIP didn’t work.
I have read this on other threads. there are only 2 IP addresses .I have tried this . Please suggest what should I fill in Settings > Asterisk Sip settings NAT section and sip legacy settings ?
Do those settings matter on IN route ? (Amazing out route that I consider far more complicated it’s working)
We can wrestle that bear later. My suspicion is that your config would be a lot easier with PJ-SIP.
In your current config, instead of “type=peer” use these settings:
This sets up your inbound to use the settings in your chan-sip setup. The x.x.x.x is the IP address of the server. If there’s only one, you only need one trunk, but you need one for each IP address of the ITSP phone server. If they have two, you need two trunks. If they have 50, you need 50 trunks (something that PJ-SIP simplifies).
You can’t. You need two trunks, one for each host. That’s why PJ-SIP is an improvement - you only need one trunk for both of the addresses (one in the main section and one in the “Permit” section).
Also, all of the settings can go in your Outgoing settings when you use “type=friend”. This way, your settings are used for the entire trunk. Get rid of the “type=peer” there and replace it with the “type=friend” and you should get a 50% reduction in your Anonymous errors. Once you get that one working, copy the settings to a second trunk definition and add the second server address and you should be on your way.
I’m verry interested on this topic. I have same issue with same internet provider (I have used freebpx to comunicate between three different location. Everything worked till today when I added sipTrunk.
-Now I can’t call the numbers from other two location (there is vpn site-to site)
and same issue with calls from external numbers.
Please tell me if, and how you succeeded.
Thank you
Ioan