diff options
author | matteo <matteo@f38db490-d61c-443f-a65b-d21fe96a405b> | 2003-02-23 06:00:11 +0000 |
---|---|---|
committer | matteo <matteo@f38db490-d61c-443f-a65b-d21fe96a405b> | 2003-02-23 06:00:11 +0000 |
commit | b6be24372a79c5fe8568a831bab188db9ea98e8c (patch) | |
tree | e05618b650b51c146c697c794e3e510343de7230 /include | |
parent | acda464eb483efb6dd4a07ab867ae3eb30699d33 (diff) |
Sun Feb 23 07:00:00 CET 2003
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@621 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include')
-rwxr-xr-x | include/asterisk/app.h | 3 | ||||
-rwxr-xr-x | include/asterisk/channel.h | 8 | ||||
-rwxr-xr-x | include/asterisk/file.h | 4 | ||||
-rwxr-xr-x | include/asterisk/say.h | 5 |
4 files changed, 19 insertions, 1 deletions
diff --git a/include/asterisk/app.h b/include/asterisk/app.h index 44c4186d2..bcbccb726 100755 --- a/include/asterisk/app.h +++ b/include/asterisk/app.h @@ -33,6 +33,9 @@ extern "C" { */ extern int ast_app_getdata(struct ast_channel *c, char *prompt, char *s, int maxlen, int timeout); +/* Full version with audiofd and controlfd. NOTE: returns '2' on ctrlfd available, not '1' like other full functions */ +extern int ast_app_getdata_full(struct ast_channel *c, char *prompt, char *s, int maxlen, int timeout, int audiofd, int ctrlfd); + //! Record voice (after playing prompt if specified), waiting for silence (in ms) up to a given timeout (in s) or '#' int ast_app_getvoice(struct ast_channel *c, char *dest, char *dstfmt, char *prompt, int silence, int maxsec); diff --git a/include/asterisk/channel.h b/include/asterisk/channel.h index 9673fb099..b14d3c928 100755 --- a/include/asterisk/channel.h +++ b/include/asterisk/channel.h @@ -465,6 +465,10 @@ struct ast_channel *ast_channel_walk(struct ast_channel *prev); * Wait for a digit. Returns <0 on error, 0 on no entry, and the digit on success. */ char ast_waitfordigit(struct ast_channel *c, int ms); +/* Same as above with audio fd for outputing read audio and ctrlfd to monitor for + reading. Returns 1 if ctrlfd becomes available */ +char ast_waitfordigit_full(struct ast_channel *c, int ms, int audiofd, int ctrlfd); + //! Reads multiple digits /*! * \param c channel to read from @@ -476,8 +480,10 @@ char ast_waitfordigit(struct ast_channel *c, int ms); * Read in a digit string "s", max length "len", maximum timeout between digits "timeout" (-1 for none), terminated by anything in "enders". Give them rtimeout for the first digit. Returns 0 on normal return, or 1 on a timeout. In the case of - a timeout, any digits that were read before the timeout will still be available in s. */ + a timeout, any digits that were read before the timeout will still be available in s. + RETURNS 2 in full version when ctrlfd is available, NOT 1*/ int ast_readstring(struct ast_channel *c, char *s, int len, int timeout, int rtimeout, char *enders); +int ast_readstring_full(struct ast_channel *c, char *s, int len, int timeout, int rtimeout, char *enders, int audiofd, int ctrlfd); /*! Report DTMF on channel 0 */ #define AST_BRIDGE_DTMF_CHANNEL_0 (1 << 0) diff --git a/include/asterisk/file.h b/include/asterisk/file.h index 79febcb48..e7f19825d 100755 --- a/include/asterisk/file.h +++ b/include/asterisk/file.h @@ -123,6 +123,10 @@ int ast_filecopy(char *oldname, char *newname, char *fmt); */ char ast_waitstream(struct ast_channel *c, char *breakon); +/* Same as waitstream, but with audio output to fd and monitored fd checking. Returns + 1 if monfd is ready for reading */ +char ast_waitstream_full(struct ast_channel *c, char *breakon, int audiofd, int monfd); + //! Starts writing a file /*! * \param filename the name of the file to write to diff --git a/include/asterisk/say.h b/include/asterisk/say.h index c0eb7ec70..7c0d911d7 100755 --- a/include/asterisk/say.h +++ b/include/asterisk/say.h @@ -34,6 +34,9 @@ extern "C" { */ int ast_say_number(struct ast_channel *chan, int num, char *ints, char *lang); +/* Same as above with audiofd for received audio and returns 1 on ctrlfd being readable */ +int ast_say_number_full(struct ast_channel *chan, int num, char *ints, char *lang, int audiofd, int ctrlfd); + //! says digits /*! * \param chan channel to act upon @@ -44,6 +47,7 @@ int ast_say_number(struct ast_channel *chan, int num, char *ints, char *lang); * Returns 0 on success, dtmf if interrupted, -1 on failure */ int ast_say_digits(struct ast_channel *chan, int num, char *ints, char *lang); +int ast_say_digits_full(struct ast_channel *chan, int num, char *ints, char *lang, int audiofd, int ctrlfd); //! says digits of a string /*! @@ -55,6 +59,7 @@ int ast_say_digits(struct ast_channel *chan, int num, char *ints, char *lang); * Returns 0 on success, dtmf if interrupted, -1 on failure */ int ast_say_digit_str(struct ast_channel *chan, char *num, char *ints, char *lang); +int ast_say_digit_str_full(struct ast_channel *chan, char *num, char *ints, char *lang, int audiofd, int ctrlfd); int ast_say_datetime(struct ast_channel *chan, time_t t, char *ints, char *lang); |