Toshiba Stratagy phone system new voicemail button calls other extension
Aug 30, 2011 Phone systems
One thing I run into occasionally on our Toshiba Stratagy phone system is new voicemail indicators directly calling another users desk extension. Usually this happens without either parties really understanding what is causing the issue. On the phone display it self it shows something like:
Daniel K ext.112
Call 112-111
The normal screen when a new voicemail is available may show:
Daniel K ext.112
Call 112-333V
What the first screen shows is that the owner of the phone is extension 112 and that extension 111 wants to talk with the person at 112. When the user of extension 112 pushes their blinking Msg button it will call 111 and should clear the indicator once the person at 111 picks up the phone. Sometimes this is not the case and we must dial a special sequence of numbers on extension 111 to clear the light on 112. So from the Ext 111 phone dial #64 plus the extension (in this case it would be #64112) and then hang up.
Now here is the cool thing with this “issue”. If you wanted to notify a user to call you without interrupting a meeting you can dial #63 plus the extension to enable this light. An example of this would be if I was still at Ext 112 and I wanted the person sitting at Ext 111 to call me I could dial #63111 from my Ext 112 and it would show the following on Ext 111:
Josh ext.111
Call 111-112
Once the conversation was done I would then dial #64111 on my phone to clear the new Msg blinking light on Ext 111. Enjoy!
Tags: phone system, Stratagy, Toshiba
Linux uptime
Aug 24, 2011 PHP Coding, Web Development
If you want to show the uptime of your linux server on your website, you can do so very easily.
function linuxUptime() { $ut = strtok( exec( "cat /proc/uptime" ), "." ); $days = sprintf( "%2d", ($ut/(3600*24)) ); $hours = sprintf( "%2d", ( ($ut % (3600*24)) / 3600) ); $min = sprintf( "%2d", ($ut % (3600*24) % 3600)/60 ); $sec = sprintf( "%2d", ($ut % (3600*24) % 3600)%60 ); return array( $days, $hours, $min, $sec ); } $ut = linuxUptime(); // If you would like to show the seconds as well just add [ , $ut[3] seconds ] after minutes. echo "Time since last reboot: $ut[0] days, $ut[1] hours, $ut[2] minutes";
Just call the $ut = linuxUptime() function and then you can use the variables to show the time.
**NOTE: Your server must allow you to run the exec() PHP command. Some hosts disable the execution of this and several other PHP functions.
Now if you were wanting to gather the uptime of multiple servers all at the same time this can be accomplished with CURL. What we would end up doing is using the above code and place it in a PHP file on each of the target servers. In the example below you will see I am referencing a file called linuxUptime.php which holds the code listed above. We could then use a MySQL database or just an array full of domain names that we would loop through to gather the stats. Below I am posting a simple script which uses an array as an example. (This file does not currently exist on my site to show uptime of my site)
$sites = array('danielkassner.com'); // Create a list of sites to check foreach($sites as $site) { // Loop through each site and get uptime $ch = curl_init(); // Initiate curl session curl_setopt($ch, CURLOPT_URL, 'http://'.$site.'/linuxUptime.php'); // Set the URL of the uptime script curl_setopt($ch, CURLOPT_HEADER, 0); // Disable header output curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); // Return data as a string instead of output directly $data=curl_exec($ch); // Execute curl commands curl_close ($ch); // Close the curl session echo $site.': '.$data.'<br />'; // Output value returned from the linuxUptime.php file } // End server loop
When we gather stats like this we could easily store the uptime values in a database table so that we could track the history.
Enjoy!
Notepad++ Ctrl+Tab tip
Aug 11, 2011 Technology, Web Development
If you are like me and prefer to use the keyboard as much as possible instead of a mouse you will like this tip. When in Notepad++ if on your keyboard you press Ctrl+Tab it brings up a Windows style Alt+Tab menu to cycle through your open documents. When you let up on the keys it switches to the file you selected. Check out the screenshot below of it in action.
