Act asterisk as a gateway

dear friends
I have an Asterisk Server with 4 port Zapata : Asterisk Version 1.4.21.2

I want to make this server act exactly like a Gateway

I want to send All my Incoming Calls to Another Server and Route all my Outcoming Calls through this server to around the world.

My Asterisk Server with 4 port Zapata : 192.168.1.100
/
/
/
My Elastix 2.5.0 Server with 100 IP Phone Connected : 192.168.1.10

how can i do this?