summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorMark Spencer <markster@digium.com>1999-12-25 00:46:58 +0000
committerMark Spencer <markster@digium.com>1999-12-25 00:46:58 +0000
commita261bdc235632d2b2e2fe20ad95f59a4b7b2341f (patch)
tree24a564cae57d0b93811232e577fa9482bc107beb /apps
parent388961dc3533bb4dcb30196271f3af03c7495f2c (diff)
Version 0.1.2 from FTP
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@148 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps')
-rwxr-xr-xapps/app_dial.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/apps/app_dial.c b/apps/app_dial.c
index a8070e6fc..02ed8d344 100755
--- a/apps/app_dial.c
+++ b/apps/app_dial.c
@@ -290,6 +290,7 @@ static int dial_exec(struct ast_channel *chan, void *data)
int to;
int allowredir=0;
char numsubst[AST_MAX_EXTENSION];
+ char restofit[AST_MAX_EXTENSION];
char *newnum;
if (!data) {
@@ -329,7 +330,8 @@ static int dial_exec(struct ast_channel *chan, void *data)
strncpy(numsubst, number, sizeof(numsubst));
/* If we're dialing by extension, look at the extension to know what to dial */
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 */
tmp->allowredirect = 0;
if (option_debug)