aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authormartinp <martinp@f38db490-d61c-443f-a65b-d21fe96a405b>2003-08-14 20:48:44 +0000
committermartinp <martinp@f38db490-d61c-443f-a65b-d21fe96a405b>2003-08-14 20:48:44 +0000
commit24183cf0a7fc83b40b60508a1ad4b0a7182b390d (patch)
tree2f1b09eae9458d42bcc1720bb83aa0b52f39b159 /apps
parentf5020a758b97863b880b344abc664c48584979c4 (diff)
Save the dstchannel before the call gets answered so that we would know what destination channel was dialed when we get the channel hanged up
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@1331 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rwxr-xr-xapps/app_dial.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/apps/app_dial.c b/apps/app_dial.c
index 6cbd9c32f..10cabee03 100755
--- a/apps/app_dial.c
+++ b/apps/app_dial.c
@@ -568,6 +568,12 @@ static int dial_exec(struct ast_channel *chan, void *data)
tmp->chan->adsicpe = chan->adsicpe;
/* Place the call, but don't wait on the answer */
res = ast_call(tmp->chan, numsubst, 0);
+
+ /* Save the info in cdr's that we called them */
+ if (chan->cdr)
+ ast_cdr_setdestchan(chan->cdr, tmp->chan->name);
+
+ /* check the restuls of ast_call */
if (res) {
/* Again, keep going even if there's an error */
if (option_debug)