Based on bretts script "Sending EMAIL (adv)" I have created a script which emails me with phone number and caller id of any calls to my landline phone number.
I should explain that this monitoring of the phone line is not an HAH function but is carried out by the Switchboard(mi4) and xAPtel(UKUSA) on dedicated HA PC on my home network. I have been monitoring my phone line for many years and the system works well.