Friday, January 30, 2015

Magento Error

Tuesday, January 13, 2015

Chuck Lorre Productions #482


The things I have spent my life depending on are undependable. Because they are things. And things are, by their very nature, subject to change. This applies to people as well. People change. People leave. Inevitably we all leave. The world, therefore, is essentially an unstable, uncertain environment. That's why I choose to believe in, and depend on, an unchanging, eternal, omnipresent non-thing. I prefer not to call it God, because the very word tends to thing things up. So I try not to call it. I try to experience it. Easy to do looking out at the ocean. Hard to do looking up at the ocean. Easy to do when you look at a baby. Hard to do if the baby is next to you on a long plane flight. Easy to do when you look at a pretty girl. Hard to do if you were once married to her. Clearly what blocks me from transcendence is judgment. If I were able to suspend having an opinion on drowning, other peoples' baby's vomit, and alimony, if I could simply see these things as they are - actions devoid of meaning until I give them meaning - I could experience some semblance of union with the infinite sublime. I'd instantaneously transition from neurotic sitcom writer to one seriously badass guru dude. People would travel great distances to ask me for guidance with their personal problems. I'd wisely tell them "It is what it is." They'd judge this as being ridiculously inadequate advice and punch me. But I'd be okay with it because I'm, you know, exalted.

Monitor Incoming Connections (Php, Linux)

I posted this on Spiceworks....


Monitor connections on machine.
this is set to monitor eth3, with destination of, just adjust the tcpdump settings to broaden the scope.

Source Code

$file = 'source.ips.log';

$cmd = <<<EOF
sudo tcpdump -i eth3 -n -q -e "dst host"|awk -F, '{print $3}'|awk -F" " '{print $3 "." $5 "." $6}'|awk -F. '{print $1 "." $2 "." $3 "." $4 " " $5 ">" $10}'

$cmd = trim($cmd);

$handle = popen("$cmd", 'r');
$foundIPs = array();
while(!feof($handle)) {
    $buffer = trim(fgets($handle));
    $data = explode(" ",$buffer);
        // leave just text?
        $port = preg_replace("/[0-9 ]+/", "", $data[1]);
        if( empty($foundIPs[$data[0]][$data[1]]) ){
            file_put_contents($file,"source port>{destination port}\n".var_export($foundIPs,true));
        } else {
file_put_contents($file,"source port>{destination port}\n".var_export($foundIPs,true));


Monday, January 12, 2015

Get SMDR information from a Mitel 5000 CP

I posted this on spiceworks....

SMDR monitoring example can be found here.
Station Message Detail Recording (SMDR) captures detailed information about incoming and outgoing voice and data calls.
This is extremely simple and will still need to parse out the message.
Need to us Mitel DB Programming to ensure everything is setup properly.
Contact Mitel for the the "Features and Programming Guide" which provides details on the message format.

Setup Mitel - DB Programming

In System/Maintenance/SMDR
Change SMDR Output to YES
make sure "SMDR Output Active" is YES

SMDR Password - DB Programming

In System/Sockets
right click on SMDR and set password.

Find Mitel 5000 IP

Check the IP!
===> System/IP Settings/Current Processor Module IP Address

Check Port (Unsecured)

In System/IP Settings
Check "Listening Port (Unsecured)" is 4000
Check "Listening Port (Unsecured) Enabled" is YES

Monitor your SMDR messages...


Parse the message and save/log it somewhere?

Contact Mitel for the the "Features and Programming Guide" which provides details on the message format.
Or Google is your friend.


This will allow you to setup some simple analytics for calls, if you need a full blown call costing and such it will likely be cheaper to buy a solution!!