[asterisk-users] how to use a database
hw at gc-24.de
Fri Dec 7 07:32:42 CST 2018
On 12/06/2018 08:43 PM, Antony Stone wrote:
> On Thursday 06 December 2018 at 17:49:25, hw wrote:
>>>> 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.
> I use func_odbc in plenty of situations, but I'm not familiar with it being
> recommended for managing queues.
Did I say anything about using it for queues?
Queues seem to be the only way to have several phones ring at once, or
are there other ways?
> Without seeing the "note in some configuration file" that you refer to, though,
> I don't know what to say about this.
; note that using dynamic realtime extensions is not recommended anymore
; best practice; instead, you should consider writing a static dialplan
; proper data abstraction via a tool like func_odbc."
>>>> 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?
>> 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?
> No comment; I don't use this feature myself.
>> How do I make asterisk reload func_odbc.conf? Or is that not needed?
> Not needed. The whole point of configs in database tables is that they take
> effect immediately without having to tell Asterisk to reload anything.
> We did start off just talking about getting queue_log into a database table,
That's why I changed the subject. Now I started with CDR logging to the
database because queue logging seems to be even more difficult, and it's
not working because asterisk says "cdr_odbc.c:174 odbc_log: Unable to
retrieve database handle. CDR failed." while I can connect to the
datasource given in cdr_odbc.conf with isql just fine. I made another
post about that, though.
More information about the asterisk-users