John Jolly
2011-Feb-11 00:58 UTC
[asterisk-users] meetme conference & playback of random sound file
i have been trying to find a way to accomplish the following but have not found a method in which to do so: 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20110210/d1fcd9ba/attachment.htm>
Roger Burton West
2011-Feb-11 01:18 UTC
[asterisk-users] meetme conference & playback of random sound file
On Thu, Feb 10, 2011 at 04:58:05PM -0800, John Jolly 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.Absent an Asterisk-specific solution, how about a separate process which would link a random file into a fixed pathname? (Fired off from cron, perhaps.) Roger
Steve Edwards
2011-Feb-11 01:28 UTC
[asterisk-users] meetme conference & playback of random sound file
On Thu, 10 Feb 2011, John Jolly 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.?Who is the sound file played to? The caller or the conference? Please show what you are using now. Would an AGI that selected a random file from the directory and set the path as a channel variable work? -- Thanks in advance, ------------------------------------------------------------------------- Steve Edwards sedwards at sedwards.com Voice: +1-760-468-3867 PST Newline Fax: +1-760-731-3000
John Kiniston
2011-Feb-11 15:37 UTC
[asterisk-users] meetme conference & playback of random sound file
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
>