Hi everybody,
I need your help to undersand how can I solve what, in my opinion, is a NAT problem.
This is my configuration:
VoIP Provider <–> Asterisk 11.5.x + A2Billing server <–> PBX A + PBX B (each one Asterisk 1.8.x)
I can act without problems everywhere except on VoIP provider systems (I’ve to ask what I need and they say me if it’s possible or not…)
PBX A and PBX B are on the same network behind the same firewall and the same router + public IP (I’ve only one public IP so I had to NAT my PBXs).
THE PROBLEM: I’ve a SIP trunk open from the PBX A to the A2Billing server for a geographical number A and another trunk open (obviusly with different credentials) from the PBX B to the A2Billing server for a geographical number B. When I call number A from a cell phone, the call arrive to PBX A. When I call number B from a cell phone, the call still arrive to PBX A! And obviusly, here I don’t have an inbound route for that number… so the call fail and I ear ss-noservice audio file.
If I launch netstat-nat -n on my firewall I see:
udp 192.168.1.7:5060 theIPofA2BillingServer:5060 ASSURED
udp 192.168.1.9:5060 theIPofA2BillingServer:5060 ASSURED
Some configurations… Some of my A2Billing VoIP settings are:
qualify=yes
type=friend
host=dynamic
nat=comedia
canreinvite=yes
Some of my PBX config :
type=peer
trustrpid=yes
sendrpid=yes
qualify=yes
port=5060
nat=yes
maxexpirey=3600
insecure=invite,port
canreinvite=yes
In my firewall iptables I have:
-A PREROUTING -i eth0 -p udp -m multiport --dports 5060:5070 -j DNAT --to-destination 192.168.1.9
-A PREROUTING -i eth0 -p udp -m multiport --dports 10000:20000 -j DNAT --to-destination 192.168.1.9
-A FORWARD -d 192.168.1.9/32 -i eth0 -o eth1 -j fwd_wanlan_pbx
-A fwd_wanlan_pbx -p udp -m multiport --dports 5060:5070 -j ACCEPT
-A fwd_wanlan_pbx -p udp -m multiport --dports 10000:20000 -j ACCEPT
where 192.168.1.9 is PBX A. Do you think I need some modify for PBX B (192.168.1.7)?
How do you think I can solve this problem? Thank you so much!