tag:blogger.com,1999:blog-91369553270779373192024-03-13T12:25:32.028-07:00Notes of a VoIP EngineerBlake McKeebyhttp://www.blogger.com/profile/13394600090606778425noreply@blogger.comBlogger53125tag:blogger.com,1999:blog-9136955327077937319.post-30466646429240527462014-10-21T08:14:00.001-07:002014-10-22T13:52:53.032-07:00Can't Open Wireshark After OS X 10.10 Yosemite UpgradeReading online produced the conclusion that X11 Quartz (a dependency of Wireshark) had been moved from /usr/X11 to /opt/X11 as a part of the upgrade to OS X 10.10 (Yosemite). To restore the ability to open Wireshark, create symlink from the old location, /usr/X11 to the new location, /opt/X11.
<pre class="brush: xml">
sudo ln -s /opt/X11 /usr/X11
</pre>
Now try launching Wireshark. The first time I launched it took ~60 seconds to load. All subsequent launches took considerably less time. Blake McKeebyhttp://www.blogger.com/profile/13394600090606778425noreply@blogger.com0tag:blogger.com,1999:blog-9136955327077937319.post-65800811058050702202014-10-17T13:22:00.000-07:002014-10-17T13:31:24.184-07:00OS X 10.10 Yosemite MySQL Wont Start At StartupAfter upgrading to Yosemite, I noticed MySQL would no longer start on startup even though "Automatically Start MysQL Server on Startup" was enabled in the MySQL system preferences.<br />
<br />
I'm not certain what caused this to break, but I suspect the LaunchDaemon file that MySQL 5.6 uses is no longer being recognized. Maybe the location it is placing the .plist file has been changed in OS X 10.10.<br />
<br />
To resolve I created /Library/LaunchDaemons/com.mysql.mysql.plist with the following contents:<br />
<div class="p1">
<span class="s1"><br /></span></div>
<div class="p1">
<span class="s1"></span></div>
<div class="p1">
<span class="s1">
<pre class="brush: xml">
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>KeepAlive</key>
<true/>
<key>Label</key>
<string>com.mysql.mysqld</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/mysql/bin/mysqld_safe</string>
<string>--user=mysql</string>
</array>
</dict>
</plist>
</pre>
</span></div>
<div class="p1">
<br /></div>
<div class="p1">
<br /></div>
<div class="p1">
Then load the newly created plist file</div>
<div class="p1">
<span class="s1">
</span></div>
<div class="p1">
<span class="s1">sudo launchctl load -w /Library/LaunchDaemons/com.mysql.mysql.plist</span></div>
<div class="p1">
<span class="s1"><br /></span></div>Blake McKeebyhttp://www.blogger.com/profile/13394600090606778425noreply@blogger.com2tag:blogger.com,1999:blog-9136955327077937319.post-58701600548702737512013-08-21T14:29:00.002-07:002013-08-21T14:29:25.623-07:00partrotate_unixtimestamp.pl<a href="https://code.google.com/p/homer/source/browse/scripts/partrotate_unixtimestamp.pl?r=0ae129dc5508a103c4080dc0f67e0df9a610d19c">partrotate_unixtimestamp.pl</a><br />
<br />
$maxparts = 6; #6 days How long keep the data in the DB<br />
$newparts = 2; #new partitions for 2 days. Anyway, start this script daily!<br />
@stepsvalues = (86400, 3600, 1800, 900);<br />
$partstep = 0; # 0 - Day, 1 - Hour, 2 - 30 Minutes, 3 - 15 Minutes<br />
<br />
Mysql partitioning allows a large table to be segmented, storing each segment in a different file. This allows multiple disks to be used for a single table to increase efficiency. This also allows for increased query times when a WHERE statement including the partitioning index includes, allowing mysql to only have to search the records in the relevant partitions and not all the data in the table.<br />
<br />
The Mysql database table storing the captures is partitioned using <a href="http://www.cs.duke.edu/csl/docs/mysql-refman/partitioning.html#partitioning-range" target="_blank">range partitioning</a> by the unix timestamp of the date column. By default, $partstep is defined as 1 day, and so each partition contains one days worth of captures. Every night when the cron job is run, the oldest partition is deleted, and a new partition is created. The "VALUES LESS THAN MAX VALUE" partition always exists as a catchall in case an INSERT is performed with a date before the last specifically defined partition so an error will not be returned.<br />
<br />
The partitions are named using the format pYearMonthDayHour with minutes being included in the name if the $partstep is more frequent than every hour ( > 1). p2013081620<br />
<br />
PARTITION BY RANGE ( UNIX_TIMESTAMP(`date`))<br />
(PARTITION p2013081620 VALUES LESS THAN (1376784000) ENGINE = MyISAM,<br />
PARTITION p2013081720 VALUES LESS THAN (1376870400) ENGINE = MyISAM,<br />
PARTITION p2013081820 VALUES LESS THAN (1376956800) ENGINE = MyISAM,<br />
PARTITION p2013081920 VALUES LESS THAN (1377043200) ENGINE = MyISAM,<br />
PARTITION p2013082020 VALUES LESS THAN (1377129600) ENGINE = MyISAM,<br />
PARTITION p2013082120 VALUES LESS THAN (1377216000) ENGINE = MyISAM,<br />
PARTITION pmax VALUES LESS THAN MAXVALUE ENGINE = MyISAM)<br />
<br />
<br />
$maxparts - defines how many partitions will be created in the database. This is a bit confusing because $newparts defines the number of the partitions in the future. So really there are ($maxparts - $newparts) partitions of historical data, plus the partial current day, and ($newparts - 1) partitions covering future days.<br />
<br />
$newparts - defines how many of the defined partitions will be in the future. For example when $newparts = 2,Blake McKeebyhttp://www.blogger.com/profile/13394600090606778425noreply@blogger.com0tag:blogger.com,1999:blog-9136955327077937319.post-80061308439189986682013-08-14T18:07:00.001-07:002013-08-14T18:07:57.101-07:00ILOM http://docs.oracle.com/cd/E19836-01/E20746/z40002821391018.html<br />
<br />
<br />
<div style="background-color: white; font-family: Arial, Helvetica, Luxi-sans, 'Nimbus Sans L', sans-serif; font-size: 12px; margin-bottom: 17px; margin-top: 3px;">
The ILOM <tt style="color: #444444; font-family: Monaco, Courier, 'Courier New', monospace;">reset</tt> command generates a graceful or forced hardware reset of the server. By default, the reset command gracefully resets the server.</div>
<ul style="background-color: white; font-family: Arial, Helvetica, Luxi-sans, 'Nimbus Sans L', sans-serif; font-size: 12px; margin-left: 13px; padding-left: 0px;">
<li class="sgstep" style="list-style-image: url(http://docs.oracle.com/cd/E19836-01/E20746/graphics/ul_bullet.gif); margin-left: 13px; padding-left: 0px;"><a href="" name="z4001ad01392447" style="border-bottom-color: rgb(180, 180, 180); border-bottom-style: solid; border-bottom-width: 1px;"></a><b>Type one of the following commands to reset the server.</b><ul style="margin-left: 13px; padding-left: 0px;">
<li class="sgstep" style="list-style-image: url(http://docs.oracle.com/cd/E19836-01/E20746/graphics/ul_bullet.gif); margin-left: 13px; padding-left: 0px;"><a href="" name="z40013b21391042" style="border-bottom-color: rgb(180, 180, 180); border-bottom-style: solid; border-bottom-width: 1px;"></a><b>Perform a graceful reset from ILOM:</b><pre style="background-color: #efefef; border: 1px solid rgb(204, 204, 204); font-family: Monaco, Courier, 'Courier New', monospace; overflow: hidden; padding: 0.5em;">-> <b>reset /SYS</b></pre>
</li>
<li class="sgstep" style="list-style-image: url(http://docs.oracle.com/cd/E19836-01/E20746/graphics/ul_bullet.gif); margin-left: 13px; padding-left: 0px;"><a href="" name="z40002821391094" style="border-bottom-color: rgb(180, 180, 180); border-bottom-style: solid; border-bottom-width: 1px;"></a><b>If a graceful reset is not possible, perform a forced hardware reset from ILOM:</b><pre style="background-color: #efefef; border: 1px solid rgb(204, 204, 204); font-family: Monaco, Courier, 'Courier New', monospace; overflow: hidden; padding: 0.5em;">-> <b>reset -force /SYS</b></pre>
</li>
</ul>
</li>
</ul>
Blake McKeebyhttp://www.blogger.com/profile/13394600090606778425noreply@blogger.com0tag:blogger.com,1999:blog-9136955327077937319.post-45945778087570693612013-08-14T18:05:00.005-07:002013-08-27T18:00:00.588-07:00Cactihttp://docs.cacti.net/manual:088:1_installation.1_install_unix<br />
<br />
<span style="background-color: #ececec; color: #323d4f; font-family: 'Lucida Grande', 'Trebuchet MS', Helvetica, Arial, sans-serif; font-size: 13px; line-height: 18.1875px;">Name: you may choose your own</span><br />
<span style="background-color: #ececec; color: #323d4f; font-family: 'Lucida Grande', 'Trebuchet MS', Helvetica, Arial, sans-serif; font-size: 13px; line-height: 18.1875px;">Consolidation function: AVERAGE needed</span><br />
<span style="background-color: #ececec; color: #323d4f; font-family: 'Lucida Grande', 'Trebuchet MS', Helvetica, Arial, sans-serif; font-size: 13px; line-height: 18.1875px;">X-Files Factor: always 0.5</span><br />
<span style="background-color: #ececec; color: #323d4f; font-family: 'Lucida Grande', 'Trebuchet MS', Helvetica, Arial, sans-serif; font-size: 13px; line-height: 18.1875px;">Steps: 1 (that is the number of data points to use for consolidation, 1 says: no consolidation at all)</span><br />
<span style="background-color: #ececec; color: #323d4f; font-family: 'Lucida Grande', 'Trebuchet MS', Helvetica, Arial, sans-serif; font-size: 13px; line-height: 18.1875px;">Rows: 115200 = 400 days with 24 hours and 12 data points per hour (= 5 min interval)</span><br />
<span style="background-color: #ececec; color: #323d4f; font-family: 'Lucida Grande', 'Trebuchet MS', Helvetica, Arial, sans-serif; font-size: 13px; line-height: 18.1875px;">Timespan: used for displaying 33,053,184 seconds = about 382 days (taken from other cacti rra)</span><br />
<span style="background-color: #ececec; color: #323d4f; font-family: 'Lucida Grande', 'Trebuchet MS', Helvetica, Arial, sans-serif; font-size: 13px; line-height: 18.1875px;"><br /></span>
<b style="background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14px; line-height: 20px;">Name:</b><span style="background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14px; line-height: 20px;"> just suggestive name </span><br />
<b style="background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14px; line-height: 20px;">Steps (archiving ratio):</b><span style="background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14px; line-height: 20px;"> how many data points (poll values) are needed to put as one value of the RRA.</span><br />
<span style="background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14px; line-height: 20px;">For RRA "Monthly" 24 poll values (24 polls * 5 minute between poll = 120 min= 2 hour) will be consolidates as 1 value.</span><br />
<span style="background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14px; line-height: 20px;">By default one step represents 300 seconds (5 minutes), which is how often data is entered into the rrd file. </span><br />
<b style="background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14px; line-height: 20px;">Rows (Hours to store values):</b><span style="background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14px; line-height: 20px;"> how many generations data is kept in the RRA. </span><br />
<span style="background-color: white; font-family: sans-serif; font-size: 13px; line-height: 19px; orphans: 2; widows: 2;"></span><br style="background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14px; line-height: 20px;" />
<span style="background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14px; line-height: 20px;">Storage (calculated) default RRAs , 1 RRD = 94 KB (94824 Bytes)</span><br />
<b style="background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14px; line-height: 20px;">Timespan (used for graphs only): </b><span style="background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14px; line-height: 20px;">how many seconds to display in graph for this RRA.</span><br />
<b style="background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14px; line-height: 20px;">X-Files Factor:</b><span style="background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14px; line-height: 20px;"> The amount of UNKNOWN data that can still be regarded as known (= 0.5 always)</span><br />
<span style="background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14px; line-height: 20px;"><br /></span>
<span style="background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14px; line-height: 20px;"><br /></span>
<br />
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse; width: 892px;">
<!--StartFragment-->
<colgroup><col style="mso-width-alt: 38058; mso-width-source: userset; width: 892pt;" width="892"></col>
</colgroup><tbody>
<tr height="15" style="height: 15.0pt;">
<td height="15" style="height: 15.0pt; width: 892pt;" width="892">TCP-MIB::tcpRtoAlgorithm.0
= INTEGER: other(1)</td>
</tr>
<tr height="15" style="height: 15.0pt;">
<td height="15" style="height: 15.0pt;">TCP-MIB::tcpRtoMin.0 = INTEGER: 200
milliseconds</td>
</tr>
<tr height="15" style="height: 15.0pt;">
<td height="15" style="height: 15.0pt;">TCP-MIB::tcpRtoMax.0 = INTEGER: 120000
milliseconds</td>
</tr>
<tr height="15" style="height: 15.0pt;">
<td height="15" style="height: 15.0pt;">TCP-MIB::tcpMaxConn.0 = INTEGER: -1</td>
</tr>
<tr height="15" style="height: 15.0pt;">
<td height="15" style="height: 15.0pt;">TCP-MIB::tcpActiveOpens.0 = Counter32: 5</td>
</tr>
<tr height="15" style="height: 15.0pt;">
<td height="15" style="height: 15.0pt;">TCP-MIB::tcpPassiveOpens.0 = Counter32:
157</td>
</tr>
<tr height="15" style="height: 15.0pt;">
<td height="15" style="height: 15.0pt;">TCP-MIB::tcpAttemptFails.0 = Counter32:
11</td>
</tr>
<tr height="15" style="height: 15.0pt;">
<td height="15" style="height: 15.0pt;">TCP-MIB::tcpEstabResets.0 = Counter32: 4</td>
</tr>
<tr height="15" style="height: 15.0pt;">
<td height="15" style="height: 15.0pt;">TCP-MIB::tcpCurrEstab.0 = Gauge32: 0</td>
</tr>
<tr height="15" style="height: 15.0pt;">
<td height="15" style="height: 15.0pt;">TCP-MIB::tcpInSegs.0 = Counter32: 9670</td>
</tr>
<tr height="15" style="height: 15.0pt;">
<td height="15" style="height: 15.0pt;">TCP-MIB::tcpOutSegs.0 = Counter32: 9881</td>
</tr>
<tr height="15" style="height: 15.0pt;">
<td height="15" style="height: 15.0pt;">TCP-MIB::tcpRetransSegs.0 = Counter32: 96</td>
</tr>
<!--EndFragment-->
</tbody></table>
Blake McKeebyhttp://www.blogger.com/profile/13394600090606778425noreply@blogger.com0tag:blogger.com,1999:blog-9136955327077937319.post-90298884257719990112013-08-14T18:05:00.003-07:002013-08-14T18:05:47.245-07:00OSX TFTP Serverhttp://blog.dustinrue.com/archives/655<br />
https://discussions.apple.com/thread/3661529?start=15&tstart=0<br />
http://meinit.nl/how-to-enable-tftp-server-on-mac-os-xBlake McKeebyhttp://www.blogger.com/profile/13394600090606778425noreply@blogger.com0tag:blogger.com,1999:blog-9136955327077937319.post-23722459518462396472013-08-14T08:47:00.002-07:002013-08-14T08:47:10.533-07:00FTP Server Behind Time CapsuleSet server up as "default" host in time capsule using the airport utility.
On client use the the "u" flag
-u Restrains ftp from attempting ``auto-authentication''
upon initial connection. If auto-authentication is
enabled, ftp attempts to authenticate to the FTP server
by sending the AUTH command, using whichever authenti-
cation types are locally supported. Once an authenti-
cation type is accepted, an authentication protocol
will proceed by issuing ADAT commands. This option
also disables auto-login.
# ftp -u ftp.server.com
Connected to ftp.server.com.
220 192.168.3.3 FTP server (tnftpd 20100324+GSSAPI) ready.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> user
(username) ftpusername
331 User ftpusername accepted, provide password.
Password:
230 User ftpusername logged in.
ftp> passive
Passive mode off.
ftp> mput file.txt
mput file.txt? yBlake McKeebyhttp://www.blogger.com/profile/13394600090606778425noreply@blogger.com0tag:blogger.com,1999:blog-9136955327077937319.post-27359826547552336922013-06-05T22:26:00.000-07:002013-06-05T22:26:09.834-07:00Linux Central Authentication<div class="p1">
aws iam isn't open to managing resource outside of aws </div>
<br />
<div class="p1">
<a href="https://github.com/denismo/aws-iam-ldap-bridge/blob/master/INSTALL.md">https://github.com/denismo/aws-iam-ldap-bridge/blob/master/INSTALL.md</a> was the closest i found and seemed like a giant hac</div>
<div class="p1">
<br /></div>
<div class="p1">
https://code.google.com/p/openssh-lpk/ - patching openssh to store keys</div>
<div class="p1">
<span style="background-color: white; font-family: arial, sans-serif; font-size: 13px; line-height: 16.390625px;">The OpenSSH LDAP Public Key patch provides an easy way of centralizing strong user authentication by using an LDAP server for retrieving public keys instead of ~/.ssh/authorized_keys.</span></div>
<div class="p1">
<span style="background-color: white; font-family: arial, sans-serif; font-size: 13px; line-height: 16.390625px;"><br /></span></div>
<div class="p1">
</div>
<div class="p1">
google authenticator has a cool pam module.. but i need soln that less trendy, more practical</div>
<div class="p1">
https://code.google.com/p/google-authenticator/wiki/PamModuleInstructions</div>
<div class="p1">
<br /></div>
<div class="p1">
using ldap to centralize account information and using a configuration management tool like chef or puppet to distribute authorized_keys file doesn't seem to allow for the granularity required. Need to be able to limit which users can access which hosts without complicated exception rules in configuration management tool</div>
<div class="p1">
http://serverfault.com/questions/471753/what-are-best-practices-for-managing-ssh-keys-in-a-team</div>
<div class="p1">
<br /></div>
<div class="p1">
Arrived at freeipa.</div>
Blake McKeebyhttp://www.blogger.com/profile/13394600090606778425noreply@blogger.com0tag:blogger.com,1999:blog-9136955327077937319.post-88756045532788740462013-06-02T22:31:00.002-07:002013-06-02T22:31:30.406-07:00Upgrading OSX PHP to 5.4.15 with snmp and radius supportBy default the new macbook pros ship with an older version of php. Looking back it's hard to remember why I needed to upgrade, but I believe the introduction of namespaces in php came after the version that was shipped with my mac, and consequently I couldn't develop using zend framework 2. I aslo needed to compile with snmp support.<br />
<br />
Most of what is needed to accomplish compiling php 5.4.15 (latest stable), I found here:<br />
http://mac.tutsplus.com/tutorials/server/upgrading-the-native-php-installation-on-os-x-mountain-lion/<br />
<br />
Quick Summary:<br />
Mac by default doesn't have a good place collect src. Follow *nix traditions...<br />
<pre style="background-color: #eeeeee; border: 1px solid rgb(221, 221, 221); clear: both; margin-bottom: 1.833em; overflow: auto; padding: 0.667em 0.917em;"><span style="font-family: Times;"><span style="white-space: normal;">mkdir /usr/local/src</span></span></pre>
<pre style="background-color: #eeeeee; border: 1px solid rgb(221, 221, 221); clear: both; margin-bottom: 1.833em; overflow: auto; padding: 0.667em 0.917em;">
</pre>
<pre style="background-color: #eeeeee; border: 1px solid rgb(221, 221, 221); clear: both; margin-bottom: 1.833em; overflow: auto; padding: 0.667em 0.917em;">Prereqs Installed via Brew:</pre>
<pre style="background-color: #eeeeee; border: 1px solid rgb(221, 221, 221); clear: both; margin-bottom: 1.833em; overflow: auto; padding: 0.667em 0.917em;"><div class="line number1 index0 alt2" style="background-color: white !important; background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: #575757; direction: ltr !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; font-size: 14px; height: auto !important; left: auto !important; line-height: 15.390625px; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px 1em !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">
<code class="xml plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: black !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">brew install libjpeg</code></div>
<div class="line number2 index1 alt1" style="background-color: white !important; background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: #575757; direction: ltr !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; font-size: 14px; height: auto !important; left: auto !important; line-height: 15.390625px; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px 1em !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">
<code class="xml plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: black !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">brew install pcre</code></div>
<div class="line number3 index2 alt2" style="background-color: white !important; background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: #575757; direction: ltr !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; font-size: 14px; height: auto !important; left: auto !important; line-height: 15.390625px; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px 1em !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">
<code class="xml plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: black !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">brew install libxml2</code></div>
<div class="line number4 index3 alt1" style="background-color: white !important; background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: #575757; direction: ltr !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; font-size: 14px; height: auto !important; left: auto !important; line-height: 15.390625px; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px 1em !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">
<code class="xml plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: black !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">brew install mcrypt</code></div>
</pre>
<pre style="background-color: #eeeeee; border: 1px solid rgb(221, 221, 221); clear: both; margin-bottom: 1.833em; overflow: auto; padding: 0.667em 0.917em;">
</pre>
<pre style="background-color: #eeeeee; border: 1px solid rgb(221, 221, 221); clear: both; margin-bottom: 1.833em; overflow: auto; padding: 0.667em 0.917em;">Prereq ICU:</pre>
<pre style="background-color: #eeeeee; border: 1px solid rgb(221, 221, 221); clear: both; margin-bottom: 1.833em; overflow: auto; padding: 0.667em 0.917em;"><span style="font-family: Times;"><span style="white-space: normal;">cd /usr/local/src</span></span></pre>
<pre style="background-color: #eeeeee; border: 1px solid rgb(221, 221, 221); clear: both; margin-bottom: 1.833em; overflow: auto; padding: 0.667em 0.917em;">curl -O http://download.icu-project.org/files/icu4c/4.8.1.1/icu4c-4_8_1_1-src.tgz
tar -xzvf icu4c-4_8_1-src.tgz
cd icu/source
./runConfigureICU MacOSX
make
sudo make install</pre>
<pre style="background-color: #eeeeee; border: 1px solid rgb(221, 221, 221); clear: both; margin-bottom: 1.833em; overflow: auto; padding: 0.667em 0.917em;">
</pre>
<pre style="background-color: #eeeeee; border: 1px solid rgb(221, 221, 221); clear: both; margin-bottom: 1.833em; overflow: auto; padding: 0.667em 0.917em;">Prereq imap-2007:</pre>
<pre style="background-color: #eeeeee; border: 1px solid rgb(221, 221, 221); clear: both; margin-bottom: 1.833em; overflow: auto; padding: 0.667em 0.917em;"><span style="font-family: Times;"><span style="white-space: normal;">cd /usr/local/src</span></span></pre>
<pre style="background-color: #eeeeee; border: 1px solid rgb(221, 221, 221); clear: both; margin-bottom: 1.833em; overflow: auto; padding: 0.667em 0.917em;"><span style="font-family: Times;"><span style="white-space: normal;">curl -O </span><span style="white-space: normal;">http://cursor.uam.mx/mirrors/imap/imap-2007f.tar.gz</span></span></pre>
<pre style="background-color: #eeeeee; border: 1px solid rgb(221, 221, 221); clear: both; margin-bottom: 1.833em; overflow: auto; padding: 0.667em 0.917em;"><span style="font-family: Times;"><span style="white-space: normal;">tar -zxvf </span></span><span style="font-family: Times; white-space: normal;">imap-2007f.tar.gz</span></pre>
<pre style="background-color: #eeeeee; border: 1px solid rgb(221, 221, 221); clear: both; margin-bottom: 1.833em; overflow: auto; padding: 0.667em 0.917em;"><span style="background-color: white; color: #555555; font-size: 12px; line-height: 17px; white-space: normal;">cd ~/Downloads/imap-2007f</span>
<span style="background-color: white; color: #555555; font-size: 12px; line-height: 17px; white-space: normal;">make osx EXTRACFLAGS="arch i386 -arch X86_64 -g -Os -pipe -no-cpp-precomp"</span>
<span style="background-color: white; color: #555555; font-size: 12px; line-height: 17px; white-space: normal;">sudo cp c-client/*.h /usr/local/include/</span>
<span style="background-color: white; color: #555555; font-size: 12px; line-height: 17px; white-space: normal;">sudo cp c-client/*.c /usr/local/lib/</span>
<span style="background-color: white; color: #555555; font-size: 12px; line-height: 17px; white-space: normal;">sudo cp c-client/c-client.a /usr/local/lib/libc-client.a</span></pre>
<pre style="background-color: #eeeeee; border: 1px solid rgb(221, 221, 221); clear: both; margin-bottom: 1.833em; overflow: auto; padding: 0.667em 0.917em;"><span style="background-color: white; color: #555555; font-size: 12px; line-height: 17px; white-space: normal;">
</span></pre>
<pre style="background-color: #eeeeee; border: 1px solid rgb(221, 221, 221); clear: both; margin-bottom: 1.833em; overflow: auto; padding: 0.667em 0.917em;"><span style="background-color: white; color: #555555; font-size: 12px; line-height: 17px; white-space: normal;">cd /usr/local/src</span></pre>
<pre style="background-color: #eeeeee; border: 1px solid rgb(221, 221, 221); clear: both; color: #111111; font-family: Consolas, 'Andale Mono', Monaco, Courier, 'Courier New', Verdana, sans-serif; font-size: 0.857em; line-height: 1.5em; margin-bottom: 1.833em; overflow: auto; padding: 0.667em 0.917em;">curl -O http://us1.php.net/get/php-5.4.15.tar.gz/from/us3.php.net/mirror</pre>
tar -zxvf php-5.4.15.tar.gz<br />
./configure \<br />
--prefix=/usr \<br />
--mandir=/usr/share/man \<br />
--infodir=/usr/share/info \<br />
--sysconfdir=/private/etc \<br />
--with-apxs2=/usr/sbin/apxs \<br />
--enable-cli \<br />
--with-config-file-path=/etc \<br />
--with-libxml-dir=/usr \<br />
--with-openssl=/usr \<br />
--with-kerberos=/usr \<br />
--with-zlib=/usr \<br />
--enable-bcmath \<br />
--with-bz2=/usr \<br />
--enable-calendar \<br />
--with-curl=/usr \<br />
--enable-dba \<br />
--enable-exif \<br />
--enable-ftp \<br />
--with-gd \<br />
--enable-gd-native-ttf \<br />
--with-icu-dir=/usr/local \<br />
--with-iodbc=/usr \<br />
--with-ldap=/usr \<br />
--with-ldap-sasl=/usr \<br />
--with-libedit=/usr \<br />
--enable-mbstring \<br />
--enable-mbregex \<br />
--with-mysql=mysqlnd \<br />
--with-mysqli=mysqlnd \<br />
--with-pdo-mysql=mysqlnd \<br />
--with-mysql-sock=/var/mysql/mysql.sock \<br />
--with-readline=/usr \<br />
--enable-shmop \<br />
--with-snmp=/usr \<br />
--enable-soap \<br />
--enable-sockets \<br />
--enable-sysvmsg \<br />
--enable-sysvsem \<br />
--enable-sysvshm \<br />
--with-tidy \<br />
--enable-wddx \<br />
--with-xmlrpc \<br />
--with-iconv-dir=/usr \<br />
--with-xsl=/usr \<br />
--enable-zip \<br />
--with-imap=/usr/local/imap-2007 \<br />
--with-kerberos \<br />
--with-imap-ssl \<br />
--enable-intl \<br />
--with-pcre-regex \<br />
--with-pgsql=/usr \<br />
--with-pdo-pgsql=/usr \<br />
--with-freetype-dir=/usr/X11 \<br />
--with-jpeg-dir=/usr \<br />
--with-png-dir=/usr/X11<br />
make test<br />
sudo make install<br />
<br />
modify /etc/apache2/httpd.conf to contain<br />
<span style="background-color: white; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; font-size: 14px; line-height: 15.390625px; white-space: pre;">LoadModule php5_module libexec/apache2/libphp5.so</span><br />
<span style="background-color: white; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; font-size: 14px; line-height: 15.390625px; white-space: pre;"><br /></span>
<span style="font-family: Consolas, Bitstream Vera Sans Mono, Courier New, Courier, monospace;"><span style="font-size: 14px; line-height: 15.390625px; white-space: pre;">sudo apachectl restart</span></span><br />
<span style="font-family: Consolas, Bitstream Vera Sans Mono, Courier New, Courier, monospace;"><span style="font-size: 14px; line-height: 15.390625px; white-space: pre;"><br /></span></span>
<span style="font-family: Consolas, Bitstream Vera Sans Mono, Courier New, Courier, monospace;"><span style="font-size: 14px; line-height: 15.390625px; white-space: pre;">To add radius support, I a</span></span><span style="font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; font-size: 14px; line-height: 15.390625px; white-space: pre;">ttempted to install the radius extension using pear which resulted in a compile error.</span><span style="font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; font-size: 14px; line-height: 15.390625px; white-space: pre;"> I had to modify one line of in radius.c to correct the extension so it would compile against php-5.4.15.</span><br />
<span style="font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; font-size: 14px; line-height: 15.390625px; white-space: pre;">cd /usr/local/src</span><br />
<span style="font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; font-size: 14px; line-height: 15.390625px; white-space: pre;">curl -O </span><span style="font-family: Consolas, Bitstream Vera Sans Mono, Courier New, Courier, monospace;"><span style="font-size: 14px; line-height: 15.390625px; white-space: pre;">http://pecl.php.net/get/radius</span></span><br />
<span style="font-family: Consolas, Bitstream Vera Sans Mono, Courier New, Courier, monospace;"><span style="font-size: 14px; line-height: 15.390625px; white-space: pre;">tar -zxvf radius-1.2.5.tar.gz</span></span><br />
<pre style="background-color: #e1e1e1; font-family: Consolas, 'Andale Mono WT', 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 14px;">cd radius-1.2.5
$ phpize</pre>
<pre style="background-color: #e1e1e1; font-family: Consolas, 'Andale Mono WT', 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 14px;">change line containing "function_entry" to "zend_function_entry" to fix compile error that occurred during pear install
$ ./configure
$ make
# make install</pre>
Blake McKeebyhttp://www.blogger.com/profile/13394600090606778425noreply@blogger.com0tag:blogger.com,1999:blog-9136955327077937319.post-74838595008097518642012-09-05T21:50:00.000-07:002012-09-05T21:50:01.434-07:00PHP Composer Zend Framework 2 Doctrine 2 Eclipse Egit<br />
Create a new Git Repository<br />
Right click in PHP Explorer in Eclipse<br />
New->Other-Git Repository<br />
Create the new repository<br />
<br />
Import Project From Git<br />
Right clic in PHP Explorer in Eclipse<br />
Import->Projects from Git->Local<br />
Select the Git repository you just created<br />
choose to open new projects wizard.<br />
<br />
<br />
Build Application<br />
cd C:\...\git\utils<br />
Get composer<br />
php -r "eval('?>'.file_get_contents('https://getcomposer.org/installer'));"<br />
php composer.phar install<br />
Blake McKeebyhttp://www.blogger.com/profile/13394600090606778425noreply@blogger.com0tag:blogger.com,1999:blog-9136955327077937319.post-80056826188552021602011-11-15T20:02:00.001-08:002013-08-13T21:56:52.941-07:00Shell Script to Delete Empty Files in DirectoryScript to delete all empty files in a directory. This was specially designed for directories that have hundreds of thousands of files in them (ls has a limitation for directories with a large number of files in them, so find must be used)<br />
<br />
<br />
<br />
#!/bin/bash<br />
# Example: ./delete_empty_files.sh /home/random_files/<br />
<br />
usage()<br />
{<br />
echo "Usage: $0 Directory_Name"<br />
exit 1;<br />
}<br />
<br />
test -d "$1" || usage<br />
<br />
function test_and_delete()<br />
{<br />
while read line1; do<br />
size=`stat -c %s $line1`<br />
if [ $size -lt 1 ]; then<br />
#echo "$line1 is $size ( This one is empty ) "<br />
rm -f $line1<br />
else<br />
#echo "$line1 is $size "<br />
fi<br />
done<br />
}<br />
cd $1<br />
find -name "*" | test_and_delete<br />
<br />
<br />
<br />Blake McKeebyhttp://www.blogger.com/profile/13394600090606778425noreply@blogger.com0tag:blogger.com,1999:blog-9136955327077937319.post-39701910782734048602011-11-15T12:13:00.001-08:002013-08-15T22:10:51.604-07:00Provisioning WS-C3550-24PWR-SMI For Use With Polycoms<h3>
Provisioning WS-C3550-24PWR-SMI From Default Settings</h3>
<div>
Connect via console cable and configure hostname, telnet access and passwords using wizard at boot first time</div>
<div>
<br /></div>
<div>
Create voice and data vlan</div>
<div>
<blockquote class="tr_bq">
3550(config)#vlan 2<br />
3550(config-vlan)#name data<br />
3550(config-vlan)# 790<br />
3550(config-vlan)#name voice</blockquote>
</div>
<div>
Configure IP address on voice vlan</div>
<blockquote class="tr_bq">
3550(config)#interface Vlan 790<br />
3550(config-if)#ip address 192.168.16.2 255.255.255.0</blockquote>
<div>
Configure the default gateway</div>
<blockquote class="tr_bq">
3550(config)# ip default-gateway 192.168.16.1</blockquote>
<div>
Configure gigbit ports as trunk ports to router or downstream switches</div>
<div>
<blockquote class="tr_bq">
3550(config)#interface range gigabitEthernet 0/1 - 2<br />
3550(config-if)# switchport trunk encapsulation dot1q<br />
3550(config-if)# switchport trunk allowed vlan 2,790<br />
3550(config-if)# switchport mode trunk</blockquote>
</div>
Configure 24 fastethernet ports as trunk ports for phones and/or computers. Vlan 790 will be tagged and vlan 2 (the native vlan) will be untagged. Note: the untagged vlan is called the "native vlan" when the switchport mode is "trunk". The untagged vlan is called the "access vlan" when the switchport mode is "access".<br />
<blockquote class="tr_bq">
3550(config)#int range fastEthernet 0/1 - 24<br />
3550(config-if-range)# switchport trunk encapsulation dot1q<br />
3550(config-if-range)# switchport trunk native vlan 2<br />
3550(config-if-range)# switchport mode trunk</blockquote>
<h4>
</h4>
<h3>
</h3>
<h3>
Resolving Inline Power Issue</h3>
When using a WS-C3550-24PWR-SMI with a default config a Polycom 335 using POE cannot successfully boot up. During the bootup process just before the Polycom typically displays the networking information on the screen, the Polycom restarts its ethernet interface. By default the Cisco 3550 stops sending power to the port when it detects the link is down which causes the phone to lose power and restart. To remedy this problem the 3550 interface can be configured to delay turning off power to port for a defined number of seconds after it detects the link is down.<br />
<br />
<b>power inline delay</b> {<b>shutdown</b> <i>seconds</i> <b>initial</b> <i>seconds</i>}<br />
<br />
The initial time period begins when the powered device is detected by the switch. If linkdown occurs<br />
on the connected device during the initial time period, the shutdown time determines<br />
how long the switch continues to provide power to the device.<br />
<blockquote class="tr_bq">
3550(config)# int range fastEthernet 0/1 - 24<br />
3550(config-if-range)# power inline delay shutdown 20 initial 300</blockquote>
By applying the above command to an interface the switch will continue to provide power to the device 20 seconds after linkdown and the power shutdown delay will be in effect for the first 300 seconds. It may be necessary to upgrade IOS image to c3550-ipservicesk9-mz.122-44.SE6.bin as the power inline command is not available in older versions.<br />
<br />
<br />
<h3>
Upgrading the IOS image</h3>
Obtain a copy of the new IOS image and place on TFTP server. c3550-ipservicesk9-mz.122-44.SE6.bin will be used as an example. Note: an EMI image (enhanced software) can run on SMI hardware.<br />
<br />
Show contents of flash and the space left (listed at the bottom)<br />
Make sure there is enough room for the new ISO image<br />
<blockquote class="tr_bq">
3550# dir flash:<br />
Directory of flash:/<br />
2 -rwx 2177 Mar 01 1993 00:07:02 config.text<br />
3 -rwx 5 Mar 01 1993 00:07:02 private-config.text<br />
4 -rwx 676 Mar 01 1993 00:41:24 vlan.dat<br />
21 -rwx 3334765 Mar 02 1993 03:09:04 c3550-i9q3l2-mz.121-14.EA1a.bin<br />
15998976 bytes total (6278656 bytes free)</blockquote>
<div>
To delete a file</div>
<blockquote class="tr_bq">
3550# delete flash:c3550-i9q3l2-mz.121-14.EA1a.bin<br />
Delete filename [c3550-i9q3l2-mz.121-14.EA1a.bin]?<br />
Delete flash:c3550-i9q3l2-mz.121-14.EA1a.bin? [confirm]</blockquote>
To see contents of a folder<br />
<blockquote class="tr_bq">
3550# dir c3550-i5q3l2-mz.121-11.EA1</blockquote>
To delete a folder<br />
<blockquote class="tr_bq">
3550# delete /force /recursive c3550-i5q3l2-mz.121-11.EA1<br />
3550# Delete filename [c3550-i5q3l2-mz.121-11.EA1]?</blockquote>
<br />
Download and install IOS image. It should also update the boot statement<br />
<blockquote class="tr_bq">
3550#copy tftp://tftp-server-ip/c3550-ipservicesk9-mz.122-44.SE6.bin flash://c3550-ipservicesk9-mz.122-44.SE6.bin</blockquote>
Verify the image was corrupted in transfer<br />
<blockquote class="tr_bq">
3550#verify /md5 flash:c3550-ipservicesk9-mz.122-44.SE6.bin<br />
..........................Done!<br />
verify /md5 (flash:c3550-ipservicesk9-mz.122-44.SE6.bin) = a829d14ab1ccd3ecf77b99d025d188ce</blockquote>
Tell the switch to use the new IOS image<br />
<blockquote class="tr_bq">
3550(config)#boot system flash:c3550-ipservicesk9-mz.122-44.SE6.bin</blockquote>
Confirm the new boot statement is correct<br />
<blockquote class="tr_bq">
3550 # show boot<br />
BOOT path-list: flash:c3550-ipservicesk9-mz.122-44.SE6.bin<br />
Config file: flash:/config.text<br />
Private Config file: flash:/private-config.text<br />
Enable Break: no<br />
Manual Boot: no<br />
HELPER path-list: <br />
NVRAM/Config file<br />
buffer size: 393216</blockquote>
Save any changes made to the config<br />
<blockquote class="tr_bq">
3550#copy running-config startup-config<br />
Destination filename [startup-config]?<br />
Building configuration...<br />
[OK]</blockquote>
Restart the switch<br />
<blockquote class="tr_bq">
3550#reload</blockquote>
After restart, confirm switch is running new IOS<br />
<blockquote class="tr_bq">
3550# show version<br />
Cisco IOS Software, C3550 Software (C3550-IPSERVICESK9-M), Version 12.2(44)SE6, RELEASE SOFTWARE (fc1)<br />
...<br />
System image file is "flash:c3550-ipservicesk9-mz.122-44.SE6.bin"<br />
...</blockquote>
Blake McKeebyhttp://www.blogger.com/profile/13394600090606778425noreply@blogger.com1tag:blogger.com,1999:blog-9136955327077937319.post-9700395476315064292011-10-26T16:44:00.000-07:002011-10-26T16:44:37.635-07:00Mediatrix 1124 5.0.24.172 MWI WoesThe mediatrix mwi subscription has never seemed to work quite right. Below is a list of the caveats I've noticed.<br />
<br />
Caveat 1: <br />
Summary: If the subscription timer (.1.3.6.1.4.1.4935.15.100.1.20 mwiExpirationTime) seems to be anything other than 180 seconds (the minimum) it does not seem to send the re-subscribe before the session expires like it should.<br />
Explanation: When the subscription timer is set to 180, the mediatrix consistently re-subscribes every 120 seconds. When the subscription timer is set to 300 or 600, the mediatrix does not send the re-subscribe message. It instead waits for the subscription to expire producing the syslog message<br />
SipEngine [0204] L2 subscription terminated, server shutting down, will retry subscription in 2 minutes.<br />
All subsequent NOTIFY messages from the switch receive a 487 REQUEST TERMINATED until the mediatrix re-subscribes. It seems that it re-subscribes the next time it registers, or two mins after its subscription expired (which ever comes first)<br />
<br />
Caveat 2:<br />
Summary: The mediatrix breaks its subscription if it receives a NOTIFY for a line shortly after the line has been hung up.<br />
Explanation. If the mediatrix receives a NOTIFY for a line just after that line has been hung up, it returns a 400 INVALID MESSAGE-SUMMARY. This causes the switch to drop the subscription and the end user to not get any notifications until later when the mediatrix tries to re-subscribe when it thinks the session expires. At this point the mediatrix tries to re-subscribe but since the switch has already dropped the subscription, it returns a 481 Call/Transaction Does Not Exist. The mediatrix sends a new subscribe a few mins later and succeeds. I suspect this problem has something to do with the state the mediatrix is in just after line is hung up, and the mediatrix just handles it poorly.<br />
<br />
Here is summary of the tests I performed<br />
<br />
<br />
mediatrix is registering with sip server in router every 2 mins for rate pacing purposes, but router only allowing registers to central office every 1800 seconds<br />
<br />
<br />
<b>Subscription Timer Set for 180 seconds (3 mins) and empty vm box</b><br />
0 seconds - mediatrix sends SUBSCRIBE receives OK, immediately gets NOTIFY returns OK<br />
2 mins - 120 seconds -mediatrix sends SUBSCRIBE receives OK, immediately gets NOTIFY returns OK<br />
4 mins - 240 seconds - mediatrix sends SUBSCRIBE receives OK, immediately gets NOTIFY returns OK<br />
Continue.<br />
<br />
<br />
<br />
<b>Subscription Timer Set for 300 seconds (5 mins) and empty vm box</b><br />
0 seconds - mediatrix sends SUBSCRIBE receives OK, immediately gets NOTIFY returns OK<br />
3 mins -180 seconds - gets unsolicited notify from NMS and mediatrix responds with OK<br />
5 mins - 300 seconds - gets unsoliticted notify from NMS and mediatrix responds with 487 Request Terminated<br />
6 mins - 360 seconds - mediatrix sends REGISTER to router (which doesn't make it to nms) and sends SUBSCRIBE (which does make it to nms). Nms responds with NOTIFY and the mediatrix OKs it.<br />
Repeat.<br />
<br />
<b>Subscription timer set for 600 seconds (10 mins) and empty vm box</b><br />
0 seconds - mediatrix sends SUBSCRIBE receives OK, immediately gets NOTIFY returns OK<br />
3 mins - 180 seconds - gets unsolicited NOTIFY from NMS and mediatrix responds with OK<br />
6 mins - 360 seconds - gets unsolicited NOTIFY from NMS and mediatrix responds with OK<br />
9 mins - 540 seconds - gets unsolicited NOTIFY from NMS and mediatrix responds with OK<br />
10 mins - 600 seconds - gets unsoliticted NOTIFY from NMS and mediatrix responds with 487 Request Terminated<br />
12 mins - 720 seconds - mediatrix sends REGITSTER to router (which doesn't make it to nms b/c of rate pacing) and sends SUBSCRIBE (which does make it to nms). Nms responds with NOTIFY and the mediatrix OKs it.<br />
Repeat.<br />Blake McKeebyhttp://www.blogger.com/profile/13394600090606778425noreply@blogger.com0tag:blogger.com,1999:blog-9136955327077937319.post-11543795288207869252011-08-11T09:53:00.000-07:002011-08-11T09:53:04.140-07:00RsyslogWrote a customer Rsyslog.conf file to parse output from edgewater's edgemarc devices.<br />
<br />
Things to remember:<br />
using the optimized mysql module ommysql.<br />
<br />
The following rule is what writes to the SystemEvents table using the default template<br />
*.* :ommysql:127.0.0.1,Syslog,syslogwriter,<br />
<br />
I need to start rolling /var/log/messagesBlake McKeebyhttp://www.blogger.com/profile/13394600090606778425noreply@blogger.com0tag:blogger.com,1999:blog-9136955327077937319.post-16921365686258321862011-08-02T20:31:00.000-07:002011-08-02T20:31:37.202-07:00RT Exchange LoopWhen someone submits a reply or ticket from a no-reply email address it is creating an email loop even with RT's StoreLoop enabled.<br />
<br />
The email get sent in to create the reply. RT attempts to acknowledge it got the reply by responding to the reply. It delivers an outbound email to exchange which tries to deliver the email to the no-reply email address. Google comes back and says there is no account for that no-reply address. Exchange sends an email to RT saying that it will not continue to attempt to deliver this message. RT responds to this email. Enter loop.Blake McKeebyhttp://www.blogger.com/profile/13394600090606778425noreply@blogger.com0tag:blogger.com,1999:blog-9136955327077937319.post-23655525788261419892011-06-03T12:10:00.000-07:002011-06-03T12:10:54.471-07:00iperfwget https://downloads.sourceforge.net/project/iperf/iperf-2.0.5.tar.gz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fiperf%2F&ts=1306362724&use_mirror=cdnetworks-us-2<br />
tar -xvzf iperf-2.0.5.tar.gz<br />
cd iperf-2.0.5<br />
./configure<br />
make<br />
make install<br />
iperf -c 69.68.5.149 -u -b 10mBlake McKeebyhttp://www.blogger.com/profile/13394600090606778425noreply@blogger.com0tag:blogger.com,1999:blog-9136955327077937319.post-45934792475501352012011-06-03T12:06:00.000-07:002011-06-03T12:06:42.021-07:00fetchmail with RTedit config for fetchmail in /etc/fetchmail<br />
<br />
/etc/init.d/fetchmail start<br />
to start fetchmail<br />
<br />
<br />
poll remote.tlcl.net proto pop3:<br />
auth password<br />
username rt password ***** mda "/opt/rt3/bin/rt-mailgate --url http://url --queue General --action correspond"Blake McKeebyhttp://www.blogger.com/profile/13394600090606778425noreply@blogger.com0tag:blogger.com,1999:blog-9136955327077937319.post-45922137087521884702010-08-27T09:10:00.000-07:002010-08-27T09:10:21.588-07:00Enabling ASDM Access On Management Networkpixfirewall> enable<br />
Password:<br />
pixfirewall# configure terminal<br />
pixfirewall(Config)# interface ethernet1<br />
pixfirewall(Config-if)# nameif inside<br />
pixfirewall(Config-if)# ip address 192.168.1.1 255.255.255.0<br />
pixfirewall(Config-if)# no shutdown<br />
pixfirewall(Config-if)#<br />
<em>Activate ASDM and enable http server.</em><br />
pixfirewall(Config)# asdm image flash:/asdm.bin.<br />
pixfirewall(Config)# http server enable.<br />
<em>Open a connection for your PC. Example your pc IP address is 192.168.1.2</em><br />
pixfirewall(Config)# http 192.168.1.2 255.255.255.255 inside<br />
<em>Make sure all your config running properly.</em><br />
pixfirewall(Config)# show running http<br />
http server enabled<br />
http 192.168.1.0 255.255.255.0 inside<br />
pixfirewall(Config)#<br />
<em>Now your Cisco ASA/PIX can be access from your PC.<br />
Make sure your PC and Firewall has connected and open your web browser then enter this address</em> <a href="https://192.168.1.1/admin">https://192.168.1.1/admin</a>Blake McKeebyhttp://www.blogger.com/profile/13394600090606778425noreply@blogger.com0tag:blogger.com,1999:blog-9136955327077937319.post-45222794497798423932010-08-11T06:59:00.000-07:002010-08-11T06:59:29.041-07:00Converting Cisco 7912 to SIPConverting 7940/7960 to SIP is a walk in the park compared to converting a 7912. In order to convert the phone I had to:<br />
<br />
<ul><li>Point the phone to my tftp server and allow it to download the correct firmware. I used cp7912080000sip060111a</li>
<li>Then I found and edited the "sipexample.txt" file that came with the firmware to work with my SIP setup</li>
<li>Then I tried to run cfgfmt.exe on "sipexample.txt" but it told me that it could not find ptag.dat so I had to rename the file "sip_ptag.dat" that came with the firmware to ptag.dat for the tool to convert the text file into a binary file.</li>
<li>Finally i placed the binary file named gkMAC_ADDRESS in root of the tftp server and restarted the phone. My tftp server already had a binary copy of gkdefault.txt on it or otherwise I would have had to convert that file to binary with the tool and place it on the tftp server as well</li>
</ul>Blake McKeebyhttp://www.blogger.com/profile/13394600090606778425noreply@blogger.com1tag:blogger.com,1999:blog-9136955327077937319.post-6913013833322760272010-07-22T10:08:00.001-07:002010-07-29T12:57:55.794-07:00VoIP Faxing NotesLarge fix size jitter buffer<br />
<br />
Don't use echo cancellation <br />
<br />
Call starts out in either g711 or g729<br />
Then if the switch hears the cng tones and t.38 is enabled on the mediatrix box, it switches over to t.38<br />
If you are using g729, the switch might not detect the cng tones which is why g711 is better.<br />
The preferred Clear channel codec is only for when t.38 is disabled, and it describes what codec to then use for when cng tones are detected. <br />
T.38 is not a call setup protocol, thus the T.38 devices need to use standard call setup protocols to negotiate the T.38 call, e.g. H.323, SIP & MGCP.<br />
For call waiting to work the user must have the call waiting feature in broadsoft, it must be turned on and call waiting must be enabled on the mediatrix box otherwise it returns a busy signal<br />
Faxes Have to be set to the lowest baud rate 9,600. The default for most of the newer machines is 33,600.<br />
<br />
<br />
Step 1: Reduce baud rate to 9600 or lowest possible (probably 2400)<br />
Step 2: Disable error correction (ECM)<br />
Step 3: Disable bandwidth saver by dialing *99 (countrycode-areacode-number) <br />
<br />
The call path is a little confusing (why is there an INVITE from <br />
196.38.232.2 -> 192.168.0.14 and then an INVITE back to the latter from <br />
the former?), but the basic problem seems to be that you the default <br />
voice codec set to G.729A. This would explain why "training failed."<br />
<br />
The way that T.38 setup works - at least, in the Cisco voice gateway <br />
world - is that the call is first established using a voice codec. The <br />
DSPs on the receiving gateway analyze the acoustic content of the audio <br />
stream for fax tones and/or modem preambles ("listen"). If they are <br />
detected, the receiving gateway issues a re-INVITE and requests a switch <br />
to T.38 in its new SDP offer.<br />
<br />
In order for this to happen, the frequency response of the codec must be <br />
sufficient to reconstruct the clear-channel PCM content of the bearer <br />
channel. This is only possible with G.711u/A, which is little more than <br />
a packetised form of clear-channel 8 KHz PCM that carries the 3.1 KHz <br />
(300 Hz to 3400 Hz) bearer spectrum of a digital DS0 and/or a <br />
modem-grade analog line.<br />
<br />
G.729A is a codec that uses some advanced compression techniques relying <br />
on CELP (Code Excited Linear Prediction). Like many other compression <br />
schemes, it also shrinks the size of the data by referring via shorthand <br />
to elements of a waveform table/model that approximate the quantised <br />
value of a sample, but do not EQUAL it. It's good enough for voice that <br />
humans don't see too much of a difference vs. clear-channel PCM, but for <br />
any sort of scheme reliant on the encoding of digital data into the <br />
acoustic content of the bearer, it will positively not work.<br />
<br />
As a result, G.729A cannot be used for either the conveyance or <br />
detection of fax tones. You need to switch this call to G.711u or <br />
G.711A (in Cisco, "g711ulaw" or "g711alaw") before the appropriate <br />
exchange can take place. Hopefully, that should be all that is <br />
necessary to effect a switch to T.38. Make sure the default audio codec <br />
for the call is G.711u/A END-TO-END (in all VoIP legs), so that no <br />
transcoding to/from G.729A occurs anywhere.<br />
<br />
Of course, there are a variety of other issues that can be brought to <br />
bear on this scenario, but try that and see how it plays out. One thing <br />
at a time.Blake McKeebyhttp://www.blogger.com/profile/13394600090606778425noreply@blogger.com0tag:blogger.com,1999:blog-9136955327077937319.post-9666573668866857152010-07-22T08:56:00.000-07:002010-07-22T08:56:55.346-07:00Vlans with Linksys SRW224G4P & Non-Cisco RouterConfiguring the linksys switch to work with a non-cisco router was a bit of a pain. By default, all cisco interfaces are in vlan pvid 1, the native vlan and the packets are untagged. In order to separate the voice and data on my network, I set up two vlans on my router. VlanID 2 192.168.16.x is used for voice and VlanID 3 192.168.15.x is used for data. I then configured one of the router's four switch ports to use 802.1Q tagging and enable both vlans on that port.<br />
<br />
Each port on the linksys switch must be in one of the following three modes. Access is the default:<br />
<br />
General — The port belongs to VLANs, and each VLAN is user-defined as tagged or<br />
untagged (full 802.1Q mode).<br />
– Access — The port belongs to a single untagged VLAN. When a port is in Access mode, the<br />
packet types which are accepted on the port (packet type) cannot be designated. It is also not<br />
possible to enable/disable ingress filtering on an access port.<br />
– Trunk — The port belongs to VLANs in which all ports are tagged (except for an optional<br />
single native VLAN).<br />
<br />
To get the switch to work with my router, I first created two vlans to match those on my router. I then made vlan 3 the management vlan for the switch and gave it an address on the 192.168.15.x network. I then designated port 24 (although you can use any port) to be my trunk port between the linksys switch and my router and to the switch to tag both vlans across that port. I then set the pvid to all of the other ports (1-23) to be 3. The <em>PVID</em> is the default vlan for which vlan traffic will be untagged on the port. Finally I set ports 1-23 to be in general mode, told them to exclude vlan 1, tag vlan 2, and leave vlan 3 untagged. <br />
<br />
I then configured my phones to use vlan2 and gave them a 192.168.16.x address. Now any port on the linksys can be used for a phone or a computer, and the pc port on the back of cisco 7940's will also work.<br />
<br />
In retrospect I realize I could have only created one additional vlan on the linksys switch and used the native vlan as my data vlan but this took me a little bit of playing around with to find where to configure everything in the gui, and it wasn't worth changing when I got it working.Blake McKeebyhttp://www.blogger.com/profile/13394600090606778425noreply@blogger.com0tag:blogger.com,1999:blog-9136955327077937319.post-52611939477723519112010-07-16T15:07:00.000-07:002010-07-19T07:04:36.672-07:00Using PHP to Access Broadworks over SOAPFirst off, this topic is embarrassingly under-documented. developer.broadsoft.com was of very little help. <a href="http://developer.broadsoft.com/files/BW-ASProvisioningInterfaceSpec-R170.pdf">This document</a> was slightly helpful in its explanation regarding the session ID, JSESSIONID and how a unique connection relates to them but other than that it wasn't much help. To get this to work I had to download asocisoapclient_rel14.0, figure out how to get it work, then capture its transactions with a broadworks platform using wireshark, then mimic what it did in PHP. <br />
<br />
The asoscisoapclient is a valuable tool when attempting to get OCI over SOAP to work. Once you go through the painful process of getting it to work, you can take a capture while its executing and look at the communication between it and the webserver. To get asoscisoapclient to work i had to:<br />
<ol><li>Update JRE to 1.6.x </li>
<li>Make sure the JAVA_HOME environment variable is set to something like "C:\Program Files\Java\jre6" (quotes included). This can be set by right clicking on "My Computer"->Properties->Advanced->Environemnt Variables. Look under system variables and make sure it is there. If it is not, add it. From a command line you can check to make sure it has been set properly by typing echo %JAVA_HOME% and seeing the path displayed. That path must have the java "bin" folder in it.</li>
<li>Download <a href="http://developer.broadsoft.com/files/asocisoapclient_rel14.0.zip">asoscisoapclient</a></li>
<li>Unzip it</li>
<li>Open asoci soapclient_rel14.0\ASOCISoapClient\ociclient.config</li>
<ol><li>set userId</li>
<li> set password</li>
<li>set url to be http://theserver/webservice/services/ProvisioningService</li>
<li>set runMode = Single</li>
<li>set singleInputFile = input.xml</li>
<li>set singleOutputFile = response.xml</li>
</ol>
<li> Open a comand prompt</li>
<ol><li>change directory to where you unzipped the download. cd "C:\Documents and Settings\WIN_USERNAME\My Documents\Downloads\asoci<br />
soapclient_rel14.0\ASOCISoapClient"</li>
<li>execute startociclient.bat ociclient.config</li>
<li>The program will not be able to authenticate because the request it uses to login (LoginRequest) is depreciated. The LoginRequest14sp4 should now be used. I didn't bother editing and recompiling their code to make this change because I was able to see what I needed to without doing so.</li>
<li>The program will show use the OCI commands but not the SOAP headers. </li>
</ol></ol><br />
Now open wireshark, start a capture and execute the program. You should see http/xml packets go across your screen. The important thing that I learned from this is:<br />
<ol><li>What the soap envelope looks like. (I just copied it.)</li>
<li> That unlike the soap envelop, the OCI command must be html encoded.</li>
<li>HTTP POSTs must be used</li>
<li>The server is capable of using HTTP/1.1 even though the program uses HTTP/1.0 because the server responds using the HTTP/1.1 protocol (which is important because it allows for persistent connections)</li>
<li>The SOAPAction: "" header must be defined</li>
</ol>Finally, to replicate this in PHP I tried and confirmed that both PEAR's Http_Request class and PHP's extension php_curl.dll will do the trick. Http_Request seemed to be a little neater while curl seemed to be a bit more configurable. I've heard that Http_Request is just a wrapper for curl although I haven't confirmed that. The important thing to remember is to use Http/1.1. If you don't and plan on ...say.. retrieving 1192 user records, your connection will close in the middle of things and you'll get only about the first 30. Another important thing to remember is that all transactions have to be done across the same connection. Just because you have a valid Session ID and JSESSIONID doesn't mean that you can drop the connection and then open up another using the same Sesseion ID and JSESSIONID and pick up where you left off. I've read that a single Session ID and JSESSIONID are valid for hours, maybe even days, so it sounds like the trick is just keeping the connection open. Finally and most importantly understand this... OCI over SOAP is very strict and rigid. The ErrorResponses often times are not helpful and in my case were down right misleading. I kept getting a response that said "REQUEST_TIMEOUT – The OCS, or the Provisioning Server through the<br />
OCS, did not respond in a timely manner; the service may have received a RequestTimeoutException" which according to the little documentation that exists told me to "Verify that the Provisioning Server is running and<br />
Verify that the OCS is communicating with the Provisioning Server". This sent me on a diagnostic tangent wondering if PHP was using multiple HTTP connections during a single script execution, leaving my requests that weren't on the initial connection to timeout. The real problem turned out to be a misplaced "&" in the OCI command. Somewhere in the process of html encoding and decoding the requests it got added where it shouldn't have been and caused about 3 hours of unnecessary, discouraging pain.<br />
<br />
I will post my PHP class for accessing the broadworks platform when I finish it up. You can email blake.mckeeby@gmail.com and I can see if I can help although I am definitely no pro at this sort of thing.<br />
<br />
<i>Note:</i><br />
Apparently you can put more than one OCI request inside a SOAP envelope but I haven't tried this yet. It isn't recommended to put more than 15 OCI requests in a single envelope.Blake McKeebyhttp://www.blogger.com/profile/13394600090606778425noreply@blogger.com1tag:blogger.com,1999:blog-9136955327077937319.post-17382245341387823922010-07-14T11:38:00.000-07:002010-07-14T11:38:04.268-07:00Edgemarc Sip Registrion Control<div class="separator" style="clear: both; text-align: center;"></div><div class="separator" style="clear: both; text-align: center;"></div><div class="separator" style="clear: both; text-align: center;"></div><div class="separator" style="clear: both; text-align: center;"></div><div class="separator" style="clear: both; text-align: center;"><a href="http://4.bp.blogspot.com/_u_xjdB17CyE/TD4B5fOSoGI/AAAAAAAACWI/tU_MZGTJ_v0/s1600/imag.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://4.bp.blogspot.com/_u_xjdB17CyE/TD4B5fOSoGI/AAAAAAAACWI/tU_MZGTJ_v0/s320/imag.JPG" /></a></div><div style="text-align: left;"> </div><div style="text-align: left;">When the phone registers it tells the server how long its registration should be good for. If you want the edgemarc to intercept and replace this value, enable and edit the "Softswitch/IP-PBX expires Overides (s)" field. The softswitch then responds to the registration expire value with either what the phone sent of what it is configured for. If you want this value to be overridden enable and edit the "Phone Expires Override (s)" field. Finally the edgmarc prevents the softswitch from being flooded with registration attempts. The "Rate-Pacing interval (s)" determines how often the edgemarc will allow a phone's registration to be sent through it. </div><div style="text-align: left;">Note: when the edgemarc was configured as pictued above, summit-broadband said it was seeing reregistrations every 15 seconds excatly.</div><div style="text-align: left;"><br />
</div><div style="text-align: left;">Summit-broad uses the reregistrations to keep the session alive in their session border controllers.</div>Blake McKeebyhttp://www.blogger.com/profile/13394600090606778425noreply@blogger.com0tag:blogger.com,1999:blog-9136955327077937319.post-8275900932224197132010-07-14T10:07:00.000-07:002010-07-14T10:07:11.511-07:00Edgemarc Keepalive MessagesIf you tell the edgemarc to send keepalive messages it sends SIP Option Request "pings" (messages that ask the Sip Server what it is capable of). Some providers like Summit Broadband don't respond to these requests unless a phone is registered. Because the service provider doesn't respond the edgemarc thinks their service is down and goes into local mode. When the edgemarc is in local mode it doesn't forward the registration requests from the phone to the provider.<br />
<br />
Problem:<br />
If the edgemarc is started and the "Number of missed messages to declare alarm" is reached before the phone sends the registration request, the edgemarc goes to local only mode and the edgemarc will then never leave local only mode because the service provider will not respond to the Sip Option Request "pings"Blake McKeebyhttp://www.blogger.com/profile/13394600090606778425noreply@blogger.com0tag:blogger.com,1999:blog-9136955327077937319.post-32209186505079001922010-06-18T09:12:00.000-07:002010-06-18T09:12:03.078-07:00FXO Configuration on Edgemarc 4508<ul><li>Make sure that <i>Survivability</i> is set to Enabled (auto) on the Survivability page and that <i>Request Subscriber Information from SIP Server</i> is checked</li>
<li>On the Sip GW page make sure <i>Enable SIP FXO/Line</i> services is checked and <i>Enable FXO</i> port is checked for both port 1 and port 2</li>
<li>Finally on the VoIP Alg -> Sip -> Trunking page make sure there is an "Internal Sip Gateway" listed under the Sip Trunking Devices on the same network as the other VoIP devices and the Alg. Also make sure there is a Default Route routing all inbound calls to the Internal Gateway</li>
</ul>Blake McKeebyhttp://www.blogger.com/profile/13394600090606778425noreply@blogger.com0