This is probaly a small task that can be accomplished by an intermediate asterisk or a trixbox programmer.
**SIP Termiantion :**
I want my trixbox / Asterisk server ? to act as SIP terminating gateway. My partner will send me IP traffic and I'll route the incoming calls to my outbound trunks for termination.
-Setting the Trixbox to accept traffic from my partners gateway.
-There are around 20 trunks wihin my trixbox for dialing out.
-If one trunk is busy, the call should go on to the next trunk for dialing out? . The incoming call would hunt for the free trunk.