Adding local IP in SIP settings stops all calls

Hello,

I have 2 problems currently with a freepbx disto install.

Problem 1
My freepbx setup requires NAT. We have a public IP pointing to one to the box that is a 1:1 NAT
When we add a local network to the sip settings all outgoin and incoming calls stop working with the below error
WARNING[9152][C-00000000]: channel.c:4816 ast_prod: Prodding channel ‘SIP/10501-00000000’ failed
. I have looked into the configuration files and have not found anything unusual. Can anyone tell me what could be the problem.
NAT part of /etc/asterisk/sip_general_additional.conf
nat=yes
externip=38.112.198.199
localnet=10.0.0.1/255.255.255.0
Problem 2
Our SIP provider uses the public IP of the box for authentication. They will forward all calls to a public IP and when calls are placed from the box they are required to show the public IP in the SIP headers. But currently the sip headers contain the local ip of the box i.e. 10.0.0.122. This is the warning that the box shows . Our SIP provider blocks the call since it comes from the local IP hence the forbidden error. I do feel that this problem will be solved when problem 1 is fixed , I could be wrong.
WARNING[2122][C-00000051]: chan_sip.c:22795 handle_response_invite: Received response: “Forbidden” from 'sip:[email protected];tag=as42f837c7’
Any help would be appreciated.

Problem 2 is caused by problem 1, NAT configured wrong 10.0.0.1 is not a valid network ID for a 24 bit subnet mask (255.255.255.0).

I did use 10.0.0.0. I wrote 10.0.0.1 when i typed this post. The problem exists when i use 10.0.0.0

is 10.0.0.0/24 the network the phones are in?

Are you using FreePBX SIP settings module to make these changes?

Do you have all SIP ALG’s turned off in router/firewall?

Looks like the SIP inspection on the ASA firewall was the problem. Looks like problem 1 is solved but problem2 still returns forbidden . Is there any where else where asterisk would use the local IP ?

chan_sip.c:22795 handle_response_invite: Received response: “Forbidden” from 'sip:[email protected];tag=as2100c458

Thank you so much for helping with this problem.