summaryrefslogtreecommitdiff
path: root/zaptel.h
diff options
context:
space:
mode:
authormarkster <markster@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2003-02-02 17:52:04 +0000
committermarkster <markster@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2003-02-02 17:52:04 +0000
commit3faeb827e8158f98a5ad9c3fc4006d29ee33de11 (patch)
tree38a67692067e47e04fe2ef836a2b2cc18fb4b0e1 /zaptel.h
parenteafd604d74acd879c8ee1208115d4abf8100228b (diff)
Version 0.4.0 from FTP
git-svn-id: http://svn.digium.com/svn/zaptel/trunk@146 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'zaptel.h')
-rwxr-xr-xzaptel.h26
1 files changed, 23 insertions, 3 deletions
diff --git a/zaptel.h b/zaptel.h
index e6edde9..f6614aa 100755
--- a/zaptel.h
+++ b/zaptel.h
@@ -89,7 +89,7 @@
#define ZT_SIG_HDLCFCS ((1 << 9) | ZT_SIG_HDLCRAW) /* HDLC with FCS calculation */
#define ZT_SIG_HDLCNET ((1 << 10) | ZT_SIG_HDLCFCS) /* HDLC Network */
#define ZT_SIG_SLAVE (1 << 11) /* Slave to another channel */
-#define ZT_SIG_CAS (1 << 12) /* Just get bits */
+#define ZT_SIG_CAS (1 << 15) /* Just get bits */
#define ZT_ABIT 8
#define ZT_BBIT 4
@@ -129,8 +129,10 @@
#include "sec-2.h"
#elif defined(ECHO_CAN_MARK)
#include "mec.h"
-#else
+#elif defined(ECHO_CAN_MARK2)
#include "mec2.h"
+#else
+#include "mec3.h"
#endif
#endif
@@ -168,6 +170,7 @@ int alarms; /* alarms status */
int txlevel; /* what TX level is set to */
int rxlevel; /* current RX level */
int bpvcount; /* current BPV count */
+int irqmisses; /* current IRQ misses */
int syncsrc; /* span # of current sync source, or 0 for free run */
int numchans; /* number of configured channels on this span */
int totalchans; /* total number of channels on the span */
@@ -671,6 +674,12 @@ struct zt_tone_def { /* Structure for zone programming */
/* Ret Value for bits changing on a CAS / User channel */
#define ZT_EVENT_BITSCHANGED 13
+/* Ret value for the beginning of a pulse coming on its way */
+#define ZT_EVENT_PULSE_START 14
+
+#define ZT_EVENT_PULSEDIGIT (1 << 16) /* This is OR'd with the digit received */
+#define ZT_EVENT_DTMFDIGIT (1 << 17) /* Ditto for DTMF */
+
/* Flag Value for IOMUX, read avail */
#define ZT_IOMUX_READ 1
@@ -735,6 +744,10 @@ struct zt_tone_def { /* Structure for zone programming */
#define ZT_DEFAULT_RXFLASHTIME 1250 /* 1250ms longest rx flash */
#define ZT_DEFAULT_DEBOUNCETIME 600 /* 600ms of FXS GS signalling debounce */
+#define ZT_MINPULSETIME (15 * 8) /* 15 ms minimum */
+#define ZT_MAXPULSETIME (150 * 8) /* 150 ms maximum */
+#define ZT_PULSETIMEOUT ((ZT_MAXPULSETIME / 8) + 50)
+
#define ZT_LOOPCODE_TIME 10000 /* send loop codes for 10 secs */
#define ZT_ALARMSETTLE_TIME 5000 /* allow alarms to settle for 5 secs */
#define ZT_AFTERSTART_TIME 500 /* 500ms after start */
@@ -838,7 +851,7 @@ struct zt_chan {
int eventinidx; /* out index in event buf (circular) */
int eventoutidx; /* in index in event buf (circular) */
- u_char eventbuf[ZT_MAX_EVENTSIZE]; /* event circ. buffer */
+ unsigned int eventbuf[ZT_MAX_EVENTSIZE]; /* event circ. buffer */
wait_queue_head_t eventbufq; /* event wait queue */
wait_queue_head_t txstateq; /* waiting on the tx state to change */
@@ -920,7 +933,12 @@ struct zt_chan {
/* RING debounce timer */
int ringdebtimer;
+ /* PULSE digit receiver stuff */
+ int pulsecount;
+ int pulsetimer;
+
/* RBS timers */
+ int itimerset; /* what the itimer was set to last */
int itimer;
int otimer;
@@ -1014,6 +1032,8 @@ struct zt_span {
int maintstat; /* Maintenance state */
wait_queue_head_t maintq; /* Maintenance queue */
int mainttimer; /* Maintenance timer */
+
+ int irqmisses; /* Interrupt misses */
struct zt_chan *chans; /* Member channel structures */