aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_dial.c
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2004-08-27 03:16:16 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2004-08-27 03:16:16 +0000
commit671a8fee863d01c0588b889e0b0aff309c300615 (patch)
tree35f3bd4ac6b339ec16b38996f332ae7b5aa37c3f /apps/app_dial.c
parent705d29c0404ddccbae50d487f3893c95e50197d3 (diff)
When detecting a hairpin, redirect to the appropriate local extension (bug #1974)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@3662 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_dial.c')
-rwxr-xr-xapps/app_dial.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/apps/app_dial.c b/apps/app_dial.c
index b32ab2067..0bc754c3f 100755
--- a/apps/app_dial.c
+++ b/apps/app_dial.c
@@ -250,10 +250,11 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in, struct localu
if (!o->chan->callerid)
ast_log(LOG_WARNING, "Out of memory\n");
} else {
- if (in->callerid)
+ if (in->callerid) {
o->chan->callerid = strdup(in->callerid);
- if (!o->chan->callerid)
- ast_log(LOG_WARNING, "Out of memory\n");
+ if (!o->chan->callerid)
+ ast_log(LOG_WARNING, "Out of memory\n");
+ }
strncpy(o->chan->accountcode, in->accountcode, sizeof(o->chan->accountcode) - 1);
o->chan->cdrflags = in->cdrflags;
}