tinymon.php File Reference

Tiny real-time monitoring board for Asterisk. More...

Go to the source code of this file.

Functions

 my_htmlentities ($text)
 Protect HTML code : add escape chars.
 clean_dev_calls ($type, $dev, $forced)
 Clean device status information : delete (obsolete) call information.
 update_dev ($mode, $type, $dev, $ticket_a)
 Update device status information : update device information.
 parse_cnxid ($cnxid)
 Parse "chantype/dev-chanid" string and extract fields.
 update_dev_call ($mode, $cnxid, $ticket_a)
 Update device status information : update call information.
 run_session ()
 Elaborate TinyMON display.
 store_error ($err_type, $err_msg, $err_file, $err_line)
 Store errors and syslog them.
 display_errors ()
 Display errors that have been stored.

Variables

 $db = NULL


Detailed Description

Tiny real-time monitoring board for Asterisk.

Definition in file tinymon.php.


Function Documentation

my_htmlentities text  ) 
 

Protect HTML code : add escape chars.

Parameters:
$text Input String
Returns:
Converted String

Definition at line 26 of file tinymon.php.

Referenced by display_errors(), and run_session().

clean_dev_calls type,
dev,
forced
 

Clean device status information : delete (obsolete) call information.

In debug mode, "now", i.e. reference for tickets obsolescence, is the time of last ticket extracted from DB. Otherwise, "now" is current server time.

Parameters:
$type Channel type (SIP, ...)
$dev Device
$forced Set to TRUE to delete ALL call information, FALSE to delete obolete call information only
Returns:
Number of calls remaining

Definition at line 43 of file tinymon.php.

Referenced by run_session().

update_dev mode,
type,
dev,
ticket_a
 

Update device status information : update device information.

Parameters:
$mode Mode : UPDATE or DELETE
$type Channel type (SIP, ...)
$dev Device
$ticket_a AMI ticket contents, stored in an associative array

Definition at line 79 of file tinymon.php.

Referenced by run_session().

parse_cnxid cnxid  ) 
 

Parse "chantype/dev-chanid" string and extract fields.

This function analyses the input string and extracts the fields. It tries to make its best with < Z O M B I E > and suffixes alike, as well as with AsyncGoto/ and possibly other prefixes. Obviously, this simplification may involve a loss of information, or even worse, may generate incorrect information !

Parameters:
$cnxid String, supposedly looking like "chantype/dev-chanid"
Returns:
array (chantype, dev, chanid)

Definition at line 111 of file tinymon.php.

Referenced by run_session(), and update_dev_call().

update_dev_call mode,
cnxid,
ticket_a
 

Update device status information : update call information.

Parameters:
$mode Mode : UPDATE or DELETE
$cnxid Connection id with syntax "channeltype/device-channelid"
$ticket_a AMI ticket contents, stored in an associative array

Definition at line 129 of file tinymon.php.

References parse_cnxid().

Referenced by run_session().

Here is the call graph for this function:

run_session  ) 
 

Elaborate TinyMON display.

Definition at line 160 of file tinymon.php.

References $db, $status, $ui, clean_dev_calls(), display_errors(), my_htmlentities(), parse_cnxid(), update_dev(), and update_dev_call().

Here is the call graph for this function:

store_error err_type,
err_msg,
err_file,
err_line
 

Store errors and syslog them.

We'll display them alltogether later.

Definition at line 872 of file tinymon.php.

display_errors  ) 
 

Display errors that have been stored.

Definition at line 903 of file tinymon.php.

References my_htmlentities().

Referenced by run_session().

Here is the call graph for this function:


Variable Documentation

$db = NULL
 

Definition at line 941 of file tinymon.php.

Referenced by run_session().


Generated on Sat Apr 1 18:43:46 2006 for TinyMON by  doxygen 1.4.6