On Tue, 14 Sep 2010, Dan Journo wrote:
> Im looking at using MixMonitor to record calls and I know that I need to
> set the filename first.
>
> However, with the number of calls coming in, hard coding the filename
> isnt an option.
>
> So I need to do something like this:-
>
> MixMonitor(RANDOMNUMBER.wav)
>
> But can't find a way to generate a random number.
>
> I thought that maybe I could use a unique variable that already exists
> for the current call, but I'm not sure which one to pick.
Using a random number would not be the correct approach. Random does not
mean unique. You will have collisions at some point in time.
The UNIQUEID channel variable is what you want, but wouldn't it be useful
to include something meaningful in the file name like the DNIS and the
ANI? How about:
mixmonitor(${ANI}-${EXTEN}-${UNIQUEID}.wav)
Personally, I prefer "human readable" numbers so I would probably extract
the channel count from UNIQUEID and use something like:
mixmonitor(${ANI}-${EXTEN}-${STRFTIME(${EPOCH},,%Y-%m-%d-%H-%M-%S)}-${X}.wav)
--
Thanks in advance,
-------------------------------------------------------------------------
Steve Edwards [email protected] Voice: +1-760-468-3867 PST
Newline Fax: +1-760-731-3000
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users