Asterisk 13 Logging To Two Places
Switched from Asterisk 1.8 to 13.3.2. Now it logs to /var/log/asterisk/full (good) as well as /var/log/messages (not good). Anyone know why?
# grep -v “^;” logger.conf
[general]
[logfiles]
console => notice,warning,error messages => error full => notice,warning,error,debug,verbose,dtmf,fax
Thankfully, the …/full logs are rotating properly now (thanks Dale) but we don’t need both files cluttered up. We use /var/log/asterisk/full pretty extensively for troubleshooting, but I want /var/log/messages for other stuff. Didn’t do this under the old version.
Any other files you want to see?
Running on CentOS release 7.1.1503
Thomas M. Peters | Systems Administrator | tpeters@mcts.org Desk: 414.343.1720 | Helpdesk: x3400 or helpdesk@mcts.org
8 thoughts on - Asterisk 13 Logging To Two Places
messages => error
states to log error messages to ‘messages’ log file
asterisk -rx “logger reload”
—
Telecomunicaciones Abiertas de México S.A. de C.V. Carlos Chávez dCAP #1349
+52 (55)9116-91161
—
Ok, commented out that line. It’s still doing it. Reloaded dialplan. Please don’t tell me I have to restart asterisk.
Thomas M. Peters | Systems Administrator | tpeters@mcts.org Desk: 414.343.1720 | Helpdesk: x3400 or helpdesk@mcts.org
messages => error
states to log error messages to ‘messages’ log file
Still doing it. And the messages in there (/var/log/messages) are not just errors. They look a lot like the verbose log entries I’m seeing in
/var/log/asterisk/full Recall that my original logger.conf had
messages => error in it.
Jun 22 03:23:39 deneb asterisk: [Jun 22 03:23:39] — Called IAX2/incoming2fdapbx:sgsdfgsdgsdfg@xd-apbx.mcts.org/5263
Jun 22 03:23:39 deneb asterisk: [Jun 22 03:23:39] — Call accepted by 192.168.2.210:4569 (format ulaw)
Jun 22 03:23:39 deneb asterisk: [Jun 22 03:23:39] — Format for call is (ulaw)
Jun 22 03:23:39 deneb asterisk: [Jun 22 03:23:39] —
IAX2/192.168.2.210:4569-14947 is ringing Jun 22 03:23:46 deneb asterisk: [Jun 22 03:23:46] —
IAX2/192.168.2.210:4569-14947 answered DAHDI/i1/4148034154-fde Jun 22 03:23:46 deneb asterisk: [Jun 22 03:23:46] — Channel DAHDI/i1/4148034154-fde joined ‘simple_bridge’ basic-bridge
Jun 22 03:23:46 deneb asterisk: [Jun 22 03:23:46] — Channel IAX2/192.168.2.210:4569-14947 joined ‘simple_bridge’ basic-bridge
Jun 22 03:24:22 deneb asterisk: [Jun 22 03:24:22] — Span 1:
Channel 0/1 got hangup request, cause 16
Jun 22 03:24:22 deneb asterisk: [Jun 22 03:24:22] — Channel DAHDI/i1/4148034154-fde left ‘simple_bridge’ basic-bridge
Jun 22 03:24:22 deneb asterisk: [Jun 22 03:24:22] — Channel IAX2/192.168.2.210:4569-14947 left ‘simple_bridge’ basic-bridge
Jun 22 03:24:22 deneb asterisk: [Jun 22 03:24:22] == Spawn extension
(to-internal, 5263, 5) exited non-zero on ‘DAHDI/i1/4148034154-fde’
Jun 22 03:24:22 deneb asterisk: [Jun 22 03:24:22] — Executing
[h@to-internal:1] NoOp(“DAHDI/i1/4148034154-fde”, “Hangup”) in new stack Jun 22 03:24:22 deneb asterisk: [Jun 22 03:24:22] — Hungup
‘IAX2/192.168.2.210:4569-14947’
Jun 22 03:24:22 deneb asterisk: [Jun 22 03:24:22] — Hungup
‘DAHDI/i1/4148034154-fde’
Jun 22 03:29:26 deneb asterisk: [Jun 22 03:29:26] — Accepting call from ‘4472977992’ to ‘3446711’ on channel 0/4, span 2
Jun 22 03:29:26 deneb asterisk: [Jun 22 03:29:26] — Executing
[3446711@from-pstn:1] NoOp(“DAHDI/i2/8472977992-5f4c”, “Seven digits:
3446711”) in new stack Jun 22 03:29:26 deneb asterisk: [Jun 22 03:29:26] — Executing
[3446711@from-pstn:2] GotoIf(“DAHDI/i2/8472977992-5f4c”,
“0?local-overrides,4143446711,1”) in new stack Jun 22 03:29:26 deneb asterisk: [Jun 22 03:29:26] — Executing
[3446711@from-pstn:3] Goto(“DAHDI/i2/8472977992-5f4c”, “4143446711,1”)
in new stack Jun 22 03:29:26 deneb asterisk: [Jun 22 03:29:26] — Goto
(from-pstn,4143446711,1)
Jun 22 03:29:26 deneb asterisk: [Jun 22 03:29:26] — Executing
[4143446711@from-pstn:1] NoOp(“DAHDI/i2/8472977992-5f4c”, “IVR call”) in new stack Jun 22 03:29:26 deneb asterisk: [Jun 22 03:29:26] — Executing
[4143446711@from-pstn:2] Set(“DAHDI/i2/8472977992-5f4c”,
“GROUP()=INBOUND”) in new stack Jun 22 03:29:26 deneb asterisk: [Jun 22 03:29:26] — Executing
[4143446711@from-pstn:3] Answer(“DAHDI/i2/8472977992-5f4c”, “”) in new stack Jun 22 03:29:26 deneb asterisk: [Jun 22 03:29:26] — Executing
[4143446711@from-pstn:4] Wait(“DAHDI/i2/8472977992-5f4c”, “”) in new stack Jun 22 03:29:26 deneb asterisk: [Jun 22 03:29:26] — Executing
[4143446711@from-pstn:5] Set(“DAHDI/i2/8472977992-5f4c”, “IVRTrunk=”) in new stack Jun 22 03:29:26 deneb asterisk: [Jun 22 03:29:26] — Executing
[4143446711@from-pstn:6] GotoIf(“DAHDI/i2/8472977992-5f4c”,
“1?secondary”) in new stack Jun 22 03:29:26 deneb asterisk: [Jun 22 03:29:26] — Goto
(from-pstn,4143446711,8)
Jun 22 03:29:26 deneb asterisk: [Jun 22 03:29:26] — Executing
[4143446711@from-pstn:8] Set(“DAHDI/i2/8472977992-5f4c”,
“IVRTrunk=SIP/sipivr:1NA6oZjTg1rjhZN8lArDgzLI7z8V2fxV@desann-voip.mcts.org”)
in new stack Jun 22 03:29:26 deneb asterisk: [Jun 22 03:29:26] — Executing
[4143446711@from-pstn:9] GotoIf(“DAHDI/i2/8472977992-5f4c”,
“0?tertiary”) in new stack Jun 22 03:29:26 deneb asterisk: [Jun 22 03:29:26] — Executing
[4143446711@from-pstn:10] Dial(“DAHDI/i2/8472977992-5f4c”, ”
Thomas M. Peters | Systems Administrator | tpeters@mcts.org Desk: 414.343.1720 | Helpdesk: x3400 or helpdesk@mcts.org
asterisk -rx “logger reload”
—
Telecomunicaciones Abiertas de México S.A. de C.V. Carlos Chávez dCAP #1349
+52 (55)9116-91161
—
The line you commented out was writing errors to /var/log/asterisk/messages
The problem you are having is the logging to /var/log/messages via syslog. It appears that Asterisk is sending verbose logging out to syslog even though logger.conf does not have syslog configured. I am not sure why Asterisk is doing that, and I do not want to play on a production system.
I added a filter to the /etc/rsyslog.conf file
:syslogtag, contains, “asterisk” stop
Syslog is still receiving the messages, but is discarding them.
Dale
Nice to learn a new (to me) feature of rsyslog.
What does ‘logger show channels’ show?
I turned on the messages that he had in the file again, all the logs were in /var/log/asterisk and it does not show anything for syslog.
asterisk -rx ‘logger show channels’
Channel Type Status Configuration
——- —- —— ———–
Sorry, Gmail got me there.
No, ‘pidof logger’ returns nothing.
You may have a point about how it is being started however. This is CentOS 7 and Asterisk is being started by systemd. I am not sure I
get along with systemd yet, so perhaps it is doing something with syslog that I am unaware of.