A simple web-based Caller ID log viewer that reads cidcall.log from NCID (Network Caller ID) and displays it in a user-friendly table format. The current implementation uses JavaScript to fetch and parse the log file, formatting the date and time for better readability, providing a lookup for unknown numbers, and offering features like log downloads and adjustable call history display.
- Displays caller information (Date, Time, Number, Name)
- Formats dates into UK format (DD/MM/YYYY) and recognizes 'Today' and 'Yesterday'
- Live updates every 5 seconds (only updates if new entries appear)
- Number lookup for unknown callers via who-called.co.uk
- Option to change history length (Last 10, 20, 50, or All calls)
- Download log file as
cidcall.log - Audio notification when a new call appears
- Mobile responsive design
- Cache-busting technique to ensure the latest log is always fetched
Ensure you have NCID (ncid) installed and running - https://ncid.sourceforge.io/index.html.
The log file is typically stored in:
/var/log/ncid/cidcall.log
git clone https://github.com/allanstevens/PhoneLog.git
cd caller-id-log-viewerOr just download the files from here.
Since JavaScript in a browser cannot access system log files directly, you need to create a symbolic link in your web server's www directory:
ln -s /var/log/ncid/cidcall.log /var/www/html/cidcall.logMake sure the web server has permission to read the log file:
chmod 644 /var/log/ncid/cidcall.logCopy the index.html file to your web server directory:
cp index.html /var/www/html/Restart the web server if needed:
systemctl restart apache2 # For Apache
systemctl restart nginx # For Nginx- Open the web page in a browser:
http://yourserver/PhoneLog - Adjust the call log display using the dropdown menu
- Click Download Log to save a copy of the log file
- Unknown numbers can be clicked to search who-called.co.uk
- A beep sound will play when new calls are detected
The current JavaScript-based version is simple but can be improved significantly. Here are some potential enhancements:
Instead of using JavaScript to fetch the log file, a PHP script can read the file and serve it dynamically. This would:
- Remove the need for a symbolic link (
ln -s) - Allow real-time updates without needing a full reload accessed via seeking at the end or using tail, which would be more efficient then downlading the whole file via javascript
- Improve security by restricting direct access to the log file
- Restrict log access using user authentication (e.g., login system)
- Log and monitor access to caller history
While this setup works well for simple cases, other solutions might be better. Check out the ncid.sourceforge.io website for other solutions.
- Ensure NCID is running and logging calls:
tail -f /var/log/ncid/cidcall.log
- Verify web server permissions:
ls -l /var/log/ncid/cidcall.log
- Check JavaScript errors in the browser console (
F12> Console)
- Make sure the symbolic link exists and is accessible by the web server:
ls -l /var/www/html/cidcall.log
- Try using
chmod 644 /var/log/ncid/cidcall.logto fix permissions
- Ensure the browser is not caching old logs (
Shift + Refresh) - Try opening the log file manually and verifying new calls are recorded
This project is licensed under the MIT License.
Pull requests and feature suggestions are welcome! If you'd like to contribute, fork the repo and submit a PR with improvements.
Happy coding! 🚀