Hello, I think acc has its own log facility -- check the readme of the module.
I guess it should be set to the core value if not explicitly set for the module. Cheers, Daniel On 27/11/14 13:13, Massimo Varriale (IPZeta) wrote: > Hi Daniel! > It's really a permission problem! > It's not relative to permission itself (could be also 777) but it's > the owner of the custom folder that should be exactly that way: > > In my example the folder is >>> /home/sip_logs/kamailio.log > > /home could be any user, in my system is owner root:root > sip_logs MUST be owner root:syslog and permission 775 > kamailio.log MUST be syslog:adm > > So it worked! > > > Now, the only question is regarding syslog where it's logging ACC > events with this way: > > Nov 27 12:54:54 /usr/sbin/kamailio[30533]: NOTICE: acc [acc.c:318]: > acc_log_request(): ACC: transaction > answered: > timestamp=1417089294;method=INVITE;from_tag=1aba976b;to_tag=b4426d5d;call_id=7193b6c1414fd579888c3b8a62695e1b@0:0:0:0:0:0:0:0 > <mailto:call_id=7193b6c1414fd579888c3b8a62695e1b@0:0:0:0:0:0:0:0>;code=200;reason=OK;src_user=1111111;src_domain=sip.mymaskeddomain.com;dst_ouser=222222;dst_user=222222;dst_domain=151.64.131.122 > Nov 27 12:54:55 ns427791 /usr/sbin/kamailio[30532]: NOTICE: acc > [acc.c:318]: acc_log_request(): ACC: transaction > answered: > timestamp=1417089295;method=BYE;from_tag=b4426d5d;to_tag=1aba976b;call_id=7193b6c1414fd579888c3b8a62695e1b@0:0:0:0:0:0:0:0 > <mailto:call_id=7193b6c1414fd579888c3b8a62695e1b@0:0:0:0:0:0:0:0>;code=200;reason=OK;src_user= > 1111111;src_domain= sip.mymaskeddomain.com > <http://sip.mymaskeddomain.com>;dst_ouser= > 222222;dst_user=393934887807;dst_domain=151.64.131.122 > Nov 27 12:54:55 ns427791 /usr/sbin/kamailio[30532]: NOTICE: acc > [acc_cdr.c:307]: log_write_cdr(): start_time=1417089290.821; > end_time=1417089295.839; duration=5.018 > > > Is there a way to log accounting events also to my custom LOG? > And also, is debug=2 useful to debug/audit server status? > > Thank you for your great help! > > Kamailio Rocks!!!!! > > > > > > > > Il giorno 27/nov/2014, alle ore 11:59, Daniel-Constantin Mierla ha > scritto: > >> Hello, >> >> might be a permissions problem, can you try with kamailio log path >> being /var/log/kamailio.log? >> >> Cheers, >> Daniel >> >> On 27/11/14 11:49, Massimo Varriale (IPZeta) wrote: >>> Hi All! >>> I've edited rsyslog files adding local7.none and it's not yet >>> working. Of course restarting both kamailio and rsyslogd >>> What i have now is that I'm even trying to run the process as root >>> but it's always writing logs into syslog and not in my custom folder >>> log file. >>> >>> I've tried using LOG7 and LOG0 as the wiki is suggesting but with no >>> success.. >>> >>> >>> >>> Now my rsyslog files is: >>> >>> >>> cat /etc/rsyslog.d/50-default.conf >>> # Default rules for rsyslog. >>> # >>> #For more information see rsyslog.conf(5) and /etc/rsyslog.conf >>> >>> # >>> # First some standard log files. Log by facility. >>> # >>> auth,authpriv.*/var/log/auth.log >>> *.*;auth,authpriv.none,local0.none,local7.none-/var/log/syslog >>> >>> #kamailio logs >>> local7.* -/home/sip_logs/kamailio.log >>> local0.* -/home/sip_logs/kamailio.log >>> >>> >>> >>> cat /etc/kamailio/kamailio.cfg >>> ### LOG Levels: 3=DBG, 2=INFO, 1=NOTICE, 0=WARN, -1=ERR >>> #!ifdef WITH_DEBUG >>> debug=4 >>> log_stderror=no >>> #!else >>> debug=2 >>> log_stderror=no >>> #!endif >>> >>> memdbg=5 >>> memlog=5 >>> >>> log_facility=LOG_LOCAL0 >>> >>> >>> >>> >>> >>> >>> >>> Il giorno 26/nov/2014, alle ore 13:40, Salman Zafar ha scritto: >>> >>>> Hi MV, >>>> >>>> You do have correct rights on the log file, if you are not running >>>> kamailio from root, right?. >>>> >>>> check if it is not log_stderror=no, or disk space or try directly >>>> adding in rsyslog.conf.. just random thoughts..if you have not >>>> managed to fixed it yet. >>>> >>>> >>>> >>>> On Wed, Nov 26, 2014 at 4:20 PM, Massimo Varriale (IPZeta) >>>> <m.varri...@ipzeta.it <mailto:m.varri...@ipzeta.it>> wrote: >>>> >>>> Hi Salman, >>>> yes, I've restarted several times the syslog process and also >>>> as I've applied several updates and make some network changes >>>> I've rebooted completely the server several times also from my >>>> config changes. >>>> However, logs are still written in syslog. >>>> >>>> I'm using 4.2.0 from packages, if this could be different... >>>> >>>> Thank you so much >>>> Max >>>> >>>> >>>> >>>> Il giorno 26/nov/2014, alle ore 12:13, Salman Zafar ha scritto: >>>> >>>>> Hi, >>>>> >>>>> Hoping you restarted (r)syslog service as well as kamailio. >>>>> >>>>> Configs look pretty much okay I guess. >>>>> >>>>> >>>>> On Wed, Nov 26, 2014 at 4:07 PM, Massimo Varriale (IPZeta) >>>>> <m.varri...@ipzeta.it <mailto:m.varri...@ipzeta.it>> wrote: >>>>> >>>>> Hi, >>>>> I'm trying to move Kamailio LOGS from syslog to >>>>> kamailio.log into another folder but on Ubuntu 14.04 it >>>>> seems ignoring my settings. >>>>> All Logs are always saved in /var/log/syslog >>>>> How to move Kamailio Logs? >>>>> >>>>> >>>>> cat /etc/rsyslog.d/50-default.conf >>>>> # Default rules for rsyslog. >>>>> # >>>>> #For more information see rsyslog.conf(5) and >>>>> /etc/rsyslog.conf >>>>> >>>>> # >>>>> # First some standard log files. Log by facility. >>>>> # >>>>> auth,authpriv.*/var/log/auth.log >>>>> *.*;auth,authpriv.none,local0.none-/var/log/syslog >>>>> >>>>> #kamailio logs >>>>> local7.* >>>>> -/var/log/kamailio/kamailio.log >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> /etc/kamailio/kamailio.cfg >>>>> log_facility=LOG_LOCAL7 >>>>> >>>>> >>>>> >>>>> Thank you so much >>>>> Max >>>>> >>>>> >>>>> _______________________________________________ >>>>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users >>>>> mailing list >>>>> sr-users@lists.sip-router.org >>>>> <mailto:sr-users@lists.sip-router.org> >>>>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users >>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> Regards >>>>> >>>>> M. Salman Zafar >>>>> VoIP Professional >>>>> >>>>> _______________________________________________ >>>>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users >>>>> mailing list >>>>> sr-users@lists.sip-router.org >>>>> <mailto:sr-users@lists.sip-router.org> >>>>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users >>>> >>>> >>>> _______________________________________________ >>>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users >>>> mailing list >>>> sr-users@lists.sip-router.org >>>> <mailto:sr-users@lists.sip-router.org> >>>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users >>>> >>>> >>>> >>>> >>>> -- >>>> Regards >>>> >>>> M. Salman Zafar >>>> VoIP Professional >>>> >>>> _______________________________________________ >>>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list >>>> sr-users@lists.sip-router.org <mailto:sr-users@lists.sip-router.org> >>>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users >>> >>> >>> >>> _______________________________________________ >>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list >>> sr-users@lists.sip-router.org >>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users >> >> -- >> Daniel-Constantin Mierla >> http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda >> _______________________________________________ >> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list >> sr-users@lists.sip-router.org <mailto:sr-users@lists.sip-router.org> >> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users > -- Daniel-Constantin Mierla http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
_______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users