Record to a file until <escape digits> are received as dtmf.
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 preceeded by “s=” and is optional.
Returns:
failure to write: 200 result=-1 (writefile)
failure on waitfor: 200 result=-1 (waitfor) endpos=<offset>
hangup: 200 result=0 (hangup) endpos=<offset>
interrrupted: 200 result=<digit> (dtmf) endpos=<offset>
timeout: 200 result=0 (timeout) endpos=<offset>
random error: 200 result=<error> (randomerror) endpos=<offset>
<offset> is the end offset in the file being recorded.
<digit> is the ascii code for the digit pressed.
<error> ?????
Go back to Asterisk AGI