Perhaps the most important skill required to troubleshoot is reading the log files. Like other Linux services, asterisk writes the logs in /var/log/asterisk
To enable a full log you should edit the /etc/asterisk/logger.conf and uncomment the full line. Afterwards you must run this command to apply changes:
# asterisk -rx “logger reload”
Here are examples of tracing in logs:
- cat /var/log/asterisk/full | grep ERROR
- cat /var/log/asterisk/full.1 | grep 9878 | grep “some text”
- cat /var/log/asterisk/full|grep “user-callerid: “|grep 9899 > /var/log/asterisk/9899.log
- cat /var/log/asterisk/full.1| grep “[22435]” > 9864.log
- tail /var/log/asterisk/full | tee log_exmpl.txt

