NAT and port-forwarding troubles


I need some help regarding forwarding port to/from asterisk with FreePBX

Currently we have astreisk 11.5 with FreePBX 2.11.
on astreisk there are some extensions, with default inbound leading to 6666.
Also we have a SIP trunk configured with local SIP-provider.
Anyway, SIP trunk registers successfully, and outbound route configured.

In current network configuration (look below) we have some ports forwarded to asterisk server.
All inboud calls from external phones are good, no issues (both sides can hear each other clearly)
All outbound calls have issue - recipient can hear caller, but caller can’t hear recipient at all.

Regarding network:
We have FreeBSD 9.1 as gateway with 2 NICs
1st (re0) looking into Internet, with public IP
2nd (vr0) looking into local network with some local subnets (,, etc.) and vlan, connected to L3 switch.
L3 switch and FreeBSD are exchanging subnets by ospf. OSPF converges fast and without any problems, asterisk (located at another building) can ping and trace freebsd w/o any issues or packet drops.

on FreeBSD we have ipfw and pf
ipfw have rules allow any to asterisk and asterisk to any
pf have rules to redirect ports 5060 and 10000:20000 UDP to asterisk.
All clients are using PAT (port-based NAT) to have access to internet, including asterisk.

At SIP configuration we have:

Additional info:
Configuring binat (static-NAT, SAT) in PF on freebsd to make it {public ip} == {asterisk} resolves issue. So looks like it is something within ports redirection and/or NAT.

So please help us resolve no recipient’s voice at outbound (to external numbers) calls.
Thank you.

Under “Settings > Asterisks SIP Settings”; Have you configured the NAT Settings?

Will this be enough?

Should be, however when I’ve used PAT before I have had to set NAT to “no” and IP configuration to “Public IP”.

Is the one 192 network really a /25 and a /30 ? You have a gateway between those LAN’s ?

Also realize there might me 3 people in these forums that understand what a subnet mask does so you are going to get some non-sequitur comments.

Hopefully this might clear some misunderstandings.

Yes, we have both 192.168.16.xx with /25 and /30 mask.
Basically inside OSPF area 0 all connections between L3 switches (routers for those with outdated networking logic) all connecttions are peer-to-peer (/30). Also on border of area we have L3 device, which works as local gateway for asterisk. But it does not use NAT to forward packets to FreeBSD and internet and back to asterisk. Same goes with every hop inside OSPF - source and destination IPs inside packet are not replaced by anyone. So no NAT there.

And last hop inside network (before packet reaches the internet and therefore source address replaced by NAT) is

Also 17.0/24 is a network, where most of the local grandstream deskphones are located.

Hope this clarify anything.