What happens if you manually exit system.conf and add the lines then restart dahdi and asterisk? Do your spans work than?
My suspicion is that the DAHDI module does not know how to add multiple dynamic spans.
If you look at the dahdi_advanced table you can see that Field is the primary key. Since the primary canāt be duplicated inserting two rows with the primary key of ādynamicā will not work.
mysql> SHOW COLUMNS FROM dahdi_advanced;
+-------------+--------------+------+-----+-----------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------------+--------------+------+-----+-----------+-------+
| keyword | varchar(50) | NO | PRI | NULL | |
| val | varchar(255) | YES | | NULL | |
| default_val | varchar(255) | YES | | NULL | |
| type | varchar(50) | YES | | chandahdi | |
| additional | tinyint(1) | YES | | 1 | |
+-------------+--------------+------+-----+-----------+-------+
I think the only option is to manually build your DAHDI configs and not use the DAHDI module.
If this format I manually add in system.conf - all works.
When adding via freepbx - as before, after applying is only one device.
I do not understand your comment about the database.
I can see the table and I see there dahdi_advanŃed description line driver settings. I do not see there is no reason why, in which it would be impossible to add a line describing the parameters of the second span.
The database table that holds the information you are trying to add does not allow you the have 2 entries that start with dynamic. Do a show columns on the table and you will see that the field that holds the keyword dynamic is the primary key and is not allowed to be duplicated.
You will need to disable the DAHDI module and edit the files by hand and not use the DAHDI module.
You might file a feature request to have this added.