I haven't had any luck acquiring Hook Status from my Voice modem so I decided to see if I could acquire it from my ELK M1.
I created three Texts that represent custom,
User-Defined (UD) commands for Hook Status and Ringing.
I chose the following format for the new User-Defined command:
UDXXXYYYY
where:
- UD indicates a User-Defined command.
- XXX is the user-defined type. I chose three characters to represent the type's acronym. Currently, I've defined "THS" for Telephone Hook Status and "TRS" for Telephone Ring Status.
- YYYY is the data. Four characters can be used to represent all sorts of data. For THS, Off Hook is "0001" and On Hook is "0000". For TRS, ringing is simply "0001"
I followed ELK M1's serial protocol format and added the packet length, reserved characters and CRC (using ELK's CRC Calculator) to arrive at the following Texts:
- User Defined Telephone Hook Status On Hook: 0DUDTHS000000E4
- User Defined Telephone Hook Status Off Hook: 0DUDTHS000100E3
- User Defined Telephone Ring Status: 0DUDTRS000100D9
I created three Rules that send the appropriate Texts to Serial Port 0 whenever the telephone rings and the line goes on/off hook.
I modified my Premise ELK M1 driver to receive the new category of "UD" commands. At the moment, it simply prints the received status. I'll enhance it so that it updates the status of a Telephone object.
Too bad the M1 doesn't report Caller ID because then I'd have everything I need from one source!
If anyone knows how to get a voice modem to report Hook Status, please let me know. I'd still prefer to use a modem to handle everything (not everyone owns an M1).