# Asterisk Project : Asterisk 13 AGICommand_record file

Created by wikibot on Aug 08, 2014

# RECORD FILE

### Synopsis

Records to a given file.

### Description

Record to a file until a given dtmf digit in the sequence is received. Returns `-1` on hangup or error. The format will specify what kind of file will be recorded. The timeout is the maximum record time in milliseconds, or `-1` for no timeout. offset samples is optional, and, if provided, will seek to the offset without exceeding the end of the file. silence is the number of seconds of silence allowed before the function returns despite the lack of dtmf digits or reaching timeout. silence value must be preceded by `s=` and is also optional.

### Syntax

    RECORD FILE FILENAME FORMAT ESCAPE_DIGITS TIMEOUT OFFSET SAMPLES BEEP S=SILENCE

##### Arguments

- `filename`
- `format`
- `escape_digits`
- `timeout`
- `offset samples`
- `BEEP`
- `s=silence`

### See Also

### Import Version

This documentation was imported from Asterisk Version SVN-branch-13-r420538