[Home]

Summary:ASTERISK-02333: [patch] output time in hms a channel has been active when cli 'show channels' is called.
Reporter:twisted (twisted)Labels:
Date Opened:2004-09-02 19:28:56Date Closed:2008-01-15 15:06:38.000-0600
Priority:TrivialRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) timers.txt
Description:An example of output is shown below.  This is a useful tool in determining when problems occur (if they occur) and checking for 'stuck' and offhook channels (channels that have just been forgotten about being connected).  Also gives you, at a glance, an idea of how long channels are up, how long certain people have been in a conference, etc.  

****** ADDITIONAL INFORMATION ******


Asterisk CVS-HEAD-09/02/04-19:22:26, Copyright (C) 1999-2004 Digium.
Written by Mark Spencer <markster@digium.com>
=========================================================================
Connected to Asterisk CVS-HEAD-09/02/04-19:22:26 currently running on dev (pid = 23568)
dev*CLI> show channels
<pre>
Time Active                Channel  (Context    Extension    Pri )   State Appl.         Data
0h4m2s         IAX2/production/2  (           s            1   )      Up Bridged Call  SIP/Josh7905-bf85
0h4m2s         SIP/Josh7905-bf85  (local      0000         1   )      Up Dial          IAX2/dev:prodbox@production/0000@local
2 active channel(s)
</pre>
Comments:By: twisted (twisted) 2004-09-02 19:29:52

As per ages ago, disclaimer is on file. :)   also many thanks to corydon for assiting me in learning structures better.

By: twisted (twisted) 2004-09-02 19:32:12

sorry for the preformatted html, but it's not as nice looking without it... and no, the doublespace is NOT in the patch... we can thank mantis' parsing for that.

By: Tilghman Lesher (tilghman) 2004-09-02 22:10:28

You may want to initialize the field to the current time on channel creation.  Won't make a difference for VoIP channels, but Zap channels will show an idle time of 34+ years on initial dialtone.

By: Mark Spencer (markster) 2004-09-02 23:44:20

Well, sorta...   There isn't enough space in an 80 wide window to show all that info without cutting off the rest, so I just changed the formatting in "show channel <foo>" to show it properly

By: Digium Subversion (svnbot) 2008-01-15 15:06:38.000-0600

Repository: asterisk
Revision: 3716

U   trunk/cli.c

------------------------------------------------------------------------
r3716 | markster | 2008-01-15 15:06:38 -0600 (Tue, 15 Jan 2008) | 2 lines

Display elapsed time in hours/mins/seconds (bug ASTERISK-2333 kinda sorta)

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=3716