OpenSIPS is a GPL implementation of a multi-functionality SIP Server that targets to deliver a high-level technical solution (performance, security and quality) to be used in professional SIP server platforms.
The SQL table versioning logic in OpenSIPS has one big pitfall: all OpenSIPS tables must be created with opensipsdbctl. Although this is a solid/recommended way of installing OpenSIPS, real life will often impose restrictions. For example, some tables (dispatcher, drouting, etc.) may actually be SQL views of other platform-related tables.
When views / hand-made tables come in place, OpenSIPS is left without any real mechanism of validating its input table structure, leading to all sort of buggy behaviour, i.e. incorrectly balancing between dispatcher destinations (that show up in fifo ds_list) because the state field is varchar(1) instead of int(11).
This feature request discussion aims at adding a new way of checking SQL tables, by validating the type of each column during OpenSIPS startup and throwing appropriate alerts. It also has the side effect of rendering the entire db_version_table mechanism useless.
The SQL table versioning logic in OpenSIPS has one big pitfall: all OpenSIPS tables must be created with
opensipsdbctl
. Although this is a solid/recommended way of installing OpenSIPS, real life will often impose restrictions. For example, some tables (dispatcher, drouting, etc.) may actually be SQL views of other platform-related tables.When views / hand-made tables come in place, OpenSIPS is left without any real mechanism of validating its input table structure, leading to all sort of buggy behaviour, i.e. incorrectly balancing between dispatcher destinations (that show up in
fifo ds_list
) because the state field isvarchar(1)
instead ofint(11)
.This feature request discussion aims at adding a new way of checking SQL tables, by validating the type of each column during OpenSIPS startup and throwing appropriate alerts. It also has the side effect of rendering the entire
db_version_table
mechanism useless.For the MySQL driver, the problem can be solved with
mysql_fetch_fields()
and theMYSQL_FIELD
data type. What about others?Please reply with feedback / ideas / further suggestions.