When you are using the media gateway you configure the peer as a normal peer. Try reading a little about everything you want to use: