have read some post and wiki, still not sure if this situation would work,
Eg, Asterisk server run behind NAT.
there have more than 2 SIP phone behind NAT too.
the NAT setting have setted in SIP.conf file like below.
externip=x,x,x,x
localnet=x,x,x,x/x
[sip-user]
nat=yes
How happen with this, this can work?
whether the sip phone can talk each other,
cause the all behind the same firewall, both map the same port 5060
and same public real ip…
asterisk server response to the address, then what happen, which sip phone would responese that …
[/b]
the both behind different NAT firewall…
the asterisk server will need ports 5060 and whatever ports you define in RTP.conf forwarded to it. You dont need 10,000 ports, a hundred or so will do nicely.
The phone on the other end MUST have STUN. Alternatively, some phones you can manually tell it what its external IP is. You will want nat=yes and possibly canreinvite=no. Then it should work
thank Hilex,
my question is that there have more than 2 sip clients behind the same NAT firewall. and the Asterisk server is in public internet …
because all client need explorde to public internet…so the all client maped to the same the external public ip:port peers…
is this true ?
or have any other idea?
That shouldn’t be a problem - just configure the SIP clients to use different ports. E.g., one uses 5060 and the other one uses 5061. So long as they’re registering with the server and both those ports are forwarded correctly on the firewall, you should be ok.
And you’ll have to configure them to use different sets of RTP ports too - they will both need at least a couple of those, possibly more. They will have to be forwarded on the firewall too.
If your SIP clients don’t have to ability to configure the SIP and RTP ports, then either you can’t do it, or you’ll have to find a different client.