Missedcall bug

Extension is not unique !!!

The value can be none on multiple extensions

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

This breaks user management fixing this

use 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 |
+--------+--------------+-----------+-------+-----------+----------+----------+

Please report bugs at issues.freepbx.org

1 Like

To be honest I don’t know if I did it right. so many choices but I’ve tried reporting it.

You screen shot is not showing an extension list. It’s showing a user list and yes you can have multiple users that are not linked to any extension.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.