[asterisk-users] how to use a database
hw
hw at gc-24.de
Thu Dec 6 10:49:25 CST 2018
On 12/05/2018 05:00 PM, Antony Stone wrote:
> On Wednesday 05 December 2018 at 15:31:38, hw wrote:
>> I don't see a table for that.
>
> You need to create that for yourself.
>
> Asterisk can write to database tables, but doesn't help you set them up, for
> reasons I can't comment on.
How do I know what the schema needs to be? Does anybody have a scheme
for the queue_log table (and maybe others)?
Do I get to see the queries that are being used to write this data, or
do I need to form them myself and enter them into some configuration file?
>> How dynamic are changes made in the database?
>
> If by "dynamic" you mean "quickly used" then the answer is "immediately".
There's a note in some configuration file saying that dynamic extensions
are deprecated and suggesting to use func_odbc instead. This func_odbc
seems to be the most awkward way anyone could think of for this, though.
>> For example, if I want to have an extension 'foobar' and want to ring
>> different devices depending on some factors (like time of day, for example),
>> can I modify the entry in the database for the device to ring from 'bar' to
>> 'baz', and baz will ring instead of bar from thereon?
>
> Yes.
And IIUC the extension would use something like
'Dial(SIP/ODBC_PICK_USER(...))' after defining a query for my
..._PICK_USER function in func_odbc.conf to return what to dial
depending on the argument(s) supplied?
How do I make asterisk reload func_odbc.conf? Or is that not needed?
>> Is it possible to use configuration from both the database and the files
>> at the same time?
>
> Yes.
So far, that seems to work fine :)
More information about the asterisk-users
mailing list