How to add two dynamic span with freepbx?

I am new to Asterisk, so maybe my question is silly, but I do not manage to solve it. :slight_smile:
I have two devices that work through the dynamic span.

dynamic=eth,eth0/00:55:55:55:55:01,30,1
dynamic=eth,eth0/00:55:55:55:55:02,30,1

If I add one (any of) the device through freepbx - everything works fine.

Iā€™m trying to write a second device

After applying the settings freepbx ā€œforgetsā€ to the second device and the settings there is only one.

How to add two dynamic span with freepbx?

Disclaimer I am not a DAHDI expert

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.

I found a description of the format of two dynamic span:

dynamic=,,/,,

dynamic=eth,eth0/00:55:55:55:55:01/0,30,1
dynamic=eth,eth0/00:55:55:55:55:02/1,30,1

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.

Flied description of the format of adding two dynamic span.
instead of dynamic="/" had to be written:

dynamic=driver,driver interface,mac address of opposite machine/sub address,numchans,timing

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.

I understood, thank you.