[Freeswitch-users] Rotate cdr-records as root user (when FS is running from freeswitch user).

Henrik Aagaard Sørensen henrikaagaardsorensen at gmail.com
Mon Feb 13 20:21:15 MSK 2012


Sorry, yes. HUP.

It does not rotate the cdr records :(

On 13/02/2012, at 18.15, Ken Rice <krice at freeswitch.org> wrote:

> Its HUP not HUB
>
> killall -HUP freeswitch
>
> Or just killall -1 freeswitch
>
> K
>
>
> On 2/13/12 2:08 AM, "Henrik Aagaard Sørensen"
> <henrikaagaardsorensen at gmail.com> wrote:
>
>> I just tested the killall -HUB freeswitch as well, and the cdr records
>> does not get rotated.
>>
>> This is my cdr_csv.conf.xml (the dots ... is just so it didn't take up
>> the entire screen when copy-paste):
>>
>> <configuration name="cdr_csv.conf" description="CDR CSV Format">
>>  <settings>
>>    <!-- 'cdr-csv' will always be appended to log-base -->
>>    <!--<param name="log-base" value="/var/log"/>-->
>>    <param name="default-template" value="example"/>
>>    <!-- This is like the info app but after the call is hung up -->
>>    <!--<param name="debug" value="true"/>-->
>>    <param name="rotate-on-hup" value="true"/>
>>    <!-- may be a b or ab -->
>>    <param name="legs" value="a"/>
>>    <!-- Only log in Master.csv -->
>>    <param name="master-file-only" value="true"/>
>>  </settings>
>>  <templates>
>> <!--    <template name="sql">INSERT INTO cdr VALUES... -->
>>    <template name="example">"${caller_id_name}","${caller_id_number}",...
>> <!--    <template name="snom">"${caller_id_name}","${caller_id_number}",...
>> -->
>> <!--    <template
>> name="linksys">"${caller_id_name}","${caller_id_number}",... -->
>> <!--    <template name="asterisk">"${accountcode}","${caller_id_number}",...
>> -->
>>  </templates>
>> </configuration>
>>
>>
>> 2012/2/13 Henrik Aagaard Sørensen <henrikaagaardsorensen at gmail.com>:
>>> Hi Vitalie.
>>>
>>> I've already set rotate-on-hub to true. But I prefer running the
>>> fs_cli command as I do not want the log files to be rotated as well.
>>> And if I set the rotate-on-hub to false in the log-conf, no files get
>>> rotated on hub. Not even the cdr records.
>>>
>>> On Mon, Feb 13, 2012 at 3:05 AM, Vitalie Colosov <vetali100 at gmail.com> wrote:
>>>> Ensure the following line is uncommented in cdr_csv.conf.xml
>>>>
>>>> <param name=”rotate-on-hup” value=”true”/>
>>>>
>>>>
>>>> To rotate, execute from commandline:
>>>>
>>>> killall -HUP freeswitch
>>>>
>>>> You can add this command to cron so it will be executed automatically.
>>>>
>>>>
>>>>
>>>>
>>>> 2012/2/12 Henrik Aagaard Sørensen <henrikaagaardsorensen at gmail.com>
>>>>>
>>>>> I'm having FS running from the user freeswitch on CentOS 6.
>>>>>
>>>>> When calling (as the user root):
>>>>> /usr/local/freeswitch/bin/fs_cli -x 'cdr_csv rotate' >/dev/null
>>>>> nothing happens. The cdr-records does not get rotated.
>>>>>
>>>>> Can anyone help me on why this is happening and how I can rotate the
>>>>> files as root?
>>>>>
>>>>> _________________________________________________________________________
>>>>> Professional FreeSWITCH Consulting Services:
>>>>> consulting at freeswitch.org
>>>>> http://www.freeswitchsolutions.com
>>>>>
>>>>> 
>>>>> 
>>>>>
>>>>> Official FreeSWITCH Sites
>>>>> http://www.freeswitch.org
>>>>> http://wiki.freeswitch.org
>>>>> http://www.cluecon.com
>>>>>
>>>>> FreeSWITCH-users mailing list
>>>>> FreeSWITCH-users at lists.freeswitch.org
>>>>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>>>>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>>>>> http://www.freeswitch.org
>>>>
>>>>
>>>>
>>>> _________________________________________________________________________
>>>> Professional FreeSWITCH Consulting Services:
>>>> consulting at freeswitch.org
>>>> http://www.freeswitchsolutions.com
>>>>
>>>> 
>>>> 
>>>>
>>>> Official FreeSWITCH Sites
>>>> http://www.freeswitch.org
>>>> http://wiki.freeswitch.org
>>>> http://www.cluecon.com
>>>>
>>>> FreeSWITCH-users mailing list
>>>> FreeSWITCH-users at lists.freeswitch.org
>>>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>>>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>>>> http://www.freeswitch.org
>>>>
>>
>> _________________________________________________________________________
>> Professional FreeSWITCH Consulting Services:
>> consulting at freeswitch.org
>> http://www.freeswitchsolutions.com
>>
>> 
>> 
>>
>> Official FreeSWITCH Sites
>> http://www.freeswitch.org
>> http://wiki.freeswitch.org
>> http://www.cluecon.com
>>
>> FreeSWITCH-users mailing list
>> FreeSWITCH-users at lists.freeswitch.org
>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>> http://www.freeswitch.org
>
>
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
> 
> 
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://wiki.freeswitch.org
> http://www.cluecon.com
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org



Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users mailing list