<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi Daniel!<div>It's really a permission problem!</div><div>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:</div><div><br></div><div>In my example the folder is</div><div><blockquote type="cite"><div bgcolor="#FFFFFF" text="#000000"><blockquote cite="mid:82A6817C-2E93-4CE2-9B04-1731E20780A8@ipzeta.it" type="cite"><div><font class="Apple-style-span" face="Courier">/home/sip_logs/kamailio.log</font></div></blockquote></div></blockquote><br></div><div>/home could be any user, in my system is owner root:root</div><div>sip_logs MUST be owner root:syslog and permission 775</div><div>kamailio.log MUST be syslog:adm</div><div><br></div><div>So it worked!</div><div><br></div><div><br></div><div>Now, the only question is regarding syslog where it's logging ACC events with this way:</div><div><br></div><div><font class="Apple-style-span" face="Courier">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;<a href="mailto:call_id=7193b6c1414fd579888c3b8a62695e1b@0:0:0:0:0:0:0:0">call_id=7193b6c1414fd579888c3b8a62695e1b@0:0:0:0:0:0:0:0</a>;code=200;reason=OK;src_user=1111111;src_domain=sip.mymaskeddomain.com;dst_ouser=222222;dst_user=222222;dst_domain=151.64.131.122<br>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;<a href="mailto:call_id=7193b6c1414fd579888c3b8a62695e1b@0:0:0:0:0:0:0:0">call_id=7193b6c1414fd579888c3b8a62695e1b@0:0:0:0:0:0:0:0</a>;code=200;reason=OK;src_user= 1111111;src_domain= <a href="http://sip.mymaskeddomain.com">sip.mymaskeddomain.com</a>;dst_ouser= 222222;dst_user=393934887807;dst_domain=151.64.131.122<br>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</font></div><div><br></div><div><br></div><div>Is there a way to log accounting events also to my custom LOG?</div><div>And also, is debug=2 useful to debug/audit server status?</div><div><br></div><div>Thank you for your great help!</div><div><br></div><div>Kamailio Rocks!!!!!</div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br><div><div>Il giorno 27/nov/2014, alle ore 11:59, Daniel-Constantin Mierla ha scritto:</div><br class="Apple-interchange-newline"><blockquote type="cite">
  
    <meta content="text/html; charset=windows-1252" http-equiv="Content-Type">
  
  <div bgcolor="#FFFFFF" text="#000000">
    Hello,<br>
    <br>
    might be a permissions problem, can you try with kamailio log path
    being /var/log/kamailio.log?<br>
    <br>
    Cheers,<br>
    Daniel<br>
    <br>
    <div class="moz-cite-prefix">On 27/11/14 11:49, Massimo Varriale
      (IPZeta) wrote:<br>
    </div>
    <blockquote cite="mid:82A6817C-2E93-4CE2-9B04-1731E20780A8@ipzeta.it" type="cite">
      <div>Hi All!</div>
      <div>I've edited rsyslog files adding local7.none and it's not yet
        working. Of course restarting both kamailio and rsyslogd</div>
      <div>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.</div>
      <div><br>
      </div>
      <div>I've tried using LOG7 and LOG0 as the wiki is suggesting but
        with no success..</div>
      <div><br>
      </div>
      <div><br>
      </div>
      <div><br>
      </div>
      <div>Now my rsyslog files is:</div>
      <div><br>
      </div>
      <div><br>
      </div>
      <div><font class="Apple-style-span" face="Courier">cat
          /etc/rsyslog.d/50-default.conf <br>
          #  Default rules for rsyslog.<br>
          #<br>
          #<span class="Apple-tab-span" style="white-space:pre"> </span>For
          more information see rsyslog.conf(5) and /etc/rsyslog.conf<br>
          <br>
          #<br>
          # First some standard log files.  Log by facility.<br>
          #<br>
          auth,authpriv.*<span class="Apple-tab-span" style="white-space:pre"> </span>/var/log/auth.log<br>
          *.*;auth,authpriv.none,local0.none,local7.none<span class="Apple-tab-span" style="white-space:pre"> </span>-/var/log/syslog<br>
          <br>
          #kamailio logs<br>
          local7.*                        -/home/sip_logs/kamailio.log<br>
          local0.*                        -/home/sip_logs/kamailio.log</font><br>
        <br>
      </div>
      <div><br>
      </div>
      <div><br>
      </div>
      <div><font class="Apple-style-span" face="Courier">cat /etc/kamailio/kamailio.cfg</font></div>
      <div>
        <div><font class="Apple-style-span" face="Courier">### LOG
            Levels: 3=DBG, 2=INFO, 1=NOTICE, 0=WARN, -1=ERR</font></div>
        <div><font class="Apple-style-span" face="Courier">#!ifdef
            WITH_DEBUG</font></div>
        <div><font class="Apple-style-span" face="Courier">debug=4</font></div>
        <div><font class="Apple-style-span" face="Courier">log_stderror=no</font></div>
        <div><font class="Apple-style-span" face="Courier">#!else</font></div>
        <div><font class="Apple-style-span" face="Courier">debug=2</font></div>
        <div><font class="Apple-style-span" face="Courier">log_stderror=no</font></div>
        <div><font class="Apple-style-span" face="Courier">#!endif</font></div>
        <div><font class="Apple-style-span" face="Courier"><br>
          </font></div>
        <div><font class="Apple-style-span" face="Courier">memdbg=5</font></div>
        <div><font class="Apple-style-span" face="Courier">memlog=5</font></div>
        <div><font class="Apple-style-span" face="Courier"><br>
          </font></div>
        <div><font class="Apple-style-span" face="Courier">log_facility=LOG_LOCAL0</font></div>
      </div>
      <div><br>
      </div>
      <div><br>
      </div>
      <div><br>
      </div>
      <div><br>
      </div>
      <div><br>
      </div>
      <div><br>
      </div>
      <br>
      <div>
        <div>Il giorno 26/nov/2014, alle ore 13:40, Salman Zafar ha
          scritto:</div>
        <br class="Apple-interchange-newline">
        <blockquote type="cite">
          <div dir="ltr">
            <div>Hi MV,<br>
              <br>
            </div>
            You do have correct rights on the log file, if you are not
            running kamailio from root, right?.<br>
            <br>
            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.<br>
            <br>
            <br>
          </div>
          <div class="gmail_extra"><br>
            <div class="gmail_quote">On Wed, Nov 26, 2014 at 4:20 PM,
              Massimo Varriale (IPZeta) <span dir="ltr"><<a moz-do-not-send="true" href="mailto:m.varriale@ipzeta.it" target="_blank">m.varriale@ipzeta.it</a>></span>
              wrote:<br>
              <blockquote class="gmail_quote" style="margin:0 0 0
                .8ex;border-left:1px #ccc solid;padding-left:1ex">
                <div style="word-wrap:break-word">Hi Salman,
                  <div>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.</div>
                  <div>However, logs are still written in syslog.</div>
                  <div><br>
                  </div>
                  <div>I'm using 4.2.0 from packages, if this could be
                    different...</div>
                  <span class="">
                    <div><br>
                    </div>
                    <div>Thank you so much</div>
                    <div>Max</div>
                    <div><br>
                    </div>
                    <div><br>
                    </div>
                  </span>
                  <div><br>
                    <div>
                      <div>Il giorno 26/nov/2014, alle ore 12:13, Salman
                        Zafar ha scritto:</div>
                      <div>
                        <div class="h5"><br>
                          <blockquote type="cite">
                            <div dir="ltr">
                              <div>Hi,<br>
                                <br>
                              </div>
                              Hoping you restarted (r)syslog service as
                              well as kamailio. <br>
                              <br>
                              Configs look pretty much okay I guess.<br>
                              <br>
                            </div>
                            <div class="gmail_extra"><br>
                              <div class="gmail_quote">On Wed, Nov 26,
                                2014 at 4:07 PM, Massimo Varriale
                                (IPZeta) <span dir="ltr"><<a moz-do-not-send="true" href="mailto:m.varriale@ipzeta.it" target="_blank">m.varriale@ipzeta.it</a>></span>
                                wrote:<br>
                                <blockquote class="gmail_quote" style="margin:0 0 0
                                  .8ex;border-left:1px #ccc
                                  solid;padding-left:1ex">
                                  <div style="word-wrap:break-word">Hi, 
                                    <div>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.</div>
                                    <div>All Logs are always saved in
                                      /var/log/syslog</div>
                                    <div>How to move Kamailio Logs?</div>
                                    <div><br>
                                    </div>
                                    <div><br>
                                    </div>
                                    <div>
                                      <div><font face="Courier">cat
                                          /etc/rsyslog.d/50-default.conf </font></div>
                                      <div><font face="Courier">#
                                           Default rules for rsyslog.</font></div>
                                      <div><font face="Courier">#</font></div>
                                      <div><font face="Courier">#<span style="white-space:pre-wrap">
                                          </span>For more information
                                          see rsyslog.conf(5) and
                                          /etc/rsyslog.conf</font></div>
                                      <div><font face="Courier"><br>
                                        </font></div>
                                      <div><font face="Courier">#</font></div>
                                      <div><font face="Courier"># First
                                          some standard log files.  Log
                                          by facility.</font></div>
                                      <div><font face="Courier">#</font></div>
                                      <div><font face="Courier">auth,authpriv.*<span style="white-space:pre-wrap">
                                          </span>/var/log/auth.log</font></div>
                                      <div><font face="Courier">*.*;auth,authpriv.none,local0.none<span style="white-space:pre-wrap">
                                          </span>-/var/log/syslog</font></div>
                                      <div><font face="Courier"><br>
                                        </font></div>
                                      <div><font face="Courier">#kamailio
                                          logs</font></div>
                                      <div><font face="Courier">local7.*
                                                               
                                           -/var/log/kamailio/kamailio.log</font></div>
                                    </div>
                                    <div><br>
                                    </div>
                                    <div><br>
                                    </div>
                                    <div><br>
                                    </div>
                                    <div><br>
                                    </div>
                                    <div><br>
                                    </div>
                                    <div><font face="Courier">/etc/kamailio/kamailio.cfg</font></div>
                                    <div><font face="Courier">log_facility=LOG_LOCAL7</font></div>
                                    <div><br>
                                    </div>
                                    <div><br>
                                    </div>
                                    <div><br>
                                    </div>
                                    <div>Thank you so much</div>
                                    <div>Max</div>
                                    <div><br>
                                    </div>
                                  </div>
                                  <br>
_______________________________________________<br>
                                  SIP Express Router (SER) and Kamailio
                                  (OpenSER) - sr-users mailing list<br>
                                  <a moz-do-not-send="true" href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a><br>
                                  <a moz-do-not-send="true" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
                                  <br>
                                </blockquote>
                              </div>
                              <br>
                              <br clear="all">
                              <br>
                              -- <br>
                              <div>
                                <div dir="ltr"><font face="'times new
                                    roman', serif">Regards</font>
                                  <div><font face="'times new roman',
                                      serif"><br>
                                    </font>
                                    <div>
                                      <pre cols="72"><font face="'times new roman', serif">M. Salman Zafar
VoIP Professional
</font>
</pre>
                                    </div>
                                  </div>
                                </div>
                              </div>
                            </div>
_______________________________________________<br>
                            SIP Express Router (SER) and Kamailio
                            (OpenSER) - sr-users mailing list<br>
                            <a moz-do-not-send="true" href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a><br>
                            <a moz-do-not-send="true" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
                          </blockquote>
                        </div>
                      </div>
                    </div>
                    <br>
                  </div>
                </div>
                <br>
                _______________________________________________<br>
                SIP Express Router (SER) and Kamailio (OpenSER) -
                sr-users mailing list<br>
                <a moz-do-not-send="true" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
                <a moz-do-not-send="true" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
                <br>
              </blockquote>
            </div>
            <br>
            <br clear="all">
            <br>
            -- <br>
            <div class="gmail_signature">
              <div dir="ltr"><font face="'times new roman', serif">Regards</font>
                <div><font face="'times new roman', serif"><br>
                  </font>
                  <div>
                    <pre cols="72"><font face="'times new roman', serif">M. Salman Zafar
VoIP Professional
</font>
</pre>
                  </div>
                </div>
              </div>
            </div>
          </div>
          _______________________________________________<br>
          SIP Express Router (SER) and Kamailio (OpenSER) - sr-users
          mailing list<br>
          <a moz-do-not-send="true" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
          <a class="moz-txt-link-freetext" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
        </blockquote>
      </div>
      <br>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a>
<a class="moz-txt-link-freetext" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla
<a class="moz-txt-link-freetext" href="http://twitter.com/#!/miconda">http://twitter.com/#!/miconda</a> - <a class="moz-txt-link-freetext" href="http://www.linkedin.com/in/miconda">http://www.linkedin.com/in/miconda</a></pre>
  </div>

_______________________________________________<br>SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br><a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users<br></blockquote></div><br></div></body></html>