[asterisk-users] Record() : How to get filename created with %d?

Tony Mountifield tony at softins.clara.co.uk
Mon Nov 12 03:58:50 CST 2007


In article <s9fcj31qjgame355t45jv0fdl8hkivtn0o at 4ax.com>,
Vincent <vincent.delporte at bigfoot.com> wrote:
> Hello
> 
> 	About Record(), ATFT 2nd Edition says that "if the filename
> contains %d, these characters will be replaced with a number
> incremented by one each time the file is recorded."
> 
> Problem is, the documentation doesn't explain how to refer to this
> filename later in the dialplan :-/

I'm a little surprised at the variety of band-aid suggestions that have
been posted. All you need to do is refer to "show application record",
and you uwill see that the generated filename is available by using
${RECORDED_FILE}

-------------------------------------------------------------------------------
  -= Info about application 'Record' =- 

[Synopsis]
Record to a file

[Description]
  Record(filename.format|silence[|maxduration][|options])

Records from the channel into a given filename. If the file exists it will
be overwritten.
- 'format' is the format of the file type to be recorded (wav, gsm, etc).
- 'silence' is the number of seconds of silence to allow before returning.
- 'maxduration' is the maximum recording duration in seconds. If missing
  or 0 there is no maximum.
- 'options' may contain any of the following letters:
     'a' : append to existing recording rather than replacing
     'n' : do not answer, but record anyway if line not yet answered
     'q' : quiet (do not play a beep tone)
     's' : skip recording if the line is not yet answered
     't' : use alternate '*' terminator key instead of default '#'

If filename contains '%d', these characters will be replaced with a number
incremented by one each time the file is recorded. A channel variable
named RECORDED_FILE will also be set, which contains the final filemname.

Use 'show file formats' to see the available formats on your system

User can press '#' to terminate the recording and continue to the next priority.

If the user should hangup during a recording, all data will be lost and the
application will teminate. 
-------------------------------------------------------------------------------

Cheers
Tony
-- 
Tony Mountifield
Work: tony at softins.co.uk - http://www.softins.co.uk
Play: tony at mountifield.org - http://tony.mountifield.org



More information about the asterisk-users mailing list