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

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri May 30 11:21:45 CDT 2008


Author: jpeeler
Date: Fri May 30 11:21:45 2008
New Revision: 119298

URL: http://svn.digium.com/view/asterisk?view=rev&rev=119298
Log:
replace ZT_ with DAHDI_

Modified:
    team/jpeeler/chan_dahdi14/apps/app_flash.c
    team/jpeeler/chan_dahdi14/apps/app_meetme.c
    team/jpeeler/chan_dahdi14/apps/app_rpt.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/channels/chan_iax2.c
    team/jpeeler/chan_dahdi14/channels/chan_mgcp.c
    team/jpeeler/chan_dahdi14/channels/chan_zap.c
    team/jpeeler/chan_dahdi14/codecs/codec_zap.c
    team/jpeeler/chan_dahdi14/configure.ac
    team/jpeeler/chan_dahdi14/contrib/utils/zones2indications.c
    team/jpeeler/chan_dahdi14/main/channel.c
    team/jpeeler/chan_dahdi14/res/res_musiconhold.c

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=119298&r1=119297&r2=119298
==============================================================================
--- team/jpeeler/chan_dahdi14/apps/app_flash.c (original)
+++ team/jpeeler/chan_dahdi14/apps/app_flash.c Fri May 30 11:21:45 2008
@@ -65,9 +65,9 @@
 {
 	/* Avoid the silly zt_waitevent which ignores a bunch of events */
 	int i,j=0;
-	i = ZT_IOMUX_SIGEVENT;
-	if (ioctl(fd, ZT_IOMUX, &i) == -1) return -1;
-	if (ioctl(fd, ZT_GETEVENT, &j) == -1) return -1;
+	i = DAHDI_IOMUX_SIGEVENT;
+	if (ioctl(fd, DAHDI_IOMUX, &i) == -1) return -1;
+	if (ioctl(fd, DAHDI_GETEVENT, &j) == -1) return -1;
 	return j;
 }
 
@@ -80,11 +80,11 @@
 	u = ast_module_user_add(chan);
 	if (!strcasecmp(chan->tech->type, "Zap")) {
 		memset(&ztp, 0, sizeof(ztp));
-		res = ioctl(chan->fds[0], ZT_GET_PARAMS, &ztp);
+		res = ioctl(chan->fds[0], DAHDI_GET_PARAMS, &ztp);
 		if (!res) {
-			if (ztp.sigtype & __ZT_SIG_FXS) {
-				x = ZT_FLASH;
-				res = ioctl(chan->fds[0], ZT_HOOK, &x);
+			if (ztp.sigtype & __DAHDI_SIG_FXS) {
+				x = DAHDI_FLASH;
+				res = ioctl(chan->fds[0], DAHDI_HOOK, &x);
 				if (!res || (errno == EINPROGRESS)) {
 					if (res) {
 						/* Wait for the event to finish */

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=119298&r1=119297&r2=119298
==============================================================================
--- team/jpeeler/chan_dahdi14/apps/app_meetme.c (original)
+++ team/jpeeler/chan_dahdi14/apps/app_meetme.c Fri May 30 11:21:45 2008
@@ -580,8 +580,8 @@
 
 	while (len) {
 		if (block) {
-			x = ZT_IOMUX_WRITE | ZT_IOMUX_SIGEVENT;
-			res = ioctl(fd, ZT_IOMUX, &x);
+			x = DAHDI_IOMUX_WRITE | ZT_IOMUX_SIGEVENT;
+			res = ioctl(fd, DAHDI_IOMUX, &x);
 		} else
 			res = 0;
 		if (res >= 0)
@@ -768,9 +768,9 @@
 
 	/* Setup a new zap conference */
 	ztc.confno = -1;
-	ztc.confmode = ZT_CONF_CONFANN | ZT_CONF_CONFANNMON;
+	ztc.confmode = DAHDI_CONF_CONFANN | ZT_CONF_CONFANNMON;
 	cnf->fd = open("/dev/zap/pseudo", O_RDWR);
-	if (cnf->fd < 0 || ioctl(cnf->fd, ZT_SETCONF, &ztc)) {
+	if (cnf->fd < 0 || ioctl(cnf->fd, DAHDI_SETCONF, &ztc)) {
 		ast_log(LOG_WARNING, "Unable to open pseudo device\n");
 		if (cnf->fd >= 0)
 			close(cnf->fd);
@@ -788,8 +788,8 @@
 		ast_set_write_format(cnf->chan, AST_FORMAT_SLINEAR);
 		ztc.chan = 0;
 		ztc.confno = cnf->zapconf;
-		ztc.confmode = ZT_CONF_CONFANN | ZT_CONF_CONFANNMON;
-		if (ioctl(cnf->chan->fds[0], ZT_SETCONF, &ztc)) {
+		ztc.confmode = DAHDI_CONF_CONFANN | ZT_CONF_CONFANNMON;
+		if (ioctl(cnf->chan->fds[0], DAHDI_SETCONF, &ztc)) {
 			ast_log(LOG_WARNING, "Error setting conference\n");
 			if (cnf->chan)
 				ast_hangup(cnf->chan);
@@ -1218,8 +1218,8 @@
 	}
 
 	/* flush any data sitting in the pseudo channel */
-	x = ZT_FLUSH_ALL;
-	if (ioctl(fd, ZT_FLUSH, &x))
+	x = DAHDI_FLUSH_ALL;
+	if (ioctl(fd, DAHDI_FLUSH, &x))
 		ast_log(LOG_WARNING, "Error flushing channel\n");
 
 }
@@ -1405,7 +1405,7 @@
 	char members[10] = "";
 	int dtmf, opt_waitmarked_timeout = 0;
 	time_t timeout = 0;
-	ZT_BUFFERINFO bi;
+	DAHDI_BUFFERINFO bi;
 	char __buf[CONF_SIZE + AST_FRIENDLY_OFFSET];
 	char *buf = __buf + AST_FRIENDLY_OFFSET;
 	int setusercount = 0;
@@ -1444,8 +1444,8 @@
 		ast_set_write_format(conf->lchan, AST_FORMAT_SLINEAR);
 		ztc.chan = 0;
 		ztc.confno = conf->zapconf;
-		ztc.confmode = ZT_CONF_CONFANN | ZT_CONF_CONFANNMON;
-		if (ioctl(conf->lchan->fds[0], ZT_SETCONF, &ztc)) {
+		ztc.confmode = DAHDI_CONF_CONFANN | ZT_CONF_CONFANNMON;
+		if (ioctl(conf->lchan->fds[0], DAHDI_SETCONF, &ztc)) {
 			ast_log(LOG_WARNING, "Error starting listen channel\n");
 			ast_hangup(conf->lchan);
 			conf->lchan = NULL;
@@ -1616,16 +1616,16 @@
 		/* Setup buffering information */
 		memset(&bi, 0, sizeof(bi));
 		bi.bufsize = CONF_SIZE/2;
-		bi.txbufpolicy = ZT_POLICY_IMMEDIATE;
-		bi.rxbufpolicy = ZT_POLICY_IMMEDIATE;
+		bi.txbufpolicy = DAHDI_POLICY_IMMEDIATE;
+		bi.rxbufpolicy = DAHDI_POLICY_IMMEDIATE;
 		bi.numbufs = audio_buffers;
-		if (ioctl(fd, ZT_SET_BUFINFO, &bi)) {
+		if (ioctl(fd, DAHDI_SET_BUFINFO, &bi)) {
 			ast_log(LOG_WARNING, "Unable to set buffering information: %s\n", strerror(errno));
 			close(fd);
 			goto outrun;
 		}
 		x = 1;
-		if (ioctl(fd, ZT_SETLINEAR, &x)) {
+		if (ioctl(fd, DAHDI_SETLINEAR, &x)) {
 			ast_log(LOG_WARNING, "Unable to set linear mode: %s\n", strerror(errno));
 			close(fd);
 			goto outrun;
@@ -1640,7 +1640,7 @@
 	memset(&ztc_empty, 0, sizeof(ztc_empty));
 	/* Check to see if we're in a conference... */
 	ztc.chan = 0;	
-	if (ioctl(fd, ZT_GETCONF, &ztc)) {
+	if (ioctl(fd, DAHDI_GETCONF, &ztc)) {
 		ast_log(LOG_WARNING, "Error getting conference\n");
 		close(fd);
 		goto outrun;
@@ -1670,15 +1670,15 @@
 	}
 
 	if (confflags & CONFFLAG_WAITMARKED && !conf->markedusers)
-		ztc.confmode = ZT_CONF_CONF;
+		ztc.confmode = DAHDI_CONF_CONF;
 	else if (confflags & CONFFLAG_MONITOR)
-		ztc.confmode = ZT_CONF_CONFMON | ZT_CONF_LISTENER;
+		ztc.confmode = DAHDI_CONF_CONFMON | ZT_CONF_LISTENER;
 	else if (confflags & CONFFLAG_TALKER)
-		ztc.confmode = ZT_CONF_CONF | ZT_CONF_TALKER;
+		ztc.confmode = DAHDI_CONF_CONF | ZT_CONF_TALKER;
 	else 
-		ztc.confmode = ZT_CONF_CONF | ZT_CONF_TALKER | ZT_CONF_LISTENER;
-
-	if (ioctl(fd, ZT_SETCONF, &ztc)) {
+		ztc.confmode = DAHDI_CONF_CONF | ZT_CONF_TALKER | ZT_CONF_LISTENER;
+
+	if (ioctl(fd, DAHDI_SETCONF, &ztc)) {
 		ast_log(LOG_WARNING, "Error setting conference\n");
 		close(fd);
 		ast_mutex_unlock(&conf->playlock);
@@ -1796,8 +1796,8 @@
 						if(confflags & CONFFLAG_MARKEDEXIT)
 							break;
 						else {
-							ztc.confmode = ZT_CONF_CONF;
-							if (ioctl(fd, ZT_SETCONF, &ztc)) {
+							ztc.confmode = DAHDI_CONF_CONF;
+							if (ioctl(fd, DAHDI_SETCONF, &ztc)) {
 								ast_log(LOG_WARNING, "Error setting conference\n");
 								close(fd);
 								goto outrun;
@@ -1812,12 +1812,12 @@
 					/* Marked user entered, so cancel timeout */
 					timeout = 0;
 					if (confflags & CONFFLAG_MONITOR)
-						ztc.confmode = ZT_CONF_CONFMON | ZT_CONF_LISTENER;
+						ztc.confmode = DAHDI_CONF_CONFMON | ZT_CONF_LISTENER;
 					else if (confflags & CONFFLAG_TALKER)
-						ztc.confmode = ZT_CONF_CONF | ZT_CONF_TALKER;
+						ztc.confmode = DAHDI_CONF_CONF | ZT_CONF_TALKER;
 					else
-						ztc.confmode = ZT_CONF_CONF | ZT_CONF_TALKER | ZT_CONF_LISTENER;
-					if (ioctl(fd, ZT_SETCONF, &ztc)) {
+						ztc.confmode = DAHDI_CONF_CONF | ZT_CONF_TALKER | ZT_CONF_LISTENER;
+					if (ioctl(fd, DAHDI_SETCONF, &ztc)) {
 						ast_log(LOG_WARNING, "Error setting conference\n");
 						close(fd);
 						goto outrun;
@@ -1858,9 +1858,9 @@
 			/* Check if my modes have changed */
 
 			/* If I should be muted but am still talker, mute me */
-			if ((user->adminflags & (ADMINFLAG_MUTED | ADMINFLAG_SELFMUTED)) && (ztc.confmode & ZT_CONF_TALKER)) {
-				ztc.confmode ^= ZT_CONF_TALKER;
-				if (ioctl(fd, ZT_SETCONF, &ztc)) {
+			if ((user->adminflags & (ADMINFLAG_MUTED | ADMINFLAG_SELFMUTED)) && (ztc.confmode & DAHDI_CONF_TALKER)) {
+				ztc.confmode ^= DAHDI_CONF_TALKER;
+				if (ioctl(fd, DAHDI_SETCONF, &ztc)) {
 					ast_log(LOG_WARNING, "Error setting conference - Un/Mute \n");
 					ret = -1;
 					break;
@@ -1876,9 +1876,9 @@
 			}
 
 			/* If I should be un-muted but am not talker, un-mute me */
-			if (!(user->adminflags & (ADMINFLAG_MUTED | ADMINFLAG_SELFMUTED)) && !(confflags & CONFFLAG_MONITOR) && !(ztc.confmode & ZT_CONF_TALKER)) {
-				ztc.confmode |= ZT_CONF_TALKER;
-				if (ioctl(fd, ZT_SETCONF, &ztc)) {
+			if (!(user->adminflags & (ADMINFLAG_MUTED | ADMINFLAG_SELFMUTED)) && !(confflags & CONFFLAG_MONITOR) && !(ztc.confmode & DAHDI_CONF_TALKER)) {
+				ztc.confmode |= DAHDI_CONF_TALKER;
+				if (ioctl(fd, DAHDI_SETCONF, &ztc)) {
 					ast_log(LOG_WARNING, "Error setting conference - Un/Mute \n");
 					ret = -1;
 					break;
@@ -2000,7 +2000,7 @@
 				} else if (((f->frametype == AST_FRAME_DTMF) && (f->subclass == '*') && (confflags & CONFFLAG_STARMENU)) || ((f->frametype == AST_FRAME_DTMF) && menu_active)) {
 					if (confflags & CONFFLAG_PASS_DTMF)
 						conf_queue_dtmf(conf, user, f);
-					if (ioctl(fd, ZT_SETCONF, &ztc_empty)) {
+					if (ioctl(fd, DAHDI_SETCONF, &ztc_empty)) {
 						ast_log(LOG_WARNING, "Error setting conference\n");
 						close(fd);
 						ast_frfree(f);
@@ -2146,7 +2146,7 @@
 					if (musiconhold)
 			   			ast_moh_start(chan, NULL, NULL);
 
-					if (ioctl(fd, ZT_SETCONF, &ztc)) {
+					if (ioctl(fd, DAHDI_SETCONF, &ztc)) {
 						ast_log(LOG_WARNING, "Error setting conference\n");
 						close(fd);
 						ast_frfree(f);
@@ -2241,7 +2241,7 @@
 		ztc.chan = 0;	
 		ztc.confno = 0;
 		ztc.confmode = 0;
-		if (ioctl(fd, ZT_SETCONF, &ztc)) {
+		if (ioctl(fd, DAHDI_SETCONF, &ztc)) {
 			ast_log(LOG_WARNING, "Error setting conference\n");
 		}
 	}
@@ -3108,9 +3108,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 < ZT_DEFAULT_NUM_BUFS) || (audio_buffers > ZT_MAX_NUM_BUFS)) {
+		} else if ((audio_buffers < DAHDI_DEFAULT_NUM_BUFS) || (audio_buffers > ZT_MAX_NUM_BUFS)) {
 			ast_log(LOG_WARNING, "audiobuffers setting must be between %d and %d\n",
-				ZT_DEFAULT_NUM_BUFS, ZT_MAX_NUM_BUFS);
+				DAHDI_DEFAULT_NUM_BUFS, ZT_MAX_NUM_BUFS);
 			audio_buffers = DEFAULT_AUDIO_BUFFERS;
 		}
 		if (audio_buffers != DEFAULT_AUDIO_BUFFERS)

Modified: team/jpeeler/chan_dahdi14/apps/app_rpt.c
URL: http://svn.digium.com/view/asterisk/team/jpeeler/chan_dahdi14/apps/app_rpt.c?view=diff&rev=119298&r1=119297&r2=119298
==============================================================================
--- team/jpeeler/chan_dahdi14/apps/app_rpt.c (original)
+++ team/jpeeler/chan_dahdi14/apps/app_rpt.c Fri May 30 11:21:45 2008
@@ -2609,9 +2609,9 @@
 	*/
 
 	for(i = 0; i < 20 ; i++){
-		flags =  ZT_IOMUX_WRITEEMPTY | ZT_IOMUX_NOWAIT; 
-		res = ioctl(chan->fds[0], ZT_IOMUX, &flags);
-		if(flags & ZT_IOMUX_WRITEEMPTY)
+		flags =  DAHDI_IOMUX_WRITEEMPTY | ZT_IOMUX_NOWAIT; 
+		res = ioctl(chan->fds[0], DAHDI_IOMUX, &flags);
+		if(flags & DAHDI_IOMUX_WRITEEMPTY)
 			break;
 		if( ast_safe_sleep(chan, 50)){
 			res = -1;
@@ -2660,9 +2660,9 @@
 	*/
 
 	for(i = 0; i < 20 ; i++){
-		flags =  ZT_IOMUX_WRITEEMPTY | ZT_IOMUX_NOWAIT; 
-		res = ioctl(chan->fds[0], ZT_IOMUX, &flags);
-		if(flags & ZT_IOMUX_WRITEEMPTY)
+		flags =  DAHDI_IOMUX_WRITEEMPTY | ZT_IOMUX_NOWAIT; 
+		res = ioctl(chan->fds[0], DAHDI_IOMUX, &flags);
+		if(flags & DAHDI_IOMUX_WRITEEMPTY)
 			break;
 		if( ast_safe_sleep(chan, 50)){
 			res = -1;
@@ -2905,7 +2905,7 @@
 
 static void *rpt_tele_thread(void *this)
 {
-ZT_CONFINFO ci;  /* conference info */
+DAHDI_CONFINFO ci;  /* conference info */
 int	res = 0,haslink,hastx,hasremote,imdone = 0, unkeys_queued, x;
 struct	rpt_tele *mytele = (struct rpt_tele *)this;
 struct  rpt_tele *tlist;
@@ -2959,9 +2959,9 @@
 	ci.confno = (((mytele->mode == ID) || (mytele->mode == IDTALKOVER) || (mytele->mode == UNKEY) || 
 		(mytele->mode == TAILMSG) || (mytele->mode == LINKUNKEY)) || (mytele->mode == TIMEOUT) ?
 		 	myrpt->txconf : myrpt->conf);
-	ci.confmode = ZT_CONF_CONFANN;
+	ci.confmode = DAHDI_CONF_CONFANN;
 	/* first put the channel on the conference in announce mode */
-	if (ioctl(mychannel->fds[0],ZT_SETCONF,&ci) == -1)
+	if (ioctl(mychannel->fds[0],DAHDI_SETCONF,&ci) == -1)
 	{
 		ast_log(LOG_WARNING, "Unable to set conference mode to Announce\n");
 		rpt_mutex_lock(&myrpt->lock);
@@ -3144,9 +3144,9 @@
 			/* set for all to hear */
 			ci.chan = 0;
 			ci.confno = myrpt->conf;
-			ci.confmode = ZT_CONF_CONFANN;
+			ci.confmode = DAHDI_CONF_CONFANN;
 			/* first put the channel on the conference in announce mode */
-			if (ioctl(mychannel->fds[0],ZT_SETCONF,&ci) == -1)
+			if (ioctl(mychannel->fds[0],DAHDI_SETCONF,&ci) == -1)
 			{
 				ast_log(LOG_WARNING, "Unable to set conference mode to Announce\n");
 				rpt_mutex_lock(&myrpt->lock);
@@ -3174,9 +3174,9 @@
 			/* set for all to hear */
 			ci.chan = 0;
 			ci.confno = myrpt->txconf;
-			ci.confmode = ZT_CONF_CONFANN;
+			ci.confmode = DAHDI_CONF_CONFANN;
 			/* first put the channel on the conference in announce mode */
-			if (ioctl(mychannel->fds[0],ZT_SETCONF,&ci) == -1)
+			if (ioctl(mychannel->fds[0],DAHDI_SETCONF,&ci) == -1)
 			{
 				ast_log(LOG_WARNING, "Unable to set conference mode to Announce\n");
 				rpt_mutex_lock(&myrpt->lock);
@@ -3385,15 +3385,15 @@
 				res = -1;
 				break;
 			}
-			i = ZT_FLUSH_EVENT;
-			if (ioctl(myrpt->zaptxchannel->fds[0],ZT_FLUSH,&i) == -1)
+			i = DAHDI_FLUSH_EVENT;
+			if (ioctl(myrpt->zaptxchannel->fds[0],DAHDI_FLUSH,&i) == -1)
 			{
 				ast_mutex_unlock(&myrpt->remlock);
 				ast_log(LOG_ERROR,"Cant flush events");
 				res = -1;
 				break;
 			}
-			if (ioctl(myrpt->zaprxchannel->fds[0],ZT_GET_PARAMS,&par) == -1)
+			if (ioctl(myrpt->zaprxchannel->fds[0],DAHDI_GET_PARAMS,&par) == -1)
 			{
 				ast_mutex_unlock(&myrpt->remlock);
 				ast_log(LOG_ERROR,"Cant get params");
@@ -4161,7 +4161,7 @@
 
 static void *rpt_call(void *this)
 {
-ZT_CONFINFO ci;  /* conference info */
+DAHDI_CONFINFO ci;  /* conference info */
 struct	rpt *myrpt = (struct rpt *)this;
 int	res;
 int stopped,congstarted,dialtimer,lastcidx,aborted;
@@ -4181,10 +4181,10 @@
 #endif
 	ci.chan = 0;
 	ci.confno = myrpt->conf; /* use the pseudo conference */
-	ci.confmode = ZT_CONF_REALANDPSEUDO | ZT_CONF_TALKER | ZT_CONF_LISTENER
-		| ZT_CONF_PSEUDO_TALKER | ZT_CONF_PSEUDO_LISTENER; 
+	ci.confmode = DAHDI_CONF_REALANDPSEUDO | ZT_CONF_TALKER | ZT_CONF_LISTENER
+		| DAHDI_CONF_PSEUDO_TALKER | ZT_CONF_PSEUDO_LISTENER; 
 	/* first put the channel on the conference */
-	if (ioctl(mychannel->fds[0],ZT_SETCONF,&ci) == -1)
+	if (ioctl(mychannel->fds[0],DAHDI_SETCONF,&ci) == -1)
 	{
 		ast_log(LOG_WARNING, "Unable to set conference mode to Announce\n");
 		ast_hangup(mychannel);
@@ -4204,10 +4204,10 @@
 #endif
 	ci.chan = 0;
 	ci.confno = myrpt->conf;
-	ci.confmode = ZT_CONF_REALANDPSEUDO | ZT_CONF_TALKER | ZT_CONF_LISTENER
-		| ZT_CONF_PSEUDO_TALKER | ZT_CONF_PSEUDO_LISTENER; 
+	ci.confmode = DAHDI_CONF_REALANDPSEUDO | ZT_CONF_TALKER | ZT_CONF_LISTENER
+		| DAHDI_CONF_PSEUDO_TALKER | ZT_CONF_PSEUDO_LISTENER; 
 	/* first put the channel on the conference */
-	if (ioctl(genchannel->fds[0],ZT_SETCONF,&ci) == -1)
+	if (ioctl(genchannel->fds[0],DAHDI_SETCONF,&ci) == -1)
 	{
 		ast_log(LOG_WARNING, "Unable to set conference mode to Announce\n");
 		ast_hangup(mychannel);
@@ -4232,7 +4232,7 @@
 		pthread_exit(NULL);
 	}
 	/* start dialtone if patchquiet is 0. Special patch modes don't send dial tone */
-	if ((!myrpt->patchquiet) && (tone_zone_play_tone(mychannel->fds[0],ZT_TONE_DIALTONE) < 0))
+	if ((!myrpt->patchquiet) && (tone_zone_play_tone(mychannel->fds[0],DAHDI_TONE_DIALTONE) < 0))
 	{
 		ast_log(LOG_WARNING, "Cannot start dialtone\n");
 		ast_hangup(mychannel);
@@ -4274,7 +4274,7 @@
 			if(!congstarted){
 				congstarted = 1;
 				/* start congestion tone */
-				tone_zone_play_tone(mychannel->fds[0],ZT_TONE_CONGESTION);
+				tone_zone_play_tone(mychannel->fds[0],DAHDI_TONE_CONGESTION);
 			}
 		}
 		res = ast_safe_sleep(mychannel, MSWAIT);
@@ -4346,10 +4346,10 @@
 	/* set appropriate conference for the pseudo */
 	ci.chan = 0;
 	ci.confno = myrpt->conf;
-	ci.confmode = (myrpt->p.duplex == 2) ? ZT_CONF_CONFANNMON :
-		(ZT_CONF_CONF | ZT_CONF_LISTENER | ZT_CONF_TALKER);
+	ci.confmode = (myrpt->p.duplex == 2) ? DAHDI_CONF_CONFANNMON :
+		(DAHDI_CONF_CONF | ZT_CONF_LISTENER | ZT_CONF_TALKER);
 	/* first put the channel on the conference in announce mode */
-	if (ioctl(myrpt->pchannel->fds[0],ZT_SETCONF,&ci) == -1)
+	if (ioctl(myrpt->pchannel->fds[0],DAHDI_SETCONF,&ci) == -1)
 	{
 		ast_log(LOG_WARNING, "Unable to set conference mode to Announce\n");
 		ast_hangup(mychannel);
@@ -4373,7 +4373,7 @@
 				myrpt->callmode = 4;
 				rpt_mutex_unlock(&myrpt->lock);
 				/* start congestion tone */
-				tone_zone_play_tone(genchannel->fds[0],ZT_TONE_CONGESTION);
+				tone_zone_play_tone(genchannel->fds[0],DAHDI_TONE_CONGESTION);
 				rpt_mutex_lock(&myrpt->lock);
 			}
 		}
@@ -4401,10 +4401,10 @@
 	/* set appropriate conference for the pseudo */
 	ci.chan = 0;
 	ci.confno = myrpt->conf;
-	ci.confmode = ((myrpt->p.duplex == 2) || (myrpt->p.duplex == 4)) ? ZT_CONF_CONFANNMON :
-		(ZT_CONF_CONF | ZT_CONF_LISTENER | ZT_CONF_TALKER);
+	ci.confmode = ((myrpt->p.duplex == 2) || (myrpt->p.duplex == 4)) ? DAHDI_CONF_CONFANNMON :
+		(DAHDI_CONF_CONF | ZT_CONF_LISTENER | ZT_CONF_TALKER);
 	/* first put the channel on the conference in announce mode */
-	if (ioctl(myrpt->pchannel->fds[0],ZT_SETCONF,&ci) == -1)
+	if (ioctl(myrpt->pchannel->fds[0],DAHDI_SETCONF,&ci) == -1)
 	{
 		ast_log(LOG_WARNING, "Unable to set conference mode to Announce\n");
 	}
@@ -4471,7 +4471,7 @@
 	struct rpt_link *l;
 	int reconnects = 0;
 	int i,n;
-	ZT_CONFINFO ci;  /* conference info */
+	DAHDI_CONFINFO ci;  /* conference info */
 
 	val = node_lookup(myrpt,node);
 	if (!val){
@@ -4610,9 +4610,9 @@
 	/* make a conference for the tx */
 	ci.chan = 0;
 	ci.confno = myrpt->conf;
-	ci.confmode = ZT_CONF_CONF | ZT_CONF_LISTENER | ZT_CONF_TALKER;
+	ci.confmode = DAHDI_CONF_CONF | ZT_CONF_LISTENER | ZT_CONF_TALKER;
 	/* first put the channel on the conference in proper mode */
-	if (ioctl(l->pchan->fds[0], ZT_SETCONF, &ci) == -1)
+	if (ioctl(l->pchan->fds[0], DAHDI_SETCONF, &ci) == -1)
 	{
 		ast_log(LOG_WARNING, "Unable to set conference mode to Announce\n");
 		ast_hangup(l->chan);
@@ -5850,17 +5850,17 @@
 struct zt_radio_param r;
 
 	memset(&r,0,sizeof(struct zt_radio_param));
-	r.radpar = ZT_RADPAR_REMMODE;
-	r.data = ZT_RADPAR_REM_RBI1;
+	r.radpar = DAHDI_RADPAR_REMMODE;
+	r.data = DAHDI_RADPAR_REM_RBI1;
 	/* if setparam ioctl fails, its probably not a pciradio card */
-	if (ioctl(myrpt->zaprxchannel->fds[0],ZT_RADIO_SETPARAM,&r) == -1)
+	if (ioctl(myrpt->zaprxchannel->fds[0],DAHDI_RADIO_SETPARAM,&r) == -1)
 	{
 		rbi_out_parallel(myrpt,data);
 		return;
 	}
-	r.radpar = ZT_RADPAR_REMCOMMAND;
+	r.radpar = DAHDI_RADPAR_REMCOMMAND;
 	memcpy(&r.data,data,5);
-	if (ioctl(myrpt->zaprxchannel->fds[0],ZT_RADIO_SETPARAM,&r) == -1)
+	if (ioctl(myrpt->zaprxchannel->fds[0],DAHDI_RADIO_SETPARAM,&r) == -1)
 	{
 		ast_log(LOG_WARNING,"Cannot send RBI command for channel %s\n",myrpt->zaprxchannel->name);
 		return;
@@ -5909,47 +5909,47 @@
 	/* if not a zap channel, cant use pciradio stuff */
 	if (myrpt->rxchannel != myrpt->zaprxchannel) return -1;	
 
-	prm.radpar = ZT_RADPAR_UIOMODE;
-	if (ioctl(myrpt->zaprxchannel->fds[0],ZT_RADIO_GETPARAM,&prm) == -1) return -1;
+	prm.radpar = DAHDI_RADPAR_UIOMODE;
+	if (ioctl(myrpt->zaprxchannel->fds[0],DAHDI_RADIO_GETPARAM,&prm) == -1) return -1;
 	oldmode = prm.data;
-	prm.radpar = ZT_RADPAR_UIODATA;
-	if (ioctl(myrpt->zaprxchannel->fds[0],ZT_RADIO_GETPARAM,&prm) == -1) return -1;
+	prm.radpar = DAHDI_RADPAR_UIODATA;
+	if (ioctl(myrpt->zaprxchannel->fds[0],DAHDI_RADIO_GETPARAM,&prm) == -1) return -1;
 	olddata = prm.data;
-        prm.radpar = ZT_RADPAR_REMMODE;
-        if (asciiflag & 1)  prm.data = ZT_RADPAR_REM_SERIAL_ASCII;
-        else prm.data = ZT_RADPAR_REM_SERIAL;
-	if (ioctl(myrpt->zaprxchannel->fds[0],ZT_RADIO_SETPARAM,&prm) == -1) return -1;
+        prm.radpar = DAHDI_RADPAR_REMMODE;
+        if (asciiflag & 1)  prm.data = DAHDI_RADPAR_REM_SERIAL_ASCII;
+        else prm.data = DAHDI_RADPAR_REM_SERIAL;
+	if (ioctl(myrpt->zaprxchannel->fds[0],DAHDI_RADIO_SETPARAM,&prm) == -1) return -1;
 	if (asciiflag & 2)
 	{
-		i = ZT_ONHOOK;
-		if (ioctl(myrpt->zaprxchannel->fds[0],ZT_HOOK,&i) == -1) return -1;
+		i = DAHDI_ONHOOK;
+		if (ioctl(myrpt->zaprxchannel->fds[0],DAHDI_HOOK,&i) == -1) return -1;
 		usleep(100000);
 	}
-        prm.radpar = ZT_RADPAR_REMCOMMAND;
+        prm.radpar = DAHDI_RADPAR_REMCOMMAND;
         prm.data = rxmaxbytes;
         memcpy(prm.buf,txbuf,txbytes);
         prm.index = txbytes;
-	if (ioctl(myrpt->zaprxchannel->fds[0],ZT_RADIO_SETPARAM,&prm) == -1) return -1;
+	if (ioctl(myrpt->zaprxchannel->fds[0],DAHDI_RADIO_SETPARAM,&prm) == -1) return -1;
         if (rxbuf)
         {
                 *rxbuf = 0;
                 memcpy(rxbuf,prm.buf,prm.index);
         }
 	index = prm.index;
-        prm.radpar = ZT_RADPAR_REMMODE;
-        prm.data = ZT_RADPAR_REM_NONE;
-	if (ioctl(myrpt->zaprxchannel->fds[0],ZT_RADIO_SETPARAM,&prm) == -1) return -1;
+        prm.radpar = DAHDI_RADPAR_REMMODE;
+        prm.data = DAHDI_RADPAR_REM_NONE;
+	if (ioctl(myrpt->zaprxchannel->fds[0],DAHDI_RADIO_SETPARAM,&prm) == -1) return -1;
 	if (asciiflag & 2)
 	{
-		i = ZT_OFFHOOK;
-		if (ioctl(myrpt->zaprxchannel->fds[0],ZT_HOOK,&i) == -1) return -1;
-	}
-	prm.radpar = ZT_RADPAR_UIOMODE;
+		i = DAHDI_OFFHOOK;
+		if (ioctl(myrpt->zaprxchannel->fds[0],DAHDI_HOOK,&i) == -1) return -1;
+	}
+	prm.radpar = DAHDI_RADPAR_UIOMODE;
 	prm.data = oldmode;
-	if (ioctl(myrpt->zaprxchannel->fds[0],ZT_RADIO_SETPARAM,&prm) == -1) return -1;
-	prm.radpar = ZT_RADPAR_UIODATA;
+	if (ioctl(myrpt->zaprxchannel->fds[0],DAHDI_RADIO_SETPARAM,&prm) == -1) return -1;
+	prm.radpar = DAHDI_RADPAR_UIODATA;
 	prm.data = olddata;
-	if (ioctl(myrpt->zaprxchannel->fds[0],ZT_RADIO_SETPARAM,&prm) == -1) return -1;
+	if (ioctl(myrpt->zaprxchannel->fds[0],DAHDI_RADIO_SETPARAM,&prm) == -1) return -1;
         return(index);
 }
 
@@ -8763,7 +8763,7 @@
 int ms = MSWAIT,i,lasttx=0,val,remrx=0,identqueued,othertelemqueued;
 int tailmessagequeued,ctqueued,dtmfed;
 struct ast_channel *who;
-ZT_CONFINFO ci;  /* conference info */
+DAHDI_CONFINFO ci;  /* conference info */
 time_t	t;
 struct rpt_link *l,*m;
 struct rpt_tele *telem;
@@ -8963,9 +8963,9 @@
 	/* make a conference for the tx */
 	ci.chan = 0;
 	ci.confno = -1; /* make a new conf */
-	ci.confmode = ZT_CONF_CONF | ZT_CONF_LISTENER;
+	ci.confmode = DAHDI_CONF_CONF | ZT_CONF_LISTENER;
 	/* first put the channel on the conference in proper mode */
-	if (ioctl(myrpt->zaptxchannel->fds[0],ZT_SETCONF,&ci) == -1)
+	if (ioctl(myrpt->zaptxchannel->fds[0],DAHDI_SETCONF,&ci) == -1)
 	{
 		ast_log(LOG_WARNING, "Unable to set conference mode to Announce\n");
 		rpt_mutex_unlock(&myrpt->lock);
@@ -8982,10 +8982,10 @@
 	/* make a conference for the pseudo */
 	ci.chan = 0;
 	ci.confno = -1; /* make a new conf */
-	ci.confmode = ((myrpt->p.duplex == 2) || (myrpt->p.duplex == 4)) ? ZT_CONF_CONFANNMON :
-		(ZT_CONF_CONF | ZT_CONF_LISTENER | ZT_CONF_TALKER);
+	ci.confmode = ((myrpt->p.duplex == 2) || (myrpt->p.duplex == 4)) ? DAHDI_CONF_CONFANNMON :
+		(DAHDI_CONF_CONF | ZT_CONF_LISTENER | ZT_CONF_TALKER);
 	/* first put the channel on the conference in announce mode */
-	if (ioctl(myrpt->pchannel->fds[0],ZT_SETCONF,&ci) == -1)
+	if (ioctl(myrpt->pchannel->fds[0],DAHDI_SETCONF,&ci) == -1)
 	{
 		ast_log(LOG_WARNING, "Unable to set conference mode to Announce\n");
 		rpt_mutex_unlock(&myrpt->lock);
@@ -9005,7 +9005,7 @@
 		(myrpt->zaptxchannel == myrpt->txchannel))
 	{
 		/* get tx channel's port number */
-		if (ioctl(myrpt->txchannel->fds[0],ZT_CHANNO,&ci.confno) == -1)
+		if (ioctl(myrpt->txchannel->fds[0],DAHDI_CHANNO,&ci.confno) == -1)
 		{
 			ast_log(LOG_WARNING, "Unable to set tx channel's chan number\n");
 			rpt_mutex_unlock(&myrpt->lock);
@@ -9017,15 +9017,15 @@
 			myrpt->rpt_thread = AST_PTHREADT_STOP;
 			pthread_exit(NULL);
 		}
-		ci.confmode = ZT_CONF_MONITORTX;
+		ci.confmode = DAHDI_CONF_MONITORTX;
 	}
 	else
 	{
 		ci.confno = myrpt->txconf;
-		ci.confmode = ZT_CONF_CONFANNMON;
+		ci.confmode = DAHDI_CONF_CONFANNMON;
 	}
 	/* first put the channel on the conference in announce mode */
-	if (ioctl(myrpt->monchannel->fds[0],ZT_SETCONF,&ci) == -1)
+	if (ioctl(myrpt->monchannel->fds[0],DAHDI_SETCONF,&ci) == -1)
 	{
 		ast_log(LOG_WARNING, "Unable to set conference mode for monitor\n");
 		rpt_mutex_unlock(&myrpt->lock);
@@ -9057,9 +9057,9 @@
 	/* make a conference for the tx */
 	ci.chan = 0;
 	ci.confno = myrpt->txconf;
-	ci.confmode = ZT_CONF_CONF | ZT_CONF_TALKER ;
+	ci.confmode = DAHDI_CONF_CONF | ZT_CONF_TALKER ;
  	/* first put the channel on the conference in proper mode */
-	if (ioctl(myrpt->txpchannel->fds[0],ZT_SETCONF,&ci) == -1)
+	if (ioctl(myrpt->txpchannel->fds[0],DAHDI_SETCONF,&ci) == -1)
 	{
 		ast_log(LOG_WARNING, "Unable to set conference mode to Announce\n");
 		rpt_mutex_unlock(&myrpt->lock);
@@ -9786,7 +9786,7 @@
 				/* apply inbound filters, if any */
 				rpt_filter(myrpt,f->data,f->datalen / 2);
 #endif
-				if (ioctl(myrpt->zaprxchannel->fds[0], ZT_GETCONFMUTE, &ismuted) == -1)
+				if (ioctl(myrpt->zaprxchannel->fds[0], DAHDI_GETCONFMUTE, &ismuted) == -1)
 				{
 					ismuted = 0;
 				}
@@ -10076,7 +10076,7 @@
 
 					if (l->phonemode)
 					{
-						if (ioctl(l->chan->fds[0], ZT_GETCONFMUTE, &ismuted) == -1)
+						if (ioctl(l->chan->fds[0], DAHDI_GETCONFMUTE, &ismuted) == -1)
 						{
 							ismuted = 0;
 						}
@@ -10568,8 +10568,8 @@
 	struct ast_channel *who;
 	struct ast_channel *cs[20];
 	struct	rpt_link *l;
-	ZT_CONFINFO ci;  /* conference info */
-	ZT_PARAMS par;
+	DAHDI_CONFINFO ci;  /* conference info */
+	DAHDI_PARAMS par;
 	int ms,elap,nullfd;
 	time_t t,last_timeout_warning;
 	struct	zt_radio_param z;
@@ -10948,9 +10948,9 @@
 		/* make a conference for the tx */
 		ci.chan = 0;
 		ci.confno = myrpt->conf;
-		ci.confmode = ZT_CONF_CONF | ZT_CONF_LISTENER | ZT_CONF_TALKER;
+		ci.confmode = DAHDI_CONF_CONF | ZT_CONF_LISTENER | ZT_CONF_TALKER;
 		/* first put the channel on the conference in proper mode */
-		if (ioctl(l->pchan->fds[0],ZT_SETCONF,&ci) == -1)
+		if (ioctl(l->pchan->fds[0],DAHDI_SETCONF,&ci) == -1)
 		{
 			ast_log(LOG_WARNING, "Unable to set conference mode to Announce\n");
 			pthread_exit(NULL);
@@ -11115,9 +11115,9 @@
 	/* make a conference for the pseudo */
 	ci.chan = 0;
 	ci.confno = -1; /* make a new conf */
-	ci.confmode = ZT_CONF_CONFANNMON ;
+	ci.confmode = DAHDI_CONF_CONFANNMON ;
 	/* first put the channel on the conference in announce/monitor mode */
-	if (ioctl(myrpt->pchannel->fds[0],ZT_SETCONF,&ci) == -1)
+	if (ioctl(myrpt->pchannel->fds[0],DAHDI_SETCONF,&ci) == -1)
 	{
 		ast_log(LOG_WARNING, "Unable to set conference mode to Announce\n");
 		rpt_mutex_unlock(&myrpt->lock);
@@ -11144,28 +11144,28 @@
 	memset(&z,0,sizeof(z));
 	if ((myrpt->iofd < 1) && (myrpt->txchannel == myrpt->zaptxchannel))
 	{
-		z.radpar = ZT_RADPAR_REMMODE;
-		z.data = ZT_RADPAR_REM_NONE;
-		res = ioctl(myrpt->zaptxchannel->fds[0],ZT_RADIO_SETPARAM,&z);
+		z.radpar = DAHDI_RADPAR_REMMODE;
+		z.data = DAHDI_RADPAR_REM_NONE;
+		res = ioctl(myrpt->zaptxchannel->fds[0],DAHDI_RADIO_SETPARAM,&z);
 		/* if PCIRADIO and kenwood selected */
 		if ((!res) && (!strcmp(myrpt->remote,remote_rig_kenwood)))
 		{
-			z.radpar = ZT_RADPAR_UIOMODE;
+			z.radpar = DAHDI_RADPAR_UIOMODE;
 			z.data = 1;
-			if (ioctl(myrpt->zaptxchannel->fds[0],ZT_RADIO_SETPARAM,&z) == -1)
+			if (ioctl(myrpt->zaptxchannel->fds[0],DAHDI_RADIO_SETPARAM,&z) == -1)
 			{
 				ast_log(LOG_ERROR,"Cannot set UIOMODE\n");
 				return -1;
 			}
-			z.radpar = ZT_RADPAR_UIODATA;
+			z.radpar = DAHDI_RADPAR_UIODATA;
 			z.data = 3;
-			if (ioctl(myrpt->zaptxchannel->fds[0],ZT_RADIO_SETPARAM,&z) == -1)
+			if (ioctl(myrpt->zaptxchannel->fds[0],DAHDI_RADIO_SETPARAM,&z) == -1)
 			{
 				ast_log(LOG_ERROR,"Cannot set UIODATA\n");
 				return -1;
 			}
-			i = ZT_OFFHOOK;
-			if (ioctl(myrpt->zaptxchannel->fds[0],ZT_HOOK,&i) == -1)
+			i = DAHDI_OFFHOOK;
+			if (ioctl(myrpt->zaptxchannel->fds[0],DAHDI_HOOK,&i) == -1)
 			{
 				ast_log(LOG_ERROR,"Cannot set hook\n");
 				return -1;
@@ -11175,23 +11175,23 @@
 	}
 	if (myrpt->txchannel == myrpt->zaptxchannel)
 	{
-		i = ZT_ONHOOK;
-		ioctl(myrpt->zaptxchannel->fds[0],ZT_HOOK,&i);
+		i = DAHDI_ONHOOK;
+		ioctl(myrpt->zaptxchannel->fds[0],DAHDI_HOOK,&i);
 		/* if PCIRADIO and Yaesu ft897/ICOM IC-706 selected */
 		if ((myrpt->iofd < 1) && (!res) &&
 		   (!strcmp(myrpt->remote,remote_rig_ft897) ||
 		      (!strcmp(myrpt->remote,remote_rig_ic706))))
 		{
-			z.radpar = ZT_RADPAR_UIOMODE;
+			z.radpar = DAHDI_RADPAR_UIOMODE;
 			z.data = 1;
-			if (ioctl(myrpt->zaptxchannel->fds[0],ZT_RADIO_SETPARAM,&z) == -1)
+			if (ioctl(myrpt->zaptxchannel->fds[0],DAHDI_RADIO_SETPARAM,&z) == -1)
 			{
 				ast_log(LOG_ERROR,"Cannot set UIOMODE\n");
 				return -1;
 			}
-			z.radpar = ZT_RADPAR_UIODATA;
+			z.radpar = DAHDI_RADPAR_UIODATA;
 			z.data = 3;
-			if (ioctl(myrpt->zaptxchannel->fds[0],ZT_RADIO_SETPARAM,&z) == -1)
+			if (ioctl(myrpt->zaptxchannel->fds[0],DAHDI_RADIO_SETPARAM,&z) == -1)
 			{
 				ast_log(LOG_ERROR,"Cannot set UIODATA\n");
 				return -1;
@@ -11227,7 +11227,7 @@
 	if (myrpt->remote && (myrpt->rxchannel == myrpt->txchannel))
 	{
 		i = 128;
-		ioctl(myrpt->zaprxchannel->fds[0],ZT_ECHOCANCEL,&i);
+		ioctl(myrpt->zaprxchannel->fds[0],DAHDI_ECHOCANCEL,&i);
 	}
 	if (chan->_state != AST_STATE_UP) {
 		ast_answer(chan);
@@ -11235,7 +11235,7 @@
 
 	if (myrpt->rxchannel == myrpt->zaprxchannel)
 	{
-		if (ioctl(myrpt->zaprxchannel->fds[0],ZT_GET_PARAMS,&par) != -1)
+		if (ioctl(myrpt->zaprxchannel->fds[0],DAHDI_GET_PARAMS,&par) != -1)
 		{
 			if (par.rxisoffhook)
 			{
@@ -11500,9 +11500,9 @@
 					time(&myrpt->last_activity_time);
 					if ((iskenwood_pci4) && (myrpt->txchannel == myrpt->zaptxchannel))
 					{
-						z.radpar = ZT_RADPAR_UIODATA;
+						z.radpar = DAHDI_RADPAR_UIODATA;
 						z.data = 1;
-						if (ioctl(myrpt->zaptxchannel->fds[0],ZT_RADIO_SETPARAM,&z) == -1)
+						if (ioctl(myrpt->zaptxchannel->fds[0],DAHDI_RADIO_SETPARAM,&z) == -1)
 						{
 							ast_log(LOG_ERROR,"Cannot set UIODATA\n");
 							return -1;
@@ -11524,9 +11524,9 @@
 			}
 			if ((iskenwood_pci4) && (myrpt->txchannel == myrpt->zaptxchannel))
 			{
-				z.radpar = ZT_RADPAR_UIODATA;
+				z.radpar = DAHDI_RADPAR_UIODATA;
 				z.data = 3;
-				if (ioctl(myrpt->zaptxchannel->fds[0],ZT_RADIO_SETPARAM,&z) == -1)
+				if (ioctl(myrpt->zaptxchannel->fds[0],DAHDI_RADIO_SETPARAM,&z) == -1)
 				{
 					ast_log(LOG_ERROR,"Cannot set UIODATA\n");
 					return -1;
@@ -11576,7 +11576,7 @@
 			}
 			if (f->frametype == AST_FRAME_VOICE)
 			{
-				if (ioctl(chan->fds[0], ZT_GETCONFMUTE, &ismuted) == -1)
+				if (ioctl(chan->fds[0], DAHDI_GETCONFMUTE, &ismuted) == -1)
 				{
 					ismuted = 0;
 				}
@@ -11801,22 +11801,22 @@
 	myrpt->lastf2 = NULL;
 	if ((iskenwood_pci4) && (myrpt->txchannel == myrpt->zaptxchannel))
 	{
-		z.radpar = ZT_RADPAR_UIOMODE;
+		z.radpar = DAHDI_RADPAR_UIOMODE;
 		z.data = 3;
-		if (ioctl(myrpt->zaptxchannel->fds[0],ZT_RADIO_SETPARAM,&z) == -1)
+		if (ioctl(myrpt->zaptxchannel->fds[0],DAHDI_RADIO_SETPARAM,&z) == -1)
 		{
 			ast_log(LOG_ERROR,"Cannot set UIOMODE\n");
 			return -1;
 		}
-		z.radpar = ZT_RADPAR_UIODATA;
+		z.radpar = DAHDI_RADPAR_UIODATA;
 		z.data = 3;
-		if (ioctl(myrpt->zaptxchannel->fds[0],ZT_RADIO_SETPARAM,&z) == -1)
+		if (ioctl(myrpt->zaptxchannel->fds[0],DAHDI_RADIO_SETPARAM,&z) == -1)
 		{
 			ast_log(LOG_ERROR,"Cannot set UIODATA\n");
 			return -1;
 		}
-		i = ZT_OFFHOOK;
-		if (ioctl(myrpt->zaptxchannel->fds[0],ZT_HOOK,&i) == -1)
+		i = DAHDI_OFFHOOK;
+		if (ioctl(myrpt->zaptxchannel->fds[0],DAHDI_HOOK,&i) == -1)
 		{
 			ast_log(LOG_ERROR,"Cannot set hook\n");
 			return -1;

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=119298&r1=119297&r2=119298
==============================================================================
--- team/jpeeler/chan_dahdi14/apps/app_zapbarge.c (original)
+++ team/jpeeler/chan_dahdi14/apps/app_zapbarge.c Fri May 30 11:21:45 2008
@@ -107,7 +107,7 @@
 	int origfd;
 	int ret = -1;
 
-	ZT_BUFFERINFO bi;
+	DAHDI_BUFFERINFO bi;
 	char __buf[CONF_SIZE + AST_FRIENDLY_OFFSET];
 	char *buf = __buf + AST_FRIENDLY_OFFSET;
 
@@ -147,10 +147,10 @@
 		/* Setup buffering information */
 		memset(&bi, 0, sizeof(bi));
 		bi.bufsize = CONF_SIZE;
-		bi.txbufpolicy = ZT_POLICY_IMMEDIATE;
-		bi.rxbufpolicy = ZT_POLICY_IMMEDIATE;
+		bi.txbufpolicy = DAHDI_POLICY_IMMEDIATE;
+		bi.rxbufpolicy = DAHDI_POLICY_IMMEDIATE;
 		bi.numbufs = 4;
-		if (ioctl(fd, ZT_SET_BUFINFO, &bi)) {
+		if (ioctl(fd, DAHDI_SET_BUFINFO, &bi)) {
 			ast_log(LOG_WARNING, "Unable to set buffering information: %s\n", strerror(errno));
 			close(fd);
 			goto outrun;
@@ -164,7 +164,7 @@
 	memset(&ztc, 0, sizeof(ztc));
 	/* Check to see if we're in a conference... */
 	ztc.chan = 0;	
-	if (ioctl(fd, ZT_GETCONF, &ztc)) {
+	if (ioctl(fd, DAHDI_GETCONF, &ztc)) {
 		ast_log(LOG_WARNING, "Error getting conference\n");
 		close(fd);
 		goto outrun;
@@ -181,9 +181,9 @@
 	/* Add us to the conference */
 	ztc.chan = 0;	
 	ztc.confno = confno;
-	ztc.confmode = ZT_CONF_MONITORBOTH;
-
-	if (ioctl(fd, ZT_SETCONF, &ztc)) {
+	ztc.confmode = DAHDI_CONF_MONITORBOTH;
+
+	if (ioctl(fd, DAHDI_SETCONF, &ztc)) {
 		ast_log(LOG_WARNING, "Error setting conference\n");
 		close(fd);
 		goto outrun;
@@ -247,7 +247,7 @@
 		ztc.chan = 0;	
 		ztc.confno = 0;
 		ztc.confmode = 0;
-		if (ioctl(fd, ZT_SETCONF, &ztc)) {
+		if (ioctl(fd, DAHDI_SETCONF, &ztc)) {
 			ast_log(LOG_WARNING, "Error setting conference\n");
 		}
 	}

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=119298&r1=119297&r2=119298
==============================================================================
--- team/jpeeler/chan_dahdi14/apps/app_zapras.c (original)
+++ team/jpeeler/chan_dahdi14/apps/app_zapras.c Fri May 30 11:21:45 2008
@@ -146,7 +146,7 @@
 	struct zt_bufferinfo savebi;
 	int x;
 	
-	res = ioctl(chan->fds[0], ZT_GET_BUFINFO, &savebi);
+	res = ioctl(chan->fds[0], DAHDI_GET_BUFINFO, &savebi);
 	if(res) {
 		ast_log(LOG_WARNING, "Unable to check buffer policy on channel %s\n", chan->name);
 		return;
@@ -184,10 +184,10 @@
 			}
 			/* Throw back into audio mode */
 			x = 1;
-			ioctl(chan->fds[0], ZT_AUDIOMODE, &x);
+			ioctl(chan->fds[0], DAHDI_AUDIOMODE, &x);
 
 			/* Restore saved values */
-			res = ioctl(chan->fds[0], ZT_SET_BUFINFO, &savebi);
+			res = ioctl(chan->fds[0], DAHDI_SET_BUFINFO, &savebi);
 			if (res < 0) {
 				ast_log(LOG_WARNING, "Unable to set buffer policy on channel %s\n", chan->name);
 			}
@@ -201,7 +201,7 @@
 	int res=-1;
 	char *args;
 	struct ast_module_user *u;
-	ZT_PARAMS ztp;
+	DAHDI_PARAMS ztp;
 
 	if (!data) 
 		data = "";
@@ -221,9 +221,9 @@
 		sleep(2);
 	} else {
 		memset(&ztp, 0, sizeof(ztp));
-		if (ioctl(chan->fds[0], ZT_GET_PARAMS, &ztp)) {
+		if (ioctl(chan->fds[0], DAHDI_GET_PARAMS, &ztp)) {
 			ast_log(LOG_WARNING, "Unable to get zaptel parameters\n");
-		} else if (ztp.sigtype != ZT_SIG_CLEAR) {
+		} else if (ztp.sigtype != DAHDI_SIG_CLEAR) {
 			if (option_verbose > 1)
 				ast_verbose(VERBOSE_PREFIX_2 "Channel %s is not a clear channel\n", chan->name);
 		} else {

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=119298&r1=119297&r2=119298
==============================================================================
--- team/jpeeler/chan_dahdi14/apps/app_zapscan.c (original)
+++ team/jpeeler/chan_dahdi14/apps/app_zapscan.c Fri May 30 11:21:45 2008
@@ -114,7 +114,7 @@
 	char input[4];
 	int ic=0;
 	
-	ZT_BUFFERINFO bi;
+	DAHDI_BUFFERINFO bi;
 	char __buf[CONF_SIZE + AST_FRIENDLY_OFFSET];
 	char *buf = __buf + AST_FRIENDLY_OFFSET;
 	
@@ -154,10 +154,10 @@
 		/* Setup buffering information */
 		memset(&bi, 0, sizeof(bi));
 		bi.bufsize = CONF_SIZE;
-		bi.txbufpolicy = ZT_POLICY_IMMEDIATE;
-		bi.rxbufpolicy = ZT_POLICY_IMMEDIATE;
+		bi.txbufpolicy = DAHDI_POLICY_IMMEDIATE;
+		bi.rxbufpolicy = DAHDI_POLICY_IMMEDIATE;
 		bi.numbufs = 4;
-		if (ioctl(fd, ZT_SET_BUFINFO, &bi)) {
+		if (ioctl(fd, DAHDI_SET_BUFINFO, &bi)) {
 			ast_log(LOG_WARNING, "Unable to set buffering information: %s\n", strerror(errno));
 			close(fd);
 			goto outrun;
@@ -171,7 +171,7 @@
 	memset(&ztc, 0, sizeof(ztc));
 	/* Check to see if we're in a conference... */
         ztc.chan = 0;
-        if (ioctl(fd, ZT_GETCONF, &ztc)) {
+        if (ioctl(fd, DAHDI_GETCONF, &ztc)) {
 			ast_log(LOG_WARNING, "Error getting conference\n");
 			close(fd);
 			goto outrun;
@@ -188,9 +188,9 @@
         /* Add us to the conference */
         ztc.chan = 0;
         ztc.confno = confno;
-        ztc.confmode = ZT_CONF_MONITORBOTH;
-		
-        if (ioctl(fd, ZT_SETCONF, &ztc)) {
+        ztc.confmode = DAHDI_CONF_MONITORBOTH;
+		
+        if (ioctl(fd, DAHDI_SETCONF, &ztc)) {
                 ast_log(LOG_WARNING, "Error setting conference\n");
                 close(fd);
                 goto outrun;
@@ -274,7 +274,7 @@
 			ztc.chan = 0;
 			ztc.confno = 0;
 			ztc.confmode = 0;
-			if (ioctl(fd, ZT_SETCONF, &ztc)) {
+			if (ioctl(fd, DAHDI_SETCONF, &ztc)) {
 				ast_log(LOG_WARNING, "Error setting conference\n");
                 }
         }

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=119298&r1=119297&r2=119298
==============================================================================
--- team/jpeeler/chan_dahdi14/channels/chan_iax2.c (original)
+++ team/jpeeler/chan_dahdi14/channels/chan_iax2.c Fri May 30 11:21:45 2008
@@ -6511,7 +6511,7 @@
 	struct iax2_trunk_peer *tpeer, *prev = NULL, *drop=NULL;
 	int processed = 0;
 	int totalcalls = 0;
-#ifdef ZT_TIMERACK
+#ifdef DAHDI_TIMERACK
 	int x = 1;
 #endif
 	struct timeval now;
@@ -6519,9 +6519,9 @@
 		ast_verbose("Beginning trunk processing. Trunk queue ceiling is %d bytes per host\n", MAX_TRUNKDATA);
 	gettimeofday(&now, NULL);
 	if (events & AST_IO_PRI) {
-#ifdef ZT_TIMERACK
+#ifdef DAHDI_TIMERACK
 		/* Great, this is a timing interface, just call the ioctl */
-		if (ioctl(fd, ZT_TIMERACK, &x)) {
+		if (ioctl(fd, DAHDI_TIMERACK, &x)) {
 			ast_log(LOG_WARNING, "Unable to acknowledge zap timer. IAX trunking will fail!\n");
 			usleep(1);
 			return -1;
@@ -9765,10 +9765,10 @@
 	int bs = trunkfreq * 8;
 	if (timingfd > -1) {
 		if (
-#ifdef ZT_TIMERACK
-			ioctl(timingfd, ZT_TIMERCONFIG, &bs) &&
+#ifdef DAHDI_TIMERACK
+			ioctl(timingfd, DAHDI_TIMERCONFIG, &bs) &&
 #endif			
-			ioctl(timingfd, ZT_SET_BLOCKSIZE, &bs))
+			ioctl(timingfd, DAHDI_SET_BLOCKSIZE, &bs))
 			ast_log(LOG_WARNING, "Unable to set blocksize on timing source\n");
 	}
 #endif
@@ -11044,7 +11044,7 @@
 	jb_setoutput(jb_error_output, jb_warning_output, NULL);
 	
 #ifdef HAVE_ZAPTEL
-#ifdef ZT_TIMERACK
+#ifdef DAHDI_TIMERACK
 	timingfd = open("/dev/zap/timer", O_RDWR);
 	if (timingfd < 0)
 #endif

Modified: team/jpeeler/chan_dahdi14/channels/chan_mgcp.c
URL: http://svn.digium.com/view/asterisk/team/jpeeler/chan_dahdi14/channels/chan_mgcp.c?view=diff&rev=119298&r1=119297&r2=119298
==============================================================================

[... 2637 lines stripped ...]



More information about the asterisk-commits mailing list