Asterisk CLI Output


#1

Is there a location where I can parse the Asterisk CLI Verbose Information?

For example… to log into asterisk CLI you have to call asterisk -rvvv
All the information displayed at asterisk CLI is there a file or palce where I can get those info?
I want to display the information real time on a web page instead of going to bash


#2

This is set in logger.conf, The default directories for the logs is /var/log/asterisk.

They are not intended for machine parsing.


#3

Thanks!! Much appreciate it.


#4

this can be done in

This can be done with a few line a codes , I wont wrote the code having issues with my laptop key boad

read the content of /var/log/asterisk/full and print it on you browser

using php , you can use any of this functions file(), fopen, shell_exec() or any other


#5

Thanks! I’m using nodejs which im going to read the file but I dont see "/var/log/asterisk/full"
I only see the following under /var/log/asterisk/ …
cdr-csv , cdr-custom, cel-custom, messages, queue_log

I’m reading /var/log/asterisk/messages file and im only getting error notifications?
such as…

[Nov 19 22:50:30] Asterisk 13.18.2 built by root @ AsteriskFinal on a x86_64 running Linux on 2017-11-20 03:46:07 UTC
[Nov 19 22:50:30] NOTICE[1093] cdr.c: CDR simple logging enabled.
[Nov 19 22:50:30] NOTICE[1093] loader.c: 309 modules will be loaded.
[Nov 19 22:50:30] NOTICE[1093] res_odbc.c: res_odbc loaded.
[Nov 19 22:50:31] WARNING[1093] res_phoneprov.c: Unable to find a valid server address or name.
[Nov 19 22:50:31] ERROR[1093] ari/config.c: No configured users for ARI
[Nov 19 22:50:31] NOTICE[1093] pbx_lua.c: Lua PBX Switch loaded.
[Nov 19 22:50:31] NOTICE[1093] res_config_ldap.c: No directory user found, anonymous binding as default.
[Nov 19 22:50:31] ERROR[1093] res_config_ldap.c: No directory URL or host found.
[Nov 19 22:50:31] ERROR[1093] res_config_ldap.c: Cannot load LDAP RealTime driver.
[Nov 19 22:50:31] ERROR[1093] res_config_pgsql.c: PostgreSQL RealTime: Failed to connect database asterisk on 127.0.0.1:
[Nov 19 22:50:31] WARNING[1093] res_config_pgsql.c: PostgreSQL RealTime: Couldn't establish connection. Check debug.
[Nov 19 22:50:31] NOTICE[1093] chan_skinny.c: Configuring skinny from skinny.conf
[Nov 19 22:50:31] NOTICE[1093] confbridge/conf_config_parser.c: Adding default_menu menu to app_confbridge
[Nov 19 22:50:31] NOTICE[1093] cdr_pgsql.c: cdr_pgsql configuration contains no global section, skipping module load.
[Nov 19 22:50:31] NOTICE[1093] cel_custom.c: No mappings found in cel_custom.conf. Not logging CEL to custom CSVs.

I want the following Info…

Asterisk 13.18.2, Copyright (C) 1999 - 2014, Digium, Inc. and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.............................................
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
Connected to Asterisk 13.18.2 currently running on AsteriskFinal (pid = 1135)
    -- Called default_endpoint/sip:14075551111@192.5.111.13:5060
    -- Called default_endpoint/sip:14075552222@192.5.111.13:5060
    -- Called default_endpoint/sip:14075553333@192.5.111.13:5060
AsteriskFinal*CLI> core restart now


#6

It has to be enabled in logger.conf. The sample configuration comments it out.


#7

Thanks, I see I had to uncomment
full => notice,warning,error,debug,verbose,dtmf,fax