How to make good call routing?

Hi,

i have 3 asterisk servers and dont know how route the call.
Configuration is 1 main server with 2xE1 and 2 secondary servers with 16xGSM on each.
How can i do something like this:

  • user is logen to main server
  • user making call
  • try call via one secondary server -> if busy try call via next secondary server -> if busy call via main server

Any idea?

Greetings