[asterisk-commits] jpeeler: branch jpeeler/chan_dahdi14 r119891 - in /team/jpeeler/chan_dahdi14:...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Jun 2 18:36:41 CDT 2008


Author: jpeeler
Date: Mon Jun  2 18:36:41 2008
New Revision: 119891

URL: http://svn.digium.com/view/asterisk?view=rev&rev=119891
Log:
Support both DAHDI and Zaptel using dahdi_compat compatability header.


Added:
    team/jpeeler/chan_dahdi14/include/asterisk/dahdi_compat.h   (with props)
Modified:
    team/jpeeler/chan_dahdi14/apps/app_disa.c
    team/jpeeler/chan_dahdi14/apps/app_flash.c
    team/jpeeler/chan_dahdi14/apps/app_meetme.c
    team/jpeeler/chan_dahdi14/apps/app_page.c
    team/jpeeler/chan_dahdi14/apps/app_read.c
    team/jpeeler/chan_dahdi14/apps/app_zapbarge.c
    team/jpeeler/chan_dahdi14/apps/app_zapras.c
    team/jpeeler/chan_dahdi14/apps/app_zapscan.c
    team/jpeeler/chan_dahdi14/build_tools/menuselect-deps.in
    team/jpeeler/chan_dahdi14/channels/chan_dahdi.c
    team/jpeeler/chan_dahdi14/channels/chan_iax2.c
    team/jpeeler/chan_dahdi14/channels/chan_misdn.c
    team/jpeeler/chan_dahdi14/codecs/codec_zap.c
    team/jpeeler/chan_dahdi14/configure
    team/jpeeler/chan_dahdi14/configure.ac
    team/jpeeler/chan_dahdi14/funcs/func_channel.c
    team/jpeeler/chan_dahdi14/include/asterisk/channel.h
    team/jpeeler/chan_dahdi14/include/asterisk/indications.h
    team/jpeeler/chan_dahdi14/main/app.c
    team/jpeeler/chan_dahdi14/main/channel.c
    team/jpeeler/chan_dahdi14/main/indications.c
    team/jpeeler/chan_dahdi14/makeopts.in
    team/jpeeler/chan_dahdi14/pbx/pbx_config.c
    team/jpeeler/chan_dahdi14/res/res_indications.c
    team/jpeeler/chan_dahdi14/res/res_musiconhold.c
    team/jpeeler/chan_dahdi14/res/snmp/agent.c

Modified: team/jpeeler/chan_dahdi14/apps/app_disa.c
URL: http://svn.digium.com/view/asterisk/team/jpeeler/chan_dahdi14/apps/app_disa.c?view=diff&rev=119891&r1=119890&r2=119891
==============================================================================
--- team/jpeeler/chan_dahdi14/apps/app_disa.c (original)
+++ team/jpeeler/chan_dahdi14/apps/app_disa.c Mon Jun  2 18:36:41 2008
@@ -98,7 +98,7 @@
 
 static void play_dialtone(struct ast_channel *chan, char *mailbox)
 {
-	const struct tone_zone_sound *ts = NULL;
+	const struct ind_tone_zone_sound *ts = NULL;
 	if(ast_app_has_voicemail(mailbox, NULL))
 		ts = ast_get_indication_tone(chan->zone, "dialrecall");
 	else

Modified: team/jpeeler/chan_dahdi14/apps/app_flash.c
URL: http://svn.digium.com/view/asterisk/team/jpeeler/chan_dahdi14/apps/app_flash.c?view=diff&rev=119891&r1=119890&r2=119891
==============================================================================
--- team/jpeeler/chan_dahdi14/apps/app_flash.c (original)
+++ team/jpeeler/chan_dahdi14/apps/app_flash.c Mon Jun  2 18:36:41 2008
@@ -26,7 +26,7 @@
  */
  
 /*** MODULEINFO
-	<depend>zaptel</depend>
+	<depend>dahdi</depend>
  ***/
 
 #include "asterisk.h"
@@ -38,7 +38,6 @@
 #include <string.h>
 #include <errno.h>
 #include <sys/ioctl.h>
-#include <zaptel/zaptel.h>
 
 #include "asterisk/lock.h"
 #include "asterisk/file.h"
@@ -49,6 +48,8 @@
 #include "asterisk/translate.h"
 #include "asterisk/image.h"
 #include "asterisk/options.h"
+
+#include "asterisk/dahdi_compat.h"
 
 static char *app = "Flash";
 
@@ -76,7 +77,7 @@
 	int res = -1;
 	int x;
 	struct ast_module_user *u;
-	struct zt_params ztp;
+	DAHDI_PARAMS ztp;
 	u = ast_module_user_add(chan);
 	if (!strcasecmp(chan->tech->type, "Zap")) {
 		memset(&ztp, 0, sizeof(ztp));

Modified: team/jpeeler/chan_dahdi14/apps/app_meetme.c
URL: http://svn.digium.com/view/asterisk/team/jpeeler/chan_dahdi14/apps/app_meetme.c?view=diff&rev=119891&r1=119890&r2=119891
==============================================================================
--- team/jpeeler/chan_dahdi14/apps/app_meetme.c (original)
+++ team/jpeeler/chan_dahdi14/apps/app_meetme.c Mon Jun  2 18:36:41 2008
@@ -30,7 +30,7 @@
  */
 
 /*** MODULEINFO
-	<depend>zaptel</depend>
+	<depend>dahdi</depend>
  ***/
 
 #include "asterisk.h"
@@ -45,7 +45,6 @@
 #include <sys/ioctl.h>
 #include <sys/stat.h>
 #include <sys/types.h>
-#include <zaptel/zaptel.h>
 
 #include "asterisk/lock.h"
 #include "asterisk/file.h"
@@ -68,6 +67,8 @@
 #include "asterisk/devicestate.h"
 #include "asterisk/dial.h"
 #include "asterisk/causes.h"
+
+#include "asterisk/dahdi_compat.h"
 
 #include "enter.h"
 #include "leave.h"
@@ -580,7 +581,7 @@
 
 	while (len) {
 		if (block) {
-			x = DAHDI_IOMUX_WRITE | ZT_IOMUX_SIGEVENT;
+			x = DAHDI_IOMUX_WRITE | DAHDI_IOMUX_SIGEVENT;
 			res = ioctl(fd, DAHDI_IOMUX, &x);
 		} else
 			res = 0;
@@ -741,7 +742,7 @@
 static struct ast_conference *build_conf(char *confno, char *pin, char *pinadmin, int make, int dynamic, int refcount)
 {
 	struct ast_conference *cnf;
-	struct zt_confinfo ztc = { 0, };
+	DAHDI_CONFINFO ztc = { 0, };
 	int confno_int = 0;
 
 	AST_LIST_LOCK(&confs);
@@ -768,7 +769,7 @@
 
 	/* Setup a new zap conference */
 	ztc.confno = -1;
-	ztc.confmode = DAHDI_CONF_CONFANN | ZT_CONF_CONFANNMON;
+	ztc.confmode = DAHDI_CONF_CONFANN | DAHDI_CONF_CONFANNMON;
 	cnf->fd = open("/dev/zap/pseudo", O_RDWR);
 	if (cnf->fd < 0 || ioctl(cnf->fd, DAHDI_SETCONF, &ztc)) {
 		ast_log(LOG_WARNING, "Unable to open pseudo device\n");
@@ -788,7 +789,7 @@
 		ast_set_write_format(cnf->chan, AST_FORMAT_SLINEAR);
 		ztc.chan = 0;
 		ztc.confno = cnf->zapconf;
-		ztc.confmode = DAHDI_CONF_CONFANN | ZT_CONF_CONFANNMON;
+		ztc.confmode = DAHDI_CONF_CONFANN | DAHDI_CONF_CONFANNMON;
 		if (ioctl(cnf->chan->fds[0], DAHDI_SETCONF, &ztc)) {
 			ast_log(LOG_WARNING, "Error setting conference\n");
 			if (cnf->chan)
@@ -1372,7 +1373,7 @@
 	struct ast_conf_user *user = NULL;
 	struct ast_conf_user *usr = NULL;
 	int fd;
-	struct zt_confinfo ztc, ztc_empty;
+	DAHDI_CONFINFO ztc, ztc_empty;
 	struct ast_frame *f;
 	struct ast_channel *c;
 	struct ast_frame fr;
@@ -1444,7 +1445,7 @@
 		ast_set_write_format(conf->lchan, AST_FORMAT_SLINEAR);
 		ztc.chan = 0;
 		ztc.confno = conf->zapconf;
-		ztc.confmode = DAHDI_CONF_CONFANN | ZT_CONF_CONFANNMON;
+		ztc.confmode = DAHDI_CONF_CONFANN | DAHDI_CONF_CONFANNMON;
 		if (ioctl(conf->lchan->fds[0], DAHDI_SETCONF, &ztc)) {
 			ast_log(LOG_WARNING, "Error starting listen channel\n");
 			ast_hangup(conf->lchan);
@@ -1672,11 +1673,11 @@
 	if (confflags & CONFFLAG_WAITMARKED && !conf->markedusers)
 		ztc.confmode = DAHDI_CONF_CONF;
 	else if (confflags & CONFFLAG_MONITOR)
-		ztc.confmode = DAHDI_CONF_CONFMON | ZT_CONF_LISTENER;
+		ztc.confmode = DAHDI_CONF_CONFMON | DAHDI_CONF_LISTENER;
 	else if (confflags & CONFFLAG_TALKER)
-		ztc.confmode = DAHDI_CONF_CONF | ZT_CONF_TALKER;
+		ztc.confmode = DAHDI_CONF_CONF | DAHDI_CONF_TALKER;
 	else 
-		ztc.confmode = DAHDI_CONF_CONF | ZT_CONF_TALKER | ZT_CONF_LISTENER;
+		ztc.confmode = DAHDI_CONF_CONF | DAHDI_CONF_TALKER | DAHDI_CONF_LISTENER;
 
 	if (ioctl(fd, DAHDI_SETCONF, &ztc)) {
 		ast_log(LOG_WARNING, "Error setting conference\n");
@@ -1812,11 +1813,11 @@
 					/* Marked user entered, so cancel timeout */
 					timeout = 0;
 					if (confflags & CONFFLAG_MONITOR)
-						ztc.confmode = DAHDI_CONF_CONFMON | ZT_CONF_LISTENER;
+						ztc.confmode = DAHDI_CONF_CONFMON | DAHDI_CONF_LISTENER;
 					else if (confflags & CONFFLAG_TALKER)
-						ztc.confmode = DAHDI_CONF_CONF | ZT_CONF_TALKER;
+						ztc.confmode = DAHDI_CONF_CONF | DAHDI_CONF_TALKER;
 					else
-						ztc.confmode = DAHDI_CONF_CONF | ZT_CONF_TALKER | ZT_CONF_LISTENER;
+						ztc.confmode = DAHDI_CONF_CONF | DAHDI_CONF_TALKER | DAHDI_CONF_LISTENER;
 					if (ioctl(fd, DAHDI_SETCONF, &ztc)) {
 						ast_log(LOG_WARNING, "Error setting conference\n");
 						close(fd);
@@ -3108,9 +3109,9 @@
 		if ((sscanf(val, "%d", &audio_buffers) != 1)) {
 			ast_log(LOG_WARNING, "audiobuffers setting must be a number, not '%s'\n", val);
 			audio_buffers = DEFAULT_AUDIO_BUFFERS;
-		} else if ((audio_buffers < DAHDI_DEFAULT_NUM_BUFS) || (audio_buffers > ZT_MAX_NUM_BUFS)) {
+		} else if ((audio_buffers < DAHDI_DEFAULT_NUM_BUFS) || (audio_buffers > DAHDI_MAX_NUM_BUFS)) {
 			ast_log(LOG_WARNING, "audiobuffers setting must be between %d and %d\n",
-				DAHDI_DEFAULT_NUM_BUFS, ZT_MAX_NUM_BUFS);
+				DAHDI_DEFAULT_NUM_BUFS, DAHDI_MAX_NUM_BUFS);
 			audio_buffers = DEFAULT_AUDIO_BUFFERS;
 		}
 		if (audio_buffers != DEFAULT_AUDIO_BUFFERS)

Modified: team/jpeeler/chan_dahdi14/apps/app_page.c
URL: http://svn.digium.com/view/asterisk/team/jpeeler/chan_dahdi14/apps/app_page.c?view=diff&rev=119891&r1=119890&r2=119891
==============================================================================
--- team/jpeeler/chan_dahdi14/apps/app_page.c (original)
+++ team/jpeeler/chan_dahdi14/apps/app_page.c Mon Jun  2 18:36:41 2008
@@ -26,7 +26,7 @@
  */
 
 /*** MODULEINFO
-	<depend>zaptel</depend>
+	<depend>dahdi</depend>
 	<depend>app_meetme</depend>
  ***/
 

Modified: team/jpeeler/chan_dahdi14/apps/app_read.c
URL: http://svn.digium.com/view/asterisk/team/jpeeler/chan_dahdi14/apps/app_read.c?view=diff&rev=119891&r1=119890&r2=119891
==============================================================================
--- team/jpeeler/chan_dahdi14/apps/app_read.c (original)
+++ team/jpeeler/chan_dahdi14/apps/app_read.c Mon Jun  2 18:36:41 2008
@@ -92,7 +92,7 @@
 	int maxdigits = 255;
 	int tries = 1, to = 0, x = 0;
 	char *argcopy = NULL;
-	struct tone_zone_sound *ts;
+	struct ind_tone_zone_sound *ts;
 	struct ast_flags flags = {0};
 
 	 AST_DECLARE_APP_ARGS(arglist,

Modified: team/jpeeler/chan_dahdi14/apps/app_zapbarge.c
URL: http://svn.digium.com/view/asterisk/team/jpeeler/chan_dahdi14/apps/app_zapbarge.c?view=diff&rev=119891&r1=119890&r2=119891
==============================================================================
--- team/jpeeler/chan_dahdi14/apps/app_zapbarge.c (original)
+++ team/jpeeler/chan_dahdi14/apps/app_zapbarge.c Mon Jun  2 18:36:41 2008
@@ -32,7 +32,7 @@
  */
 
 /*** MODULEINFO
-	<depend>zaptel</depend>
+	<depend>dahdi</depend>
  ***/
 
 #include "asterisk.h"
@@ -45,7 +45,6 @@
 #include <unistd.h>
 #include <errno.h>
 #include <sys/ioctl.h>
-#include <zaptel/zaptel.h>
 
 #include "asterisk/lock.h"
 #include "asterisk/file.h"
@@ -60,6 +59,8 @@
 #include "asterisk/say.h"
 #include "asterisk/utils.h"
 
+#include "asterisk/dahdi_compat.h"
+
 static char *app = "ZapBarge";
 
 static char *synopsis = "Barge in (monitor) Zap channel";
@@ -94,7 +95,7 @@
 static int conf_run(struct ast_channel *chan, int confno, int confflags)
 {
 	int fd;
-	struct zt_confinfo ztc;
+	DAHDI_CONFINFO ztc;
 	struct ast_frame *f;
 	struct ast_channel *c;
 	struct ast_frame fr;

Modified: team/jpeeler/chan_dahdi14/apps/app_zapras.c
URL: http://svn.digium.com/view/asterisk/team/jpeeler/chan_dahdi14/apps/app_zapras.c?view=diff&rev=119891&r1=119890&r2=119891
==============================================================================
--- team/jpeeler/chan_dahdi14/apps/app_zapras.c (original)
+++ team/jpeeler/chan_dahdi14/apps/app_zapras.c Mon Jun  2 18:36:41 2008
@@ -26,7 +26,7 @@
  */
 
 /*** MODULEINFO
-	<depend>zaptel</depend>
+	<depend>dahdi</depend>
  ***/
 
 #include "asterisk.h"
@@ -48,7 +48,6 @@
 #include <errno.h>
 #include <stdio.h>
 #include <fcntl.h>
-#include <zaptel/zaptel.h>
 
 #include "asterisk/lock.h"
 #include "asterisk/file.h"
@@ -58,6 +57,8 @@
 #include "asterisk/module.h"
 #include "asterisk/options.h"
 
+#include "asterisk/dahdi_compat.h"
+
 static char *app = "ZapRAS";
 
 static char *synopsis = "Executes Zaptel ISDN RAS application";
@@ -143,7 +144,7 @@
 	int status;
 	int res;
 	int signalled = 0;
-	struct zt_bufferinfo savebi;
+	DAHDI_BUFFERINFO savebi;
 	int x;
 	
 	res = ioctl(chan->fds[0], DAHDI_GET_BUFINFO, &savebi);

Modified: team/jpeeler/chan_dahdi14/apps/app_zapscan.c
URL: http://svn.digium.com/view/asterisk/team/jpeeler/chan_dahdi14/apps/app_zapscan.c?view=diff&rev=119891&r1=119890&r2=119891
==============================================================================
--- team/jpeeler/chan_dahdi14/apps/app_zapscan.c (original)
+++ team/jpeeler/chan_dahdi14/apps/app_zapscan.c Mon Jun  2 18:36:41 2008
@@ -31,7 +31,7 @@
  */
 
 /*** MODULEINFO
-	<depend>zaptel</depend>
+	<depend>dahdi</depend>
  ***/
 
 #include "asterisk.h"
@@ -44,7 +44,6 @@
 #include <unistd.h>
 #include <errno.h>
 #include <sys/ioctl.h>
-#include <zaptel/zaptel.h>
 
 #include "asterisk/lock.h"
 #include "asterisk/file.h"
@@ -59,6 +58,8 @@
 #include "asterisk/cli.h"
 #include "asterisk/say.h"
 
+#include "asterisk/dahdi_compat.h"
+
 static char *app = "ZapScan";
 
 static char *synopsis = "Scan Zap channels to monitor calls";
@@ -99,7 +100,7 @@
 static int conf_run(struct ast_channel *chan, int confno, int confflags)
 {
 	int fd;
-	struct zt_confinfo ztc;
+	DAHDI_CONFINFO ztc;
 	struct ast_frame *f;
 	struct ast_channel *c;
 	struct ast_frame fr;

Modified: team/jpeeler/chan_dahdi14/build_tools/menuselect-deps.in
URL: http://svn.digium.com/view/asterisk/team/jpeeler/chan_dahdi14/build_tools/menuselect-deps.in?view=diff&rev=119891&r1=119890&r2=119891
==============================================================================
--- team/jpeeler/chan_dahdi14/build_tools/menuselect-deps.in (original)
+++ team/jpeeler/chan_dahdi14/build_tools/menuselect-deps.in Mon Jun  2 18:36:41 2008
@@ -1,5 +1,6 @@
 ASOUND=@PBX_ALSA@
 CURL=@PBX_CURL@
+DAHDI=@PBX_DAHDI@
 FREETDS=@PBX_FREETDS@
 GSM=@PBX_GSM@
 GTK=@PBX_GTK@

Modified: team/jpeeler/chan_dahdi14/channels/chan_dahdi.c
URL: http://svn.digium.com/view/asterisk/team/jpeeler/chan_dahdi14/channels/chan_dahdi.c?view=diff&rev=119891&r1=119890&r2=119891
==============================================================================
--- team/jpeeler/chan_dahdi14/channels/chan_dahdi.c (original)
+++ team/jpeeler/chan_dahdi14/channels/chan_dahdi.c Mon Jun  2 18:36:41 2008
@@ -39,7 +39,6 @@
 
 /*** MODULEINFO
 	<depend>res_smdi</depend>
-	<depend>DAHDI_vldtmf</depend>
 	<depend>DAHDI</depend>
 	<depend>tonezone</depend>
 	<depend>res_features</depend>
@@ -67,8 +66,6 @@
 #include <sys/ioctl.h>
 #include <math.h>
 #include <ctype.h>
-#include <dahdi/user.h>
-#include <dahdi/tonezone.h>
 
 #ifdef HAVE_PRI
 #include <libpri.h>
@@ -106,6 +103,8 @@
 #include "asterisk/astobj.h"
 #define SMDI_MD_WAIT_TIMEOUT 1500 /* 1.5 seconds */
 
+#include "asterisk/dahdi_compat.h"
+
 /*! Global jitterbuffer configuration - by default, jb is disabled */
 static struct ast_jb_conf default_jbconf =
 {
@@ -116,7 +115,7 @@
 };
 static struct ast_jb_conf global_jbconf;
 
-#if !defined(DAHDI_SIG_EM_E1) || (defined(HAVE_PRI) && !defined(ZT_SIG_HARDHDLC))
+#if !defined(DAHDI_SIG_EM_E1) || (defined(HAVE_PRI) && !defined(DAHDI_SIG_HARDHDLC))
 #error "Your DAHDI is too old.  Please update"
 #endif
 
@@ -416,7 +415,7 @@
 		
 	struct dahdi_subchannel sub_unused;		/*!< Just a safety precaution */
 	struct dahdi_subchannel subs[3];			/*!< Sub-channels */
-	struct dahdi_confinfo saveconf;			/*!< Saved conference info */
+	DAHDI_CONFINFO saveconf;			/*!< Saved conference info */
 
 	struct dahdi_pvt *slaves[MAX_SLAVES];		/*!< Slave to us (follows our conferencing) */
 	struct dahdi_pvt *master;				/*!< Master to us (we follow their conferencing) */
@@ -1235,10 +1234,10 @@
 	} else {
 		if (!index) {
 			/* Real-side and pseudo-side both participate in conference */
-			zi.confmode = DAHDI_CONF_REALANDPSEUDO | ZT_CONF_TALKER | ZT_CONF_LISTENER |
-				DAHDI_CONF_PSEUDO_TALKER | ZT_CONF_PSEUDO_LISTENER;
+			zi.confmode = DAHDI_CONF_REALANDPSEUDO | DAHDI_CONF_TALKER | DAHDI_CONF_LISTENER |
+				DAHDI_CONF_PSEUDO_TALKER | DAHDI_CONF_PSEUDO_LISTENER;
 		} else
-			zi.confmode = DAHDI_CONF_CONF | ZT_CONF_TALKER | ZT_CONF_LISTENER;
+			zi.confmode = DAHDI_CONF_CONF | DAHDI_CONF_TALKER | DAHDI_CONF_LISTENER;
 		zi.confno = p->confno;
 	}
 	if ((zi.confno == c->curconf.confno) && (zi.confmode == c->curconf.confmode))
@@ -1469,7 +1468,7 @@
 	p->echocanon = 0;
 }
 
-static void fill_txgain(struct dahdi_gains *g, float gain, int law)
+static void fill_txgain(DAHDI_GAINS *g, float gain, int law)
 {
 	int j;
 	int k;
@@ -1503,7 +1502,7 @@
 	}
 }
 
-static void fill_rxgain(struct dahdi_gains *g, float gain, int law)
+static void fill_rxgain(DAHDI_GAINS *g, float gain, int law)
 {
 	int j;
 	int k;
@@ -1539,7 +1538,7 @@
 
 static int set_actual_txgain(int fd, int chan, float gain, int law)
 {
-	struct dahdi_gains g;
+	DAHDI_GAINS g;
 	int res;
 
 	memset(&g, 0, sizeof(g));
@@ -1558,7 +1557,7 @@
 
 static int set_actual_rxgain(int fd, int chan, float gain, int law)
 {
-	struct dahdi_gains g;
+	DAHDI_GAINS g;
 	int res;
 
 	memset(&g, 0, sizeof(g));
@@ -1640,7 +1639,7 @@
 
 static int save_conference(struct dahdi_pvt *p)
 {
-	struct dahdi_confinfo c;
+	DAHDI_CONFINFO c;
 	int res;
 	if (p->saveconf.confmode) {
 		ast_log(LOG_WARNING, "Can't save conference -- already in use\n");
@@ -1797,7 +1796,7 @@
 		ast_mutex_unlock(&p->lock);
 		return 0;
 	}
-	x = DAHDI_FLUSH_READ | ZT_FLUSH_WRITE;
+	x = DAHDI_FLUSH_READ | DAHDI_FLUSH_WRITE;
 	res = ioctl(p->subs[SUB_REAL].dfd, DAHDI_FLUSH, &x);
 	if (res)
 		ast_log(LOG_WARNING, "Unable to flush input on channel %d\n", p->channel);
@@ -3129,7 +3128,7 @@
 	p->ignoredtmf = 0;
 
 #ifdef DAHDI_TONEDETECT
-	val = DAHDI_TONEDETECT_ON | ZT_TONEDETECT_MUTE;
+	val = DAHDI_TONEDETECT_ON | DAHDI_TONEDETECT_MUTE;
 	ioctl(p->subs[SUB_REAL].dfd, DAHDI_TONEDETECT, &val);
 #endif		
 	if (!p->hardwaredtmf && p->dsp) {
@@ -3704,7 +3703,7 @@
 	if (option_debug)
 		ast_log(LOG_DEBUG, "Got event %s(%d) on channel %d (index %d)\n", event2str(res), res, p->channel, index);
 
-	if (res & (DAHDI_EVENT_PULSEDIGIT | ZT_EVENT_DTMFUP)) {
+	if (res & (DAHDI_EVENT_PULSEDIGIT | DAHDI_EVENT_DTMFUP)) {
 		p->pulsedial =  (res & DAHDI_EVENT_PULSEDIGIT) ? 1 : 0;
 
 		ast_log(LOG_DEBUG, "Detected %sdigit '%c'\n", p->pulsedial ? "pulse ": "", res & 0xff);
@@ -4180,7 +4179,7 @@
 			if (p->oprmode < 0) break;
 			if (p->oprmode > 1)
 			{
-				struct dahdi_params par;
+				DAHDI_PARAMS par;
 
 				if (ioctl(p->oprpeer->subs[SUB_REAL].dfd, DAHDI_GET_PARAMS, &par) != -1)
 				{
@@ -4536,7 +4535,7 @@
 		} else
 			res = dahdi_get_event(p->subs[SUB_REAL].dfd);
 		/* Switch to real if there is one and this isn't something really silly... */
-		if ((res != DAHDI_EVENT_RINGEROFF) && (res != ZT_EVENT_RINGERON) &&
+		if ((res != DAHDI_EVENT_RINGEROFF) && (res != DAHDI_EVENT_RINGERON) &&
 			(res != DAHDI_EVENT_HOOKCOMPLETE)) {
 			ast_log(LOG_DEBUG, "Restoring owner of channel %d on event %d\n", p->channel, res);
 			p->owner = p->subs[SUB_REAL].owner;
@@ -5263,7 +5262,7 @@
 			features |= DSP_FEATURE_FAX_DETECT;
 		}
 #ifdef DAHDI_TONEDETECT
-		x = DAHDI_TONEDETECT_ON | ZT_TONEDETECT_MUTE;
+		x = DAHDI_TONEDETECT_ON | DAHDI_TONEDETECT_MUTE;
 		if (ioctl(i->subs[index].dfd, DAHDI_TONEDETECT, &x)) {
 #endif		
 			i->hardwaredtmf = 0;
@@ -6168,7 +6167,7 @@
 					
 					/* First we wait and listen for the Caller*ID */
 					for (;;) {	
-						i = DAHDI_IOMUX_READ | ZT_IOMUX_SIGEVENT;
+						i = DAHDI_IOMUX_READ | DAHDI_IOMUX_SIGEVENT;
 						if ((res = ioctl(p->subs[index].dfd, DAHDI_IOMUX, &i)))	{
 							ast_log(LOG_WARNING, "I/O MUX failed: %s\n", strerror(errno));
 							callerid_free(cs);
@@ -6267,7 +6266,7 @@
 						}
 		
 						for (;;) {	
-							i = DAHDI_IOMUX_READ | ZT_IOMUX_SIGEVENT;
+							i = DAHDI_IOMUX_READ | DAHDI_IOMUX_SIGEVENT;
 							if ((res = ioctl(p->subs[index].dfd, DAHDI_IOMUX, &i)))	{
 								ast_log(LOG_WARNING, "I/O MUX failed: %s\n", strerror(errno));
 								callerid_free(cs);
@@ -6372,7 +6371,7 @@
 				/* Take out of linear mode for Caller*ID processing */
 				dahdi_setlinear(p->subs[index].dfd, 0);
 				for (;;) {	
-					i = DAHDI_IOMUX_READ | ZT_IOMUX_SIGEVENT;
+					i = DAHDI_IOMUX_READ | DAHDI_IOMUX_SIGEVENT;
 					if ((res = ioctl(p->subs[index].dfd, DAHDI_IOMUX, &i)))	{
 						ast_log(LOG_WARNING, "I/O MUX failed: %s\n", strerror(errno));
 						callerid_free(cs);
@@ -6443,7 +6442,7 @@
 					if (option_verbose > 2)
 						ast_verbose( VERBOSE_PREFIX_3 "Detecting post-CID distinctive ring\n");
 					for (;;) {
-						i = DAHDI_IOMUX_READ | ZT_IOMUX_SIGEVENT;
+						i = DAHDI_IOMUX_READ | DAHDI_IOMUX_SIGEVENT;
 						if ((res = ioctl(p->subs[index].dfd, DAHDI_IOMUX, &i)))    {
 							ast_log(LOG_WARNING, "I/O MUX failed: %s\n", strerror(errno));
 							callerid_free(cs);
@@ -7023,7 +7022,7 @@
 }
 
 #ifdef HAVE_PRI
-static int pri_resolve_span(int *span, int channel, int offset, struct dahdi_spaninfo *si)
+static int pri_resolve_span(int *span, int channel, int offset, DAHDI_SPANINFO *si)
 {
 	int x;
 	int trunkgroup;
@@ -7062,7 +7061,7 @@
 
 static int pri_create_trunkgroup(int trunkgroup, int *channels)
 {
-	struct dahdi_spaninfo si;
+	DAHDI_SPANINFO si;
 	DAHDI_PARAMS p;
 	int fd;
 	int span;
@@ -7142,9 +7141,9 @@
 	struct dahdi_pvt *tmp = NULL, *tmp2,  *prev = NULL;
 	char fn[80];
 #if 1
-	struct dahdi_bufferinfo bi;
+	DAHDI_BUFFERINFO bi;
 #endif
-	struct dahdi_spaninfo si;
+	DAHDI_SPANINFO si;
 	int res;
 	int span=0;
 	int here = 0;
@@ -9454,7 +9453,7 @@
 	int res, x;
 	DAHDI_PARAMS p;
 	DAHDI_BUFFERINFO bi;
-	struct dahdi_spaninfo si;
+	DAHDI_SPANINFO si;
 	int i;
 	
 	for (i = 0; i < NUM_DCHANS; i++) {
@@ -9473,7 +9472,7 @@
 			ast_log(LOG_ERROR, "Unable to get parameters for D-channel %d (%s)\n", x, strerror(errno));
 			return -1;
 		}
-		if ((p.sigtype != DAHDI_SIG_HDLCFCS) && (p.sigtype != ZT_SIG_HARDHDLC)) {
+		if ((p.sigtype != DAHDI_SIG_HDLCFCS) && (p.sigtype != DAHDI_SIG_HARDHDLC)) {
 			dahdi_close(pri->fds[i]);
 			pri->fds[i] = -1;
 			ast_log(LOG_ERROR, "D-channel %d is not in HDLC/FCS mode.  See /etc/DAHDI.conf\n", x);
@@ -10047,7 +10046,7 @@
 			ast_cli(fd, "DSP: %s\n", tmp->dsp ? "yes" : "no");
 			ast_cli(fd, "Relax DTMF: %s\n", tmp->dtmfrelax ? "yes" : "no");
 			ast_cli(fd, "Dialing/CallwaitCAS: %d/%d\n", tmp->dialing, tmp->callwaitcas);
-			ast_cli(fd, "Default law: %s\n", tmp->law == DAHDI_LAW_MULAW ? "ulaw" : tmp->law == ZT_LAW_ALAW ? "alaw" : "unknown");
+			ast_cli(fd, "Default law: %s\n", tmp->law == DAHDI_LAW_MULAW ? "ulaw" : tmp->law == DAHDI_LAW_ALAW ? "alaw" : "unknown");
 			ast_cli(fd, "Fax Handled: %s\n", tmp->faxhandled ? "yes" : "no");
 			ast_cli(fd, "Pulse phone: %s\n", tmp->pulsedial ? "yes" : "no");
 			ast_cli(fd, "Echo Cancellation: %d taps%s, currently %s\n", tmp->echocancel, tmp->echocanbridged ? "" : " unless TDM bridged", tmp->echocanon ? "ON" : "OFF");
@@ -10266,7 +10265,7 @@
 
 	{ { "dahdi", "restart", NULL},
 	dahdi_restart_cmd, "Fully restart DAHDI channels",
-	dahdi_restart_usage, NULL &cli_zap_restart_deprecated },
+	dahdi_restart_usage, NULL, &cli_zap_restart_deprecated },
 
 	{ { "dahdi", "show", "status", NULL},
 	dahdi_show_status, "Show all DAHDI cards status",
@@ -11242,7 +11241,7 @@
 				int toneduration;
 				int ctlfd;
 				int res;
-				struct dahdi_dialparams dps;
+				DAHDI_DIAL_PARAMS dps;
 
 				ctlfd = open("/dev/dahdi/ctl", O_RDWR);
 				if (ctlfd == -1) {

Modified: team/jpeeler/chan_dahdi14/channels/chan_iax2.c
URL: http://svn.digium.com/view/asterisk/team/jpeeler/chan_dahdi14/channels/chan_iax2.c?view=diff&rev=119891&r1=119890&r2=119891
==============================================================================
--- team/jpeeler/chan_dahdi14/channels/chan_iax2.c (original)
+++ team/jpeeler/chan_dahdi14/channels/chan_iax2.c Mon Jun  2 18:36:41 2008
@@ -29,7 +29,7 @@
  */
 
 /*** MODULEINFO
-	<use>zaptel</use>
+	<use>dahdi</use>
         <depend>res_features</depend>
  ***/
 
@@ -61,7 +61,7 @@
 
 #ifdef HAVE_ZAPTEL
 #include <sys/ioctl.h>
-#include <zaptel/zaptel.h>
+#include "asterisk/dahdi_compat.h"
 #endif
 
 #include "asterisk/lock.h"

Modified: team/jpeeler/chan_dahdi14/channels/chan_misdn.c
URL: http://svn.digium.com/view/asterisk/team/jpeeler/chan_dahdi14/channels/chan_misdn.c?view=diff&rev=119891&r1=119890&r2=119891
==============================================================================
--- team/jpeeler/chan_dahdi14/channels/chan_misdn.c (original)
+++ team/jpeeler/chan_dahdi14/channels/chan_misdn.c Mon Jun  2 18:36:41 2008
@@ -211,7 +211,7 @@
 	int other_pid;
 	struct chan_list *other_ch;
 
-	const struct tone_zone_sound *ts;
+	const struct ind_tone_zone_sound *ts;
 	
 	int overlap_dial;
 	int overlap_dial_task;
@@ -2989,7 +2989,7 @@
 
 static int dialtone_indicate(struct chan_list *cl)
 {
-	const struct tone_zone_sound *ts= NULL;
+	const struct ind_tone_zone_sound *ts= NULL;
 	struct ast_channel *ast=cl->ast;
 	int nd=0;
 

Modified: team/jpeeler/chan_dahdi14/codecs/codec_zap.c
URL: http://svn.digium.com/view/asterisk/team/jpeeler/chan_dahdi14/codecs/codec_zap.c?view=diff&rev=119891&r1=119890&r2=119891
==============================================================================
--- team/jpeeler/chan_dahdi14/codecs/codec_zap.c (original)
+++ team/jpeeler/chan_dahdi14/codecs/codec_zap.c Mon Jun  2 18:36:41 2008
@@ -27,8 +27,7 @@
  */
 
 /*** MODULEINFO
-	<depend>zaptel_transcode</depend>
-	<depend>zaptel</depend>
+	<depend>dahdi</depend>
  ***/
 
 #include "asterisk.h"
@@ -44,7 +43,6 @@
 #include <sys/ioctl.h>
 #include <errno.h>
 #include <sys/mman.h>
-#include <zaptel/zaptel.h>
 
 #include "asterisk/lock.h"
 #include "asterisk/translate.h"
@@ -57,6 +55,8 @@
 #include "asterisk/utils.h"
 #include "asterisk/linkedlists.h"
 
+#include "asterisk/dahdi_compat.h"
+
 #define BUFFER_SAMPLES	8000
 
 static unsigned int global_useplc = 0;
@@ -113,7 +113,7 @@
 	int totalms;
 	int lasttotalms;
 #endif
-	struct zt_transcode_header *hdr;
+	DAHDI_TRANSCODE_HEADER *hdr;
 };
 
 static int transcoder_show(int fd, int argc, char **argv)
@@ -133,7 +133,7 @@
 static int zap_framein(struct ast_trans_pvt *pvt, struct ast_frame *f)
 {
 	struct pvt *ztp = pvt->pvt;
-	struct zt_transcode_header *hdr = ztp->hdr;
+	DAHDI_TRANSCODE_HEADER *hdr = ztp->hdr;
 
 	if (!f->subclass) {
 		/* Fake a return frame for calculation purposes */
@@ -180,7 +180,7 @@
 static struct ast_frame *zap_frameout(struct ast_trans_pvt *pvt)
 {
 	struct pvt *ztp = pvt->pvt;
-	struct zt_transcode_header *hdr = ztp->hdr;
+	DAHDI_TRANSCODE_HEADER *hdr = ztp->hdr;
 	unsigned int x;
 
 	if (ztp->fake == 2) {
@@ -259,7 +259,7 @@
 	int fd;
 	unsigned int x = DAHDI_TCOP_ALLOCATE;
 	struct pvt *ztp = pvt->pvt;
-	struct zt_transcode_header *hdr;
+	DAHDI_TRANSCODE_HEADER *hdr;
 	int flags;
 	
 	if ((fd = open("/dev/zap/transcode", O_RDWR)) < 0)
@@ -441,7 +441,7 @@
 
 static int find_transcoders(void)
 {
-	struct zt_transcode_info info = { 0, };
+	DAHDI_TRANSCODE_INFO info = { 0, };
 	struct format_map map = { { { 0 } } };
 	int fd, res;
 	unsigned int x, y;

Modified: team/jpeeler/chan_dahdi14/configure.ac
URL: http://svn.digium.com/view/asterisk/team/jpeeler/chan_dahdi14/configure.ac?view=diff&rev=119891&r1=119890&r2=119891
==============================================================================
--- team/jpeeler/chan_dahdi14/configure.ac (original)
+++ team/jpeeler/chan_dahdi14/configure.ac Mon Jun  2 18:36:41 2008
@@ -436,7 +436,9 @@
   AST_EXT_LIB_CHECK([CAP], [cap], [cap_from_text], [sys/capability.h])
 fi
 
-AST_C_DEFINE_CHECK([DAHDI], [DAHDI_CODE], [dahdi/user.h])
+if test "${USE_DAHDI}" != "no" ; then
+	AST_C_DEFINE_CHECK([DAHDI], [DAHDI_CODE], [dahdi/user.h])
+fi
 
 AST_C_COMPILE_CHECK([GETIFADDRS], [struct ifaddrs *p; getifaddrs(&p)], [ifaddrs.h])
 
@@ -1410,7 +1412,7 @@
 
 AST_EXT_LIB_CHECK([ZLIB], [z], [compress], [zlib.h])
 
-if test "${USE_ZAPTEL}" != "no"; then
+if test "${USE_ZAPTEL}" != "no" && test "x${PBX_DAHDI}" != "x1"; then
    AC_MSG_CHECKING(for ZT_DIAL_OP_CANCEL in zaptel/zaptel.h)
    saved_cppflags="${CPPFLAGS}"
    if test "x${ZAPTEL_DIR}" != "x"; then
@@ -1446,7 +1448,7 @@
    fi
 fi
 
-if test "${PBX_ZAPTEL}" = 1; then
+if test "${PBX_ZAPTEL}" = 1 && test "x${PBX_DAHDI}" != "x1"; then
    AC_MSG_CHECKING(for ZT_EVENT_REMOVED in zaptel/zaptel.h)
    saved_cppflags="${CPPFLAGS}"
    if test "x${ZAPTEL_DIR}" != "x"; then
@@ -1494,6 +1496,11 @@
 fi
 AC_SUBST(PBX_ZAPTEL_VLDTMF)
 AC_SUBST(PBX_ZAPTEL_TRANSCODE)
+
+if test "x${PBX_ZAPTEL}" = "x1" ; then
+	PBX_DAHDI=1
+	AC_SUBST(PBX_DAHDI)
+fi
 
 EDITLINE_LIB=""
 if test "x$TERMCAP_LIB" != "x" ; then

Modified: team/jpeeler/chan_dahdi14/funcs/func_channel.c
URL: http://svn.digium.com/view/asterisk/team/jpeeler/chan_dahdi14/funcs/func_channel.c?view=diff&rev=119891&r1=119890&r2=119891
==============================================================================
--- team/jpeeler/chan_dahdi14/funcs/func_channel.c (original)
+++ team/jpeeler/chan_dahdi14/funcs/func_channel.c Mon Jun  2 18:36:41 2008
@@ -111,7 +111,7 @@
 	else if (!strcasecmp(data, "musicclass"))
 		locked_string_field_set(chan, musicclass, value);
 	else if (!strcasecmp(data, "tonezone")) {
-		struct tone_zone *new_zone;
+		struct ind_tone_zone *new_zone;
 		if (!(new_zone = ast_get_indication_zone(value))) {
 			ast_log(LOG_ERROR, "Unknown country code '%s' for tonezone. Check indications.conf for available country codes.\n", value);
 			ret = -1;	

Modified: team/jpeeler/chan_dahdi14/include/asterisk/channel.h
URL: http://svn.digium.com/view/asterisk/team/jpeeler/chan_dahdi14/include/asterisk/channel.h?view=diff&rev=119891&r1=119890&r2=119891
==============================================================================
--- team/jpeeler/chan_dahdi14/include/asterisk/channel.h (original)
+++ team/jpeeler/chan_dahdi14/include/asterisk/channel.h Mon Jun  2 18:36:41 2008
@@ -414,7 +414,7 @@
 	struct ast_cdr *cdr;				/*!< Call Detail Record */
 	enum ast_channel_adsicpe adsicpe;		/*!< Whether or not ADSI is detected on CPE */
 
-	struct tone_zone *zone;				/*!< Tone zone as set in indications.conf or
+	struct ind_tone_zone *zone;				/*!< Tone zone as set in indications.conf or
 								in the CHANNEL dialplan function */
 
 	struct ast_channel_monitor *monitor;		/*!< Channel monitoring */

Added: team/jpeeler/chan_dahdi14/include/asterisk/dahdi_compat.h
URL: http://svn.digium.com/view/asterisk/team/jpeeler/chan_dahdi14/include/asterisk/dahdi_compat.h?view=auto&rev=119891
==============================================================================
--- team/jpeeler/chan_dahdi14/include/asterisk/dahdi_compat.h (added)
+++ team/jpeeler/chan_dahdi14/include/asterisk/dahdi_compat.h Mon Jun  2 18:36:41 2008
@@ -1,0 +1,188 @@
+/*
+ * Asterisk -- An open source telephony toolkit.
+ *
+ * Copyright (C) 2008, Digium, Inc.
+ *
+ * See http://www.asterisk.org for more information about
+ * the Asterisk project. Please do not directly contact
+ * any of the maintainers of this project for assistance;
+ * the project provides a web site, mailing lists and IRC
+ * channels for your use.
+ *
+ * This program is free software, distributed under the terms of
+ * the GNU General Public License Version 2. See the LICENSE file
+ * at the top of the source tree.
+ */
+
+/*! 
+ * \file
+ * \brief DAHDI compatibility with zaptel
+ */
+
+#ifndef DAHDI_COMPAT_H
+#define DAHDI_COMPAT_H
+
+#ifndef HAVE_ZAPTEL
+
+#include <dahdi/user.h>
+#include <dahdi/tonezone.h>
+
+#else
+
+#include <zaptel/zaptel.h>
+#include <zaptel/tonezone.h>
+
+/* Compiling against Zaptel instead of DAHDI */
+
+#define __DAHDI_SIG_FXO __ZT_SIG_FXO
+#define __DAHDI_SIG_FXS __ZT_SIG_FXS
+#define DAHDI_ALARM_BLUE ZT_ALARM_BLUE
+#define DAHDI_ALARM_LOOPBACK ZT_ALARM_LOOPBACK
+#define DAHDI_ALARM_NONE ZT_ALARM_NONE
+#define DAHDI_ALARM_NOTOPEN ZT_ALARM_NOTOPEN
+#define DAHDI_ALARM_RECOVER ZT_ALARM_RECOVER
+#define DAHDI_ALARM_RED ZT_ALARM_RED
+#define DAHDI_ALARM_YELLOW ZT_ALARM_YELLOW
+#define DAHDI_AUDIOMODE ZT_AUDIOMODE
+#define DAHDI_BUFFERINFO ZT_BUFFERINFO
+#define DAHDI_CHANNO ZT_CHANNO
+#define DAHDI_CHECK_HOOKSTATE ZT_CHECK_HOOKSTATE
+#define DAHDI_CONF_CONF ZT_CONF_CONF
+#define DAHDI_CONF_CONFANN ZT_CONF_CONFANN
+#define DAHDI_CONF_CONFANNMON ZT_CONF_CONFANNMON
+#define DAHDI_CONF_CONFMON ZT_CONF_CONFMON
+#define DAHDI_CONF_DIGITALMON ZT_CONF_DIGITALMON
+#define DAHDI_CONF_LISTENER ZT_CONF_LISTENER
+#define DAHDI_CONF_MONITORBOTH ZT_CONF_MONITORBOTH
+#define DAHDI_CONF_NORMAL ZT_CONF_NORMAL
+#define DAHDI_CONF_PSEUDO_LISTENER ZT_CONF_PSEUDO_LISTENER
+#define DAHDI_CONF_PSEUDO_TALKER ZT_CONF_PSEUDO_TALKER
+#define DAHDI_CONF_REALANDPSEUDO ZT_CONF_REALANDPSEUDO
+#define DAHDI_CONF_TALKER ZT_CONF_TALKER
+#define DAHDI_CONFDIAG ZT_CONFDIAG
+#define DAHDI_CONFINFO ZT_CONFINFO
+#define DAHDI_CONFMUTE ZT_CONFMUTE
+#define DAHDI_DEFAULT_NUM_BUFS ZT_DEFAULT_NUM_BUFS
+#define DAHDI_DIAL ZT_DIAL
+#define DAHDI_DIALING ZT_DIALING
+#define DAHDI_DIAL_OP_APPEND ZT_DIAL_OP_APPEND
+#define DAHDI_DIAL_OPERATION ZT_DIAL_OPERATION
+#define DAHDI_DIAL_OP_REPLACE ZT_DIAL_OP_REPLACE
+#define DAHDI_DIAL_PARAMS ZT_DIAL_PARAMS
+#define DAHDI_ECHOCANCEL ZT_ECHOCANCEL
+#define DAHDI_ECHOTRAIN ZT_ECHOTRAIN
+#define DAHDI_EVENT_ALARM ZT_EVENT_ALARM
+#define DAHDI_EVENT_BITSCHANGED ZT_EVENT_BITSCHANGED
+#define DAHDI_EVENT_DIALCOMPLETE ZT_EVENT_DIALCOMPLETE
+#define DAHDI_EVENT_DTMFDOWN ZT_EVENT_DTMFDOWN
+#define DAHDI_EVENT_DTMFUP ZT_EVENT_DTMFUP
+#define DAHDI_EVENT_EC_DISABLED ZT_EVENT_EC_DISABLED
+#define DAHDI_EVENT_HOOKCOMPLETE ZT_EVENT_HOOKCOMPLETE
+#define DAHDI_EVENT_NOALARM ZT_EVENT_NOALARM
+#define DAHDI_EVENT_NONE ZT_EVENT_NONE
+#define DAHDI_EVENT_ONHOOK ZT_EVENT_ONHOOK
+#define DAHDI_EVENT_POLARITY ZT_EVENT_POLARITY
+#define DAHDI_EVENT_PULSEDIGIT ZT_EVENT_PULSEDIGIT
+#define DAHDI_EVENT_PULSE_START ZT_EVENT_PULSE_START
+#define DAHDI_EVENT_REMOVED ZT_EVENT_REMOVED
+#define DAHDI_EVENT_RINGBEGIN ZT_EVENT_RINGBEGIN
+#define DAHDI_EVENT_RINGEROFF ZT_EVENT_RINGEROFF
+#define DAHDI_EVENT_RINGERON ZT_EVENT_RINGERON
+#define DAHDI_EVENT_RINGOFFHOOK ZT_EVENT_RINGOFFHOOK
+#define DAHDI_EVENT_TIMER_EXPIRED ZT_EVENT_TIMER_EXPIRED
+#define DAHDI_EVENT_TIMER_PING ZT_EVENT_TIMER_PING
+#define DAHDI_EVENT_WINKFLASH ZT_EVENT_WINKFLASH
+#define DAHDI_FLASH ZT_FLASH
+#define DAHDI_FLUSH ZT_FLUSH
+#define DAHDI_FLUSH_ALL ZT_FLUSH_ALL
+#define DAHDI_FLUSH_BOTH ZT_FLUSH_BOTH
+#define DAHDI_FLUSH_READ ZT_FLUSH_READ
+#define DAHDI_FLUSH_WRITE ZT_FLUSH_WRITE
+#define DAHDI_GAINS ZT_GAINS
+#define DAHDI_GET_BUFINFO ZT_GET_BUFINFO
+#define DAHDI_GETCONF ZT_GETCONF
+#define DAHDI_GETCONFMUTE ZT_GETCONFMUTE
+#define DAHDI_GETEVENT ZT_GETEVENT
+#define DAHDI_GETGAINS ZT_GETGAINS
+#define DAHDI_GET_PARAMS ZT_GET_PARAMS
+#define DAHDI_HOOK ZT_HOOK
+#define DAHDI_IOMUX ZT_IOMUX
+#define DAHDI_IOMUX_READ ZT_IOMUX_READ
+#define DAHDI_IOMUX_SIGEVENT ZT_IOMUX_SIGEVENT
+#define DAHDI_IOMUX_WRITE ZT_IOMUX_WRITE
+#define DAHDI_LAW_ALAW ZT_LAW_ALAW
+#define DAHDI_LAW_DEFAULT ZT_LAW_DEFAULT
+#define DAHDI_LAW_MULAW ZT_LAW_MULAW
+#define DAHDI_MAX_NUM_BUFS ZT_MAX_NUM_BUFS
+#define DAHDI_MAX_SPANS ZT_MAX_SPANS
+#define DAHDI_OFFHOOK ZT_OFFHOOK
+#define DAHDI_ONHOOK ZT_ONHOOK
+#define DAHDI_ONHOOKTRANSFER ZT_ONHOOKTRANSFER
+#define DAHDI_PARAMS ZT_PARAMS
+#define DAHDI_POLICY_IMMEDIATE ZT_POLICY_IMMEDIATE
+#define DAHDI_PRI ZT_PRI
+#define DAHDI_RING ZT_RING
+#define DAHDI_RINGOFF ZT_RINGOFF
+#define DAHDI_SENDTONE ZT_SENDTONE
+#define DAHDI_SET_BLOCKSIZE ZT_SET_BLOCKSIZE
+#define DAHDI_SET_BUFINFO ZT_SET_BUFINFO
+#define DAHDI_SETCADENCE ZT_SETCADENCE
+#define DAHDI_SETCONF ZT_SETCONF
+#define DAHDI_SET_DIALPARAMS ZT_SET_DIALPARAMS
+#define DAHDI_SETGAINS ZT_SETGAINS
+#define DAHDI_SETLAW ZT_SETLAW
+#define DAHDI_SETLINEAR ZT_SETLINEAR
+#define DAHDI_SET_PARAMS ZT_SET_PARAMS
+#define DAHDI_SETTONEZONE ZT_SETTONEZONE
+#define DAHDI_SIG_CLEAR ZT_SIG_CLEAR
+#define DAHDI_SIG_EM ZT_SIG_EM
+#define DAHDI_SIG_EM_E1 ZT_SIG_EM_E1
+#define DAHDI_SIG_FXO ZT_SIG_FXO
+#define DAHDI_SIG_FXOGS ZT_SIG_FXOGS
+#define DAHDI_SIG_FXOKS ZT_SIG_FXOKS
+#define DAHDI_SIG_FXOLS ZT_SIG_FXOLS
+#define DAHDI_SIG_FXS ZT_SIG_FXS
+#define DAHDI_SIG_FXSGS ZT_SIG_FXSGS
+#define DAHDI_SIG_FXSKS ZT_SIG_FXSKS
+#define DAHDI_SIG_FXSLS ZT_SIG_FXSLS
+#define DAHDI_SIG_HARDHDLC ZT_SIG_HARDHDLC
+#define DAHDI_SIG_HDLCFCS ZT_SIG_HDLCFCS
+#define DAHDI_SIG_SF ZT_SIG_SF
+#define DAHDI_SPANINFO ZT_SPANINFO
+#define DAHDI_SPANSTAT ZT_SPANSTAT
+#define DAHDI_SPECIFY ZT_SPECIFY
+#define DAHDI_START ZT_START
+#define DAHDI_TCOP_ALLOCATE ZT_TCOP_ALLOCATE
+#define DAHDI_TCOP_GETINFO ZT_TCOP_GETINFO
+#define DAHDI_TCOP_RELEASE ZT_TCOP_RELEASE
+#define DAHDI_TCOP_TRANSCODE ZT_TCOP_TRANSCODE
+#define DAHDI_TIMERACK ZT_TIMERACK
+#define DAHDI_TIMERCONFIG ZT_TIMERCONFIG
+#define DAHDI_TIMERPING ZT_TIMERPING
+#define DAHDI_TIMERPONG ZT_TIMERPONG
+#define DAHDI_TONE_BUSY ZT_TONE_BUSY
+#define DAHDI_TONE_CONGESTION ZT_TONE_CONGESTION
+#define DAHDI_TONEDETECT ZT_TONEDETECT
+#define DAHDI_TONEDETECT_MUTE ZT_TONEDETECT_MUTE
+#define DAHDI_TONEDETECT_ON ZT_TONEDETECT_ON
+#define DAHDI_TONE_DIALRECALL ZT_TONE_DIALRECALL
+#define DAHDI_TONE_DIALTONE ZT_TONE_DIALTONE
+#define DAHDI_TONE_DTMF_A ZT_TONE_DTMF_A
+#define DAHDI_TONE_DTMF_BASE ZT_TONE_DTMF_BASE
+#define DAHDI_TONE_DTMF_p ZT_TONE_DTMF_p
+#define DAHDI_TONE_DTMF_s ZT_TONE_DTMF_s
+#define DAHDI_TONE_INFO ZT_TONE_INFO
+#define DAHDI_TONE_RINGTONE ZT_TONE_RINGTONE
+#define DAHDI_TONE_STUTTER ZT_TONE_STUTTER
+#define DAHDI_TRANSCODE_HEADER ZT_TRANSCODE_HEADER
+#define DAHDI_TRANSCODE_INFO ZT_TRANSCODE_INFO
+#define DAHDI_TRANSCODE_MAGIC ZT_TRANSCODE_MAGIC
+#define DAHDI_TRANSCODE_OP ZT_TRANSCODE_OP
+#define DAHDI_vldtmf ZT_vldtmf
+#define DAHDI_WINK ZT_WINK
+
+#define dahdi_ring_cadence zt_ring_cadence
+
+#endif
+
+#endif /* DAHDI_COMPAT_H */

Propchange: team/jpeeler/chan_dahdi14/include/asterisk/dahdi_compat.h
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: team/jpeeler/chan_dahdi14/include/asterisk/dahdi_compat.h
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: team/jpeeler/chan_dahdi14/include/asterisk/dahdi_compat.h
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: team/jpeeler/chan_dahdi14/include/asterisk/indications.h
URL: http://svn.digium.com/view/asterisk/team/jpeeler/chan_dahdi14/include/asterisk/indications.h?view=diff&rev=119891&r1=119890&r2=119891
==============================================================================
--- team/jpeeler/chan_dahdi14/include/asterisk/indications.h (original)
+++ team/jpeeler/chan_dahdi14/include/asterisk/indications.h Mon Jun  2 18:36:41 2008
@@ -34,8 +34,8 @@
 
 #include "asterisk/lock.h"
 
-struct tone_zone_sound {
-	struct tone_zone_sound *next;		/* next element */
+struct ind_tone_zone_sound {
+	struct ind_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:
@@ -45,33 +45,33 @@
 	   specified in milliseconds */
 };
 
-struct tone_zone {
-	struct tone_zone* next;				/* next in list */
+struct ind_tone_zone {
+	struct ind_tone_zone* next;				/* next in list */
 	char country[5];				/* Country code */
 	char alias[5];					/* is this an alias? */
 	char description[40];				/* Description */
 	int  nrringcadence;				/* # registered ringcadence elements */
 	int *ringcadence;				/* Ring cadence */
-	struct tone_zone_sound *tones;			/* The known tones for this zone */
+	struct ind_tone_zone_sound *tones;			/* The known tones for this zone */
 };
 
 /* set the default tone country */
 int ast_set_indication_country(const char *country);
 
-/* locate tone_zone, given the country. if country == NULL, use the default country */
-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 */
-struct tone_zone_sound *ast_get_indication_tone(const struct tone_zone *zone, const char *indication);
+/* locate ind_tone_zone, given the country. if country == NULL, use the default country */
+struct ind_tone_zone *ast_get_indication_zone(const char *country);
+/* locate a ind_tone_zone_sound, given the ind_tone_zone. if ind_tone_zone == NULL, use the default ind_tone_zone */
+struct ind_tone_zone_sound *ast_get_indication_tone(const struct ind_tone_zone *zone, const char *indication);
 
 /* add a new country, if country exists, it will be replaced. */
-int ast_register_indication_country(struct tone_zone *country);

[... 447 lines stripped ...]



More information about the asterisk-commits mailing list