mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-04 20:04:50 +00:00
Version 0.1.2 from FTP
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@148 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -290,6 +290,7 @@ static int dial_exec(struct ast_channel *chan, void *data)
|
|||||||
int to;
|
int to;
|
||||||
int allowredir=0;
|
int allowredir=0;
|
||||||
char numsubst[AST_MAX_EXTENSION];
|
char numsubst[AST_MAX_EXTENSION];
|
||||||
|
char restofit[AST_MAX_EXTENSION];
|
||||||
char *newnum;
|
char *newnum;
|
||||||
|
|
||||||
if (!data) {
|
if (!data) {
|
||||||
@@ -329,7 +330,8 @@ static int dial_exec(struct ast_channel *chan, void *data)
|
|||||||
strncpy(numsubst, number, sizeof(numsubst));
|
strncpy(numsubst, number, sizeof(numsubst));
|
||||||
/* If we're dialing by extension, look at the extension to know what to dial */
|
/* If we're dialing by extension, look at the extension to know what to dial */
|
||||||
if ((newnum = strstr(numsubst, "BYEXTENSION"))) {
|
if ((newnum = strstr(numsubst, "BYEXTENSION"))) {
|
||||||
snprintf(newnum, sizeof(numsubst) - (newnum - numsubst), "%s", chan->exten);
|
strncpy(restofit, newnum + strlen("BYEXTENSION"), sizeof(restofit));
|
||||||
|
snprintf(newnum, sizeof(numsubst) - (newnum - numsubst), "%s%s", chan->exten,restofit);
|
||||||
/* By default, if we're dialing by extension, don't permit redirecting */
|
/* By default, if we're dialing by extension, don't permit redirecting */
|
||||||
tmp->allowredirect = 0;
|
tmp->allowredirect = 0;
|
||||||
if (option_debug)
|
if (option_debug)
|
||||||
|
Reference in New Issue
Block a user