[asterisk-users] meetme conference & playback of random sound file

John Kiniston john at meatkite.com
Fri Feb 11 09:37:50 CST 2011


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)


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)

On Thu, Feb 10, 2011 at 5:58 PM, John Jolly <jgjolly at gmail.com> wrote:
>
> 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.
>
> Is this possible? Any help will be greatly appreciated.
>
> john jolly jgjolly[at]gmail.com
>



More information about the asterisk-users mailing list