Summary: | ASTERISK-03115: [patch] Log Execution Stack to Channel Variables | ||
Reporter: | wolfson (wolfson) | Labels: | |
Date Opened: | 2004-12-28 15:43:44.000-0600 | Date Closed: | 2008-01-15 15:18:52.000-0600 |
Priority: | Major | Regression? | No |
Status: | Closed/Complete | Components: | Core/General |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) pbx.stack-trace.diff ( 1) pbx.stack-trace2.diff ( 2) pbx.stack-trace3.diff | |
Description: | This patch will modify pbx.c to log the execution stack to channel variables. Combined with cdr_dumper_php this makes for a very easy way to debug the patch a call took after the fact. ****** ADDITIONAL INFORMATION ****** Variables will be formed like: [STACK-incomming-daytime-1] => Dial("Zap/4-1", "SIP/601&SIP/602&SIP/603&SIP/604|20|xr") in new stack [STACK-incomming-fxo-s-2] => Macro("Zap/4-1", "screen|") in new stack [STACK-incomming-fxo-s-3] => Monitor("Zap/4-1", "WAV|20041228-152157--s|bm") in new stack [STACK-incomming-fxo-s-4] => Goto("Zap/4-1", "incomming|s|1") in new stack [STACK-incomming-h-1] => NoOp("Zap/4-1", "HangUpCause-16") in new stack [STACK-incomming-s-1] => GotoIfTime("Zap/4-1", "10:00-17:00|*|29-30|dec?incomming|holiday|1") in new stack [STACK-incomming-s-2] => GotoIfTime("Zap/4-1", "10:00-17:00|mon-fri|*|*?incomming|daytime|1") in new stack [STACK-macro-screen-s-1] => GotoIf("Zap/4-1", "0?bad|1") in new stack Disclaimer is on file, though this code is more targeted at debugging then production use. | ||
Comments: | By: Mark Spencer (markster) 2004-12-28 15:46:37.000-0600 This code could be integrated if it were made an runtime option to enable it. Obviously it would otherwise induce a lot of memory and CPU utilization as it would make all variable lookups much longer. By: wolfson (wolfson) 2004-12-28 16:04:40.000-0600 Would enabling it when debug is on work, or would a seperate config option be prefered. By: wolfson (wolfson) 2004-12-29 16:55:04.000-0600 Uploaded a new diff that is only enabled when debug is on. Since it uses an existing if, there should be no added overhead with debug off. By: Mark Spencer (markster) 2004-12-29 18:14:01.000-0600 This patch does not appear to apply, perhaps it's been corrupted somehow. By: wolfson (wolfson) 2004-12-29 18:39:08.000-0600 Tabs got converted to spaces during save. It now appears to patch cleanly. By: Mark Spencer (markster) 2004-12-29 18:46:07.000-0600 Added to CVS, patched just fine. Thanks! By: Russell Bryant (russell) 2005-01-02 10:17:31.000-0600 not in 1.0 By: Digium Subversion (svnbot) 2008-01-15 15:18:52.000-0600 Repository: asterisk Revision: 4598 U trunk/pbx.c ------------------------------------------------------------------------ r4598 | markster | 2008-01-15 15:18:51 -0600 (Tue, 15 Jan 2008) | 2 lines Log execution stack if option_debug is enabled (bug ASTERISK-3115) ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=4598 |