Asterisk gateway to gateway configuration

Hhow can i conect two asterisk servers in gateway to gateway mode? The objective is route some calls from one to another server

Thanks in advance