How to connect two asterisk servers using IAX

Hi, I am a little new to asterisk, so this might seem very stupid or easy question.
I want to connect two asterisk servers for calling purposes. One server has a static public IP but the other one does not have a public IP. It is connected to the internet behind a NAT.
So I tried the basic stuff given here: … al+servers

I am trying to connect a user to a peer. The peer is the machine sitting behind the NAT. How do I register the peer with the user so that It knows where to send the call when the particular extension is dialed at the user end? I hope this makes sense