aboutsummaryrefslogtreecommitdiffstats
path: root/include/asterisk/indications.h
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2002-11-13 15:14:37 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2002-11-13 15:14:37 +0000
commita94649ebbc962982227c15786f61e05b91da5e08 (patch)
treea8aaee35863edf60c8bf6c0a197f898462d8c5d8 /include/asterisk/indications.h
parent440b6f08d3a957e6d3dcc3f7ed7d3a58d760d87b (diff)
Version 0.3.0 from FTP
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@549 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include/asterisk/indications.h')
-rwxr-xr-xinclude/asterisk/indications.h75
1 files changed, 75 insertions, 0 deletions
diff --git a/include/asterisk/indications.h b/include/asterisk/indications.h
new file mode 100755
index 000000000..1ff4dacd3
--- /dev/null
+++ b/include/asterisk/indications.h
@@ -0,0 +1,75 @@
+/*
+ * BSD Telephony Of Mexico "Tormenta" Tone Zone Support 2/22/01
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * Primary Author: Pauline Middelink <middelink@polyware.nl>
+ *
+ */
+
+#ifndef _ASTERISK_INDICATIONS_H
+#define _ASTERISK_INDICATIONS_H
+
+/* forward reference */
+struct ast_channel;
+
+struct tone_zone_sound {
+ struct tone_zone_sound *next; /* next element */
+ const char *name; /* Identifing name */
+ const char *data; /* Actual zone description */
+ /* Description is a series of tones of the format:
+ [!]freq1[+freq2][/duration] separated by commas. There
+ are no spaces. The sequence is repeated back to the
+ first tone description not preceeded by !. Duration is
+ specified in milliseconds */
+};
+
+struct tone_zone {
+ struct tone_zone* next; /* next in list */
+ char country[5]; /* Country code */
+ char alias[5]; /* is this an alias? */
+ char description[40]; /* Description */
+ int nrringcadance; /* # registered ringcadance elements */
+ int *ringcadance; /* Ring cadence */
+ struct tone_zone_sound *tones; /* The known tones for this zone */
+};
+
+/* set the default tone country */
+extern int ast_set_indication_country(const char *country);
+
+/* locate tone_zone, given the country. if country == NULL, use the default country */
+extern struct tone_zone *ast_get_indication_zone(const char *country);
+/* locate a tone_zone_sound, given the tone_zone. if tone_zone == NULL, use the default tone_zone */
+extern struct tone_zone_sound *ast_get_indication_tone(const struct tone_zone *zone, const char *indication);
+
+/* add a new country, if country exists, it will be replaced. */
+extern int ast_register_indication_country(struct tone_zone *country);
+/* remove an existing country and all its indications, country must exist */
+extern int ast_unregister_indication_country(const char *country);
+/* add a new indication to a tone_zone. tone_zone must exist. if the indication already
+ * exists, it will be replaced. */
+extern int ast_register_indication(struct tone_zone *zone, const char *indication, const char *tonelist);
+/* remove an existing tone_zone's indication. tone_zone must exist */
+extern int ast_unregister_indication(struct tone_zone *zone, const char *indication);
+
+/* Start a tone-list going */
+int ast_playtones_start(struct ast_channel *chan, int vol, const char* tonelist);
+/*! Stop the tones from playing */
+void ast_playtones_stop(struct ast_channel *chan);
+
+extern struct tone_zone *tone_zones;
+extern pthread_mutex_t tzlock;
+
+#endif