System information

pin int4,
context text,
status bool DEFAULT false,
"location" text,
CONSTRAINT ast_hotdesk_id_pk PRIMARY KEY (id)
)
WITHOUT OIDS;
For MySQL:
$ mysql -u asterisk -p asterisk
Enter password:
Then create the table with the following bit of SQL:
CREATE TABLE ast_hotdesk
(
id serial NOT NULL,
extension int8,
first_name text,
last_name text,
cid_name text,
cid_number varchar(10),
pin int4,
context text,
status bool DEFAULT false,
location text,
CONSTRAINT ast_hotdesk_id_pk PRIMARY KEY (id)
);
The table information is summarized in Table 16-1.
Table 16-1. Summary of ast_hotdesk table
Column name Column type
id Serial, auto-incrementing
extension Integer
first_name Text
last_name Text
cid_name Text
cid_number Varchar 10
pin Integer
context Text
status Boolean, default false
location Text
After that, populate the database with the following information (some of the values
that you see actually will change only after the dialplan work is done, but we include
it here by way of example).
Getting Funky with func_odbc: Hot-Desking | 357