Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the XML CDR Importer more resilient #6543

Merged
merged 1 commit into from Feb 9, 2023

Commits on Feb 6, 2023

  1. Make the XML CDR Importer more resilient

    So I discovered 2 things,
    
    1. If a user adds the default config cdr-field-array with the content of a database field Let's pretend they want to show the xml_cdr_uuid column (for support purposes) - it could be any column (please don't argue with the column name, it is an example only), the SQL construction will fail as not Postgresql, Not MariaDB/MySQL allow having a column repeated twice. Adding array_unique() fixes this issue.
    
    2. This one is for developers: If a developer wants to create more columns in the v_xml_cdr table and make them visible in the CDR app, common sense tells to add the default setting cdr-field-array to show it. As the code is now, this will look into the freeswitch variables and overwrite it with NULL. I am adding a condition that verifies if the value has been already assigned, if it is, it won't overwrite it. This allows any developer who may be interested in extending the CDR to simply extend the class without touching it; very handy to keep the original code untouched.
    daniel-lucio committed Feb 6, 2023
    Configuration menu
    Copy the full SHA
    7e5f4f9 View commit details
    Browse the repository at this point in the history