[Asterisk-Users] How to do something random?
MF Hulber
asterisk-admin at hulber.com
Mon Mar 28 21:46:24 MST 2005
Take a look at the Random() command.
MARK.
Ronald Wiplinger wrote:
> I want to change the below lines:
>
> exten => _011.,1,SetGroup(line1) ; set current group to
> line
> exten => _011.,2,CheckGroup(1) ; check line1 does
> not have more than 1
> exten => _011.,3,Dial,SIP/${EXTEN}@line-a ; use line-1
> exten => _011.,103,1,SetGroup(line2) ; set current
> group to line
> exten => _011.,104,CheckGroup(1) ; check line2 does not
> have more than 1
> exten => _011.,105,Dial,IAX2/xxxxx at line-b/${EXTEN} ; use line-2
> exten => _011.,205,1,SetGroup(line3) ; set current
> group to line
> exten => _011.,206,CheckGroup(1) ; check line3 does not
> have more than 1
> exten => _011.,207,Dial,IAX2/xxxxx at line-b/${EXTEN} ; use line-3
>
> exten => _011.,307,Busy ; Play busy if all lines
> already used
>
>
> so that the three lines will be choosen random, but still only one
> user per line.
>
> Can you give me a hint?
> BTW, I have not tested the lines yet, ... if you spot an error, please
> point it out.
>
>
> bye
>
> Ronald
>
> _______________________________________________
> Asterisk-Users mailing list
> Asterisk-Users at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-users
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-users
More information about the asterisk-users
mailing list