If I put asterisk behind NAT then its easy for me to connect my SIP phones to the asterisk directly. But then I can not access asterisk easily from outside the NAT ( from the internet ).
On the other hand if I put asterisk on a static ip then I can not connect my SIP phones to asterisk directly. I mean the only way I know is to use SER or OpenSER.
Is there any way to have astreisk on a static ip and connect SIP phones directly to it?
[quote=“narinder”]If I put asterisk behind NAT then its easy for me to connect my SIP phones to the asterisk directly. But then I can not access asterisk easily from outside the NAT ( from the internet ).
On the other hand if I put asterisk on a static ip then I can not connect my SIP phones to asterisk directly. I mean the only way I know is to use SER or OpenSER.
Is there any way to have astreisk on a static ip and connect SIP phones directly to it?[/quote]
Short answer is yes.
The problem with most home NAT routers is they force you to port forward the SIP and RTP ports to a single IP. If you have a router which allow you to do NAT but not force you to do port forwarding for SIP and RTP then you can do what you want.
In my home set-up I have 5 static IPs assigned to me by my ISP (41-45). My firewall/router is a Cisco 806 router. It uses .41 as the gateway IP, my Asterisk server is on .45 and I have another Cisco 806 router as my NAT router on .44 which behind it I have 3 SIP ATAs. I have no problem with my set-up seeing that the Cisco 806 does not force me to use port fowarding to pass SIP and RTP.