I have not looked at or used any of these code examples, but they do show how to detect
off-hook conditions and a lot more. Just figured you could find something useful in there
somewhere.