How connect two asterisk servers?

Dear Sir,

I want to connect my two asterisk servers one in Public IP(Server_RIP) and the other Server(Server_PIP) in private IP with internet connection.

  1. I want extensions of Server_RIP should call extensions of Server_PIP.
  2. I want extensions of Server_RIP should call to the SIP trunk associated with Server_PIP.
  3. I want all incoming calls to Server_RIP should pass to all extensions and SIP trunk of Server_PIP.

I need your kind co-operation.

Regards,
Zahid

I am using Elastix 2.2.0 with Asterisk 1.8.7.0 and FreePBX 2.8.

You can connect the both server through IAX turnking or you can use the DUNDi. But you need the Static IP address at both server.