Wed Oct 28 15:47:56 2009

Asterisk developer's documentation


say.h

Go to the documentation of this file.
00001 /*
00002  * Asterisk -- An open source telephony toolkit.
00003  *
00004  * Copyright (C) 1999 - 2005, Digium, Inc.
00005  *
00006  * Mark Spencer <markster@digium.com>
00007  *
00008  * See http://www.asterisk.org for more information about
00009  * the Asterisk project. Please do not directly contact
00010  * any of the maintainers of this project for assistance;
00011  * the project provides a web site, mailing lists and IRC
00012  * channels for your use.
00013  *
00014  * This program is free software, distributed under the terms of
00015  * the GNU General Public License Version 2. See the LICENSE file
00016  * at the top of the source tree.
00017  */
00018 
00019 /*! \file
00020  * \brief Say numbers and dates (maybe words one day too)
00021  */
00022 
00023 #ifndef _ASTERISK_SAY_H
00024 #define _ASTERISK_SAY_H
00025 
00026 #include "asterisk/channel.h"
00027 #include "asterisk/file.h"
00028 
00029 #include <time.h>
00030 
00031 #if defined(__cplusplus) || defined(c_plusplus)
00032 extern "C" {
00033 #endif
00034 
00035 /* says a number
00036  * \param chan channel to say them number on
00037  * \param num number to say on the channel
00038  * \param ints which dtmf to interrupt on
00039  * \param lang language to speak the number
00040  * \param options set to 'f' for female, 'm' for male, 'c' for commune, 'n' for neuter, 'p' for plural
00041  * Vocally says a number on a given channel
00042  * Returns 0 on success, DTMF digit on interrupt, -1 on failure
00043  */
00044 int ast_say_number(struct ast_channel *chan, int num, const char *ints, const char *lang, const char *options);
00045 
00046 /* Same as above with audiofd for received audio and returns 1 on ctrlfd being readable */
00047 int ast_say_number_full(struct ast_channel *chan, int num, const char *ints, const char *lang, const char *options, int audiofd, int ctrlfd);
00048 
00049 /* says an enumeration
00050  * \param chan channel to say them enumeration on
00051  * \param num number to say on the channel
00052  * \param ints which dtmf to interrupt on
00053  * \param lang language to speak the enumeration
00054  * \param options set to 'f' for female, 'm' for male, 'c' for commune, 'n' for neuter, 'p' for plural
00055  * Vocally says a enumeration on a given channel (first, sencond, third, forth, thirtyfirst, hundredth, ....) 
00056  * especially useful for dates and messages. says 'last' if num equals to INT_MAX
00057  * Returns 0 on success, DTMF digit on interrupt, -1 on failure
00058  */
00059 int ast_say_enumeration(struct ast_channel *chan, int num, const char *ints, const char *lang, const char *options);
00060 int ast_say_enumeration_full(struct ast_channel *chan, int num, const char *ints, const char *lang, const char *options, int audiofd, int ctrlfd);
00061 
00062 /* says digits
00063  * \param chan channel to act upon
00064  * \param num number to speak
00065  * \param ints which dtmf to interrupt on
00066  * \param lang language to speak
00067  * Vocally says digits of a given number
00068  * Returns 0 on success, dtmf if interrupted, -1 on failure
00069  */
00070 int ast_say_digits(struct ast_channel *chan, int num, const char *ints, const char *lang);
00071 int ast_say_digits_full(struct ast_channel *chan, int num, const char *ints, const char *lang, int audiofd, int ctrlfd);
00072 
00073 /* says digits of a string
00074  * \param chan channel to act upon
00075  * \param num string to speak
00076  * \param ints which dtmf to interrupt on
00077  * \param lang language to speak in
00078  * Vocally says the digits of a given string
00079  * Returns 0 on success, dtmf if interrupted, -1 on failure
00080  */
00081 int ast_say_digit_str(struct ast_channel *chan, const char *num, const char *ints, const char *lang);
00082 int ast_say_digit_str_full(struct ast_channel *chan, const char *num, const char *ints, const char *lang, int audiofd, int ctrlfd);
00083 int ast_say_character_str(struct ast_channel *chan, const char *num, const char *ints, const char *lang);
00084 int ast_say_character_str_full(struct ast_channel *chan, const char *num, const char *ints, const char *lang, int audiofd, int ctrlfd);
00085 int ast_say_phonetic_str(struct ast_channel *chan, const char *num, const char *ints, const char *lang);
00086 int ast_say_phonetic_str_full(struct ast_channel *chan, const char *num, const char *ints, const char *lang, int audiofd, int ctrlfd);
00087 
00088 int ast_say_datetime(struct ast_channel *chan, time_t t, const char *ints, const char *lang);
00089 
00090 int ast_say_time(struct ast_channel *chan, time_t t, const char *ints, const char *lang);
00091 
00092 int ast_say_date(struct ast_channel *chan, time_t t, const char *ints, const char *lang);
00093 
00094 int ast_say_datetime_from_now(struct ast_channel *chan, time_t t, const char *ints, const char *lang);
00095 
00096 int ast_say_date_with_format(struct ast_channel *chan, time_t t, const char *ints, const char *lang, const char *format, const char *timezone);
00097 
00098 #if defined(__cplusplus) || defined(c_plusplus)
00099 }
00100 #endif
00101 
00102 #endif /* _ASTERISK_SAY_H */

Generated on Wed Oct 28 15:47:56 2009 for Asterisk - the Open Source PBX by  doxygen 1.5.6