diff options
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 bf995d898..a3dba3c50 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); |