From 9d8c71ee86da27b1e93f1179e66ea273e1e5239e Mon Sep 17 00:00:00 2001 From: Mark Spencer Date: Fri, 17 Sep 2004 15:05:29 +0000 Subject: Move routines from voicemail to app for general use (part of bug #752) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3801 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- include/asterisk/app.h | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'include/asterisk/app.h') diff --git a/include/asterisk/app.h b/include/asterisk/app.h index 48a014915..314feb3d9 100755 --- a/include/asterisk/app.h +++ b/include/asterisk/app.h @@ -4,9 +4,9 @@ * Application convenience functions, designed to give consistent * look and feel to asterisk apps. * - * Copyright (C) 1999, Mark Spencer + * Copyright (C) 1999-2004, Digium, Inc. * - * Mark Spencer + * Mark Spencer * * This program is free software, distributed under the terms of * the GNU General Public License @@ -57,6 +57,17 @@ int ast_linear_stream(struct ast_channel *chan, const char *filename, int fd, in //! Stream a file with fast forward, pause, reverse. int ast_control_streamfile(struct ast_channel *chan, char *file, char *fwd, char *rev, char *stop, char *pause, int skipms); +//! Play a stream and wait for a digit, returning the digit that was pressed +int ast_play_and_wait(struct ast_channel *chan, char *fn); + +//! Record a file for a max amount of time, in a given list of formats separated by '|', outputting the duration of the recording, and with a maximum +// permitted silence time of 'maxsilence' under 'silencethreshold' or use '-1' for either or both parameters for defaults. +int ast_play_and_record(struct ast_channel *chan, char *playfile, char *recordfile, int maxtime, char *fmt, int *duration, int silencethreshold, int maxsilence); + +//! Record a message and prepend the message to the given record file after playing the optional playfile (or a beep), storing the duration in 'duration' and with a maximum +// permitted silence time of 'maxsilence' under 'silencethreshold' or use '-1' for either or both parameters for defaults. +int ast_play_and_prepend(struct ast_channel *chan, char *playfile, char *recordfile, int maxtime, char *fmt, int *duration, int beep, int silencethreshold, int maxsilence); + #if defined(__cplusplus) || defined(c_plusplus) } #endif -- cgit v1.2.3