diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-10-28 17:04:56 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-10-28 17:04:56 +0000 |
commit | b185ca4b2bf1471e268122f89fe6242741cc4f11 (patch) | |
tree | 0a4c278dd6d58c733258bb0e8ff6331a1f12ac9b /apps/app_dial.c | |
parent | 8260c066cf596fe33c4b1b903292f1e99b3eef2e (diff) |
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.4@152368 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_dial.c')
-rw-r--r-- | apps/app_dial.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/apps/app_dial.c b/apps/app_dial.c index 8eaacce9f..6c835fcec 100644 --- a/apps/app_dial.c +++ b/apps/app_dial.c @@ -877,6 +877,13 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags return -1; } + /* 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", ""); + u = ast_module_user_add(chan); parse = ast_strdupa(data); |