<!-- Kamailio Pull Request Template -->
<!-- IMPORTANT: - for detailed contributing guidelines, read: https://github.com/kamailio/kamailio/blob/master/.github/CONTRIBUTING.md - pull requests must be done to master branch, unless they are backports of fixes from master branch to a stable branch - backports to stable branches must be done with 'git cherry-pick -x ...' - code is contributed under BSD for core and main components (tm, sl, auth, tls) - code is contributed GPLv2 or a compatible license for the other components - GPL code is contributed with OpenSSL licensing exception -->
#### Pre-Submission Checklist <!-- Go over all points below, and after creating the PR, tick all the checkboxes that apply --> <!-- All points should be verified, otherwise, read the CONTRIBUTING guidelines from above--> <!-- If you're unsure about any of these, don't hesitate to ask on sr-dev mailing list --> - [ ] Commit message has the format required by CONTRIBUTING guide - [ ] Commits are split per component (core, individual modules, libs, utils, ...) - [ ] Each component has a single commit (if not, squash them into one commit) - [ ] No commits to README files for modules (changes must be done to docbook files in `doc/` subfolder, the README file is autogenerated)
#### Type Of Change - [ ] Small bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds new functionality) - [ ] Breaking change (fix or feature that would change existing functionality)
#### Checklist: <!-- Go over all points below, and after creating the PR, tick the checkboxes that apply --> - [ ] PR should be backported to stable branches - [ ] Tested changes locally - [ ] Related to issue #XXXX (replace XXXX with an open issue number)
#### Description <!-- Describe your changes in detail --> These commits create a CDR addressed engine, similar to the one that acc module exports for acc message accounting. Such an engine made an extension module like acc_json possible. This CDR engine is then used in acc_json to write the functionality for logging CDRs in JSON format.
I have added functions to the API exported by acc module instead of creating another separate CDR API, as I thought this is cleaner. I only implemented the acc_json logging to syslog (no message queue support yet).
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/2107
-- Commit Summary --
* acc: adding CDR engine functionality * acc_json: adding CDR as JSON functionality
-- File Changes --
M src/modules/acc/acc_api.h (38) M src/modules/acc/acc_cdr.c (41) M src/modules/acc/acc_cdr.h (6) M src/modules/acc/acc_logic.c (10) M src/modules/acc/acc_logic.h (2) M src/modules/acc/acc_mod.c (93) M src/modules/acc_json/acc_json_mod.c (131) M src/modules/acc_json/acc_json_mod.h (4) M src/modules/acc_json/doc/acc_json_admin.xml (54)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/2107.patch https://github.com/kamailio/kamailio/pull/2107.diff
Extending the acc API adding CDR support to acc_json seems like good options.
You did not think it was worth supporting queuing in mqueue, so that the same 2 outputs can be used syslog or mqueue ?
Hi @jchavanton, I think the queuing is worth it. I will add this. Thank you
@lbalaceanu @jchavanton - if the current PR is fine with the existing functionality, then it can be merged and mqueue support can be added as an enhancement later.
True, this is one way to proceed.
Hi, Please allow one or two days before merging, so that I can also add the mqueue thing. Thank you
No problem to wait even more days, if there is ongoing work in short term. I just wanted to avoid keeping here this PR for long time, while others can be interested in using/testing it, as the mqueue support is not a limitation of the current PR, but like an enhancement with new features.
@lbalaceanu pushed 2 commits.
e3fe8e7f88c53e8ce69d776e21b78531d604783d acc: adding CDR engine functionality 09f1c59bfef99867e4a006ba882ba13951b01276 acc_json: adding CDR as JSON functionality
Hi guys,
I modified the commits to contain the CDR writing to the message queue as well. Please let me know what you think.
Hi, nice I like it, supporting the same outputs for ACC and CDR is a big plus in terms of cohesion. mqueue can be quite handy.
Should we then merge and close the pull request?
Go ahead and merge - somehow I didn't noticed that the mqueue support was added, but I see that @jchavanton was ok with the change.
Merged #2107 into master.
hi @miconda,
is it ok for this to be backported to 5.3 ? Or shall be considered available only starting from 5.4?
Thank you, Stefan
@smititelu - this is a (larger) feature extension to the module. So it is not possible to backport it to a stable branch. But it will be as usual available in the next major release, 5.4.0.
Thank you @henningw for clarification.