Asterisk Tutorial 50 – Asterisk Logger - pascom - ContactCenterWorld.com Blog
Introducing Asterisk and The Asterisk Logger
Welcome to the 50th episode of Introducing Asterisk, the step by step guide to Asterisk phone systems, and to celebrate we’re kicking off a new topic by taking a look at the Asterisk Logger.
What is The Asterisk Logger
In the past we have used Wireshark for debugging our SIP protocols. However, not everything speaks SIP – what then? Until now, we have always used the Asterisk CLI when testing and debugging our system. By which I mean we made some changes, set the verbosity level to 3 (
asterisk -rvvv), reloaded the dialplan, made a call and then analysed the CLI output.
That’s fine for testing purposes when first setting up your Asterisk phone system. But good luck using this method in a productive system – you will need the reading skills of superman. Moreover, the question of how to debug your dialplan or historical data still remains? And this where the Asterisk Logger (
logger.conf) comes into play.
In a nutshell, the Asterisk Logger is a logging mechanism which can write logs to files or to the syslog system (i.e. the Asterisk Console). In order to configure the Asterisk Logger, you will need to access logger.conf as the root asterisk user using the following command:
vi etc/asterisk/logger.confWhere vi equals your choosen Linux Text Editor.
Using The Asterisk Logger
Scroll down to the [Logfiles] section within the
logger.conf configurations file. Under Logfiles, you will find a number of options (or levels as they are referred to by Asterisk) which can be included in the log file, as shown below:
These options are not all necessary, but it is good to know they exist should you need more information in your log files. Pay particular attention to the verbose option as it also provides you with the option to set the verbosity level.
It is also worth noting the syntax format is also explained in the above screenshot. When configuring your Asterisk Logger, you will need to use the following format:
filename => level options (i.e. notice,warning,error)
This is illustrated clearly by the screenshot below which was captured further on in the logger.conf configurations file.
It is also important to note that the grey lines are actually your configurable options which can be modified to match your needs, as highlighted below:
"console" relates to the Asterisk console and the filename
"messages" relates to an actual log file. Note that if the settings were left as above, the verbosity level would be set to whatever default level you have configured in the Asterisk Startup configurations. Therefore, for debug purposes we would suggest setting the verbosity level for the
"messages" log file as explained below:
messages => notice,warning,error,verbose(3)
Our recommendation would to set a verbosity level of 3 as this will ensure that dialplan elements will also be logged and can therefore be analysed later when debugging historical issues.
Save your changes and that’s it you’re down – well almost. Don’t forget to log back into the Asterisk CLI and reload the Asterisk Logger using the command below:logger reload
Now you are done! However, in the video above we also explain a few additional options such as
Logger Rotate and so on – so worth watching it in full!
Mathias Top Tip
First up, when configuring the Asterisk Logger, we wouldn’t recommend adding a fixed verbosity level to the “console” log file. Mainly as this can always be changed using the verbosity switches as we have done in every tutorial before now.
Next up, when you are first configuring your system it could be a good idea to set the default verbosity level in the Asterisk startup configurations. However, one setup and you have ironed out the crinkles, then in order to save hard disk storage space, we would recommend setting it back to 0 or the equivalent of -r.
In order to do this, you will need to modify the verbose level in the
etc/init.d/asterisk.conf to match you desired levels of verbosity.
pascom are the developers of the software-based mobydick VoIP phone system for business. mobydick offers businesses with a viable alternative to proprietary PBX solutions. mobydick combines all the flexibility of Asterisk in one easy to install, manage and use solution.
Packed full of Unified Communication tools and PBX functions, mobydick is the fully featured Open Standards phone system to meet today’s communication needs.
For more on our mobydick phone system and to arrange a free personalised demo, give us a call on +49 991 29691 200 / +44 203 1379 964 or drop us a line via our website. Alternatively, take mobydick for a test spin with our free community download and find out how it can benefit your business communications.
Until next time – Happy VoIPing!
Publish Date: June 1, 2016 5:00 AM
|All Suppliers||Get Listed|
(VIEW OUR PAGE)
CTI Software is the creator of custom application called Davos, which complements the telephone client solutions with intelligent features such as automated call attendant, call recording and archivin...
(VIEW OUR PAGE)
HigherGround develops data collection, information storage, and interaction analytics solutions that easily transform data into actionable intelligence, enabling operational optimization, enhanced per...
(VIEW OUR PAGE)
Advanced AI technology and Natural Language Processing delivered to clients in the Cloud that harnesses both voice and digital conversations. The focus is on building an environment where intelligent ...
View more from pascom
Recent Blog Posts:
|Nexbridge UK SIP Provider pascom Interoperability||October 17, 2017 5:00 AM|
|What is Unified Communications?||September 29, 2017 5:00 AM|
|pascom 16 Focuses on UCC UX||September 26, 2017 5:00 AM|
|Summer Special: Cloud PBX Bundle||July 17, 2017 5:00 AM|
|pascom Boosts UC Offering with UK Hosted PBX||May 8, 2017 5:00 AM|
|pascom Launches UK Hosted PBX||May 5, 2017 5:00 AM|
|pascom Launch Hosted mobydick Telephony Service||October 4, 2016 5:00 AM|
|mobydick 7.13 Release||September 12, 2016 5:00 AM|
|Asterisk Tutorial 58 – Asterisk AMI Originate Dial||July 27, 2016 5:00 AM|
|Asterisk Tutorial 57 – Asterisk AMI Connect & Authenticate||July 20, 2016 5:00 AM|