[asterisk-commits] jpeeler: branch jpeeler/chan_dahdi r118172 - in /team/jpeeler/chan_dahdi: app...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri May 23 17:29:45 CDT 2008


Author: jpeeler
Date: Fri May 23 17:29:44 2008
New Revision: 118172

URL: http://svn.digium.com/view/asterisk?view=rev&rev=118172
Log:
More Zap/zap/Zapata/zapata/zt to corresponding DAHDI conversions. This code is probably not compilable at this point. Will test once configure is modified to properly support DAHDI.

Modified:
    team/jpeeler/chan_dahdi/apps/app_chanisavail.c
    team/jpeeler/chan_dahdi/apps/app_dial.c
    team/jpeeler/chan_dahdi/apps/app_flash.c
    team/jpeeler/chan_dahdi/apps/app_meetme.c
    team/jpeeler/chan_dahdi/apps/app_queue.c
    team/jpeeler/chan_dahdi/apps/app_rpt.c
    team/jpeeler/chan_dahdi/apps/app_zapbarge.c
    team/jpeeler/chan_dahdi/apps/app_zapras.c
    team/jpeeler/chan_dahdi/apps/app_zapscan.c
    team/jpeeler/chan_dahdi/cdr/cdr_csv.c
    team/jpeeler/chan_dahdi/channels/chan_dahdi.c
    team/jpeeler/chan_dahdi/channels/chan_iax2.c
    team/jpeeler/chan_dahdi/channels/chan_mgcp.c
    team/jpeeler/chan_dahdi/codecs/codec_zap.c
    team/jpeeler/chan_dahdi/configs/extensions.ael.sample
    team/jpeeler/chan_dahdi/configs/extensions.conf.sample
    team/jpeeler/chan_dahdi/configs/extensions.lua.sample
    team/jpeeler/chan_dahdi/configs/meetme.conf.sample
    team/jpeeler/chan_dahdi/configs/muted.conf.sample
    team/jpeeler/chan_dahdi/configs/queues.conf.sample
    team/jpeeler/chan_dahdi/configs/rpt.conf.sample
    team/jpeeler/chan_dahdi/configs/sla.conf.sample
    team/jpeeler/chan_dahdi/configs/users.conf.sample
    team/jpeeler/chan_dahdi/configs/zapata.conf.sample
    team/jpeeler/chan_dahdi/contrib/init.d/rc.mandrake.asterisk
    team/jpeeler/chan_dahdi/contrib/init.d/rc.mandrake.zaptel
    team/jpeeler/chan_dahdi/contrib/init.d/rc.suse.asterisk
    team/jpeeler/chan_dahdi/contrib/scripts/autosupport
    team/jpeeler/chan_dahdi/contrib/scripts/loadtest.tcl
    team/jpeeler/chan_dahdi/doc/asterisk.8
    team/jpeeler/chan_dahdi/doc/asterisk.sgml
    team/jpeeler/chan_dahdi/doc/backtrace.txt
    team/jpeeler/chan_dahdi/doc/janitor-projects.txt
    team/jpeeler/chan_dahdi/doc/manager_1_1.txt
    team/jpeeler/chan_dahdi/doc/osp.txt
    team/jpeeler/chan_dahdi/doc/sms.txt
    team/jpeeler/chan_dahdi/doc/tex/ael.tex
    team/jpeeler/chan_dahdi/doc/tex/app-sms.tex
    team/jpeeler/chan_dahdi/doc/tex/backtrace.tex
    team/jpeeler/chan_dahdi/doc/tex/channelvariables.tex
    team/jpeeler/chan_dahdi/doc/tex/enum.tex
    team/jpeeler/chan_dahdi/doc/tex/hardware.tex
    team/jpeeler/chan_dahdi/doc/tex/localchannel.tex
    team/jpeeler/chan_dahdi/doc/tex/manager.tex
    team/jpeeler/chan_dahdi/doc/tex/privacy.tex
    team/jpeeler/chan_dahdi/doc/tex/queues-with-callback-members.tex
    team/jpeeler/chan_dahdi/doc/tex/security.tex
    team/jpeeler/chan_dahdi/doc/tex/sla.tex
    team/jpeeler/chan_dahdi/include/asterisk/autoconfig.h.in
    team/jpeeler/chan_dahdi/include/asterisk/channel.h
    team/jpeeler/chan_dahdi/include/asterisk/dsp.h
    team/jpeeler/chan_dahdi/include/asterisk/options.h
    team/jpeeler/chan_dahdi/include/asterisk/zapata.h
    team/jpeeler/chan_dahdi/main/asterisk.c
    team/jpeeler/chan_dahdi/main/channel.c
    team/jpeeler/chan_dahdi/main/features.c
    team/jpeeler/chan_dahdi/main/file.c
    team/jpeeler/chan_dahdi/pbx/pbx_config.c
    team/jpeeler/chan_dahdi/res/res_musiconhold.c
    team/jpeeler/chan_dahdi/utils/extconf.c

Modified: team/jpeeler/chan_dahdi/apps/app_chanisavail.c
URL: http://svn.digium.com/view/asterisk/team/jpeeler/chan_dahdi/apps/app_chanisavail.c?view=diff&rev=118172&r1=118171&r2=118172
==============================================================================
--- team/jpeeler/chan_dahdi/apps/app_chanisavail.c (original)
+++ team/jpeeler/chan_dahdi/apps/app_chanisavail.c Fri May 23 17:29:44 2008
@@ -71,7 +71,7 @@
 	);
 
 	if (ast_strlen_zero(data)) {
-		ast_log(LOG_WARNING, "ChanIsAvail requires an argument (Zap/1&Zap/2)\n");
+		ast_log(LOG_WARNING, "ChanIsAvail requires an argument (DAHDI/1&DAHDI/2)\n");
 		return -1;
 	}
 

Modified: team/jpeeler/chan_dahdi/apps/app_dial.c
URL: http://svn.digium.com/view/asterisk/team/jpeeler/chan_dahdi/apps/app_dial.c?view=diff&rev=118172&r1=118171&r2=118172
==============================================================================
--- team/jpeeler/chan_dahdi/apps/app_dial.c (original)
+++ team/jpeeler/chan_dahdi/apps/app_dial.c Fri May 23 17:29:44 2008
@@ -171,8 +171,8 @@
 "    o    - Specify that the CallerID that was present on the *calling* channel\n"
 "           be set as the CallerID on the *called* channel. This was the\n"
 "           behavior of Asterisk 1.0 and earlier.\n"
-"    O([x]) - \"Operator Services\" mode (Zaptel channel to Zaptel channel\n"
-"             only, if specified on non-Zaptel interface, it will be ignored).\n"
+"    O([x]) - \"Operator Services\" mode (DAHDI channel to DAHDI channel\n"
+"             only, if specified on non-DAHDI interface, it will be ignored).\n"
 "             When the destination answers (presumably an operator services\n"
 "             station), the originator no longer has control of their line.\n"
 "             They may hang up, but the switch will not release their line\n"
@@ -1895,9 +1895,9 @@
 				res = -1;
 				goto done;
 			}
-			if (opermode && !strncmp(chan->name, "Zap", 3) && !strncmp(peer->name, "Zap", 3)) {
-				/* what's this special handling for Zap <-> Zap ?
-				 * A: Zap to Zap calls are natively bridged at the kernel driver
+			if (opermode && !strncmp(chan->name, "dahdi", 3) && !strncmp(peer->name, "dahdi", 3)) {
+				/* what's this special handling for dahdi <-> dahdi ?
+				 * A: dahdi to dahdi calls are natively bridged at the kernel driver
 				 * level, so we need to ensure that this mode gets propagated
 				 * all the way down. */
 				struct oprmode oprmode;

Modified: team/jpeeler/chan_dahdi/apps/app_flash.c
URL: http://svn.digium.com/view/asterisk/team/jpeeler/chan_dahdi/apps/app_flash.c?view=diff&rev=118172&r1=118171&r2=118172
==============================================================================
--- team/jpeeler/chan_dahdi/apps/app_flash.c (original)
+++ team/jpeeler/chan_dahdi/apps/app_flash.c Fri May 23 17:29:44 2008
@@ -18,7 +18,7 @@
 
 /*! \file
  *
- * \brief App to flash a zap trunk
+ * \brief App to flash a DAHDI trunk
  *
  * \author Mark Spencer <markster at digium.com>
  * 
@@ -26,7 +26,7 @@
  */
  
 /*** MODULEINFO
-	<depend>zaptel</depend>
+	<depend>dahdi</depend>
  ***/
 
 #include "asterisk.h"
@@ -45,18 +45,18 @@
 
 static char *app = "Flash";
 
-static char *synopsis = "Flashes a Zap Trunk";
+static char *synopsis = "Flashes a DAHDI Trunk";
 
 static char *descrip = 
-"Performs a flash on a zap trunk.  This can be used\n"
+"Performs a flash on a DAHDI trunk.  This can be used\n"
 "to access features provided on an incoming analogue circuit\n"
 "such as conference and call waiting. Use with SendDTMF() to\n"
 "perform external transfers\n";
 
 
-static inline int zt_wait_event(int fd)
+static inline int dahdi_wait_event(int fd)
 {
-	/* Avoid the silly zt_waitevent which ignores a bunch of events */
+	/* Avoid the silly dahdi_waitevent which ignores a bunch of events */
 	int i,j=0;
 	i = DAHDI_IOMUX_SIGEVENT;
 	if (ioctl(fd, DAHDI_IOMUX, &i) == -1) return -1;
@@ -68,23 +68,23 @@
 {
 	int res = -1;
 	int x;
-	struct zt_params ztp;
+	struct dahdi_params dahdip;
 
-	if (strcasecmp(chan->tech->type, "Zap")) {
-		ast_log(LOG_WARNING, "%s is not a Zap channel\n", chan->name);
+	if (strcasecmp(chan->tech->type, "dahdi")) {
+		ast_log(LOG_WARNING, "%s is not a DAHDI channel\n", chan->name);
 		return -1;
 	}
 	
-	memset(&ztp, 0, sizeof(ztp));
-	res = ioctl(chan->fds[0], DAHDI_GET_PARAMS, &ztp);
+	memset(&dahdip, 0, sizeof(dahdip));
+	res = ioctl(chan->fds[0], DAHDI_GET_PARAMS, &dahdip);
 	if (!res) {
-		if (ztp.sigtype & __DAHDI_SIG_FXS) {
+		if (dahdip.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 */
-					zt_wait_event(chan->fds[0]);
+					dahdi_wait_event(chan->fds[0]);
 				}
 				res = ast_safe_sleep(chan, 1000);
 				ast_verb(3, "Flashed channel %s\n", chan->name);

Modified: team/jpeeler/chan_dahdi/apps/app_meetme.c
URL: http://svn.digium.com/view/asterisk/team/jpeeler/chan_dahdi/apps/app_meetme.c?view=diff&rev=118172&r1=118171&r2=118172
==============================================================================
--- team/jpeeler/chan_dahdi/apps/app_meetme.c (original)
+++ team/jpeeler/chan_dahdi/apps/app_meetme.c Fri May 23 17:29:44 2008
@@ -30,7 +30,7 @@
  */
 
 /*** MODULEINFO
-	<depend>zaptel</depend>
+	<depend>dahdi</depend>
  ***/
 
 #include "asterisk.h"
@@ -228,15 +228,15 @@
 "conference.  If the conference number is omitted, the user will be prompted\n"
 "to enter one.  User can exit the conference by hangup, or if the 'p' option\n"
 "is specified, by pressing '#'.\n"
-"Please note: The Zaptel kernel modules and at least one hardware driver (or ztdummy)\n"
-"             must be present for conferencing to operate properly. In addition, the chan_zap\n"
+"Please note: The DAHDI kernel modules and at least one hardware driver (or dahdi_dummy)\n"
+"             must be present for conferencing to operate properly. In addition, the chan_dahdi\n"
 "             channel driver must be loaded for the 'i' and 'r' options to operate at all.\n\n"
 "The option string may contain zero or more of the following characters:\n"
 "      'a' -- set admin mode\n"
 "      'A' -- set marked mode\n"
 "      'b' -- run AGI script specified in ${MEETME_AGI_BACKGROUND}\n"
 "             Default: conf-background.agi  (Note: This does not work with\n"
-"             non-Zap channels in the same conference)\n"
+"             non-DAHDI channels in the same conference)\n"
 "      'c' -- announce user(s) count on joining a conference\n"
 "      'C' -- continue in dialplan when kicked out of conference\n"
 "      'd' -- dynamically add conference\n"
@@ -361,7 +361,7 @@
 	struct ast_channel *chan;               /*!< Announcements channel */
 	struct ast_channel *lchan;              /*!< Listen/Record channel */
 	int fd;                                 /*!< Announcements fd */
-	int zapconf;                            /*!< Zaptel Conf # */
+	int dahdiconf;                            /*!< DAHDI Conf # */
 	int users;                              /*!< Number of active users */
 	int markedusers;                        /*!< Number of marked users */
 	int maxusers;                           /*!< Participant limit if scheduled */
@@ -403,7 +403,7 @@
 	int adminflags;                         /*!< Flags set by the Admin */
 	struct ast_channel *chan;               /*!< Connected channel */
 	int talking;                            /*!< Is user talking */
-	int zapchannel;                         /*!< Is a Zaptel channel */
+	int dahdichannel;                         /*!< Is a DAHDI channel */
 	char usrvalue[50];                      /*!< Custom User Value */
 	char namerecloc[PATH_MAX];				/*!< Name Recorded file Location */
 	time_t jointime;                        /*!< Time the user joined the conference */
@@ -801,7 +801,7 @@
 static struct ast_conference *build_conf(char *confno, char *pin, char *pinadmin, int make, int dynamic, int refcount, const struct ast_channel *chan)
 {
 	struct ast_conference *cnf;
-	struct zt_confinfo ztc = { 0, };
+	struct dahdi_confinfo dahdic = { 0, };
 	int confno_int = 0;
 
 	AST_LIST_LOCK(&confs);
@@ -827,11 +827,11 @@
 	ast_copy_string(cnf->pinadmin, pinadmin, sizeof(cnf->pinadmin));
 	ast_copy_string(cnf->uniqueid, chan->uniqueid, sizeof(cnf->uniqueid));
 
-	/* Setup a new zap conference */
-	ztc.confno = -1;
-	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)) {
+	/* Setup a new dahdi conference */
+	dahdic.confno = -1;
+	dahdic.confmode = DAHDI_CONF_CONFANN | DAHDI_CONF_CONFANNMON;
+	cnf->fd = open("/dev/dahdi/pseudo", O_RDWR);
+	if (cnf->fd < 0 || ioctl(cnf->fd, DAHDI_SETCONF, &dahdic)) {
 		ast_log(LOG_WARNING, "Unable to open pseudo device\n");
 		if (cnf->fd >= 0)
 			close(cnf->fd);
@@ -840,17 +840,17 @@
 		goto cnfout;
 	}
 
-	cnf->zapconf = ztc.confno;
+	cnf->dahdiconf = dahdic.confno;
 
 	/* Setup a new channel for playback of audio files */
-	cnf->chan = ast_request("zap", AST_FORMAT_SLINEAR, "pseudo", NULL);
+	cnf->chan = ast_request("dahdi", AST_FORMAT_SLINEAR, "pseudo", NULL);
 	if (cnf->chan) {
 		ast_set_read_format(cnf->chan, AST_FORMAT_SLINEAR);
 		ast_set_write_format(cnf->chan, AST_FORMAT_SLINEAR);
-		ztc.chan = 0;
-		ztc.confno = cnf->zapconf;
-		ztc.confmode = DAHDI_CONF_CONFANN | DAHDI_CONF_CONFANNMON;
-		if (ioctl(cnf->chan->fds[0], DAHDI_SETCONF, &ztc)) {
+		dahdic.chan = 0;
+		dahdic.confno = cnf->dahdiconf;
+		dahdic.confmode = DAHDI_CONF_CONFANN | DAHDI_CONF_CONFANNMON;
+		if (ioctl(cnf->chan->fds[0], DAHDI_SETCONF, &dahdic)) {
 			ast_log(LOG_WARNING, "Error setting conference\n");
 			if (cnf->chan)
 				ast_hangup(cnf->chan);
@@ -867,7 +867,7 @@
 	cnf->start = time(NULL);
 	cnf->maxusers = 0x7fffffff;
 	cnf->isdynamic = dynamic ? 1 : 0;
-	ast_verb(3, "Created MeetMe conference %d for conference '%s'\n", cnf->zapconf, cnf->confno);
+	ast_verb(3, "Created MeetMe conference %d for conference '%s'\n", cnf->dahdiconf, cnf->confno);
 	AST_LIST_INSERT_HEAD(&confs, cnf, list);
 
 	/* Reserve conference number in map */
@@ -1484,7 +1484,7 @@
 	struct ast_conf_user *user = NULL;
 	struct ast_conf_user *usr = NULL;
 	int fd;
-	struct zt_confinfo ztc, ztc_empty;
+	struct dahdi_confinfo dahdic, dahdic_empty;
 	struct ast_frame *f;
 	struct ast_channel *c;
 	struct ast_frame fr;
@@ -1493,7 +1493,7 @@
 	int nfds;
 	int res;
 	int flags;
-	int retryzap;
+	int retrydahdi;
 	int origfd;
 	int musiconhold = 0;
 	int firstpass = 0;
@@ -1645,13 +1645,13 @@
 	}
 
 	ast_mutex_lock(&conf->recordthreadlock);
-	if ((conf->recordthread == AST_PTHREADT_NULL) && (confflags & CONFFLAG_RECORDCONF) && ((conf->lchan = ast_request("zap", AST_FORMAT_SLINEAR, "pseudo", NULL)))) {
+	if ((conf->recordthread == AST_PTHREADT_NULL) && (confflags & CONFFLAG_RECORDCONF) && ((conf->lchan = ast_request("dahdi", AST_FORMAT_SLINEAR, "pseudo", NULL)))) {
 		ast_set_read_format(conf->lchan, AST_FORMAT_SLINEAR);
 		ast_set_write_format(conf->lchan, AST_FORMAT_SLINEAR);
-		ztc.chan = 0;
-		ztc.confno = conf->zapconf;
-		ztc.confmode = DAHDI_CONF_CONFANN | DAHDI_CONF_CONFANNMON;
-		if (ioctl(conf->lchan->fds[0], DAHDI_SETCONF, &ztc)) {
+		dahdic.chan = 0;
+		dahdic.confno = conf->dahdiconf;
+		dahdic.confmode = DAHDI_CONF_CONFANN | DAHDI_CONF_CONFANNMON;
+		if (ioctl(conf->lchan->fds[0], DAHDI_SETCONF, &dahdic)) {
 			ast_log(LOG_WARNING, "Error starting listen channel\n");
 			ast_hangup(conf->lchan);
 			conf->lchan = NULL;
@@ -1828,13 +1828,13 @@
 		goto outrun;
 	}
 
-	retryzap = (strcasecmp(chan->tech->type, "Zap") || (chan->audiohooks || chan->monitor) ? 1 : 0);
-	user->zapchannel = !retryzap;
-
- zapretry:
+	retrydahdi = (strcasecmp(chan->tech->type, "dahdi") || (chan->audiohooks || chan->monitor) ? 1 : 0);
+	user->dahdichannel = !retrydahdi;
+
+ dahdiretry:
 	origfd = chan->fds[0];
-	if (retryzap) {
-		fd = open("/dev/zap/pseudo", O_RDWR);
+	if (retrydahdi) {
+		fd = open("/dev/dahdi/pseudo", O_RDWR);
 		if (fd < 0) {
 			ast_log(LOG_WARNING, "Unable to open pseudo channel: %s\n", strerror(errno));
 			goto outrun;
@@ -1875,27 +1875,27 @@
 		fd = chan->fds[0];
 		nfds = 0;
 	}
-	memset(&ztc, 0, sizeof(ztc));
-	memset(&ztc_empty, 0, sizeof(ztc_empty));
+	memset(&dahdic, 0, sizeof(dahdic));
+	memset(&dahdic_empty, 0, sizeof(dahdic_empty));
 	/* Check to see if we're in a conference... */
-	ztc.chan = 0;	
-	if (ioctl(fd, DAHDI_GETCONF, &ztc)) {
+	dahdic.chan = 0;	
+	if (ioctl(fd, DAHDI_GETCONF, &dahdic)) {
 		ast_log(LOG_WARNING, "Error getting conference\n");
 		close(fd);
 		goto outrun;
 	}
-	if (ztc.confmode) {
+	if (dahdic.confmode) {
 		/* Whoa, already in a conference...  Retry... */
-		if (!retryzap) {
-			ast_debug(1, "Zap channel is in a conference already, retrying with pseudo\n");
-			retryzap = 1;
-			goto zapretry;
-		}
-	}
-	memset(&ztc, 0, sizeof(ztc));
+		if (!retrydahdi) {
+			ast_debug(1, "DAHDI channel is in a conference already, retrying with pseudo\n");
+			retrydahdi = 1;
+			goto dahdiretry;
+		}
+	}
+	memset(&dahdic, 0, sizeof(dahdic));
 	/* Add us to the conference */
-	ztc.chan = 0;	
-	ztc.confno = conf->zapconf;
+	dahdic.chan = 0;	
+	dahdic.confno = conf->dahdiconf;
 
 	ast_mutex_lock(&conf->playlock);
 
@@ -1909,21 +1909,21 @@
 	}
 
 	if (confflags & CONFFLAG_WAITMARKED && !conf->markedusers)
-		ztc.confmode = DAHDI_CONF_CONF;
+		dahdic.confmode = DAHDI_CONF_CONF;
 	else if (confflags & CONFFLAG_MONITOR)
-		ztc.confmode = DAHDI_CONF_CONFMON | DAHDI_CONF_LISTENER;
+		dahdic.confmode = DAHDI_CONF_CONFMON | DAHDI_CONF_LISTENER;
 	else if (confflags & CONFFLAG_TALKER)
-		ztc.confmode = DAHDI_CONF_CONF | DAHDI_CONF_TALKER;
+		dahdic.confmode = DAHDI_CONF_CONF | DAHDI_CONF_TALKER;
 	else 
-		ztc.confmode = DAHDI_CONF_CONF | DAHDI_CONF_TALKER | DAHDI_CONF_LISTENER;
-
-	if (ioctl(fd, DAHDI_SETCONF, &ztc)) {
+		dahdic.confmode = DAHDI_CONF_CONF | DAHDI_CONF_TALKER | DAHDI_CONF_LISTENER;
+
+	if (ioctl(fd, DAHDI_SETCONF, &dahdic)) {
 		ast_log(LOG_WARNING, "Error setting conference\n");
 		close(fd);
 		ast_mutex_unlock(&conf->playlock);
 		goto outrun;
 	}
-	ast_debug(1, "Placed channel %s in ZAP conf %d\n", chan->name, conf->zapconf);
+	ast_debug(1, "Placed channel %s in ZAP conf %d\n", chan->name, conf->dahdiconf);
 
 	if (!sent_event) {
 		manager_event(EVENT_FLAG_CALL, "MeetmeJoin", 
@@ -1964,8 +1964,8 @@
 		}
 		ast_channel_unlock(chan);
 		
-		if (user->zapchannel) {
-			/*  Set CONFMUTE mode on Zap channel to mute DTMF tones */
+		if (user->dahdichannel) {
+			/*  Set CONFMUTE mode on DAHDI channel to mute DTMF tones */
 			x = 1;
 			ast_channel_setoption(chan, AST_OPTION_TONE_VERIFY, &x, sizeof(char), 0);
 		}
@@ -1977,14 +1977,14 @@
 			ast_log(LOG_WARNING, "Could not find application (agi)\n");
 			ret = -2;
 		}
-		if (user->zapchannel) {
-			/*  Remove CONFMUTE mode on Zap channel */
+		if (user->dahdichannel) {
+			/*  Remove CONFMUTE mode on DAHDI channel */
 			x = 0;
 			ast_channel_setoption(chan, AST_OPTION_TONE_VERIFY, &x, sizeof(char), 0);
 		}
 	} else {
-		if (user->zapchannel && (confflags & CONFFLAG_STARMENU)) {
-			/*  Set CONFMUTE mode on Zap channel to mute DTMF tones when the menu is enabled */
+		if (user->dahdichannel && (confflags & CONFFLAG_STARMENU)) {
+			/*  Set CONFMUTE mode on DAHDI channel to mute DTMF tones when the menu is enabled */
 			x = 1;
 			ast_channel_setoption(chan, AST_OPTION_TONE_VERIFY, &x, sizeof(char), 0);
 		}	
@@ -2135,8 +2135,8 @@
 								ret = 0;
 							break;
 						} else {
-							ztc.confmode = DAHDI_CONF_CONF;
-							if (ioctl(fd, DAHDI_SETCONF, &ztc)) {
+							dahdic.confmode = DAHDI_CONF_CONF;
+							if (ioctl(fd, DAHDI_SETCONF, &dahdic)) {
 								ast_log(LOG_WARNING, "Error setting conference\n");
 								close(fd);
 								goto outrun;
@@ -2151,12 +2151,12 @@
 					/* Marked user entered, so cancel timeout */
 					timeout = 0;
 					if (confflags & CONFFLAG_MONITOR)
-						ztc.confmode = DAHDI_CONF_CONFMON | DAHDI_CONF_LISTENER;
+						dahdic.confmode = DAHDI_CONF_CONFMON | DAHDI_CONF_LISTENER;
 					else if (confflags & CONFFLAG_TALKER)
-						ztc.confmode = DAHDI_CONF_CONF | DAHDI_CONF_TALKER;
+						dahdic.confmode = DAHDI_CONF_CONF | DAHDI_CONF_TALKER;
 					else
-						ztc.confmode = DAHDI_CONF_CONF | DAHDI_CONF_TALKER | DAHDI_CONF_LISTENER;
-					if (ioctl(fd, DAHDI_SETCONF, &ztc)) {
+						dahdic.confmode = DAHDI_CONF_CONF | DAHDI_CONF_TALKER | DAHDI_CONF_LISTENER;
+					if (ioctl(fd, DAHDI_SETCONF, &dahdic)) {
 						ast_log(LOG_WARNING, "Error setting conference\n");
 						close(fd);
 						goto outrun;
@@ -2200,9 +2200,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 & DAHDI_CONF_TALKER)) {
-				ztc.confmode ^= DAHDI_CONF_TALKER;
-				if (ioctl(fd, DAHDI_SETCONF, &ztc)) {
+			if ((user->adminflags & (ADMINFLAG_MUTED | ADMINFLAG_SELFMUTED)) && (dahdic.confmode & DAHDI_CONF_TALKER)) {
+				dahdic.confmode ^= DAHDI_CONF_TALKER;
+				if (ioctl(fd, DAHDI_SETCONF, &dahdic)) {
 					ast_log(LOG_WARNING, "Error setting conference - Un/Mute \n");
 					ret = -1;
 					break;
@@ -2218,9 +2218,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 & DAHDI_CONF_TALKER)) {
-				ztc.confmode |= DAHDI_CONF_TALKER;
-				if (ioctl(fd, DAHDI_SETCONF, &ztc)) {
+			if (!(user->adminflags & (ADMINFLAG_MUTED | ADMINFLAG_SELFMUTED)) && !(confflags & CONFFLAG_MONITOR) && !(dahdic.confmode & DAHDI_CONF_TALKER)) {
+				dahdic.confmode |= DAHDI_CONF_TALKER;
+				if (ioctl(fd, DAHDI_SETCONF, &dahdic)) {
 					ast_log(LOG_WARNING, "Error setting conference - Un/Mute \n");
 					ret = -1;
 					break;
@@ -2277,16 +2277,16 @@
 				break;
 
 			if (c) {
-				if (c->fds[0] != origfd || (user->zapchannel && (c->audiohooks || c->monitor))) {
+				if (c->fds[0] != origfd || (user->dahdichannel && (c->audiohooks || c->monitor))) {
 					if (using_pseudo) {
 						/* Kill old pseudo */
 						close(fd);
 						using_pseudo = 0;
 					}
 					ast_debug(1, "Ooh, something swapped out under us, starting over\n");
-					retryzap = (strcasecmp(c->tech->type, "Zap") || (c->audiohooks || c->monitor) ? 1 : 0);
-					user->zapchannel = !retryzap;
-					goto zapretry;
+					retrydahdi = (strcasecmp(c->tech->type, "dahdi") || (c->audiohooks || c->monitor) ? 1 : 0);
+					user->dahdichannel = !retrydahdi;
+					goto dahdiretry;
 				}
 				if ((confflags & CONFFLAG_MONITOR) || (user->adminflags & (ADMINFLAG_MUTED | ADMINFLAG_SELFMUTED)))
 					f = ast_read_noaudio(c);
@@ -2376,7 +2376,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, DAHDI_SETCONF, &ztc_empty)) {
+					if (ioctl(fd, DAHDI_SETCONF, &dahdic_empty)) {
 						ast_log(LOG_WARNING, "Error setting conference\n");
 						close(fd);
 						ast_frfree(f);
@@ -2531,7 +2531,7 @@
 					if (musiconhold)
 						conf_start_moh(chan, optargs[OPT_ARG_MOH_CLASS]);
 
-					if (ioctl(fd, DAHDI_SETCONF, &ztc)) {
+					if (ioctl(fd, DAHDI_SETCONF, &dahdic)) {
 						ast_log(LOG_WARNING, "Error setting conference\n");
 						close(fd);
 						ast_frfree(f);
@@ -2622,10 +2622,10 @@
 		close(fd);
 	else {
 		/* Take out of conference */
-		ztc.chan = 0;	
-		ztc.confno = 0;
-		ztc.confmode = 0;
-		if (ioctl(fd, DAHDI_SETCONF, &ztc)) {
+		dahdic.chan = 0;	
+		dahdic.confno = 0;
+		dahdic.confmode = 0;
+		if (ioctl(fd, DAHDI_SETCONF, &dahdic)) {
 			ast_log(LOG_WARNING, "Error setting conference\n");
 		}
 	}
@@ -2827,13 +2827,13 @@
 		if (confflags && !cnf->chan &&
 		    !ast_test_flag(confflags, CONFFLAG_QUIET) &&
 		    ast_test_flag(confflags, CONFFLAG_INTROUSER)) {
-			ast_log(LOG_WARNING, "No Zap channel available for conference, user introduction disabled (is chan_zap loaded?)\n");
+			ast_log(LOG_WARNING, "No DAHDI channel available for conference, user introduction disabled (is chan_dahdi loaded?)\n");
 			ast_clear_flag(confflags, CONFFLAG_INTROUSER);
 		}
 		
 		if (confflags && !cnf->chan &&
 		    ast_test_flag(confflags, CONFFLAG_RECORDCONF)) {
-			ast_log(LOG_WARNING, "No Zap channel available for conference, conference recording disabled (is chan_zap loaded?)\n");
+			ast_log(LOG_WARNING, "No DAHDI channel available for conference, conference recording disabled (is chan_dahdi loaded?)\n");
 			ast_clear_flag(confflags, CONFFLAG_RECORDCONF);
 		}
 	}
@@ -2925,13 +2925,13 @@
 		if (confflags && !cnf->chan &&
 		    !ast_test_flag(confflags, CONFFLAG_QUIET) &&
 		    ast_test_flag(confflags, CONFFLAG_INTROUSER)) {
-			ast_log(LOG_WARNING, "No Zap channel available for conference, user introduction disabled (is chan_zap loaded?)\n");
+			ast_log(LOG_WARNING, "No DAHDI channel available for conference, user introduction disabled (is chan_dahdi loaded?)\n");
 			ast_clear_flag(confflags, CONFFLAG_INTROUSER);
 		}
 		
 		if (confflags && !cnf->chan &&
 		    ast_test_flag(confflags, CONFFLAG_RECORDCONF)) {
-			ast_log(LOG_WARNING, "No Zap channel available for conference, conference recording disabled (is chan_zap loaded?)\n");
+			ast_log(LOG_WARNING, "No DAHDI channel available for conference, conference recording disabled (is chan_dahdi loaded?)\n");
 			ast_clear_flag(confflags, CONFFLAG_RECORDCONF);
 		}
 	}

Modified: team/jpeeler/chan_dahdi/apps/app_queue.c
URL: http://svn.digium.com/view/asterisk/team/jpeeler/chan_dahdi/apps/app_queue.c?view=diff&rev=118172&r1=118171&r2=118172
==============================================================================
--- team/jpeeler/chan_dahdi/apps/app_queue.c (original)
+++ team/jpeeler/chan_dahdi/apps/app_queue.c Fri May 23 17:29:44 2008
@@ -3316,9 +3316,9 @@
 		/* Ah ha!  Someone answered within the desired timeframe.  Of course after this
 		   we will always return with -1 so that it is hung up properly after the
 		   conversation.  */
-		if (!strcmp(qe->chan->tech->type, "Zap"))
+		if (!strcmp(qe->chan->tech->type, "dahdi"))
 			ast_channel_setoption(qe->chan, AST_OPTION_TONE_VERIFY, &nondataquality, sizeof(nondataquality), 0);
-		if (!strcmp(peer->tech->type, "Zap"))
+		if (!strcmp(peer->tech->type, "dahdi"))
 			ast_channel_setoption(peer, AST_OPTION_TONE_VERIFY, &nondataquality, sizeof(nondataquality), 0);
 		/* Update parameters for the queue */
 		time(&now);

Modified: team/jpeeler/chan_dahdi/apps/app_rpt.c
URL: http://svn.digium.com/view/asterisk/team/jpeeler/chan_dahdi/apps/app_rpt.c?view=diff&rev=118172&r1=118171&r2=118172
==============================================================================
--- team/jpeeler/chan_dahdi/apps/app_rpt.c (original)
+++ team/jpeeler/chan_dahdi/apps/app_rpt.c Fri May 23 17:29:44 2008
@@ -152,7 +152,7 @@
 */
 
 /*** MODULEINFO
-	<depend>zaptel</depend>
+	<depend>dahdi</depend>
 	<depend>tonezone</depend>
 	<defaultenabled>no</defaultenabled>
  ***/
@@ -763,7 +763,7 @@
 	int  parrottimer;
 	unsigned int parrotcnt;
 	struct ast_channel *rxchannel,*txchannel, *monchannel, *parrotchannel;
-	struct ast_channel *pchannel,*txpchannel, *zaprxchannel, *zaptxchannel;
+	struct ast_channel *pchannel,*txpchannel, *dahdirxchannel, *dahditxchannel;
 	struct ast_channel *voxchannel;
 	struct ast_frame *lastf1,*lastf2;
 	struct rpt_tele tele;
@@ -3601,7 +3601,7 @@
 	ast_stopstream(chan);
 	
 	/*
-	* Wait for the zaptel driver to physically write the tone blocks to the hardware
+	* Wait for the DAHDI driver to physically write the tone blocks to the hardware
 	*/
 
 	for(i = 0; i < 20 ; i++){
@@ -3658,7 +3658,7 @@
 	ast_stopstream(chan);
 
 	/*
-	* Wait for the zaptel driver to physically write the tone blocks to the hardware
+	* Wait for the DAHDI driver to physically write the tone blocks to the hardware
 	*/
 
 	for(i = 0; i < 20 ; i++){
@@ -3954,7 +3954,7 @@
 char mhz[MAXREMSTR];
 char decimals[MAXREMSTR];
 char	mystr[200];
-struct zt_params par;
+struct dahdi_params par;
 
 
 	/* get a pointer to myrpt */
@@ -4002,7 +4002,7 @@
 
 
 	/* allocate a pseudo-channel thru asterisk */
-	mychannel = ast_request("zap",AST_FORMAT_SLINEAR,"pseudo",NULL);
+	mychannel = ast_request("dahdi",AST_FORMAT_SLINEAR,"pseudo",NULL);
 	if (!mychannel)
 	{
 		fprintf(stderr,"rpt:Sorry unable to obtain pseudo channel\n");
@@ -4513,14 +4513,14 @@
 			if (myrpt->iofd < 0)
 			{
 				i = DAHDI_FLUSH_EVENT;
-				if (ioctl(myrpt->zaptxchannel->fds[0],DAHDI_FLUSH,&i) == -1)
+				if (ioctl(myrpt->dahditxchannel->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],DAHDI_GET_PARAMS,&par) == -1)
+				if (ioctl(myrpt->dahdirxchannel->fds[0],DAHDI_GET_PARAMS,&par) == -1)
 				{
 					ast_mutex_unlock(&myrpt->remlock);
 					ast_log(LOG_ERROR,"Cant get params");
@@ -5293,7 +5293,7 @@
 
 	myrpt->mydtmf = 0;
 	/* allocate a pseudo-channel thru asterisk */
-	mychannel = ast_request("zap",AST_FORMAT_SLINEAR,"pseudo",NULL);
+	mychannel = ast_request("dahdi",AST_FORMAT_SLINEAR,"pseudo",NULL);
 	if (!mychannel)
 	{
 		fprintf(stderr,"rpt:Sorry unable to obtain pseudo channel\n");
@@ -5319,7 +5319,7 @@
 		pthread_exit(NULL);
 	}
 	/* allocate a pseudo-channel thru asterisk */
-	genchannel = ast_request("zap",AST_FORMAT_SLINEAR,"pseudo",NULL);
+	genchannel = ast_request("dahdi",AST_FORMAT_SLINEAR,"pseudo",NULL);
 	if (!genchannel)
 	{
 		fprintf(stderr,"rpt:Sorry unable to obtain pseudo channel\n");
@@ -5829,7 +5829,7 @@
 		return -1;
 	}
 	/* allocate a pseudo-channel thru asterisk */
-	l->pchan = ast_request("zap",AST_FORMAT_SLINEAR,"pseudo",NULL);
+	l->pchan = ast_request("dahdi",AST_FORMAT_SLINEAR,"pseudo",NULL);
 	if (!l->pchan){
 		ast_log(LOG_WARNING,"rpt connect: Sorry unable to obtain pseudo channel\n");
 		ast_hangup(l->chan);
@@ -7384,22 +7384,22 @@
 
 static void rbi_out(struct rpt *myrpt,unsigned char *data)
 {
-struct zt_radio_param r;
-
-	memset(&r,0,sizeof(struct zt_radio_param));
+struct dahdi_radio_param r;
+
+	memset(&r,0,sizeof(struct dahdi_radio_param));
 	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],DAHDI_RADIO_SETPARAM,&r) == -1)
+	if (ioctl(myrpt->dahdirxchannel->fds[0],DAHDI_RADIO_SETPARAM,&r) == -1)
 	{
 		rbi_out_parallel(myrpt,data);
 		return;
 	}
 	r.radpar = DAHDI_RADPAR_REMCOMMAND;
 	memcpy(&r.data,data,5);
-	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);
+	if (ioctl(myrpt->dahdirxchannel->fds[0],DAHDI_RADIO_SETPARAM,&r) == -1)
+	{
+		ast_log(LOG_WARNING,"Cannot send RBI command for channel %s\n",myrpt->dahdirxchannel->name);
 		return;
 	}
 }
@@ -7408,7 +7408,7 @@
 	unsigned char *rxbuf, int rxmaxbytes, int asciiflag)
 {
 	int i,j,index,oldmode,olddata;
-	struct zt_radio_param prm;
+	struct dahdi_radio_param prm;
 	char c;
 
 	 if(debug) {
@@ -7453,30 +7453,30 @@
 		return(i);
 	}
 
-	/* if not a zap channel, cant use pciradio stuff */
-	if (myrpt->rxchannel != myrpt->zaprxchannel) return -1;	
+	/* if not a DAHDI channel, cant use pciradio stuff */
+	if (myrpt->rxchannel != myrpt->dahdirxchannel) return -1;	
 
 	prm.radpar = DAHDI_RADPAR_UIOMODE;
-	if (ioctl(myrpt->zaprxchannel->fds[0],DAHDI_RADIO_GETPARAM,&prm) == -1) return -1;
+	if (ioctl(myrpt->dahdirxchannel->fds[0],DAHDI_RADIO_GETPARAM,&prm) == -1) return -1;
 	oldmode = prm.data;
 	prm.radpar = DAHDI_RADPAR_UIODATA;
-	if (ioctl(myrpt->zaprxchannel->fds[0],DAHDI_RADIO_GETPARAM,&prm) == -1) return -1;
+	if (ioctl(myrpt->dahdirxchannel->fds[0],DAHDI_RADIO_GETPARAM,&prm) == -1) return -1;
 	olddata = prm.data;
         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 (ioctl(myrpt->dahdirxchannel->fds[0],DAHDI_RADIO_SETPARAM,&prm) == -1) return -1;
 	if (asciiflag & 2)
 	{
 		i = DAHDI_ONHOOK;
-		if (ioctl(myrpt->zaprxchannel->fds[0],DAHDI_HOOK,&i) == -1) return -1;
+		if (ioctl(myrpt->dahdirxchannel->fds[0],DAHDI_HOOK,&i) == -1) return -1;
 		usleep(100000);
 	}
         prm.radpar = DAHDI_RADPAR_REMCOMMAND;
         prm.data = rxmaxbytes;
         memcpy(prm.buf,txbuf,txbytes);
         prm.index = txbytes;
-	if (ioctl(myrpt->zaprxchannel->fds[0],DAHDI_RADIO_SETPARAM,&prm) == -1) return -1;
+	if (ioctl(myrpt->dahdirxchannel->fds[0],DAHDI_RADIO_SETPARAM,&prm) == -1) return -1;
         if (rxbuf)
         {
                 *rxbuf = 0;
@@ -7485,18 +7485,18 @@
 	index = prm.index;
         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 (ioctl(myrpt->dahdirxchannel->fds[0],DAHDI_RADIO_SETPARAM,&prm) == -1) return -1;
 	if (asciiflag & 2)
 	{
 		i = DAHDI_OFFHOOK;
-		if (ioctl(myrpt->zaprxchannel->fds[0],DAHDI_HOOK,&i) == -1) return -1;
+		if (ioctl(myrpt->dahdirxchannel->fds[0],DAHDI_HOOK,&i) == -1) return -1;
 	}
 	prm.radpar = DAHDI_RADPAR_UIOMODE;
 	prm.data = oldmode;
-	if (ioctl(myrpt->zaprxchannel->fds[0],DAHDI_RADIO_SETPARAM,&prm) == -1) return -1;
+	if (ioctl(myrpt->dahdirxchannel->fds[0],DAHDI_RADIO_SETPARAM,&prm) == -1) return -1;
 	prm.radpar = DAHDI_RADPAR_UIODATA;
 	prm.data = olddata;
-	if (ioctl(myrpt->zaprxchannel->fds[0],DAHDI_RADIO_SETPARAM,&prm) == -1) return -1;
+	if (ioctl(myrpt->dahdirxchannel->fds[0],DAHDI_RADIO_SETPARAM,&prm) == -1) return -1;
         return(index);
 }
 
@@ -10782,9 +10782,9 @@
 	}
 	*tele++ = 0;
 	myrpt->rxchannel = ast_request(tmpstr,AST_FORMAT_SLINEAR,tele,NULL);
-	myrpt->zaprxchannel = NULL;
+	myrpt->dahdirxchannel = NULL;
 	if (!strcasecmp(tmpstr,"Zap"))
-		myrpt->zaprxchannel = myrpt->rxchannel;
+		myrpt->dahdirxchannel = myrpt->rxchannel;
 	if (myrpt->rxchannel)
 	{
 		if (myrpt->rxchannel->_state == AST_STATE_BUSY)
@@ -10825,7 +10825,7 @@
 		myrpt->rpt_thread = AST_PTHREADT_STOP;
 		pthread_exit(NULL);
 	}
-	myrpt->zaptxchannel = NULL;
+	myrpt->dahditxchannel = NULL;
 	if (myrpt->txchanname)
 	{
 		strncpy(tmpstr,myrpt->txchanname,sizeof(tmpstr) - 1);
@@ -10841,7 +10841,7 @@
 		*tele++ = 0;
 		myrpt->txchannel = ast_request(tmpstr,AST_FORMAT_SLINEAR,tele,NULL);
 		if (!strcasecmp(tmpstr,"Zap"))
-			myrpt->zaptxchannel = myrpt->txchannel;
+			myrpt->dahditxchannel = myrpt->txchannel;
 		if (myrpt->txchannel)
 		{
 			if (myrpt->txchannel->_state == AST_STATE_BUSY)
@@ -10890,12 +10890,12 @@
 	{
 		myrpt->txchannel = myrpt->rxchannel;
 		if (!strncasecmp(myrpt->rxchanname,"Zap",3))
-			myrpt->zaptxchannel = myrpt->txchannel;
+			myrpt->dahditxchannel = myrpt->txchannel;
 	}
 	ast_indicate(myrpt->txchannel,AST_CONTROL_RADIO_KEY);
 	ast_indicate(myrpt->txchannel,AST_CONTROL_RADIO_UNKEY);
 	/* allocate a pseudo-channel thru asterisk */
-	myrpt->pchannel = ast_request("zap",AST_FORMAT_SLINEAR,"pseudo",NULL);
+	myrpt->pchannel = ast_request("dahdi",AST_FORMAT_SLINEAR,"pseudo",NULL);
 	if (!myrpt->pchannel)
 	{
 		fprintf(stderr,"rpt:Sorry unable to obtain pseudo channel\n");
@@ -10910,12 +10910,12 @@
 	if (myrpt->pchannel->cdr)
 		ast_set_flag(myrpt->pchannel->cdr,AST_CDR_FLAG_POST_DISABLED);
 #endif
-	if (!myrpt->zaprxchannel) myrpt->zaprxchannel = myrpt->pchannel;
-	if (!myrpt->zaptxchannel)
+	if (!myrpt->dahdirxchannel) myrpt->dahdirxchannel = myrpt->pchannel;
+	if (!myrpt->dahditxchannel)
 	{
 		/* allocate a pseudo-channel thru asterisk */
-		myrpt->zaptxchannel = ast_request("zap",AST_FORMAT_SLINEAR,"pseudo",NULL);
-		if (!myrpt->zaptxchannel)
+		myrpt->dahditxchannel = ast_request("dahdi",AST_FORMAT_SLINEAR,"pseudo",NULL);
+		if (!myrpt->dahditxchannel)
 		{
 			fprintf(stderr,"rpt:Sorry unable to obtain pseudo channel\n");
 			rpt_mutex_unlock(&myrpt->lock);
@@ -10925,15 +10925,15 @@
 			myrpt->rpt_thread = AST_PTHREADT_STOP;
 			pthread_exit(NULL);
 		}
-		ast_set_read_format(myrpt->zaptxchannel,AST_FORMAT_SLINEAR);
-		ast_set_write_format(myrpt->zaptxchannel,AST_FORMAT_SLINEAR);
+		ast_set_read_format(myrpt->dahditxchannel,AST_FORMAT_SLINEAR);
+		ast_set_write_format(myrpt->dahditxchannel,AST_FORMAT_SLINEAR);
 #ifdef	AST_CDR_FLAG_POST_DISABLED
-		if (myrpt->zaptxchannel->cdr)
-			ast_set_flag(myrpt->zaptxchannel->cdr,AST_CDR_FLAG_POST_DISABLED);
+		if (myrpt->dahditxchannel->cdr)
+			ast_set_flag(myrpt->dahditxchannel->cdr,AST_CDR_FLAG_POST_DISABLED);
 #endif
 	}
 	/* allocate a pseudo-channel thru asterisk */
-	myrpt->monchannel = ast_request("zap",AST_FORMAT_SLINEAR,"pseudo",NULL);
+	myrpt->monchannel = ast_request("dahdi",AST_FORMAT_SLINEAR,"pseudo",NULL);
 	if (!myrpt->monchannel)
 	{
 		fprintf(stderr,"rpt:Sorry unable to obtain pseudo channel\n");
@@ -10955,7 +10955,7 @@
 	ci.confno = -1; /* make a new conf */
 	ci.confmode = DAHDI_CONF_CONF | DAHDI_CONF_LISTENER;
 	/* first put the channel on the conference in proper mode */
-	if (ioctl(myrpt->zaptxchannel->fds[0],DAHDI_SETCONF,&ci) == -1)
+	if (ioctl(myrpt->dahditxchannel->fds[0],DAHDI_SETCONF,&ci) == -1)
 	{
 		ast_log(LOG_WARNING, "Unable to set conference mode to Announce\n");
 		rpt_mutex_unlock(&myrpt->lock);
@@ -10992,7 +10992,7 @@
 	/* make a conference for the pseudo */
 	ci.chan = 0;
 	if ((strstr(myrpt->txchannel->name,"pseudo") == NULL) &&
-		(myrpt->zaptxchannel == myrpt->txchannel))
+		(myrpt->dahditxchannel == myrpt->txchannel))
 	{
 		/* get tx channel's port number */
 		if (ioctl(myrpt->txchannel->fds[0],DAHDI_CHANNO,&ci.confno) == -1)
@@ -11028,7 +11028,7 @@
 		pthread_exit(NULL);
 	}
 	/* allocate a pseudo-channel thru asterisk */
-	myrpt->parrotchannel = ast_request("zap",AST_FORMAT_SLINEAR,"pseudo",NULL);
+	myrpt->parrotchannel = ast_request("dahdi",AST_FORMAT_SLINEAR,"pseudo",NULL);
 	if (!myrpt->parrotchannel)
 	{
 		fprintf(stderr,"rpt:Sorry unable to obtain pseudo channel\n");
@@ -11046,7 +11046,7 @@
 		ast_set_flag(myrpt->parrotchannel->cdr,AST_CDR_FLAG_POST_DISABLED);
 #endif
 	/* allocate a pseudo-channel thru asterisk */
-	myrpt->voxchannel = ast_request("zap",AST_FORMAT_SLINEAR,"pseudo",NULL);
+	myrpt->voxchannel = ast_request("dahdi",AST_FORMAT_SLINEAR,"pseudo",NULL);
 	if (!myrpt->voxchannel)
 	{
 		fprintf(stderr,"rpt:Sorry unable to obtain pseudo channel\n");
@@ -11064,7 +11064,7 @@
 		ast_set_flag(myrpt->voxchannel->cdr,AST_CDR_FLAG_POST_DISABLED);
 #endif
 	/* allocate a pseudo-channel thru asterisk */
-	myrpt->txpchannel = ast_request("zap",AST_FORMAT_SLINEAR,"pseudo",NULL);
+	myrpt->txpchannel = ast_request("dahdi",AST_FORMAT_SLINEAR,"pseudo",NULL);
 	if (!myrpt->txpchannel)
 	{
 		fprintf(stderr,"rpt:Sorry unable to obtain pseudo channel\n");
@@ -11179,8 +11179,8 @@
 
 		/* DEBUG Dump */
 		if((myrpt->disgorgetime) && (time(NULL) >= myrpt->disgorgetime)){
-			struct rpt_link *zl;
-			struct rpt_tele *zt;
+			struct rpt_link *dl;
+			struct rpt_tele *dt;
 
 			myrpt->disgorgetime = 0;
 			ast_log(LOG_NOTICE,"********** Variable Dump Start (app_rpt) **********\n");
@@ -11201,30 +11201,30 @@
 			ast_log(LOG_NOTICE,"myrpt->tailtimer = %d\n",myrpt->tailtimer);
 			ast_log(LOG_NOTICE,"myrpt->tailevent = %d\n",myrpt->tailevent);
 
-			zl = myrpt->links.next;
-              		while(zl != &myrpt->links){
-				ast_log(LOG_NOTICE,"*** Link Name: %s ***\n",zl->name);
-				ast_log(LOG_NOTICE,"        link->lasttx %d\n",zl->lasttx);
-				ast_log(LOG_NOTICE,"        link->lastrx %d\n",zl->lastrx);
-				ast_log(LOG_NOTICE,"        link->connected %d\n",zl->connected);
-				ast_log(LOG_NOTICE,"        link->hasconnected %d\n",zl->hasconnected);
-				ast_log(LOG_NOTICE,"        link->outbound %d\n",zl->outbound);
-				ast_log(LOG_NOTICE,"        link->disced %d\n",zl->disced);
-				ast_log(LOG_NOTICE,"        link->killme %d\n",zl->killme);
-				ast_log(LOG_NOTICE,"        link->disctime %ld\n",zl->disctime);
-				ast_log(LOG_NOTICE,"        link->retrytimer %ld\n",zl->retrytimer);
-				ast_log(LOG_NOTICE,"        link->retries = %d\n",zl->retries);
-				ast_log(LOG_NOTICE,"        link->reconnects = %d\n",zl->reconnects);
-				ast_log(LOG_NOTICE,"        link->newkey = %d\n",zl->newkey);
-                        	zl = zl->next;
+			dl = myrpt->links.next;

[... 7649 lines stripped ...]



More information about the asterisk-commits mailing list