Random selection of TRUNKS

Hello all, thanks for looking my topic…Here is the problem:
i have 4 trunks:
2 of them are incoming\outgoing
2 other of them are only for outgoing calls
Is there any way to make asterisk to select trunks randomly when making a call?

For example trunks 1 and are busy with incoming calls and asterisk must select 1 of 2 outgoing trunks to place an outgoing call?

Or as i understand there is easier way to organize stair-like script using 103 priorities (102 priority - line is circuit busy)
for example
making outbound call
2 outgoing trunks are busy…
astersik checks first trunk - and gets circuit busy…at 103 there is Goto to trunk2 but also gets circuit busy…in/out trunk1 is free to make call and asterisk places call throught in/out trunk1…

Which way is better?
And how can i construct “stair like script”?

in simple words how can asterisk transfer outgoing call from the trunk which is busy to free trunk?

You can use n+101 to make calls. Meaning you try the first trunk. If it is busy try the next one. Something like:

exten => _X.,1,Dial(ZAP/g1/${EXTEN})
exten => _X.,102,Dial(ZAP/g2/${EXTEN})

If group 1 fails for what ever reason it will try to go out over group 2.