[Asterisk-Users] Re: Dialplan configuration with Realtime

Gundemarie Scholz spamyousilly at gmx.de
Thu Jul 7 01:55:40 MST 2005


snacktime wrote:
> On 7/6/05, Gundemarie Scholz <spamyousilly at gmx.de> wrote:
> > Following the instructions on voip-ip.org I have implemented
> > Realtime with MySQL for my Asterisk server. The individual extension
> > configuration is managed in a table called extensions.
> >
> > Still I have to keep some data in the extensions.conf, namely the
> > switch and the include statements. Is there a way to minimize that
> > or completely get rid of them?
>
> No, but you can put extensions.conf into mysql via realtime static

I have done so, and for testing I have added the switch and include
statements from extensions.conf, after that I have removed the
extensions.conf file completely.

Here is an excerpt of the ast_config table, shortened to the relevant bits.

+----+-----+-----+----------+--------------+-------------------------+
| id | cat | var | category | var_name     | value                   |
+----+-----+-----+----------+--------------+-------------------------+
|  6 |   0 |   0 | general  | static       | yes                     |
|  7 |   0 |   1 | general  | writeprotect | no                      |
| 38 |   1 |   0 | default  | switch       | Realtime/default at rt_ext |
| 39 |   2 |   0 | from-sip | include      | default                 |
| 40 |   3 |   0 | local    | include      | default                 |
+----+-----+-----+----------+--------------+-------------------------+

During startup Asterisk then unfortunately produces the following error
message: "WARNING: pbx.c:3650 ast_merge_contexts_and_delete: Requested
contexts didn't get merged."


> while using realtime extensions at the same time.

I am doing that already, and it works well as long as I use switch and
include statements in an extensions.conf file.

> If your goal is to keep everything in the database that will work.

The question then remains where to put the include and the switch
statements, as they don't seem to fit into the extensions table either. Any
suggestions are highly appreciated!

mysql> show columns from extensions;
+----------+--------------+------+-----+---------+-------+
| Field    | Type         | Null | Key | Default | Extra |
+----------+--------------+------+-----+---------+-------+
| context  | varchar(20)  |      | PRI | default |       |
| exten    | varchar(64)  |      | PRI |         |       |
| priority | int(2)       |      | PRI | 1       |       |
| app      | varchar(20)  |      |     |         |       |
| appdata  | varchar(255) | YES  |     | NULL    |       |
| descr    | text         | YES  |     | NULL    |       |
| flags    | int(1)       |      |     | 0       |       |
+----------+--------------+------+-----+---------+-------+

Regards,
Gunde




More information about the asterisk-users mailing list