Uploaded image for project: 'FreePBX'
  1. FreePBX
  2. FREEPBX-24033

Installed missedcall module

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 16
    • Fix Version/s: 16.0.2
    • Component/s: asterisk
    • Labels:
      None
    • ToDo:
    • Asterisk Version:
      19.8.0
    • Distro Version:
      FreePBX 16.0.33 'VoIP Server'
    • Distro:
      FreePBX Distro
    • Module Fix Version:

      Description

      I got a notice that there was a new module missedcall notification. After installing it I noticed that I had a duplicate error on that module investigating noticed that I couldn't edit user pages anymore. Gave duplicate key error.

       

      Linked extensions are not unique as the type none is not unique.

       

       

      
      show create table missedcall \G;
      *************************** 1. row ***************************
             Table: missedcall
      Create Table: CREATE TABLE `missedcall` (
        `userid` int(11) NOT NULL,
        `notification` smallint(6) DEFAULT '0',
        `extension` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
        `queue` smallint(6) DEFAULT NULL,
        `ringgroup` smallint(6) DEFAULT NULL,
        `internal` smallint(6) DEFAULT NULL,
        `external` smallint(6) DEFAULT NULL,
        PRIMARY KEY (`userid`),
        UNIQUE KEY `extension` (`extension`)
      ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci
      

      Basically this breaks user management as when I want to update a user with type none it gives an error that there's duplicate key.

      Dropping index extension will fix this.

       

      
      MariaDB [asterisk]> use asterisk;
      MariaDB [asterisk]> alter table missedcall drop index extension;
      MariaDB [asterisk]> select * from missedcall;
      +--------+--------------+-----------+-------+-----------+----------+----------+
      | userid | notification | extension | queue | ringgroup | internal | external |
      +--------+--------------+-----------+-------+-----------+----------+----------+
      |      1 |            1 | none      |     0 |         0 |        0 |        0 |
      |      3 |            0 | 5001      |     0 |         0 |        0 |        0 |
      |      4 |            0 | none      |     0 |         0 |        0 |        0 |
      |      5 |            0 | 6001      |  NULL |      NULL |     NULL |     NULL |
      |      6 |            0 | 5701      |  NULL |      NULL |     NULL |     NULL |
      |      7 |            0 | 5002      |     0 |         0 |        0 |        0 |
      |      8 |            0 | 9919988   |  NULL |      NULL |     NULL |     NULL |
      |      9 |            0 | 5711      |     0 |         0 |        0 |        0 |
      +--------+--------------+-----------+-------+-----------+----------+----------+
      
      

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                Ofloo Ofloo
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  NextupJiraPlusStatus

                  Error rendering 'slack.nextup.jira:nextup-jira-plus-status'. Please contact your Jira administrators.