Main Page | Alphabetical List | Data Structures | File List | Data Fields | Globals

say.h

Go to the documentation of this file.
00001 /*
00002  * Asterisk -- A telephony toolkit for Linux.
00003  *
00004  * Say numbers and dates (maybe words one day too)
00005  * 
00006  * Copyright (C) 1999, Mark Spencer
00007  *
00008  * Mark Spencer <markster@linux-support.net>
00009  *
00010  * This program is free software, distributed under the terms of
00011  * the GNU General Public License
00012  */
00013 
00014 #ifndef _ASTERISK_SAY_H
00015 #define _ASTERISK_SAY_H
00016 
00017 #include <asterisk/channel.h>
00018 #include <asterisk/file.h>
00019 
00020 #include <time.h>
00021 
00022 #if defined(__cplusplus) || defined(c_plusplus)
00023 extern "C" {
00024 #endif
00025 
00026 //! says a number
00027 /*! 
00028  * \param chan channel to say them number on
00029  * \param num number to say on the channel
00030  * \param ints which dtmf to interrupt on
00031  * \param lang language to speak the number
00032  * Vocally says a number on a given channel
00033  * Returns 0 on success, DTMF digit on interrupt, -1 on failure
00034  */
00035 int ast_say_number(struct ast_channel *chan, int num, char *ints, char *lang);
00036 
00037 /* Same as above with audiofd for received audio and returns 1 on ctrlfd being readable */
00038 int ast_say_number_full(struct ast_channel *chan, int num, char *ints, char *lang, int audiofd, int ctrlfd);
00039 
00040 //! says digits
00041 /*!
00042  * \param chan channel to act upon
00043  * \param num number to speak
00044  * \param ints which dtmf to interrupt on
00045  * \param lang language to speak
00046  * Vocally says digits of a given number
00047  * Returns 0 on success, dtmf if interrupted, -1 on failure
00048  */
00049 int ast_say_digits(struct ast_channel *chan, int num, char *ints, char *lang);
00050 int ast_say_digits_full(struct ast_channel *chan, int num, char *ints, char *lang, int audiofd, int ctrlfd);
00051 
00052 //! says digits of a string
00053 /*! 
00054  * \param chan channel to act upon
00055  * \param num string to speak
00056  * \param ints which dtmf to interrupt on
00057  * \param lang language to speak in
00058  * Vocally says the digits of a given string
00059  * Returns 0 on success, dtmf if interrupted, -1 on failure
00060  */
00061 int ast_say_digit_str(struct ast_channel *chan, char *num, char *ints, char *lang);
00062 int ast_say_digit_str_full(struct ast_channel *chan, char *num, char *ints, char *lang, int audiofd, int ctrlfd);
00063 
00064 int ast_say_datetime(struct ast_channel *chan, time_t t, char *ints, char *lang);
00065 
00066 int ast_say_time(struct ast_channel *chan, time_t t, char *ints, char *lang);
00067 
00068 int ast_say_date(struct ast_channel *chan, time_t t, char *ints, char *lang);
00069 
00070 int ast_say_datetime_from_now(struct ast_channel *chan, time_t t, char *ints, char *lang);
00071 
00072 int ast_say_date_with_format(struct ast_channel *chan, time_t t, char *ints, char *lang, char *format, char *timezone);
00073 
00074 #if defined(__cplusplus) || defined(c_plusplus)
00075 }
00076 #endif
00077 
00078 #endif

Generated on Sun Apr 18 23:33:55 2004 for Asterisk by doxygen 1.3.6-20040222