[asterisk-commits] tilghman: branch 1.4 r152368 - /branches/1.4/apps/app_dial.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Oct 28 12:04:57 CDT 2008


Author: tilghman
Date: Tue Oct 28 12:04:56 2008
New Revision: 152368

URL: http://svn.digium.com/view/asterisk?view=rev&rev=152368
Log:
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

Modified:
    branches/1.4/apps/app_dial.c

Modified: branches/1.4/apps/app_dial.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/apps/app_dial.c?view=diff&rev=152368&r1=152367&r2=152368
==============================================================================
--- branches/1.4/apps/app_dial.c (original)
+++ branches/1.4/apps/app_dial.c Tue Oct 28 12:04:56 2008
@@ -877,6 +877,13 @@
 		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);




More information about the asterisk-commits mailing list