Logging
How to use the logfile
Logging is a powerful mechanism for tracking system activity. From the logfile, you can view the SIP packets and other important information that are generated by your PBX. The logfile is an invaluable tool that enables you to solve problems that are occurring on your PBX. It can answer questions like:
- "Why isn't my phone registering to the PBX?"
- "Why isn't Plug and Play working?"
- "Why can't I make outbound calls?"
- "Why isn't email working on my PBX?"
These and many other questions can be answered simply by using the logfile.
Log are available on system and domain level. Most messages are available on domain level; however some messages that don't have a domain context appear only on system level.
Viewing the logfile
In order to view the logfile, navigate to the Status > Logfile page in the administrator mode. On domain level, the logfile is available in the same area. The log file contains a list of entries with the following content:
- The log level: Log level 0 means highest importance while log level 9 means low importance (debug level).
- The time: This column shows when the event was recorded. The time is the local time, with the milliseconds after the dot. The date is not shown to keep the row short.
- The log category: The next column shows the log category where the entry was recorded.
- The log message: The log message contains the description of what has happened. All log messages are in English, there are no translations available for log messages.
- Log attachments: Some messages like tracing SIP packets contain an attachment which is shown below the log message. The size of the message is clipped so that it does not break the layout.
Using the clear button, the log will be deleted and using reload button, the log will be reloaded. The download button generates a file that can be used e.g. as attachment to an email or ticket.
Controlling log output
In order to control what is being written to the logfile, click on the setup button. This will bring up a dialog like below.
The log length: determines how many log entries the PBX will keep in memory. There is a trade off between the log length, the required memory and how long it will take to load those messages into the browser window.
The duration for logging: automaticall stops the logging after a certain time. This is useful when you are working with a live system and want to make sure that when done, the logging does not impose any unneeded load on the system.
The log filename: can be used to tell the system to write the log messages to the file system. The dollar-sign will be replaces with the current date; the PBX will automatically deleted logfiles that are older than three days in order to avoid clogging up the file system.
The PBX can also write the log messages to a syslog server. If this is required, the address needs to be put into the Syslog server IP address setting. It may also specify the port in the form address:port.
Writing messages to the memory log, to the file system and to the syslog server are independent from each other and may occur in parallel.
In order to set the log level for a specific category, select the log level from the respective drop down. In order to set all levels, you can use the first drop down All.
When the system receives or sends a SIP packet, it determines whether the packet will be logged and which log level the event will have.
- Log REGISTER: REGISTER packets deal with the registration of extensions or trunks, which can generate a lot of traffic. If you are not interested in the registration traffic, disable this setting (see Appendix B for more information on SIP messages).
- Log SUBSCRIBE/NOTIFY: SUBSCRIBE/NOTIFY deals with message waiting indications (MWIs), the LED state, and other used subscriptions.
- Log call messages: These packets usually belong to an ongoing call (e.g., INVITE, CANCEL, ACK, BYE). When you enable the logging for one of the previous categories, the SIP packets will be logged on log level 7. If your log level is below 7, the packets won’t show up in your log.
- Log Other Messages: This setting takes care of anything that are not part of the above 3 cases. When you enable the logging for one of the previous categories, the SIP packets will be logged on log level 7. If your log level is below 7, the packets won’t show up in your log.
- Log Watch List (IP): The watch list filters the SIP packets by IP address. This feature is useful when you have a specific device that you want to watch in the system’s log. Enter the IP addresses into this field. You can also enter multiple IP addresses into this field. In addition to the SIP messages, the system will also log other activities like TLS messages which are associated with the IP address.
Logging categories
You can enable or disable logging on a subsystem level (available subsystems are shown below):
- Log general events: These events are of general interest, for example, information about the working directory.
- Log SIP events: Events in this module relate to the SIP traffic of the system.
- Log media events: The system reports events about media processing, for example, a one-way audio RTP timeout. Setting this to a high log level will generate significant overhead for the system and should be done only when needed.
- Log IVR events: This module logs events related to processing user input (e.g., all DTMF events, including the auto attendant and the mailbox) and events related.
- Log email events: If you want to troubleshoot the email server interaction, turn this module on so that you’ll see SMTP events.
- Log webserver events: This module logs all HTTP-related material, including HTTP-based plug and play.
- Log webclient events: This module logs all HTTP client related material, such as sending out HTTP requests out, in the case of CDRs, as well as HTTP/SOAP-related material).
- Log registration events: When a device registers or deregisters, it appears in this module.
- Log SNMP events: SNMP events occur when an external SNMP agent requests information from the system.
- Log trunk events: Log events are related to trunks (e.g., when a trunk registers for the first time or when an inbound trunk calls).
- Log SOAP events: This subsystem deals with SOAP input and output.
- Log device provisioning: This module includes events related to the provisioning and the built-in FTP/TFTP server.
- Log TLS events: This module logs TLS-related messages in the log file.
- Log LDAP events: This module logs address book look-ups.
- Log configuration events: This module logs all events related to account creation, deletion, and modification.
- Log CSTA events: This module is dedicated to the CSTA subsystem.
- Log CRM events: This module is dedicated to the CRM and PMS subsystem.
- Log ACME certificate processing: When generating X.509 certificates, the system will send log messages to this category.
- Remote Provisioning Service interface: This log level filters messages from the remote provisioning subsystem.
- Database driver: Log events related to the database drivers (SQL/MongoDB)
- Log DNS events: Log events related the DNS queries go into this category.
- Log billing events: Events that are related to the generation of monthly bills are in this category.
- Log script events: Script events that are not send to other categories will be sent here.