Re: [asterisk-users] cdr_sqlite3
> On 2023-03-28 16:15, Sean Bright wrote: Something like the following: https://gist.github.com/seanbright/f8331df57aacdd06b6d391dfec2f59c6 thank you Sean that works beautifully -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- Check out the new Asterisk community forum at: https://community.asterisk.org/ New to Asterisk? Start here: https://wiki.asterisk.org/wiki/display/AST/Getting+Started asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] cdr_sqlite3
On 3/28/2023 4:03 AM, Fourhundred Thecat wrote: > > On 2023-03-04 23:11, Sean Bright wrote: > > > > cdr/cdr_sqlite3_custom.c line 311 > > Hello, > > I asked here recently how to change the location where > "cdr_sqlite3_custom" stores the sqlite database. The default is location > is "astlogdir". > > I need to change this location without affecting the rest of the > asterisk logs. > > Sean Bright suggested to patch cdr/cdr_sqlite3_custom.c > > But I cannot hard-code the path either. > > How could I create new custom configuration variable, perhaps > "cdrlogdir", that I could then assign in asterisk.conf ? Something like the following: https://gist.github.com/seanbright/f8331df57aacdd06b6d391dfec2f59c6 This adds a new 'filename' option that you would provide in /etc/asterisk/cdr_sqlite3_custom.conf like: [master] ; A non-absolute path will be relative to Asterisk's log ; directory filename = testing.db Or: [master] filename = /full/path/to/testing.db This patch does not support module reload, so once the filename is set you would have to unload and load the module or restart Asterisk if you wanted to change the path to the database file. To apply: $ cd /path/to/source/code/of/asterisk $ curl https://gist.githubusercontent.com/seanbright/f8331df57aacdd06b6d391dfec2f59c6/raw/693f7027440b07d1122283d4d750051f8acbbe94/gistfile0.txt | patch -p1 $ make && sudo make install Kind regards, Sean -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- Check out the new Asterisk community forum at: https://community.asterisk.org/ New to Asterisk? Start here: https://wiki.asterisk.org/wiki/display/AST/Getting+Started asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] cdr_sqlite3
> On 2023-03-04 23:11, Sean Bright wrote: > > cdr/cdr_sqlite3_custom.c line 311 Hello, I asked here recently how to change the location where "cdr_sqlite3_custom" stores the sqlite database. The default is location is "astlogdir". I need to change this location without affecting the rest of the asterisk logs. Sean Bright suggested to patch cdr/cdr_sqlite3_custom.c But I cannot hard-code the path either. How could I create new custom configuration variable, perhaps "cdrlogdir", that I could then assign in asterisk.conf ? Can this be done easily by patching few lines somewhere? thanks, -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- Check out the new Asterisk community forum at: https://community.asterisk.org/ New to Asterisk? Start here: https://wiki.asterisk.org/wiki/display/AST/Getting+Started asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] cdr_sqlite3
On Sat, 4 Mar 2023, Sean Bright wrote: On Sat, Mar 4, 2023 at 1:29 PM, Fourhundred Thecat <400the...@gmx.ch> wrote: /var/log/asterisk/master.db how can I change the location ? If this is not possible to change in the config file, where in the source code would I change that? cdr/cdr_sqlite3_custom.c line 311 Or... In the [directories] section of asterisk.conf, you can set astlogdir which is usually set to /var/log/asterisk/. If you want to change the actual file name, may the source be with you. -- Thanks in advance, - Steve Edwards sedwa...@sedwards.com Voice: +1-760-468-3867 PST https://www.linkedin.com/in/steve-edwards-4244281 -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- Check out the new Asterisk community forum at: https://community.asterisk.org/ New to Asterisk? Start here: https://wiki.asterisk.org/wiki/display/AST/Getting+Started asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] cdr_sqlite3
On Sat, Mar 4, 2023 at 1:29 PM, Fourhundred Thecat <400the...@gmx.ch> wrote: > /var/log/asterisk/master.db > > how can I change the location ? > > If this is not possible to change in the config file, where in the > source code would I change that? cdr/cdr_sqlite3_custom.c line 311 Kind regards, Sean-- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- Check out the new Asterisk community forum at: https://community.asterisk.org/ New to Asterisk? Start here: https://wiki.asterisk.org/wiki/display/AST/Getting+Started asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users