meetme conference & playback of random sound file
I am trying to configure the meetme conference (asterisk 1.8) to play a random sound file from a specific directory prior to it dropping the caller into the conference itself. i am able to successfully get it to play a specific file prior to entering the conference unsure how to implement this sort of randomization.
Check out the Random Application and the RAND function, Here is a quick untested example for either.
exten => s,1,Answer
exten => s,n,Background(privacy-please-stay-on-line-to-be-connected)
exten => s,n,Random(33:${CONTEXT},s,FILE1) ; 33% Num1
exten => s,n,Random(33:${CONTEXT},s,FILE2) ; 33% Num2
exten => s,n,Random(34:${CONTEXT},s,FILE3) ; 34% Num3
exten => s,n(FILE1),Background(tt-monkeys)
exten => s,n,Goto(Connect)
exten => s,n(FILE2),Background(tt-weasels)
exten => s,n,Goto(Connect)
exten => s,n(FILE3),Background(gambling-drunk)
exten => s,n,Goto(Connect)
exten => s,n(CONNECT),NoOp
exten => s,n,Meetme(options)
exten => s,n,Background(privacy-please-stay-on-line-to-be-connected)
exten => s,n,Random(33:${CONTEXT},s,FILE1) ; 33% Num1
exten => s,n,Random(33:${CONTEXT},s,FILE2) ; 33% Num2
exten => s,n,Random(34:${CONTEXT},s,FILE3) ; 34% Num3
exten => s,n(FILE1),Background(tt-monkeys)
exten => s,n,Goto(Connect)
exten => s,n(FILE2),Background(tt-weasels)
exten => s,n,Goto(Connect)
exten => s,n(FILE3),Background(gambling-drunk)
exten => s,n,Goto(Connect)
exten => s,n(CONNECT),NoOp
exten => s,n,Meetme(options)
Or using RAND if your prompts are all numbered as prompt0 to prompt100
exten => s,1,Answer
exten => s,n,Background(privacy-please-stay-on-line-to-be-connected)
exten => s,n,Set(promptnum=${RAND(1,100)})
exten => s,n,Background(prompt${promptnum})
exten => s,n,Meetme(options)
exten => s,n,Background(privacy-please-stay-on-line-to-be-connected)
exten => s,n,Set(promptnum=${RAND(1,100)})
exten => s,n,Background(prompt${promptnum})
exten => s,n,Meetme(options)