Global array or hash for dialplan

Colleagues, please tell me the answer to this question.

The documentation says that I can set the value of the variable in the global section of the extensions.conf file and it will be visible from all dialplans. It’s great.

Is it possible to predetermine some data structure? Array, hash?

I understand that you can use AstDB and try to do something similar to it on this.
But that means that I will torment SQLite and the hard drive.

Therefore, if for my realization of my task it is enough to preload a few small tables at the start of the Asterisk, then this would be more correct.

The disadvantage of globals is that they are gone once Asterisk gets restarted or even the dialplan gets reloaded.

The sqlite DB is not that bad actually and especially the PJSIP stack uses it extensively, so a few extra bytes won’t matter. Another option is to use a modern external DB. You could write a short AGI stub and do everything with Elasticsearch…, :wink:

I want to use a solution that will consume the least amount of system resources.

Then use the sqlite db.

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