summaryrefslogtreecommitdiff
path: root/zaptel.h
diff options
context:
space:
mode:
Diffstat (limited to 'zaptel.h')
-rw-r--r--zaptel.h33
1 files changed, 25 insertions, 8 deletions
diff --git a/zaptel.h b/zaptel.h
index 1695171..fa959a5 100644
--- a/zaptel.h
+++ b/zaptel.h
@@ -518,7 +518,7 @@ struct zt_hwgain{
#define ZT_DEFAULTZONE _IOW (ZT_CODE, 24, int)
/*
- * Load a tone zone from a ZT_tone_def_header, see
+ * Load a tone zone from a zt_tone_def_header, see
* below...
*/
#define ZT_LOADZONE _IOW (ZT_CODE, 25, struct zt_tone_def_header)
@@ -765,10 +765,8 @@ struct zt_hwgain{
#define ZT_TONE_MAX 16
#define ZT_TONE_DTMF_BASE 64
+#define ZT_TONE_MF_BASE 80
-/*
- * These must be in the same order as the dtmf_tones array in tones.h
- */
enum {
ZT_TONE_DTMF_0 = ZT_TONE_DTMF_BASE,
ZT_TONE_DTMF_1,
@@ -790,6 +788,26 @@ enum {
#define ZT_TONE_DTMF_MAX ZT_TONE_DTMF_D
+enum {
+ ZT_TONE_MF_0 = ZT_TONE_MF_BASE,
+ ZT_TONE_MF_1,
+ ZT_TONE_MF_2,
+ ZT_TONE_MF_3,
+ ZT_TONE_MF_4,
+ ZT_TONE_MF_5,
+ ZT_TONE_MF_6,
+ ZT_TONE_MF_7,
+ ZT_TONE_MF_8,
+ ZT_TONE_MF_9,
+ ZT_TONE_MF_s,
+ ZT_TONE_MF_p,
+ ZT_TONE_MF_A,
+ ZT_TONE_MF_B,
+ ZT_TONE_MF_C,
+};
+
+#define ZT_TONE_MF_MAX ZT_TONE_MF_C
+
#define ZT_MAX_CADENCE 16
#define ZT_TONEDETECT_ON (1 << 0) /* Detect tones */
@@ -855,7 +873,7 @@ struct zt_tone_def_header {
int zone; /* Which zone we are loading */
int ringcadence[ZT_MAX_CADENCE]; /* Ring cadence in ms (0=on, 1=off, ends with 0 value) */
char name[40]; /* Informational name of zone */
- /* Immediately follow the ZT_tone_def_header by ZT_tone_def's */
+ /* Immediately follow the zt_tone_def_header by zt_tone_def's */
};
struct zt_tone_def { /* Structure for zone programming */
@@ -1675,9 +1693,8 @@ void zt_alarm_notify(struct zt_span *span);
/* Initialize a tone state */
void zt_init_tone_state(struct zt_tone_state *ts, struct zt_tone *zt);
-/* Get a given DTMF or MF tone struct, suitable for zt_tone_nextsample.
- Set 'mf' to 0 for DTMF or 1 for MFv1 */
-struct zt_tone *zt_dtmf_tone(char digit, int mf);
+/* Get a given DTMF or MF tone struct, suitable for zt_tone_nextsample. */
+struct zt_tone *zt_dtmf_tone(const struct zt_chan *chan, char digit);
/* Echo cancel a receive and transmit chunk for a given channel. This
should be called by the low-level driver as close to the interface