There is a [globals] section in the extensions.conf file that can be used to define global dialplan variables. Can these variables be read from the database when Realtime is being used? I tried setting them into the asterisk_config database table but it doesn’t work.
Here you can see the globals section that I am referring to:
Now asterisk is reading the dialplan rules (not only the configuration) from the asterisk_config database table. I would like to have the actual dialplan rules in a different table. This is how my extconfig.conf looks now:
Ok, I wasn’t clear on the concepts of dynamic and static realtime. I was able to use static realtime to read the extensions.conf content from the database as described here: https://www.voip-info.org/asterisk-realtime-static/
Then, the actual extensions (dialplan rules) can be read from the database (dynamic realtime, table extensions in my case) if a switch statement is added to the context definition in the static realtime table, like this:
select * from asterisk_config where filename='extensions.conf' and category='agents';
id | category | var_name | var_val | cat_metric | filename | commented | var_metric
------+----------+----------+----------+------------+-----------------+-----------+------------
1122 | agents | switch | realtime | 0 | extensions.conf | 0 | 1
Then Asterisk will read the extensions (dynamic realtime) database table to fully define the agents context.
All this works because my extconf.conf is like this: