On Nov 11, 2007 12:40 AM, Vincent  wrote:

> Thanks, but it won't do, as I need to get the exact filename so
> I can send an e-mail pointing to the file later in the script :-/

 you can generate your own name using a combo of
 STRFTIME() & CALLERID() & CDR() ( and RAND() if you like )

 Set(dtime=${STRFTIME(|America/New_York|%Y%m%d%H%M%S)})

 raw unformatted CDR(start|u) will give you a epoch down to a
 microsec, that is a very fine granularity :

  Set(r_start=${CDR(start|u)})    ;  1191749828.013884

 this will give you ID unique to each call :

       CDR(uniqueid|r)      ;  1191749828.1

 Finally, if you still want to grab the name autogenerated
 by record(), capture it to a temp file and use readfile() to
 extract it :

   TrySystem(/bin/mv -v /tmp/msg%d.wav /var/www/asterisk/ >/tmp/filename)

   ReadFile(filename=/tmp/filename,80)

   Please refer to pages 424, 495 & 512 of the book.

--

_______________________________________________
--Bandwidth and Colocation Provided by http://www.api-digital.com--

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to