Sip trunks random

Hi, I have the following situation I need get random trunks in a SIP route.

The following is current configuration in my asterisk, but the sequence is line by line:

exten => _909.,1,SetCallerID(“27848800”)
exten => _909.,n,Dial(SIP/${EXTEN}@1000,60,rg)
exten => _909.,n,Dial(SIP/${EXTEN}@1001,60,rg)
exten => _909.,n,Dial(SIP/${EXTEN}@1002,60,rg)
exten => _909.,n,Dial(SIP/${EXTEN}@1003,60,rg)
exten => _909.,n,Dial(SIP/${EXTEN}@1004,60,rg)
exten => _909.,n,Dial(SIP/${EXTEN}@1005,60,rg)
exten => _909.,n,Hangup()

I want to get randomly each trunk is this route,like a normal digital trunk with ZAP channels.
I think I can do that whith SIPgroups commands, but I can´t find the way to do.

Please help me.

what you need to do is post another 4 or 5 threads asking the same question. you’re bound to get an answer then :unamused:

Needed a smiliar thing, this is what I have

[globals]
IPSvoda=10.65.138.102-10.65.138.105
COUNTvoda=0

IPSmc=10.65.138.103
COUNTmc=0

mcNoOfChannels=1
vodaNoOfChannels=2

exten => _X.,20,gotoif($["${COUNTvoda}" = “${vodaNoOfChannels}”] ? 21:22)
exten => _X.,21,SetGlobalVar(COUNTvoda=0])
exten => _X.,22,SetGlobalVar(COUNTvoda=$[${COUNTvoda}+1])
exten => _X.,23,Set(dialipvoda=${CUT(IPSvoda,-,${COUNTvoda})})
exten => _X.,24,Dial(SIP/${EXTEN}@${dialipvoda},40,L(3600000))
;exten => _X.,25,GotoIf($["${DIALSTATUS}" != “BUSY”] ? 20)
;exten => _X.,26,Goto(pd-${DIALSTATUS},1)
exten => _X.,25,Goto(pd-${DIALSTATUS},1)

So for you, just have IPsvoda=1000-1001-1002-1003…

then CUT will select on that string