<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1256">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Hack;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0cm;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:36.0pt;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:"Courier New";}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:2008434303;
        mso-list-type:hybrid;
        mso-list-template-ids:-1974193448 -1 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
@list l0:level1
        {mso-level-text:%1-;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level2
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level3
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l0:level4
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level5
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level6
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l0:level7
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level8
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level9
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
ol
        {margin-bottom:0cm;}
ul
        {margin-bottom:0cm;}
--></style>
</head>
<body lang="EN-US" link="blue" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal">Thank you Dear </p>
<p class="MsoNormal">I did it by creating new log file and making it the default one for accounting EDR  just by doing :</p>
<ol style="margin-top:0cm" start="1" type="1">
<li class="MsoListParagraph" style="margin-left:0cm;mso-list:l0 level1 lfo1">In Kamailio.cfg
<span style="font-family:Wingdings">à</span> modparam("acc", "log_facility", "LOG_LOCAL1")</li><li class="MsoListParagraph" style="margin-left:0cm;mso-list:l0 level1 lfo1">in the rsyslog.conf
<span style="font-family:Wingdings">à</span> I added new line “local1.* -var/log/accounting”</li></ol>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">in the case of flatstore  database my error was the sets of the permissions for the directory of the module
</p>
<p class="MsoNormal">at the end the both way worked great </p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Sent from <a href="https://go.microsoft.com/fwlink/?LinkId=550986">
Mail</a> for Windows 10</p>
<p class="MsoNormal"><o:p> </o:p></p>
<div style="mso-element:para-border-div;border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal" dir="RTL" style="text-align:right;direction:rtl;unicode-bidi:embed;border:none;padding:0cm">
<b><span dir="LTR">From</span></b><span dir="RTL"></span><b><span lang="AR-SA" style="font-family:"Arial",sans-serif"><span dir="RTL"></span>:
</span></b><span lang="AR-SA" style="font-family:"Arial",sans-serif"><a href="mailto:hw@kamailio.org"><span lang="EN-US" dir="LTR" style="font-family:"Calibri",sans-serif">Henning Westerholt</span></a><br>
</span><b><span dir="LTR">Sent</span></b><span dir="RTL"></span><b><span lang="AR-SA" style="font-family:"Arial",sans-serif"><span dir="RTL"></span>:
</span></b><span lang="AR-SA" style="font-family:"Arial",sans-serif">þ06 þÃíÇÑ,þ þ2018 þ04:40 þã<br>
</span><b><span dir="LTR">To</span></b><span dir="RTL"></span><b><span lang="AR-SA" style="font-family:"Arial",sans-serif"><span dir="RTL"></span>:
</span></b><span lang="AR-SA" style="font-family:"Arial",sans-serif"><a href="mailto:sr-users@lists.kamailio.org"><span lang="EN-US" dir="LTR" style="font-family:"Calibri",sans-serif">sr-users@lists.kamailio.org</span></a><br>
</span><b><span dir="LTR">Cc</span></b><span dir="RTL"></span><b><span lang="AR-SA" style="font-family:"Arial",sans-serif"><span dir="RTL"></span>:
</span></b><span lang="AR-SA" style="font-family:"Arial",sans-serif"><a href="mailto:eyas37@hotmail.com"><span lang="EN-US" dir="LTR" style="font-family:"Calibri",sans-serif">eyas barhouk</span></a><br>
</span><b><span dir="LTR">Subject</span></b><span dir="RTL"></span><b><span lang="AR-SA" style="font-family:"Arial",sans-serif"><span dir="RTL"></span>:
</span></b><span dir="LTR">Re: [SR-Users] log CDRs to text file</span></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p style="margin:0cm;margin-bottom:.0001pt"><span style="font-size:9.0pt;font-family:"Hack",serif">Am Donnerstag, 3. Mai 2018, 22:23:54 CEST schrieb eyas barhouk:<o:p></o:p></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;-qt-block-indent:0;-qt-user-state:0"><span style="font-size:9.0pt;font-family:"Hack",serif">> Hello Dears<o:p></o:p></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;-qt-block-indent:0;-qt-user-state:0"><span style="font-size:9.0pt;font-family:"Hack",serif">> I'm trying to get Kamailio to log its CDRs (collected By ACC module ) to<o:p></o:p></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;-qt-block-indent:0;-qt-user-state:0"><span style="font-size:9.0pt;font-family:"Hack",serif">> text file instead of a database so i used modparam("acc", "db_url",<o:p></o:p></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;-qt-block-indent:0;-qt-user-state:0"><span style="font-size:9.0pt;font-family:"Hack",serif">> "flatstore:/var/log/acc") and in each time kamailio trying to write on the<o:p></o:p></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;-qt-block-indent:0;-qt-user-state:0"><span style="font-size:9.0pt;font-family:"Hack",serif">> text file i get the error : " db_flatstore flat_new_connection() : not a<o:p></o:p></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;-qt-block-indent:0;-qt-user-state:0"><span style="font-size:9.0pt;font-family:"Hack",serif">> directory"<o:p></o:p></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;-qt-block-indent:0;-qt-user-state:0"><span style="font-size:9.0pt;font-family:"Hack",serif">> so could any one guide me about how i have to create the database text file<o:p></o:p></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;-qt-block-indent:0;-qt-user-state:0"><span style="font-size:9.0pt;font-family:"Hack",serif">> "acc"? and what is the cause of the error i got ?<o:p></o:p></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;-qt-paragraph-type:empty;-qt-block-indent:0">
<span style="font-size:9.0pt;font-family:"Hack",serif"> <o:p></o:p></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;-qt-block-indent:0;-qt-user-state:0"><span style="font-size:9.0pt;font-family:"Hack",serif">Hello,<o:p></o:p></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;-qt-paragraph-type:empty;-qt-block-indent:0">
<span style="font-size:9.0pt;font-family:"Hack",serif"> <o:p></o:p></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;-qt-block-indent:0;-qt-user-state:0"><span style="font-size:9.0pt;font-family:"Hack",serif">have you configured the flatstore DB in the kamailio cfg as well?<o:p></o:p></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;-qt-paragraph-type:empty;-qt-block-indent:0">
<span style="font-size:9.0pt;font-family:"Hack",serif"> <o:p></o:p></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;-qt-block-indent:0;-qt-user-state:0"><span style="font-size:9.0pt;font-family:"Hack",serif">If you just want to get the accounting in a text file, you can do this with standard system logging methods. Have a look to
 the cfg parameter log_facility and other in the acc README. Depending on your environment this may be easier for you.<o:p></o:p></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;-qt-paragraph-type:empty;-qt-block-indent:0">
<span style="font-size:9.0pt;font-family:"Hack",serif"> <o:p></o:p></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;-qt-block-indent:0;-qt-user-state:0"><span style="font-size:9.0pt;font-family:"Hack",serif">Best regards,<o:p></o:p></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;-qt-paragraph-type:empty;-qt-block-indent:0">
<span style="font-size:9.0pt;font-family:"Hack",serif"> <o:p></o:p></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;-qt-block-indent:0;-qt-user-state:0"><span style="font-size:9.0pt;font-family:"Hack",serif">Henning<o:p></o:p></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;-qt-paragraph-type:empty;-qt-block-indent:0">
<span style="font-size:9.0pt;font-family:"Hack",serif"> <o:p></o:p></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;-qt-paragraph-type:empty;-qt-block-indent:0">
<span style="font-size:9.0pt;font-family:"Hack",serif"> <o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>