Advice on Reading Asterisk Log files

Hi chaps

Does anyone here have any advice, or a link to a good KB, about how to read asterisk log files? I’m keen to know more about the best way to interpret the information in a log file.

One particular question is how best to follow a call through the log file, given that it may be one of many calls coming in or out at that time, and the log files can be huge. Are there any identifiers on each line that we can use to track the flow of the call and find the ultimate error that we might be interested in ?

Any advice welcome.


The number in square brackets is the thread ID. Typically there are two threads handling a simple call: the PBX thread, which is dedicated to the call, and the channel technology driver thread, which is shared. That means you can correlate dialplan related events but may not be able to do so for other events.

Call event logging may also prove useful, and that does have a call identifier.

So with the following seen in the logs, the number between the [] (in this case 23752) can be used to track the call through the logs, or is it the 00003d63 reference?

/var/log/asterisk/full-20130626:[2013-06-25 15:29:10] VERBOSE[23752] pbx.c: – Executing [90123456789@from-internal:1] Macro(“SIP/1036-00003d63”, “user-callerid,LIMIT,”) in new stack

SIP/1036-00003d63 is the name of the channel running in the dialplan, so will be constant for that call. Although, for current versions, the 00003d63 is a serial number of the number of allocations of SIP channels, other technology types will use different, or no intance identifier sequences, and SIP used to use the address of a data structure, which meant the result was only unique at one point in time. I use both the thread ID and the channel name to track calls. You may also need to use the B party channel name. Neither is sufficient in itself.

Thanks. Better get my grep hat on then.

ThreadID and channel name hunting I shall go.

Thanks very much.