update analog

git-svn-id: http://svn.openzap.org/svn/openzap/trunk@273 a93c3328-9c30-0410-af19-c9cd2b2d52af
This commit is contained in:
Anthony Minessale
2007-06-18 21:32:56 +00:00
parent 93b8880e1e
commit 441b487329
7 changed files with 131 additions and 27 deletions

View File

@@ -386,6 +386,7 @@ struct zap_span {
zio_event_cb_t event_callback;
zap_mutex_t *mutex;
zap_trunk_type_t trunk_type;
zap_analog_start_type_t start_type;
zap_signal_type_t signal_type;
struct zap_isdn_data *isdn_data;
struct zap_analog_data *analog_data;

View File

@@ -119,6 +119,15 @@ typedef enum {
#define TRUNK_STRINGS "E1", "T1", "J1", "BRI", "FXO", "FXS", "NONE"
ZAP_STR2ENUM_P(zap_str2zap_trunk_type, zap_trunk_type2str, zap_trunk_type_t)
typedef enum {
ZAP_ANALOG_START_KEWL,
ZAP_ANALOG_START_LOOP,
ZAP_ANALOG_START_GROUND,
ZAP_ANALOG_START_INVALID
} zap_analog_start_type_t;
#define START_TYPE_STRINGS "KEWL", "LOOP", "GROUND", "INVALID"
ZAP_STR2ENUM_P(zap_str2zap_analog_start_type, zap_analog_start_type2str, zap_analog_start_type_t)
typedef enum {
ZAP_OOB_DTMF,
ZAP_OOB_ONHOOK,

View File

@@ -110,26 +110,26 @@ struct zt_maintinfo {
int span_no; /* span number */
int command; /* Maintenance mode to set (from zt_maintenance_mode_t) */
};
struct zt_lineconfig {
/* Used in ZT_SPANCONFIG */
int span; /* Which span number (0 to use name) */
char name[20]; /* Name of span to use */
int lbo; /* line build-outs */
int lineconfig; /* line config parameters (framing, coding) */
int sync; /* what level of sync source we are */
}
struct zt_chanconfig {
/* Used in ZT_CHANCONFIG */
int chan; /* Channel we're applying this to (0 to use name) */
char name[40]; /* Name of channel to use */
int sigtype; /* Signal type */
int deflaw; /* Default law (ZT_LAW_DEFAULT, ZT_LAW_MULAW, or ZT_LAW_ALAW */
int master; /* Master channel if sigtype is ZT_SLAVE */
int idlebits; /* Idle bits (if this is a CAS channel) or channel to monitor (if this is DACS channel) */
char netdev_name[16]; /* name for the hdlc network device */
}
struct zt_lineconfig {
/* Used in ZT_SPANCONFIG */
int span; /* Which span number (0 to use name) */
char name[20]; /* Name of span to use */
int lbo; /* line build-outs */
int lineconfig; /* line config parameters (framing, coding) */
int sync; /* what level of sync source we are */
};
struct zt_chanconfig {
/* Used in ZT_CHANCONFIG */
int chan; /* Channel we're applying this to (0 to use name) */
char name[40]; /* Name of channel to use */
int sigtype; /* Signal type */
int deflaw; /* Default law (ZT_LAW_DEFAULT, ZT_LAW_MULAW, or ZT_LAW_ALAW */
int master; /* Master channel if sigtype is ZT_SLAVE */
int idlebits; /* Idle bits (if this is a CAS channel) or channel to monitor (if this is DACS channel) */
char netdev_name[16]; /* name for the hdlc network device */
};
/* Enumerations */
@@ -238,7 +238,8 @@ ZT_SIG_EM = (1 << 6) /* E&M */
#define ZT_GETGAINS _IOWR (ZT_CODE, 16, struct zt_gains) /* Get Channel audio gains */
#define ZT_SETGAINS _IOWR (ZT_CODE, 17, struct zt_gains) /* Set Channel audio gains */
#define ZT_SPANCONFIG _IOW (ZT_CODE, 18, struct zt_lineconfig) /*Set Line (T1) Configurations and start system */
#define ZT_CHANCONFIG _IOW (ZT_CODE, 19, struct zt_chanconfig) /* Set Channel Configuration */
#define ZT_AUDIOMODE _IOW (ZT_CODE, 32, int) /* Set a clear channel into audio mode */
#define ZT_ECHOCANCEL _IOW (ZT_CODE, 33, int) /* Control Echo Canceller */
#define ZT_HDLCRAWMODE _IOW (ZT_CODE, 36, int) /* Set a clear channel into HDLC w/out FCS checking/calculation mode */