Skip to content

Support for various AstDB backends #35

Open
@viktike

Description

@viktike

Is your feature or improvement request related to a problem? Please describe.
I need to store Asterisk's internal database (SQLite3) in a remote database for high availability reasons, mostly for distributed device state (hints) and persistent queue members. I've read the wiki, that the previous can be done with corosync, but it's not an active-active or a hot-standy setup, but a failover one. Currently, we're running with a patch (replaced main/db.c), which is working (attached) just fine, but I'm unable to contribute it back, since it's done in compilation time, and replaces the original behavior, also it's not in a module.

Describe the solution you'd like
I would propose something like extconfig.conf and static realtime config engines (res_config_something.so).
Another idea is to make this two features (hints and persistent queue members) store their state using sorcery.

Describe alternatives you've considered
My alternative is just run with one of the patches. I'm currently using the odbc one. Previously we tried using various shared filesystems like gusterfs or drbd, but it seemed like overkill, and had several issues with conflicts. Also interested in any other ideas.

Additional context
I've attached the odbc and the mysql db.c files for this. Please note, since these aren't modules, it requires linking the asterisk binary to one of these libraries in the main/Makefile:

AST_LIBS+=$(UNIXODBC_LIB)
AST_LIBS+=$(MYSQLCLIENT_LIB)

db_odbc.c.patch
db_mysql.c.patch

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions