Thursday, September 10, 2009

Sharing Ethernet and Phone on the same CAT5 Cable

When we built our house 4 years ago, the builder installed a central wiring panel. Every room has a Cat5 jack in it that terminates back to a 110 block in this panel. However, they only ran 1 cable to each room, and it's only delivering standard phone. At the time, I didn't see a real need to pay a whole lot of extra money for a separate cable to support ethernet, when I could just setup a wireless router.

Then I got a job working from home, which included a VoIP phone. My office is upstairs and all my network gear is downstairs. So I initially installed DD-WRT on an extra Linksys Wireless Router and turned it into an Ethernet to Wireless Bridge and connected my VoIP phone to that. However, I started to experience issues with QoS using this setup that I never could really seem to resolve. So, I started looking at ways to get this phone on a wired connection. Obviously, I could move my DSL Modem and Router upstairs into the office, but I have other equipment downstairs that's connected to it. So what to do?

Well, knowing a few things about Ethernet and phones, it dawned on me that I could actually mix phone and Ethernet on a sinlge Cat5 cable. Standard Ethernet only uses 2 pairs out of the 4 available. That leaves 2 "extra" pairs. So, here's how I've re-wired everything to allow for a single Ethernet and 2 phone lines in every room now.

On a standard RJ45 connector, Ethernet only uses pins 1,2,4, and 5. I bought a small patch block from Fry's electronics and terminated each fo the cables from each room on the block. Then on the other side of the block I made a custom cable that only connected to pins 1,2,4,5 on the block, and an RJ45 on the other end that I plugged into a small Linksys switch, which fit nicely into the panel. Luckily the panel included an outlet for power to the switch. The remaining pins (3,6,7,and 8) I patched to the 110 block where my phone service comes in.

In order for this to work though, each jack in the house must also be rewired. Plugging an ethernet cable into the jack and connecting it to the PC could be dangerous to the PC. You've now got phone signal coming into the ethernet jack, and sending a 90 volt ringing signal into your PC is probably not a good thing. All I had to do was to split the pairs out again on the jack into 2 jacks - one for phone and one for ethernet.

I've now got 1 Ethernet and 1 Phone jack in each room, and it seems to be working really well. I was actually a bit concerned that I might get some interference from the ethernet signals and the DSL coming on on my phone line, but it all seems to be working really well.

Tuesday, September 8, 2009

Windows Home Server + Tuner Card + SageTV

First off, I've been playing with Windows Home Server lately, and I have to say I like it. It's based on Windows Server 2003, and gives you some pretty nice functionality packaged in a friendly interface. First off was taking my two 250GB drives and turning them into a single 500GB logical drive for storage. Second is setting up some default shares: Music, Pictures, Video, Public. And finally the backup solution is pretty slick. So now I have all of the PC's in my house backing up and all of my music and videos centralized. If I run out of space on the 500GB logical drive, I can just plop another drive in and 'add' it to my storage capacity.

However, this box used to serve as a media center PC, and has a Hauppauge HVR1600 tuner card in it. I hated to lose that functionality. So, I decided to install the drivers and see what I could do. I was hoping to be able to use this to schedule some recordings that I could watch from the other PCs in the house.

I've never been impressed with Hauppauge's WinTV interface, so I started looking for something better. What I came across was a really slick package: SageTV. SageTV offers a version that's compatible with Windows Home Server and turns the home server into a streaming server.
Install the SageTV client on your laptop and you can stream live or recorded TV from the Windows Home Server to your laptop.
I'm still running the trial of SageTV, so we'll see how it goes. Not sure I'm ready to fork out the $75 for the registered version just yet. But so far I'm liking this setup.

Next step.....Install Apache/PHP/Wordpress and setup a custom PhotoBlog for my wife's photography work.

Monday, April 13, 2009

TDM to h.323 to SIP and back again

We're working on an interesting project for a medium sized cable company.
They currently have a Nortel CS1000 located at their corporate office and we are tasked with implementing a SIP based IVR solution from Holly Connects for them. The problem is that the version of the CS1000 they are currently running does not support SIP. The customer has plans to upgrade the switch at some point, but times being what they are - it's not in the budget right now. So, how do you hook a SIP based IVR up to a Nortel CS1000?
Well, the CS1000 does support h.323. And it just so happens that we have a product capable of handling an h.323 to SIP translation. We use our FlexxGate product for several different applications where we're taking TDM to SIP. Support was already in place to convert h.323 from Avaya to SIP, so Nortel CS1000 h.323 to SIP wasn't hard to implement.

But, there was a wrinkle - we don't just need to bridge the h.323 to SIP divide, we also have to work with a CTI product from Syntellect (formerly Envox) called CTConnect. One of the things we need to is have the original call reference ID from the CS1000 available to the IVR application in order for the CTI functionality to work properly.
Through some fancy footwork one of our developers was able to extract the call reference ID from the Q.931 messages coming in on h.323 and pass it along to the IVR in the form of a custom SIP header.

And now, we are able to place a call from a landline, into the Nortel CS1000, out to FlexxGate on h.323, preserve the call reference ID, and pass the call on to the IVR via SIP.
A lot of moving parts, but it's working very well.

Thursday, March 19, 2009

Using VMWare as a backup/disaster recovery solution

Recently we had a customer with some legacy hardware lose a hard disk in a RAID array. Not really a major issue, but this hardware was fairly old, so finding a suitable replacement drive became an issue for them. They realized that they did not have any backups of the server, and if it did completely fail, their contact center would be seriously degraded.
We needed to come up with a fast, reliable solution to backup this server and allow for a very fast recovery if it did indeed fail. The server is an application server, so the files are basically static. No real day to day changes that need to be backed up.
I have used VMWare Player on and off for running Linux distros and even a small Asterisk system. So the thought came to me, "Hey, it would be cool if I could convert their old Windows 2000 Server into a Virtual Machine and run it using VMWare if the physical server dies".
Well, what do you know...VMWare actually makes a product that will convert a physical system to a Virtual Machine for you. The best part is that the conversion tool is freely available on their website. Since VMWare Player is also free, this ends up being a free disaster recovery solution.
I proposed the solution to the customer, and we decided to give it a try. We were able to sucessfully create an image of the Windows 2000 Server (and do it while the server was running - no down time here). We then brought the server down and fired up the virtual machine on another server. One small snag is an issue with the scsiport.sys driver in Windows 2000. As I always like to say, "Google is your friend.". A quick search led me to a soltuion and some good information on converting Windows 2000 systems.
It worked like a charm once we got it started up. The rest of the systems in the solution never knew the difference, and the application runs just fine.
Their IT Guy even commented that we could probably run the entire solution in virtual machines.
Here's the links to the products I used:
1. VMWare Converter: http://www.vmware.com/products/converter/overview.html
2. VMWare Virtual Disk Mount Utility: http://www.vmware.com/download/eula/diskmount_ws_v55.html
3. VMWare Player: http://www.vmware.com/products/player/

The customer likes the solution enough that they will be converting 40 other servers to Virtual Machine images to be used for disaster recovery. If you think about it, it's pretty slick. I can have a server completely fail and be back up and running in the time it takes to boot the virtual image. We're talking a matter of minutes to recover.

Tuesday, January 27, 2009

Oracle and JDBC versions

Finally recovered from the holidays, it's time to get back into the swing again.
Over the holidays, one of our developers ran into an interesting issue.
We were working on a middleware component that used the JDBC6 Oracle library and we needed it to connect to an Oracle 8 database. However, every time we attempted to connect to the database, we received the following error:

Connecting to database4: java.lang.ArrayIndexOutOfBoundsException:4

The error was very non-descriptive, but after a lot of troubleshooting, we determined that the issue was the JDBC version. JDBC6 was not compatible with Oracle 8, so we had to use JDBC14. Additionally, Oracle 8 required that the connection strong be built and used rather than populating the class variables and allowing the class to build the connection string.

Thursday, December 11, 2008

Troubleshooting Oracle Error

We had an IVR application which writes to an Oracle database start giving a pretty basic error tonight. The error basically said that the app could not access the table in Oracle. Not very descriptive, and not a lot to go from.
Now, this customer has multiple sites, and the database is replicated between all of the sites, and all were experiencing the issue.
We did some digging, and ended up looking to the Oracle Alert logs which were in

/u01/app/oracle/admin/<instance>/bdump

The alert log is called:

alert_<instance>.log

What we found were entries like this:

ORA-1654: unable to extend index <schema>.<index> by 128 in tablespace <tablespace>

This was a pretty clear indication of what the issue was, because the timestamps on the messages coincided with the timestamps on the IVR messages.
So we knew that the tablespace for the index was full. How do you fix that.
Well, you need to add more space to the tablespace. Here's a simple way to do that:

alter tablespace <tablespace>
add datafile '<data file path and name>'
size <size>m
autoextend off


This will add a datafile to the tablespace with a size as specified.
We did this and the errors went away. But now the question is how can we be proactive and prevent this in the future.
Well, periodically the free space in all of the tablespaces should be checked.
Here's a simple query to figure out how much free space is available in each tablespace:

select tablespace_name,
sum(bytes)/1024/1024 MB_Free
from dba_free_space
group by tablespace_name
order by sum(bytes)/1024/1024;

This will give you a list of each tablespace and the amount of free space in Megabytes.
If you see the free space of one of the tablespaces getting real low, it's time to add more.

Tuesday, December 2, 2008

A few recommended tools

Working between Windows and Unix systems, you find from time to time, tools that you wish you could have on both systems. Generally, I find I'm missing some Unix command on Windows. So I've compile a few links here for tools that I find handy.

Text Editor
You can never underestimate the value of a good text editor. I do a lot of log file reading, and a good text editor is required. Some of the files can get rather large in size, and they tend to be in a Unix format, so they don't work in Notepad. vi is the tool of choice on a Unix system. Here are few good ones for Windows (some free, some not)
  • vim : There is an actual port of vi to windows. This includes both a command line option, and an GUI option.
    See http://www.vim.org
  • Textpad: Textpad is a good, free text editor. It handles large files sizes, and different file formats.
    See http://www.textpad.com
  • EditPad: This is my tool of choice. It's not free, but it offers a lot of different features. It receognizes many extensions and does syntax highlighting, so if your looking at Java code, or SQL Queries, it automatically colors the commands for easier viewing.
    See http://www.editpadpro.com/
Tail
Tail is a great utility available on most Unix systems. Tail allows you to watch a log file in real time.
Grep
Grep is very handy for searching a group of logs for a specific string.
These are all essential tools for log file analysis.