SIP Settings creates duplicate key-values in kvstore_sipsettings

Hello,

I’m using FreePBX15, but my system is probably over 7 years old.

When I edit SIP Settings, instead of updating the key-value store in the database kvstore, it creates an additional entry, rather than replacing the existing one. That means I end up with multiple values of the same key with different values, and that makes the configuration incorrect.

I raised this as a bug in the tracker, but it was closed as could not replicate.

So I’m wondering if my sql database is so old that the structure of it is incorrect. Is there a way of finding out how kvstore_sipsettings should be correctly structured, so I can check against mine. Should the key value be set to be unique?

Thanks

Nick

This is from my working system with SIP Settings ver. 15.0.6.39

MariaDB [asterisk]> describe kvstore_Sipsettings;
+-------+---------------+------+-----+---------+-------+
| Field | Type          | Null | Key | Default | Extra |
+-------+---------------+------+-----+---------+-------+
| key   | char(255)     | NO   | MUL | NULL    |       |
| val   | varchar(4096) | YES  |     | NULL    |       |
| type  | char(16)      | YES  |     | NULL    |       |
| id    | char(255)     | YES  | MUL | NULL    |       |
+-------+---------------+------+-----+---------+-------+
4 rows in set (0.00 sec)

Well, yep, that might explain it

mysql> describe kvstore_Sipsettings;
+-------+---------------+------+-----+---------+-------+
| Field | Type          | Null | Key | Default | Extra |
+-------+---------------+------+-----+---------+-------+
| key   | char(255)     | NO   |     | NULL    |       |
| val   | varchar(4096) | YES  |     | NULL    |       |
| type  | char(16)      | YES  |     | NULL    |       |
| id    | char(255)     | YES  |     | NULL    |       |
+-------+---------------+------+-----+---------+-------+
4 rows in set (0.01 sec)

I can’t work out what key and id would also be linked to to create a MUL value in the Key.

Is there a way of getting FreePBX to rebuild this table from scratch?

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