Setting up MythNotify
How-To guide on setting up Mythnotify (callerid)
By Dennis Hand
modifications by Geoff Scott
troubleshooting by Jim Shank
These are the dependencies that are required for Mythnotify. Chances are they have already been installed on your system.
First download the mythudprelay program.
Then, compile this feature
No dependencies are needed here. Download the Caller ID Broadcaster program.
Compile this feature
The one problem I had was trying to figure out how to make these two features startup at boot. I came up with were two startup scripts that go into your Autostart folder of your desktop manager. That could be KDE or XfCE4 which is what I use. This is my path to Autostart.
Yours might be
Let's go ahead and make a file called callerid.sh and place it in our Autostart folder.
This is the contents of callerid.sh
Same permissions as above.
The drawback to having your scripts in ~/.kde/Autostart is that they are only executed when a user logs in and opens a KDE session. I wanted MythNotify to start automatically on my backend server without any intervention. I found that the following lines work when added to /etc/rc.d/rc.local (Fedora/RedHat/CentOs):
/path/to/cidbcast --file=/path/to/cidbcast.xml --device=/dev/modemDevice --init='InitString' & /path/to/mythudprelay --xslfile /path/to/callerid.xsl --bcast='255.255.255.255' --udpport_in=6947 --udpport_out=6948 &
Of course replace "/path/to" with the actual location of your files (mine are in /usr/local/bin), and "modemDevice" and "InitString" with the appropriate values for your modem (mine are ttySHCF0 and AT+VCID=1 for a Conexant HCF modem).
Now that we can turn on-off the CallerID feature with the remote control, we now need to put callerid.sh into our PATH. This allows us to execute callerid.sh from anywhere by just giving it the filename rather than the entire path. Also we will be creating our on-off script to work with irexec. (note: Please note that I am using a newer version of QT so qt-3.2 in the command below reflects that. You may be using qt-3.1 so make sure you know what version you're running to add to your PATH. Also note that my last entry is the Autostart folder of my home directory. This is where my callerid.sh resides. Adjust yours to reflect your callerid.sh PATH).
change to something like this
This changes your PATH permanently. Restart X for the effects to take place
begin prog = irexec button = BLANK config = /usr/local/bin/callerIDtoggle.sh end
The cidbcast program automatically defaults to com1, which is ttyS0. Make sure you have proper permissions set on ttyS0 in the /dev directory. If your using an internal modem this will default to another comport such as /dev/ttyS15 or possibly /dev/modem. If your having problems setting up your modem correctly use "./cidbcast --help" for more help. Once this has been all setup, give your computer a reboot to see if it works. You should see the TR(transmit receive) light come on, using an external modem, when your desktop splash screen comes up. This means the modem is ready to accept incoming calls.
./cidbcast -v --file cidbcast.xml --init="AT S7=45 S0=0 L0 V1 X4 Q0 +VCID=1"
This will show you what data the modem is actually capturing and sending. In my case, cidbcast was unable to find the data in the caller id stream. Using Minicom, I found out the format of my caller id was:
DATE=0427 TIME=1153 NAME=SCHMOE,JOE NMBR=3035551212
What is expected by cidbcast is:
DATE = 0427 TIME = 1153 NAME = SCHMOE,JOE NMBR = 3035551212
I am not sure what the standard format is but a quick edit of the cidbcast.c to correct the fields:
if ( (field_ptr = extract_cid_field(buffer, len, "NMBR=", &field_len)) || (field_ptr = extract_cid_field(buffer, len, "CALLER NUMBER: ", &field_len)) )
- notice the removal of the space between the = and the label/data pairs.
make clean, make and retest as above to see if you got it right.