Index: channels/chan_zap.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_zap.c,v
retrieving revision 1.175
diff -u -r1.175 chan_zap.c
--- channels/chan_zap.c	18 Feb 2004 16:32:49 -0000	1.175
+++ channels/chan_zap.c	20 Feb 2004 20:46:49 -0000
@@ -198,6 +198,8 @@
 
 static int numbufs = 4;
 
+static int abandonbuiltinvsc = 0;
+
 #ifdef ZAPATA_PRI
 static int minunused = 2;
 static int minidle = 0;
@@ -448,6 +450,7 @@
 	int busydetect;
 	int busycount;
 	int callprogress;
+	int abandonbuiltinvsc;
 	struct timeval flashtime;	/* Last flash-hook time */
 	struct ast_dsp *dsp;
 	int cref;					/* Call reference number */
@@ -4392,7 +4395,7 @@
 				zt_wait_event(p->subs[index].zfd);
 				ast_hangup(chan);
 				return NULL;
-			} else if (p->callwaiting && !strcmp(exten, "*70")) {
+			} else if (p->callwaiting && !p->abandonbuiltinvsc && !strcmp(exten, "*70")) {
 				if (option_verbose > 2) 
 					ast_verbose(VERBOSE_PREFIX_3 "Disabling call waiting on %s\n", chan->name);
 				/* Disable call waiting if enabled */
@@ -4435,7 +4438,7 @@
 					return NULL;
 				}
 				
-			} else if (!p->hidecallerid && !strcmp(exten, "*67")) {
+			} else if (!p->hidecallerid && !p->abandonbuiltinvsc && !strcmp(exten, "*67")) {
 				if (option_verbose > 2) 
 					ast_verbose(VERBOSE_PREFIX_3 "Disabling Caller*ID on %s\n", chan->name);
 				/* Disable Caller*ID if enabled */
@@ -4451,7 +4454,7 @@
 				len = 0;
 				memset(exten, 0, sizeof(exten));
 				timeout = firstdigittimeout;
-			} else if (p->callreturn && !strcmp(exten, "*69")) {
+			} else if (p->callreturn && !p->abandonbuiltinvsc && !strcmp(exten, "*69")) {
 				res = 0;
 				if (strlen(p->lastcallerid)) {
 					res = ast_say_digit_str(chan, p->lastcallerid, "", chan->language);
@@ -4459,7 +4462,7 @@
 				if (!res)
 					res = tone_zone_play_tone(p->subs[index].zfd, ZT_TONE_DIALRECALL);
 				break;
-			} else if (!strcmp(exten, "*78")) {
+			} else if (!p->abandonbuiltinvsc && !strcmp(exten, "*78")) {
 				/* Do not disturb */
 				if (option_verbose > 2)
 					ast_verbose(VERBOSE_PREFIX_3 "Enabled DND on channel %d\n", p->channel);
@@ -4468,7 +4471,7 @@
 				getforward = 0;
 				memset(exten, 0, sizeof(exten));
 				len = 0;
-			} else if (!strcmp(exten, "*79")) {
+			} else if (!p->abandonbuiltinvsc && !strcmp(exten, "*79")) {
 				/* Do not disturb */
 				if (option_verbose > 2)
 					ast_verbose(VERBOSE_PREFIX_3 "Disabled DND on channel %d\n", p->channel);
@@ -4477,12 +4480,12 @@
 				getforward = 0;
 				memset(exten, 0, sizeof(exten));
 				len = 0;
-			} else if (p->cancallforward && !strcmp(exten, "*72")) {
+			} else if (p->cancallforward && !p->abandonbuiltinvsc && !strcmp(exten, "*72")) {
 				res = tone_zone_play_tone(p->subs[index].zfd, ZT_TONE_DIALRECALL);
 				getforward = 1;
 				memset(exten, 0, sizeof(exten));
 				len = 0;
-			} else if (p->cancallforward && !strcmp(exten, "*73")) {
+			} else if (p->cancallforward && !p->abandonbuiltinvsc && !strcmp(exten, "*73")) {
 				if (option_verbose > 2)
 					ast_verbose(VERBOSE_PREFIX_3 "Cancelling call forwarding on channel %d\n", p->channel);
 				res = tone_zone_play_tone(p->subs[index].zfd, ZT_TONE_DIALRECALL);
@@ -4499,7 +4502,7 @@
 				if (option_verbose > 2)
 					ast_verbose(VERBOSE_PREFIX_3 "Parking call to '%s'\n", chan->name);
 				break;
-			} else if (strlen(p->lastcallerid) && !strcmp(exten, "*80")) {
+			} else if (strlen(p->lastcallerid) && !p->abandonbuiltinvsc && !strcmp(exten, "*80")) {
 				if (option_verbose > 2)
 					ast_verbose(VERBOSE_PREFIX_3 "Blacklisting number %s\n", p->lastcallerid);
 				res = ast_db_put("blacklist", p->lastcallerid, "1");
@@ -4508,7 +4511,7 @@
 					memset(exten, 0, sizeof(exten));
 					len = 0;
 				}
-			} else if (p->hidecallerid && !strcmp(exten, "*82")) {
+			} else if (p->hidecallerid && !p->abandonbuiltinvsc && !strcmp(exten, "*82")) {
 				if (option_verbose > 2) 
 					ast_verbose(VERBOSE_PREFIX_3 "Enabling Caller*ID on %s\n", chan->name);
 				/* Enable Caller*ID if enabled */
@@ -4525,7 +4528,7 @@
 				len = 0;
 				memset(exten, 0, sizeof(exten));
 				timeout = firstdigittimeout;
-			} else if (!strcmp(exten, "*0")) {
+			} else if (!p->abandonbuiltinvsc && !strcmp(exten, "*0")) {
 				struct ast_channel *nbridge = 
 					p->subs[SUB_THREEWAY].owner;
 				struct zt_pvt *pbridge = NULL;
@@ -4560,7 +4563,7 @@
 					return NULL;
 				}					
 			} else if (!ast_canmatch_extension(chan, chan->context, exten, 1, chan->callerid) &&
-							((exten[0] != '*') || (strlen(exten) > 2))) {
+							( !((exten[0] == '*') && !p->abandonbuiltinvsc ) || (strlen(exten) > 2) )) {
 				if (option_debug)
 					ast_log(LOG_DEBUG, "Can't match %s from '%s' in context %s\n", exten, chan->callerid ? chan->callerid : "<Unknown Caller>", chan->context);
 				break;
@@ -5519,6 +5522,7 @@
 		tmp->restrictcid = restrictcid;
 		tmp->use_callingpres = use_callingpres;
 		strncpy(tmp->accountcode, accountcode, sizeof(tmp->accountcode)-1);
+		tmp->abandonbuiltinvsc = abandonbuiltinvsc;
 		tmp->amaflags = amaflags;
 		if (!here) {
 			tmp->confno = -1;
@@ -7445,6 +7449,8 @@
 			use_callingpres = ast_true(v->value);
 		} else if (!strcasecmp(v->name, "accountcode")) {
 			strncpy(accountcode, v->value, sizeof(accountcode)-1);
+		} else if (!strcasecmp(v->name, "abandonbuiltinvsc")) {
+			abandonbuiltinvsc = ast_true(v->value);
 		} else if (!strcasecmp(v->name, "amaflags")) {
 			y = ast_cdr_amaflags2int(v->value);
 			if (y < 0) 
Index: configs/zapata.conf.sample
===================================================================
RCS file: /usr/cvsroot/asterisk/configs/zapata.conf.sample,v
retrieving revision 1.16
diff -u -r1.16 zapata.conf.sample
--- configs/zapata.conf.sample	19 Jan 2004 02:32:24 -0000	1.16
+++ configs/zapata.conf.sample	20 Feb 2004 20:46:49 -0000
@@ -333,3 +333,9 @@
 ;context=default
 ;channel => 1 
 
+; Zaptel channels have a few CLASS features / Vertical Service Codes
+; provided in the channel.  If you need to implement these in the dialplan
+; for other channels, you will want to turn off the zaptel channel-based
+; implementations.  (defaults to 'no')
+;
+;abandonbuiltinvsc=yes
