O'Reilly logo

Asterisk: The Future of Telephony by Leif Madsen, Jared Smith, Jim Van Meggelen

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

RECORD FILE

Synopsis

RECORD FILE filename format escape_digits timeout [offset_samples] [BEEP] [s=silence]

Records the channel audio to the specified file until the reception of a defined escape (DTMF) digit. The format argument defines the type of file to be recorded (wav, gsm, etc.). The timeout argument is the maximum number of milliseconds the recording can last, and can be set to -1 for no timeout. The offset_samples argument is optional; if provided, it will seek to the offset without exceeding the end of the file. The silence argument is the number of seconds of silence allowed before the function returns despite the lack of DTMF digits or reaching the timeout. The silence value must be preceded by s= and is also optional.

Return values:

-1

Failure

0

Successful recording

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required