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

Henrik Aagaard Sørensen henrikaagaardsorensen at gmail.com
Tue Feb 14 11:26:56 MSK 2012


I just deleted the orignal Master-file and now everything works. All
commands rotate the cdr records.

Thanks for all the help anyways.

2012/2/14 Henrik Aagaard Sørensen <henrikaagaardsorensen at gmail.com>:
> That only rotates the log files, not my cdr records :(
>
> On Tue, Feb 14, 2012 at 12:19 AM, Anthony Minessale
> <anthony.minessale at gmail.com> wrote:
>> fs_cli -x "fsctl send_sighup"
>>
>> 2012/2/13 Henrik Aagaard Sørensen <henrikaagaardsorensen at gmail.com>:
>>> 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
>>>
>>> _________________________________________________________________________
>>> 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
>>
>>
>>
>> --
>> Anthony Minessale II
>>
>> FreeSWITCH http://www.freeswitch.org/
>> ClueCon http://www.cluecon.com/
>> Twitter: http://twitter.com/FreeSWITCH_wire
>>
>> AIM: anthm
>> MSN:anthony_minessale at hotmail.com
>> GTALK/JABBER/PAYPAL:anthony.minessale at gmail.com
>> IRC: irc.freenode.net #freeswitch
>>
>> FreeSWITCH Developer Conference
>> sip:888 at conference.freeswitch.org
>> googletalk:conf+888 at conference.freeswitch.org
>> pstn:+19193869900
>>
>> _________________________________________________________________________
>> 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