Working with 2 Asterisk servers

Hello,
We have 2 Asterisk servers for 2 different purposes.
My ext. is registered to ServerA
I would like, when I call to 9XXXXXXX, to have this call redirected from ServerA to ServerB
And ServerB will execute the call to XXXXXXX

ServerA is Asterisk 1.6.2.10
ServerB is Asterisk 1.8.20.1

How should the conf. files look like?

Thank you
Noam.

Treat server B as an outgoing ITSP and server A as an incoming, DID, ITSP.

על כל אחד מהשרתים הגדרתי trunk באופן הבא:
I have created 2 trunks, one on each server as follow:

Server A:
Trunk Name: AtoB

Outgoing setting:
Trunk Name = JLM

Peer Details:
host: Server B IP
username=jlm
fromuser=jlm
secret=some-passwd
type=friend
qualify=yes
context=from-internal

The rest I left blank

Server B:
Trunk Name: BtoA

Outgoing setting:
Trunk Name = JLM

Peer Details:
host: Server A IP
username=jlm
fromuser=jlm
secret=some-passwd
type=friend
qualify=yes
context=from-internal
All the rest I left blank

After creating a new trunk on each server,
On server A I have configured outbound route towards the new server.
I put the new outbound route on the top of the list and set dial rules as required.

On server B I have created only 1 outbound route towards my Telephony Provider

Now, when dialing from an phone registered to Server A
The request is received on Server A and goes to Server B.
Server B get the request and pass it to the Telephony provider.

Nice and easy.