Skip to main content

Logging in Asterisk

Sometimes, when debugging an issue, it’s useful to see and log extra information and at other times, you want logging to be minimal.
Asterisk has different types of message that can be logged. These are:
  • debug
  • notice
  • warning
  • error
  • verbose
  • dtmf
  • fax

logger.conf

Asterisk provides a number of ways of logging information. The logger.conf file (Location: /etc/asterisk/logger.conf) contains the configuration elements for logging.
;
; Logging Configuration
;
[general]
;
[logfiles]
debug => debug
messages => warning,error
console => notice,warning,error,debug,verbose,dtmf,fax
Arrow The first line tells Asterisk to log debug messages (the right side of the =>) to a file called debug (the left side of the =>) located in /var/log/asterisk/.
Arrow The second line tells Asterisk to log warning and error messages to a file called messages located in /var/log/asterisk/.
Arrow The third line tells Asterisk to send all messages to the CLI console.

asterisk.conf

The log directory can be changed by modifying the line astlogdir => /var/log/asterisk to point to the desired directory in the asterisk.conf file (Location: /etc/asterisk/asterisk.conf).
There are various levels of verbosity and debugging. Use set verbose or set debug followed by a numerical value to change them. Useful values range from 0 (disabled) to 10 (maximum) for verbosity and debugging levels.
To change verbosity and debugging levels, run the following commands in a CLI console:
core set verbose 10
; This sets verbosity at level 10
core set debug 10
; This sets debugging at level 10
You can also increase (but not decrease) the verbosity level when you connect to the Asterisk CLI from the Linux prompt, by using one or more -v parameters to the asterisk application.
To connect to the Asterisk CLI and set the verbosity level to three (because there are three -v parameters), run the following command in a console:
asterisk -vvvr
You can also increase (but not decrease) the debugging level when you connect to the Asterisk CLI from the Linux prompt, by using one or more -d parameters to the asterisk application.
To connect to the Asterisk CLI and set the debug level to three (because there are three -d parameters), run the following command in a console:
asterisk -dddr
It is also possible to activate other types of debug system: (see asterisk CLI command)
  • core set debug channel <all|channel> [off]
  • agi set debug [on|off]
  • iax2 set debug {on|off|peer}
  • sip set debug {on|off|ip|peer}
Rotating logs
Rotate logs by running the following command in the CLI console:
  • logger rotate
You can also do by putting the following command in a cron job:
  • /usr/sbin/asterisk -rx ‘logger rotate’
http://asteriskvoipsystem.org/logging-in-asterisk/

Comments

  1. You’ll want a extremely responsive assist staff, out there 24/7 and trained in the way to|tips on how to} deal with the most typical customer 1xbet complaints. It’s additionally a good suggestion to have a separate department offering customized take care of VIPs. Additionally, your customer assist staff must be multilingual — at the very least, {they must|they want to|they have to} converse the same language because the goal market.

    ReplyDelete

Post a Comment

Popular posts from this blog

Asterisk – CLI commands

Agent commands agent logoff  - Sets an agent offline agent show  - Show status of agents agent show online  - Show all online agents AGI commands agi dump html  - Dumps a list of AGI commands in HTML format agi exec  - Add AGI command to a channel in Async AGI agi set debug [on|off]  - Enable/Disable AGI debugging agi show commands [topic]  - List AGI commands or specific help dnsmgr refresh  - Performs an immediate refresh dnsmgr reload  - Reloads the DNS manager configuration dnsmgr status  - Display the DNS manager status Calendar commands calendar dump sched  - Dump calendar sched context calendar show calendar  - Display information about a calendar calendar show calendars  - Show registered calendars Channel commands channel originate  - Originate a call channel redirect  - Redirect a call channel request hangup  - Request a hangup on a given channel Cli commands cli check permissions  - Try a permissions config for a user cli reload permi

Step by step: Configure call recording - Asterisk tutorials

This article will cover enabling asterisk to record calls. You may want this to interview people over the phone, podcast, or some other purpose. In features.conf, under: [featuremap] uncomment the line that looks like this: automixmon => *3 ; One Touch Record a.k.a. Touch MixMonitor — Make sure to set the X and/or x option in the Dial() or    Queue() app call! Then, enable the X option for Dial() in your dialplan in extensions.conf: PLEASE NOTE:  change you need to make – add the X  your dial rule make look different with me. exten => s,n,Dial(SIP/100,60) make it this instead: exten => s,n,Dial(SIP/100,60,X) The X is what tells Asterisk to allow callers to dial *3 during a call to enable or disable recording. From the asterisk console (run asterisk -r), you should see a line like this appear when the user starts a recording: – User hit ‘*3′ to record call. filename: auto-xxxxx-EXTENSION-DIALEDNUMBER When the recording ends, un

Making video calls – Asterisk tutorial

sip.conf To be able to send video during a call, codec h263 and video support must be enabled. This is done by adding three lines in the sip.conf file (Location: /etc/asterisk/sip.conf). Add the following lines in the [general] tab of the file. videosupport = yes ; Enable video allow = h263 ; H.263 is our video codec allow = h263p ; H.263p is the enhanced video codec Reload Reload the sip.conf file by running the following command in the CLI console:  reload Config in Softphone  Click “Softphone”  Click “Preferences”    Click “Video Codecs”  Verify that h263 and h263+ are selected Click “OK”  Click the video (Webcam) icon to display the video  Dial the other sip phone (number 1002)  Click “Show Video” on the two sip phones. http://asteriskvoipsystem.org/making-video-calls-asterisk-tutorial/