[HELP]: Need 4 Asterisk acting routers for multiple clients

My idea:
Try to figure out how (if possible) to set up 4 (or more) server Asterisk. These server* has a trunk-line to every other server*.
These server* acts as servers for client* that needs to call another client*.
Every client* has its own country code. Every client* has 2 trunks to 2 different server* (for failover).

Client*-001 dials 99003123. (99 for entering an ‘external’ call through one of the trunks) (003 specifies which client* to call) (123 is the extention).
This call should be sent to one of the server* that looks at the 003 and decides to which * he should send the call to. If there is a client*-003 that has a trunk to him, the call should be routed to that client*, otherwise the call should be routed to that server* where the Client*-003 has one of its trunk-lines.
(The above example: Client*-001 has got trunk-line to Server1 and Server2. Client*-003 has got trunk-line to Server3 and Server4. Calls from Client*-001 goes through trunk to Server1 (or 2) and Server1 (or 2) routes to Server3 (or 4) who sends the call through trunk to Client-003.)

If setting up the asterisk network this way, then client* don’t need to set up a new trunk when a new client* is entering this asterisk-network. The client* don’t even need to know if there exists any other clients. Only the server* needs to know about the new client* and where its trunk-lines are. If client*-001 tries to call a client*-999 (that doesn’t exist) then he just gets an error that saids something like “Could not connect”.

Estimation is around 100 client* that would need to be able to reach each other. Estimate peaks of round 75 simultanious calls.

There is not going to be any need for external connections (like client*>server*>pstn or client*>server*>otherSIPserver).

All trunks is going to be in VPN-tunnels.

My questios:

  1. Is this a good idea, or does it create big problems?
    Is there better ways of setting up this kind of phone-network?

  2. Does anybody have any suggestion of the configuration-files in the server* so that they route calls in a good way (if possible, could the * decide which trunk-line he should use based on the fastest/best route for best sound quality)?

  3. Any suggestions on client* configs?

  4. I have tried to find out some docs about this, but I haven’t found any. Suggestions on some docs that describes how somebody else has set up something like this?

hmm … not sure about the many-many relationship, especially when it comes to VPN tunnels. sounds like a recipe for disaster / lots of hard work to me.

instead of this, how about a central Asterisk server that does the call routing ? then each site only needs a single VPN tunnel apart from the centre. does the RTP need to go via a secure path ? if not, then you could offload jthe RTP from the central server once the call is setup.

otherwise, it all sounds feasible, but i wouldn’t like to be responsible for 100 Asterisk servers every time a new site comes on board.

As I understand its risky to let all client* connect to only one server* that handles the calls. What if the server* goes down (or its network goes down)? All calls is dropped. The RTP is supposed to go in secure tunnels, so one server* has to handle all the traffic. This is not a bad idea though… but I’m worried about the latency. What if the server is in Egypt, the calling client is in USA and the called client is in Canada? This would result i traffic from USA to Egypt and back to Canada.

The VPN question is not that important at this moment (unless VPN-tunnels has bad influence on RTP traffic). The problem is (as I see it) to get the RTP to bounce from one * to another until it reaches the end destination.

[client*-001] ----->----- [server1] ----->----- [server2] ----->-----[client*004]

I don’t understand which config-file that controls the IAX2 routings (for the servers). And I don’t know how to edit that config.