mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-28 23:15:59 +00:00
remove support for BYEXTENSION (which nobody even knows about anymore)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18977 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -1,6 +1,11 @@
|
|||||||
Information for Upgrading From Previous Asterisk Releases
|
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:
|
Command Line Interface:
|
||||||
|
|
||||||
* 'show channels concise', designed to be used by applications that will parse
|
* 'show channels concise', designed to be used by applications that will parse
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Asterisk -- An open source telephony toolkit.
|
* Asterisk -- An open source telephony toolkit.
|
||||||
*
|
*
|
||||||
* Copyright (C) 1999 - 2005, Digium, Inc.
|
* Copyright (C) 1999 - 2006, Digium, Inc.
|
||||||
*
|
*
|
||||||
* Mark Spencer <markster@digium.com>
|
* Mark Spencer <markster@digium.com>
|
||||||
*
|
*
|
||||||
@@ -747,10 +747,8 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags
|
|||||||
int numnochan = 0;
|
int numnochan = 0;
|
||||||
int cause;
|
int cause;
|
||||||
char numsubst[AST_MAX_EXTENSION];
|
char numsubst[AST_MAX_EXTENSION];
|
||||||
char restofit[AST_MAX_EXTENSION];
|
|
||||||
char cidname[AST_MAX_EXTENSION];
|
char cidname[AST_MAX_EXTENSION];
|
||||||
char toast[80];
|
char toast[80];
|
||||||
char *newnum;
|
|
||||||
char *l;
|
char *l;
|
||||||
int privdb_val=0;
|
int privdb_val=0;
|
||||||
unsigned int calldurationlimit=0;
|
unsigned int calldurationlimit=0;
|
||||||
@@ -1007,14 +1005,6 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags
|
|||||||
ast_set2_flag(tmp, args.url, DIAL_NOFORWARDHTML);
|
ast_set2_flag(tmp, args.url, DIAL_NOFORWARDHTML);
|
||||||
}
|
}
|
||||||
ast_copy_string(numsubst, number, sizeof(numsubst));
|
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 */
|
/* Request the peer */
|
||||||
tmp->chan = ast_request(tech, chan->nativeformats, numsubst, &cause);
|
tmp->chan = ast_request(tech, chan->nativeformats, numsubst, &cause);
|
||||||
if (!tmp->chan) {
|
if (!tmp->chan) {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Asterisk -- An open source telephony toolkit.
|
* Asterisk -- An open source telephony toolkit.
|
||||||
*
|
*
|
||||||
* Copyright (C) 1999 - 2005, Digium, Inc.
|
* Copyright (C) 1999 - 2006, Digium, Inc.
|
||||||
*
|
*
|
||||||
* Mark Spencer <markster@digium.com>
|
* Mark Spencer <markster@digium.com>
|
||||||
*
|
*
|
||||||
@@ -164,9 +164,9 @@ static int parkandannounce_exec(struct ast_channel *chan, void *data)
|
|||||||
}
|
}
|
||||||
/* At this point we have a priority and maybe an extension and a context */
|
/* At this point we have a priority and maybe an extension and a context */
|
||||||
chan->priority = atoi(priority);
|
chan->priority = atoi(priority);
|
||||||
if(exten && strcasecmp(exten, "BYEXTENSION"))
|
if (exten)
|
||||||
strncpy(chan->exten, exten, sizeof(chan->exten)-1);
|
strncpy(chan->exten, exten, sizeof(chan->exten)-1);
|
||||||
if(context)
|
if (context)
|
||||||
strncpy(chan->context, context, sizeof(chan->context)-1);
|
strncpy(chan->context, context, sizeof(chan->context)-1);
|
||||||
} else { /* increment the priority by default*/
|
} else { /* increment the priority by default*/
|
||||||
chan->priority++;
|
chan->priority++;
|
||||||
|
|||||||
@@ -2018,11 +2018,9 @@ static int try_calling(struct queue_ent *qe, const char *options, char *announce
|
|||||||
struct member *cur;
|
struct member *cur;
|
||||||
struct callattempt *outgoing=NULL; /* the queue we are building */
|
struct callattempt *outgoing=NULL; /* the queue we are building */
|
||||||
int to;
|
int to;
|
||||||
char restofit[AST_MAX_EXTENSION];
|
|
||||||
char oldexten[AST_MAX_EXTENSION]="";
|
char oldexten[AST_MAX_EXTENSION]="";
|
||||||
char oldcontext[AST_MAX_CONTEXT]="";
|
char oldcontext[AST_MAX_CONTEXT]="";
|
||||||
char queuename[256]="";
|
char queuename[256]="";
|
||||||
char *newnum;
|
|
||||||
struct ast_channel *peer;
|
struct ast_channel *peer;
|
||||||
struct ast_channel *which;
|
struct ast_channel *which;
|
||||||
struct callattempt *lpeer;
|
struct callattempt *lpeer;
|
||||||
@@ -2103,14 +2101,6 @@ static int try_calling(struct queue_ent *qe, const char *options, char *announce
|
|||||||
tmp->oldstatus = cur->status;
|
tmp->oldstatus = cur->status;
|
||||||
tmp->lastcall = cur->lastcall;
|
tmp->lastcall = cur->lastcall;
|
||||||
ast_copy_string(tmp->interface, cur->interface, sizeof(tmp->interface));
|
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
|
/* Special case: If we ring everyone, go ahead and ring them, otherwise
|
||||||
just calculate their metric for the appropriate strategy */
|
just calculate their metric for the appropriate strategy */
|
||||||
if (!calc_metric(qe->parent, cur, x++, qe, tmp)) {
|
if (!calc_metric(qe->parent, cur, x++, qe, tmp)) {
|
||||||
|
|||||||
@@ -6452,9 +6452,9 @@ static int rpt_exec(struct ast_channel *chan, void *data)
|
|||||||
}
|
}
|
||||||
/* At this point we have a priority and maybe an extension and a context */
|
/* At this point we have a priority and maybe an extension and a context */
|
||||||
chan->priority = atoi(priority);
|
chan->priority = atoi(priority);
|
||||||
if(exten && strcasecmp(exten, "BYEXTENSION"))
|
if (exten)
|
||||||
strncpy(chan->exten, exten, sizeof(chan->exten)-1);
|
strncpy(chan->exten, exten, sizeof(chan->exten)-1);
|
||||||
if(context)
|
if (context)
|
||||||
strncpy(chan->context, context, sizeof(chan->context)-1);
|
strncpy(chan->context, context, sizeof(chan->context)-1);
|
||||||
} else { /* increment the priority by default*/
|
} else { /* increment the priority by default*/
|
||||||
chan->priority++;
|
chan->priority++;
|
||||||
|
|||||||
5
pbx.c
5
pbx.c
@@ -6040,7 +6040,7 @@ int ast_parseable_goto(struct ast_channel *chan, const char *goto_string)
|
|||||||
pri++;
|
pri++;
|
||||||
}
|
}
|
||||||
if (sscanf(pri, "%d", &ipri) != 1) {
|
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) {
|
pri, chan->cid.cid_num)) < 1) {
|
||||||
ast_log(LOG_WARNING, "Priority '%s' must be a number > 0, or valid label\n", pri);
|
ast_log(LOG_WARNING, "Priority '%s' must be a number > 0, or valid label\n", pri);
|
||||||
return -1;
|
return -1;
|
||||||
@@ -6049,9 +6049,6 @@ int ast_parseable_goto(struct ast_channel *chan, const char *goto_string)
|
|||||||
}
|
}
|
||||||
/* At this point we have a priority and maybe an extension and a context */
|
/* At this point we have a priority and maybe an extension and a context */
|
||||||
|
|
||||||
if (exten && !strcasecmp(exten, "BYEXTENSION"))
|
|
||||||
exten = NULL;
|
|
||||||
|
|
||||||
if (mode)
|
if (mode)
|
||||||
ipri = chan->priority + (ipri * mode);
|
ipri = chan->priority + (ipri * mode);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user