aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_dial.c
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2008-10-28 17:08:47 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2008-10-28 17:08:47 +0000
commit54f6f9d46dfd351fb542fb97d6daf19ba1589bad (patch)
treea31294f5d6083bd320acd4c7a308010e312b87ce /apps/app_dial.c
parent05b64d5e968710d0c0b6b0a0246c946020b2b466 (diff)
Merged revisions 152369 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ................ r152369 | tilghman | 2008-10-28 12:07:39 -0500 (Tue, 28 Oct 2008) | 15 lines Merged revisions 152368 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r152368 | tilghman | 2008-10-28 12:04:56 -0500 (Tue, 28 Oct 2008) | 8 lines Reset all DIAL variables back to blank, in case Dial is called multiple times per call (which could otherwise lead to inconsistent status reports). (closes issue #13216) Reported by: ruddy Patches: 20081014__bug13216.diff.txt uploaded by Corydon76 (license 14) Tested by: ruddy ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@152370 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_dial.c')
-rw-r--r--apps/app_dial.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/apps/app_dial.c b/apps/app_dial.c
index 3fdbdb6f5..de28e1bb1 100644
--- a/apps/app_dial.c
+++ b/apps/app_dial.c
@@ -1283,6 +1283,13 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags
struct ast_dial_features *caller_features;
int fulldial = 0, num_dialed = 0;
+ /* Reset all DIAL variables back to blank, to prevent confusion (in case we don't reset all of them). */
+ pbx_builtin_setvar_helper(chan, "DIALSTATUS", "");
+ pbx_builtin_setvar_helper(chan, "DIALEDPEERNUMBER", "");
+ pbx_builtin_setvar_helper(chan, "DIALEDPEERNAME", "");
+ pbx_builtin_setvar_helper(chan, "ANSWEREDTIME", "");
+ pbx_builtin_setvar_helper(chan, "DIALEDTIME", "");
+
if (ast_strlen_zero(data)) {
ast_log(LOG_WARNING, "Dial requires an argument (technology/number)\n");
pbx_builtin_setvar_helper(chan, "DIALSTATUS", pa.status);