[asterisk-commits] trunk r18977 - in /trunk: ./ apps/

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Mon Apr 10 16:01:23 MST 2006


Author: kpfleming
Date: Mon Apr 10 18:01:22 2006
New Revision: 18977

URL: http://svn.digium.com/view/asterisk?rev=18977&view=rev
Log:
remove support for BYEXTENSION (which nobody even knows about anymore)

Modified:
    trunk/UPGRADE.txt
    trunk/apps/app_dial.c
    trunk/apps/app_parkandannounce.c
    trunk/apps/app_queue.c
    trunk/apps/app_rpt.c
    trunk/pbx.c

Modified: trunk/UPGRADE.txt
URL: http://svn.digium.com/view/asterisk/trunk/UPGRADE.txt?rev=18977&r1=18976&r2=18977&view=diff
==============================================================================
--- trunk/UPGRADE.txt (original)
+++ trunk/UPGRADE.txt Mon Apr 10 18:01:22 2006
@@ -1,5 +1,10 @@
 Information for Upgrading From Previous Asterisk Releases
 =========================================================
+
+PBX Core:
+
+* The (very old and undocumented) ability to use BYEXTENSION for dialing
+  instead of ${EXTEN} has been removed.
 
 Command Line Interface:
 

Modified: trunk/apps/app_dial.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_dial.c?rev=18977&r1=18976&r2=18977&view=diff
==============================================================================
--- trunk/apps/app_dial.c (original)
+++ trunk/apps/app_dial.c Mon Apr 10 18:01:22 2006
@@ -1,7 +1,7 @@
 /*
  * Asterisk -- An open source telephony toolkit.
  *
- * Copyright (C) 1999 - 2005, Digium, Inc.
+ * Copyright (C) 1999 - 2006, Digium, Inc.
  *
  * Mark Spencer <markster at digium.com>
  *
@@ -747,10 +747,8 @@
 	int numnochan = 0;
 	int cause;
 	char numsubst[AST_MAX_EXTENSION];
-	char restofit[AST_MAX_EXTENSION];
 	char cidname[AST_MAX_EXTENSION];
 	char toast[80];
-	char *newnum;
 	char *l;
 	int privdb_val=0;
 	unsigned int calldurationlimit=0;
@@ -1007,14 +1005,6 @@
 			ast_set2_flag(tmp, args.url, DIAL_NOFORWARDHTML);	
 		}
 		ast_copy_string(numsubst, number, sizeof(numsubst));
-		/* If we're dialing by extension, look at the extension to know what to dial */
-		if ((newnum = strstr(numsubst, "BYEXTENSION"))) {
-			/* strlen("BYEXTENSION") == 11 */
-			ast_copy_string(restofit, newnum + 11, sizeof(restofit));
-			snprintf(newnum, sizeof(numsubst) - (newnum - numsubst), "%s%s", chan->exten,restofit);
-			if (option_debug)
-				ast_log(LOG_DEBUG, "Dialing by extension %s\n", numsubst);
-		}
 		/* Request the peer */
 		tmp->chan = ast_request(tech, chan->nativeformats, numsubst, &cause);
 		if (!tmp->chan) {

Modified: trunk/apps/app_parkandannounce.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_parkandannounce.c?rev=18977&r1=18976&r2=18977&view=diff
==============================================================================
--- trunk/apps/app_parkandannounce.c (original)
+++ trunk/apps/app_parkandannounce.c Mon Apr 10 18:01:22 2006
@@ -1,7 +1,7 @@
 /*
  * Asterisk -- An open source telephony toolkit.
  *
- * Copyright (C) 1999 - 2005, Digium, Inc.
+ * Copyright (C) 1999 - 2006, Digium, Inc.
  *
  * Mark Spencer <markster at digium.com>
  *
@@ -164,9 +164,9 @@
 	}
 	/* At this point we have a priority and maybe an extension and a context */
 	chan->priority = atoi(priority);
-	if(exten && strcasecmp(exten, "BYEXTENSION"))
+	if (exten)
 		strncpy(chan->exten, exten, sizeof(chan->exten)-1);
-	if(context)
+	if (context)
 		strncpy(chan->context, context, sizeof(chan->context)-1);
 	} else {  /* increment the priority by default*/
 		chan->priority++;

Modified: trunk/apps/app_queue.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_queue.c?rev=18977&r1=18976&r2=18977&view=diff
==============================================================================
--- trunk/apps/app_queue.c (original)
+++ trunk/apps/app_queue.c Mon Apr 10 18:01:22 2006
@@ -2018,11 +2018,9 @@
 	struct member *cur;
 	struct callattempt *outgoing=NULL; /* the queue we are building */
 	int to;
-	char restofit[AST_MAX_EXTENSION];
 	char oldexten[AST_MAX_EXTENSION]="";
 	char oldcontext[AST_MAX_CONTEXT]="";
 	char queuename[256]="";
-	char *newnum;
 	struct ast_channel *peer;
 	struct ast_channel *which;
 	struct callattempt *lpeer;
@@ -2103,14 +2101,6 @@
 		tmp->oldstatus = cur->status;
 		tmp->lastcall = cur->lastcall;
 		ast_copy_string(tmp->interface, cur->interface, sizeof(tmp->interface));
-		/* If we're dialing by extension, look at the extension to know what to dial */
-		if ((newnum = strstr(tmp->interface, "/BYEXTENSION"))) {
-			newnum++;
-			strncpy(restofit, newnum + strlen("BYEXTENSION"), sizeof(restofit) - 1);
-			snprintf(newnum, sizeof(tmp->interface) - (newnum - tmp->interface), "%s%s", qe->chan->exten, restofit);
-			if (option_debug)
-				ast_log(LOG_DEBUG, "Dialing by extension %s\n", tmp->interface);
-		}
 		/* Special case: If we ring everyone, go ahead and ring them, otherwise
 		   just calculate their metric for the appropriate strategy */
 		if (!calc_metric(qe->parent, cur, x++, qe, tmp)) {

Modified: trunk/apps/app_rpt.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_rpt.c?rev=18977&r1=18976&r2=18977&view=diff
==============================================================================
--- trunk/apps/app_rpt.c (original)
+++ trunk/apps/app_rpt.c Mon Apr 10 18:01:22 2006
@@ -6452,9 +6452,9 @@
 		}
 		/* At this point we have a priority and maybe an extension and a context */
 		chan->priority = atoi(priority);
-		if(exten && strcasecmp(exten, "BYEXTENSION"))
+		if (exten)
 			strncpy(chan->exten, exten, sizeof(chan->exten)-1);
-		if(context)
+		if (context)
 			strncpy(chan->context, context, sizeof(chan->context)-1);
 		} else {  /* increment the priority by default*/
 			chan->priority++;

Modified: trunk/pbx.c
URL: http://svn.digium.com/view/asterisk/trunk/pbx.c?rev=18977&r1=18976&r2=18977&view=diff
==============================================================================
--- trunk/pbx.c (original)
+++ trunk/pbx.c Mon Apr 10 18:01:22 2006
@@ -6040,7 +6040,7 @@
 		pri++;
 	}
 	if (sscanf(pri, "%d", &ipri) != 1) {
-		if ((ipri = ast_findlabel_extension(chan, context ? context : chan->context, (exten && strcasecmp(exten, "BYEXTENSION")) ? exten : chan->exten, 
+		if ((ipri = ast_findlabel_extension(chan, context ? context : chan->context, exten ? exten : chan->exten, 
 			pri, chan->cid.cid_num)) < 1) {
 			ast_log(LOG_WARNING, "Priority '%s' must be a number > 0, or valid label\n", pri);
 			return -1;
@@ -6049,9 +6049,6 @@
 	} 
 	/* At this point we have a priority and maybe an extension and a context */
 
-	if (exten && !strcasecmp(exten, "BYEXTENSION"))
-		exten = NULL;
-
 	if (mode) 
 		ipri = chan->priority + (ipri * mode);
 



More information about the asterisk-commits mailing list