Go to the command line and put in the following
- Code: Select all
grep 'Registered SIP' /var/log/asterisk/messages
That will go through your log and only show you all the lines where "Registered SIP" appeared in the log. Keep in mind that is only going to show within the time frame the log has. For example when I ran it I only had back to Feb 1, because that is the start of my log on that server. This can also be used to get just about anything you want out of a log just change out 'Registered SIP' for whatever you are looking for. In my case you are using something other than SIP phones you can change SIP out for IAX or whaterver you are looking for. Using just Registered all by itself brings up all kinds of log items that are not phones.
You can also use
- Code: Select all
grep --after-context=1 --before-context=1 'Registered SIP' /var/log/asterisk/messages
In this case it will give you the line prior to the search phrase in the log and the line after the search phrase in the log. This is useful if you looking for an event and you are looking for cause and result. You can just change the 1's to however many lines you want before the search result "--before-context" or however many you want after the search result "--after-context"
Hope this helps!