Skip to content

nethvoice: vendor nethserver-phonebook-mysql package in freepbx container #7564

Closed
nethesis/ns8-nethvoice
#516

Description

@Amygos

The nethserver-phonebook-mysql feature is already present, but it currently
relies on external sources.
Vendoring and properly packaging it as part of NS8 NethVoice module ensures
easier maintenance, improved reliability, and consistent updates for NethVoice
deployments.

Activity

  1. added this to the NethVoice 1.4 milestone on Jul 22, 2025
  2. added
    nethvoiceBug or features releted to the NethVoice project
    on Jul 22, 2025
  3. moved this from Todo to In Progress in NethVoiceon Jul 22, 2025
  4. Amygos commented on Jul 23, 2025

    @Amygos
    MemberAuthor

    Testing release nethesis/ns8-nethvoice 1.4.2-testing.4

  5. Amygos commented on Jul 23, 2025

    @Amygos
    MemberAuthor

    Test Case 1: Add and Manage a MySQL External Address Book Source

    • Objective: Verify that a MySQL database can be configured as an external phonebook source, contacts are imported correctly, field mapping and synchronization interval work, data preview is available, and sources remain functional after module upgrade.
    • Preconditions:
      • NethVoice module is installed from the testing version.
      • A MySQL database with contact information is reachable.
      • Credentials for the database are available.
    • Steps:
      1. In the NethVoice UI, from the left sidebar, under the "Apps" section, select "Phonebook sources".
      2. On the "Phonebook sources configuration" page, click the "Create new source" button.
      3. In the "New phonebook source" window, under "Source":
        • Enter a unique value into the "Phonebook name" field.
        • Select "MySQL" in the "Source type" dropdown.
        • Fill in "Database name", "Database address", "Database port" (default: 3306), "Database user", and "Database password".
        • In the "Select query" field, enter the SQL query (e.g., SELECT * FROM [table]), replacing [table] with the actual table name.
      4. Click the "Verify" button below the "Select query" field.
      5. Check that the "Query preview" section displays a preview of the data from the source.
      6. Click the "Next >" button to proceed to "Map".
      7. Review available source fields and destination fields. Map source fields to NethVoice fields as required.
      8. Click "Next >" to proceed to "Settings".
      9. Choose the desired synchronization interval.
      10. Click "Finish" or the equivalent to save.
      11. Confirm the new source appears in the "Phonebook sources" list.
      12. Wait for the next scheduled sync, update the source data, and confirm updates are pulled into NethVoice after the interval.
      13. Edit the existing source, change configuration fields, mapping, or sync interval, and save changes.
      14. Use "Verify" to check data and confirm contacts import as expected.
    • Expected Results:
      • The "Create new source" dialog opens when the button is clicked.
      • All input fields and dropdowns are present and functional as per UI.
      • The "Verify" button checks the query and displays a preview under "Query preview".
      • The wizard progresses via the "Next >" button.
      • All source fields are available for mapping, and the mapping interface is clear and functional.
      • Synchronization interval options are present and selectable; contacts are refreshed as scheduled.
      • The new source is listed and usable in NethVoice applications.
      • The upgrade does not remove existing sources; editing, verifying, and saving works post-upgrade.
      • Import and preview are still functional after upgrade.

    Test Case 2: Add and Manage a CSV External Address Book Source via URL

    • Objective: Verify that an external CSV file can be configured as a phonebook source, contacts are imported, field mapping and synchronization interval work, data preview is available, and sources remain functional after module upgrade.
    • Preconditions:
      • NethVoice module is installed from the testing version.
      • A valid HTTP/HTTPS-accessible CSV file exists with required format.
    • Steps:
      1. In the NethVoice UI, from the left sidebar, under the "Apps" section, select "Phonebook sources".
      2. Click the "Create new source" button.
      3. In the "New phonebook source" window, fill in:
        • "Phonebook name": enter a unique name.
        • "Source type": select "CSV".
        • "CSV URL": enter the HTTP/HTTPS address of the CSV file.
      4. Click the "Verify" button.
      5. Confirm the data preview appears under "Query preview".
      6. Click "Next >" to proceed to "Map".
      7. Review available source fields and destination fields. Map fields as needed.
      8. Click "Next >" to proceed to "Settings".
      9. Set synchronization interval.
      10. Click "Finish" or equivalent.
      11. Confirm the new source appears in the "Phonebook sources" list.
      12. Wait for the next scheduled sync, update the CSV file, and confirm updates are pulled into NethVoice after the interval.
      13. Edit the existing source, change configuration fields, mapping, or sync interval, and save changes.
      14. Use "Verify" to check data and confirm contacts import as expected.
    • Expected Results:
      • The "CSV URL" field and "Source type" dropdown are present and functional.
      • Clicking "Verify" fetches and previews the CSV data.
      • Wizard navigation via "Next >" works as expected.
      • All source fields are available for mapping, and the mapping interface is clear and functional.
      • Synchronization interval options are present and selectable; contacts are refreshed as scheduled.
      • The new source is added and visible in the list.
      • The upgrade does not remove existing sources; editing, verifying, and saving works post-upgrade.
      • Import and preview are still functional after upgrade.

    Test Case 3: Add and Manage a CSV External Address Book Source via File Upload

    • Objective: Verify that a locally uploaded CSV file can be used as a phonebook source, contacts are imported, field mapping and synchronization interval work, data preview is available, and sources remain functional after module upgrade.
    • Preconditions:
      • NethVoice module is installed from the testing version.
      • A valid UTF-8 encoded CSV file is available for upload.
    • Steps:
      1. In the NethVoice UI, from the left sidebar, under the "Apps" section, select "Phonebook sources".
      2. Click the "Create new source" button.
      3. In the "New phonebook source" dialog:
        • Fill in "Phonebook name".
        • Set "Source type" to "CSV".
        • Use the file upload button to the right of the CSV URL field to upload the CSV file.
        • Ensure the CSV URL field is auto-populated.
      4. Click "Verify" to preview data.
      5. Click "Next >" to "Map", review available source fields and destination fields, assign fields, and proceed to "Settings".
      6. Set sync interval and finish.
      7. Check the new source appears in the list.
      8. Wait for the next scheduled sync, update the CSV file, and confirm updates are pulled into NethVoice after the interval.
      9. Edit the existing source, change configuration fields, mapping, or sync interval, and save changes.
      10. Use "Verify" to check data and confirm contacts import as expected.
    • Expected Results:
      • The file upload populates the URL field.
      • "Verify" previews the uploaded data.
      • Wizard steps and field mapping function as expected.
      • All source fields are available for mapping, and the mapping interface is clear and functional.
      • Synchronization interval options are present and selectable; contacts are refreshed as scheduled.
      • New source is listed and operational.
      • The upgrade does not remove existing sources; editing, verifying, and saving works post-upgrade.
      • Import and preview are still functional after upgrade.

  6. added
    testingPackages are available from testing repositories
    on Jul 23, 2025
  7. moved this from In Progress to Testing in NethVoiceon Jul 23, 2025
  8. assigned and unassigned on Jul 28, 2025
  9. margit86 commented on Jul 31, 2025

    @margit86

    All test cases fail when clicking the Verify button, and the following is logged in Journalctl:

    Test case1

    Jul 31 13:29:26 rl1 freepbx[761684]: sh: 1: /usr/share/phonebooks/phonebook-import: not found
    Jul 31 13:29:26 rl1 freepbx[761684]: 127.0.0.1 - - [31/Jul/2025:15:29:26 +0200] "POST /freepbx/rest/phonebook/test HTTP/1.1" 200 234 "https://XXXXXX/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36"

    Test case 2

    Jul 31 14:34:44 rl1 freepbx[761684]: sh: 1: /usr/share/phonebooks/phonebook-import: not found
    Jul 31 14:34:44 rl1 freepbx[761684]: 127.0.0.1 - - [31/Jul/2025:16:34:44 +0200] "POST /freepbx/rest/phonebook/test HTTP/1.1" 200 234 "https://XXXXXXX/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36

    Test case 3

    Jul 31 14:38:20 rl1 freepbx[761684]: sh: 1: /usr/share/phonebooks/phonebook-import: not found
    Jul 31 14:38:20 rl1 freepbx[761684]: 127.0.0.1 - - [31/Jul/2025:16:38:20 +0200] "POST /freepbx/rest/phonebook/test HTTP/1.1" 200 234 "https://XXXXXXX/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36"

  10. removed
    testingPackages are available from testing repositories
    on Jul 31, 2025
  11. moved this from Testing to In Progress in NethVoiceon Jul 31, 2025
  12. Amygos commented on Aug 1, 2025

    @Amygos
    MemberAuthor

    Testing release nethesis/ns8-nethvoice 1.4.2-testing.11

  13. added
    testingPackages are available from testing repositories
    on Aug 1, 2025
  14. moved this from In Progress to Testing in NethVoiceon Aug 1, 2025
  15. removed
    testingPackages are available from testing repositories
    on Aug 5, 2025
  16. moved this from Testing to Verified in NethVoiceon Aug 5, 2025
  17. Stell0 commented on Aug 6, 2025

    @Stell0
  18. moved this from Verified to Done in NethVoiceon Aug 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    nethvoiceBug or features releted to the NethVoice projectverifiedAll test cases were verified successfully

    Type

    No type

    Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions