diff --git a/apps/app_dahdibarge.c b/apps/app_dahdibarge.c
index 853f285..cba85a9 100644
--- a/apps/app_dahdibarge.c
+++ b/apps/app_dahdibarge.c
@@ -134,11 +134,7 @@ static int conf_run(struct ast_channel *chan, int confno, int confflags)
 zapretry:
 	origfd = chan->fds[0];
 	if (retryzap) {
-#ifdef HAVE_ZAPTEL
-		fd = open("/dev/zap/pseudo", O_RDWR);
-#else
-		fd = open("/dev/dahdi/pseudo", O_RDWR);
-#endif
+		fd = open(DAHDI_FILE_PSEUDO, O_RDWR);
 		if (fd < 0) {
 			ast_log(LOG_WARNING, "Unable to open pseudo channel: %s\n", strerror(errno));
 			goto outrun;
diff --git a/apps/app_dahdiscan.c b/apps/app_dahdiscan.c
index e1b8694..6a60075 100644
--- a/apps/app_dahdiscan.c
+++ b/apps/app_dahdiscan.c
@@ -135,7 +135,7 @@ static int conf_run(struct ast_channel *chan, int confno, int confflags)
  zapretry:
 	origfd = chan->fds[0];
 	if (retryzap) {
-		fd = open("/dev/zap/pseudo", O_RDWR);
+		fd = open(DAHDI_FILE_PSEUDO, O_RDWR);
 		if (fd < 0) {
 			ast_log(LOG_WARNING, "Unable to open pseudo channel: %s\n", strerror(errno));
 			goto outrun;
diff --git a/apps/app_meetme.c b/apps/app_meetme.c
index df4148e..c8ef431 100644
--- a/apps/app_meetme.c
+++ b/apps/app_meetme.c
@@ -769,11 +769,7 @@ static struct ast_conference *build_conf(char *confno, char *pin, char *pinadmin
 	/* Setup a new zap conference */
 	ztc.confno = -1;
 	ztc.confmode = DAHDI_CONF_CONFANN | DAHDI_CONF_CONFANNMON;
-#ifdef HAVE_ZAPTEL
-	cnf->fd = open("/dev/zap/pseudo", O_RDWR);
-#else
-	cnf->fd = open("/dev/dahdi/pseudo", O_RDWR);
-#endif
+	cnf->fd = open(DAHDI_FILE_PSEUDO, O_RDWR);
 	if (cnf->fd < 0 || ioctl(cnf->fd, DAHDI_SETCONF, &ztc)) {
 		ast_log(LOG_WARNING, "Unable to open pseudo device\n");
 		if (cnf->fd >= 0)
@@ -1599,11 +1595,7 @@ static int conf_run(struct ast_channel *chan, struct ast_conference *conf, int c
  zapretry:
 	origfd = chan->fds[0];
 	if (retryzap) {
-#ifdef HAVE_ZAPTEL
-		fd = open("/dev/zap/pseudo", O_RDWR);
-#else
-		fd = open("/dev/dahdi/pseudo", O_RDWR);
-#endif
+		fd = open(DAHDI_FILE_PSEUDO, O_RDWR);
 		if (fd < 0) {
 			ast_log(LOG_WARNING, "Unable to open pseudo channel: %s\n", strerror(errno));
 			goto outrun;
diff --git a/channels/chan_dahdi.c b/channels/chan_dahdi.c
index 91160f1..5269bf7 100644
--- a/channels/chan_dahdi.c
+++ b/channels/chan_dahdi.c
@@ -915,11 +915,7 @@ static int dahdi_open(char *fn)
 			ast_log(LOG_WARNING, "Invalid channel number '%s'\n", fn);
 			return -1;
 		}
-#ifdef HAVE_ZAPTEL
-		fn = "/dev/zap/channel";
-#else
-		fn = "/dev/dahdi/channel";
-#endif
+		fn = DAHDI_FILE_CHANNEL;
 	}
 	fd = open(fn, O_RDWR | O_NONBLOCK);
 	if (fd < 0) {
@@ -981,11 +977,7 @@ static int alloc_sub(struct dahdi_pvt *p, int x)
 	struct dahdi_bufferinfo bi;
 	int res;
 	if (p->subs[x].dfd < 0) {
-#ifdef HAVE_ZAPTEL
-		p->subs[x].dfd = dahdi_open("/dev/zap/pseudo");
-#else
-		p->subs[x].dfd = dahdi_open("/dev/dahdi/pseudo");
-#endif
+		p->subs[x].dfd = dahdi_open(DAHDI_FILE_PSEUDO);
 		if (p->subs[x].dfd > -1) {
 			res = ioctl(p->subs[x].dfd, DAHDI_GET_BUFINFO, &bi);
 			if (!res) {
@@ -7222,11 +7214,7 @@ static int pri_create_trunkgroup(int trunkgroup, int *channels)
 			break;
 		memset(&si, 0, sizeof(si));
 		memset(&p, 0, sizeof(p));
-#ifdef HAVE_ZAPTEL
-		fd = open("/dev/zap/channel", O_RDWR);
-#else
-		fd = open("/dev/dahdi/channel", O_RDWR);
-#endif
+		fd = open(DAHDI_FILE_CHANNEL, O_RDWR);
 		if (fd < 0) {
 			ast_log(LOG_WARNING, "Failed to open channel: %s\n", strerror(errno));
 			return -1;
@@ -7886,11 +7874,7 @@ static struct dahdi_pvt *chandup(struct dahdi_pvt *src)
 	if ((p = ast_malloc(sizeof(*p)))) {
 		memcpy(p, src, sizeof(struct dahdi_pvt));
 		ast_mutex_init(&p->lock);
-#ifdef HAVE_ZAPTEL
-		p->subs[SUB_REAL].dfd = dahdi_open("/dev/zap/pseudo");
-#else
-		p->subs[SUB_REAL].dfd = dahdi_open("/dev/dahdi/pseudo");
-#endif
+		p->subs[SUB_REAL].dfd = dahdi_open(DAHDI_FILE_PSEUDO);
 		/* Allocate a DAHDI structure */
 		if (p->subs[SUB_REAL].dfd < 0) {
 			ast_log(LOG_ERROR, "Unable to dup channel: %s\n",  strerror(errno));
@@ -9632,11 +9616,7 @@ static int start_pri(struct dahdi_pri *pri)
 	for (i = 0; i < NUM_DCHANS; i++) {
 		if (!pri->dchannels[i])
 			break;
-#ifdef HAVE_ZAPTEL
-		pri->fds[i] = open("/dev/zap/channel", O_RDWR, 0600);
-#else
-		pri->fds[i] = open("/dev/dahdi/channel", O_RDWR, 0600);
-#endif
+		pri->fds[i] = open(DAHDI_FILE_CHANNEL, O_RDWR, 0600);
 		x = pri->dchannels[i];
 		if ((pri->fds[i] < 0) || (ioctl(pri->fds[i],DAHDI_SPECIFY,&x) == -1)) {
 			ast_log(LOG_ERROR, "Unable to open D-channel %d (%s)\n", x, strerror(errno));
@@ -10409,19 +10389,11 @@ static int dahdi_show_status(int fd, int argc, char *argv[]) {
 	int ctl;
 	struct dahdi_spaninfo s;
 
-#ifdef HAVE_ZAPTEL
-	if ((ctl = open("/dev/zap/ctl", O_RDWR)) < 0) {
-		ast_log(LOG_WARNING, "Unable to open /dev/zap/ctl: %s\n", strerror(errno));
-		ast_cli(fd, "No Zaptel interface found.\n");
+	if ((ctl = open(DAHDI_FILE_CTL, O_RDWR)) < 0) {
+		ast_log(LOG_WARNING, "Unable to open " DAHDI_FILE_CTL ": %s\n", strerror(errno));
+		ast_cli(fd, "No " DAHDI_NAME " interface found.\n");
 		return RESULT_FAILURE;
 	}
-#else
-	if ((ctl = open("/dev/dahdi/ctl", O_RDWR)) < 0) {
-		ast_log(LOG_WARNING, "Unable to open /dev/dahdi/ctl: %s\n", strerror(errno));
-		ast_cli(fd, "No DAHDI interface found.\n");
-		return RESULT_FAILURE;
-	}
-#endif
 	ast_cli(fd, FORMAT2, "Description", "Alarms", "IRQ", "bpviol", "CRC4");
 
 	for (span = 1; span < DAHDI_MAX_SPANS; ++span) {
@@ -11609,14 +11581,10 @@ static int process_dahdi(struct dahdi_chan_conf *confp, const char *cat, struct
 				int res;
 				struct dahdi_dialparams dps;
 
-#ifdef HAVE_ZAPTEL
-				ctlfd = open("/dev/zap/ctl", O_RDWR);
-#else
-				ctlfd = open("/dev/dahdi/ctl", O_RDWR);
-#endif
+				ctlfd = open(DAHDI_FILE_CTL, O_RDWR);
 
 				if (ctlfd == -1) {
-					ast_log(LOG_ERROR, "Unable to open /dev/dahdi/ctl to set toneduration\n");
+					ast_log(LOG_ERROR, "Unable to open " DAHDI_FILE_CTL " to set toneduration\n");
 					return -1;
 				}
 
diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c
index 5d83f62..ad37280 100644
--- a/channels/chan_iax2.c
+++ b/channels/chan_iax2.c
@@ -11149,23 +11149,13 @@ static int load_module(void)
 	iax_set_error(iax_error_output);
 	jb_setoutput(jb_error_output, jb_warning_output, NULL);
 	
-#ifdef HAVE_ZAPTEL
-#ifdef ZAPTEL_TIMERACK
-	timingfd = open("/dev/zap/timer", O_RDWR);
-	if (timingfd < 0)
-#endif
-		timingfd = open("/dev/zap/pseudo", O_RDWR);
-	if (timingfd < 0) 
-		ast_log(LOG_WARNING, "Unable to open IAX timing interface: %s\n", strerror(errno));
-#elif defined(HAVE_DAHDI)
 #ifdef DAHDI_TIMERACK
-	timingfd = open("/dev/dahdi/timer", O_RDWR);
+	timingfd = open(DAHDI_FILE_TIMER, O_RDWR);
 	if (timingfd < 0)
 #endif
-		timingfd = open("/dev/dahdi/pseudo", O_RDWR);
+		timingfd = open(DAHDI_FILE_PSEUDO, O_RDWR);
 	if (timingfd < 0) 
 		ast_log(LOG_WARNING, "Unable to open IAX timing interface: %s\n", strerror(errno));
-#endif
 
 	memset(iaxs, 0, sizeof(iaxs));
 
diff --git a/include/asterisk/dahdi_compat.h b/include/asterisk/dahdi_compat.h
index 2270237..d210fb7 100644
--- a/include/asterisk/dahdi_compat.h
+++ b/include/asterisk/dahdi_compat.h
@@ -26,10 +26,16 @@
 
 #include <dahdi/user.h>
 
+#define DAHDI_DIR_NAME "/dev/dahdi"
+#define DAHDI_NAME "DAHDI"
+
 #elif defined(HAVE_ZAPTEL)
 
 #include <zaptel/zaptel.h>
 
+#define DAHDI_DIR_NAME "/dev/zap"
+#define DAHDI_NAME "DAHDI"
+
 /* Compiling against Zaptel instead of DAHDI */
 
 #define __DAHDI_SIG_FXO __ZT_SIG_FXO
@@ -181,4 +187,10 @@
 
 #endif
 
+#define DAHDI_FILE_CHANNEL   DAHDI_DIR_NAME "/channel"
+#define DAHDI_FILE_CTL       DAHDI_DIR_NAME "/ctl"
+#define DAHDI_FILE_PSEUDO    DAHDI_DIR_NAME "/pseudo"
+#define DAHDI_FILE_TIMER     DAHDI_DIR_NAME "/timer"
+#define DAHDI_FILE_TRANSCODE DAHDI_DIR_NAME "/transcode"
+
 #endif /* DAHDI_COMPAT_H */
diff --git a/main/asterisk.c b/main/asterisk.c
index cee50d6..9b6c548 100644
--- a/main/asterisk.c
+++ b/main/asterisk.c
@@ -2985,53 +2985,35 @@ int main(int argc, char *argv[])
 	dahdi_chan_name_len = &_dahdi_chan_name_len;
 	dahdi_chan_mode = &_dahdi_chan_mode;
 
-#ifdef HAVE_ZAPTEL
 	{
 		int fd;
 		int x = 160;
-		fd = open("/dev/zap/timer", O_RDWR);
-		if (fd >= 0) {
-			if (ioctl(fd, DAHDI_TIMERCONFIG, &x)) {
-				ast_log(LOG_ERROR, "You have Zaptel built and drivers loaded, but the Zaptel timer test failed to set ZT_TIMERCONFIG to %d.\n", x);
-				exit(1);
-			}
-			if ((x = ast_wait_for_input(fd, 300)) < 0) {
-				ast_log(LOG_ERROR, "You have Zaptel built and drivers loaded, but the Zaptel timer could not be polled during the Zaptel timer test.\n");
-				exit(1);
-			}
-			if (!x) {
-				const char zaptel_timer_error[] = {
-					"Asterisk has detected a problem with your Zaptel configuration and will shutdown for your protection.  You have options:"
-					"\n\t1. You only have to compile Zaptel support into Asterisk if you need it.  One option is to recompile without Zaptel support."
-					"\n\t2. You only have to load Zaptel drivers if you want to take advantage of Zaptel services.  One option is to unload zaptel modules if you don't need them."
-					"\n\t3. If you need Zaptel services, you must correctly configure Zaptel."
-				};
-				ast_log(LOG_ERROR, "%s\n", zaptel_timer_error);
-				exit(1);
-			}
-			close(fd);
-		}
-	}
-#elif defined(HAVE_DAHDI)
-{
-		int fd;
-		int x = 160;
-		fd = open("/dev/dahdi/timer", O_RDWR);
+		fd = open(DAHDI_FILE_TIMER, O_RDWR);
 		if (fd >= 0) {
 			if (ioctl(fd, DAHDI_TIMERCONFIG, &x)) {
-				ast_log(LOG_ERROR, "You have DAHDI built and drivers loaded, but the DAHDI timer test failed to set DAHDI_TIMERCONFIG to %d.\n", x);
+				ast_log(LOG_ERROR, "You have " DAHDI_NAME
+						" built and drivers loaded, but the "
+						DAHDI_NAME " timer test failed to set DAHDI_TIMERCONFIG to %d.\n", x);
 				exit(1);
 			}
 			if ((x = ast_wait_for_input(fd, 300)) < 0) {
-				ast_log(LOG_ERROR, "You have DAHDI built and drivers loaded, but the DAHDI timer could not be polled during the DAHDI timer test.\n");
+				ast_log(LOG_ERROR, "You have " DAHDI_NAME 
+						"built and drivers loaded, but the " 
+						DAHDI_NAME " timer could not be polled during the " 
+						DAHDI_NAME " timer test.\n");
 				exit(1);
 			}
 			if (!x) {
 				const char dahdi_timer_error[] = {
-					"Asterisk has detected a problem with your DAHDI configuration and will shutdown for your protection.  You have options:"
-					"\n\t1. You only have to compile DAHDI support into Asterisk if you need it.  One option is to recompile without DAHDI support."
-					"\n\t2. You only have to load DAHDI drivers if you want to take advantage of DAHDI services.  One option is to unload DAHDI modules if you don't need them."
-					"\n\t3. If you need DAHDI services, you must correctly configure DAHDI."
+					"Asterisk has detected a problem with your " DAHDI_NAME 
+						" configuration and will shutdown for your protection.  You have options:"
+					"\n\t1. You only have to compile " DAHDI_NAME 
+						" support into Asterisk if you need it.  One option is to recompile without " 
+						DAHDI_NAME " support."
+					"\n\t2. You only have to load " DAHDI_NAME " drivers if you want to take advantage of " 
+						DAHDI_NAME " services.  One option is to unload " 
+						DAHDI_NAME " modules if you don't need them."
+					"\n\t3. If you need Zaptel services, you must correctly configure " DAHDI_NAME "."
 				};
 				ast_log(LOG_ERROR, "%s\n", dahdi_timer_error);
 				exit(1);
@@ -3039,8 +3021,6 @@ int main(int argc, char *argv[])
 			close(fd);
 		}
 	}
-
-#endif
 	threadstorage_init();
 
 	astobj2_init();
diff --git a/main/channel.c b/main/channel.c
index 1f92ed9..b1c1d3e 100644
--- a/main/channel.c
+++ b/main/channel.c
@@ -744,11 +744,7 @@ struct ast_channel *ast_channel_alloc(int needqueue, int state, const char *cid_
 
 #ifdef HAVE_DAHDI
 
-#ifdef HAVE_ZAPTEL
-	tmp->timingfd = open("/dev/zap/timer", O_RDWR);
-#else
-	tmp->timingfd = open("/dev/dahdi/timer", O_RDWR);
-#endif
+	tmp->timingfd = open(DAHDI_FILE_TIMER, O_RDWR);
 
 	if (tmp->timingfd > -1) {
 		/* Check if timing interface supports new
diff --git a/res/res_musiconhold.c b/res/res_musiconhold.c
index ed2b55f..737113c 100644
--- a/res/res_musiconhold.c
+++ b/res/res_musiconhold.c
@@ -910,11 +910,7 @@ static int moh_register(struct mohclass *moh, int reload)
 #ifdef HAVE_DAHDI
 		/* Open /dev/zap/pseudo for timing...  Is
 		   there a better, yet reliable way to do this? */
-#ifdef HAVE_ZAPTEL
-		moh->pseudofd = open("/dev/zap/pseudo", O_RDONLY);
-#else
-		moh->pseudofd = open("/dev/dahdi/pseudo", O_RDONLY);
-#endif
+		moh->pseudofd = open(DAHDI_FILE_PSEUDO, O_RDONLY);
 		if (moh->pseudofd < 0) {
 			ast_log(LOG_WARNING, "Unable to open pseudo channel for timing...  Sound may be choppy.\n");
 		} else {
