Calls from one Asterisk box to another

Hi, i’m new to asterisk so this question may seem obvious to some of you…

I would like to make calls from one asterisk server to another, i’ve already done this with the two servers in the same network (ex : server1 - server2 - but now I want to place the second server in a complete different network

server 1 will be in
server 2 will be in

Both of them are behind a router so they wont have the address the my isp provide me (the router in the network of server1 will have the address and then the server will have an address like 192.168.x.x) I would like to know what kind of config in which device (router or server) I have to do to make calls to the other server.

Thank you!

This link will be useful for you

Thank you, usefull link but is there any way to do it with the SIP protocol ? or better said, why the 3 methods use IAX instead of SIP.

Thank you!

Yes is possible, actually is very similar only you have to add two lines in the peer configuration:

in the register section you need to make the registration of peer:

register => your-remote-peer1:remote-password@domain-of-asterisk/or-static-ip

[Your peer]
defaultuser=your user
context=your context
allow=your codec
insecure=invite,port ; important add this line