/usr/share/opensips/postgres/drouting-create.sql is in opensips-postgres-module 2.2.2-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 | INSERT INTO version (table_name, table_version) values ('dr_gateways','6');
CREATE TABLE dr_gateways (
id SERIAL PRIMARY KEY NOT NULL,
gwid VARCHAR(64) NOT NULL,
type INTEGER DEFAULT 0 NOT NULL,
address VARCHAR(128) NOT NULL,
strip INTEGER DEFAULT 0 NOT NULL,
pri_prefix VARCHAR(16) DEFAULT NULL,
attrs VARCHAR(255) DEFAULT NULL,
probe_mode INTEGER DEFAULT 0 NOT NULL,
state INTEGER DEFAULT 0 NOT NULL,
socket VARCHAR(128) DEFAULT NULL,
description VARCHAR(128) DEFAULT '' NOT NULL,
CONSTRAINT dr_gateways_dr_gw_idx UNIQUE (gwid)
);
ALTER SEQUENCE dr_gateways_id_seq MAXVALUE 2147483647 CYCLE;
INSERT INTO version (table_name, table_version) values ('dr_rules','3');
CREATE TABLE dr_rules (
ruleid SERIAL PRIMARY KEY NOT NULL,
groupid VARCHAR(255) NOT NULL,
prefix VARCHAR(64) NOT NULL,
timerec VARCHAR(255) NOT NULL,
priority INTEGER DEFAULT 0 NOT NULL,
routeid VARCHAR(255) DEFAULT NULL,
gwlist VARCHAR(255) NOT NULL,
attrs VARCHAR(255) DEFAULT NULL,
description VARCHAR(128) DEFAULT '' NOT NULL
);
ALTER SEQUENCE dr_rules_ruleid_seq MAXVALUE 2147483647 CYCLE;
INSERT INTO version (table_name, table_version) values ('dr_carriers','2');
CREATE TABLE dr_carriers (
id SERIAL PRIMARY KEY NOT NULL,
carrierid VARCHAR(64) NOT NULL,
gwlist VARCHAR(255) NOT NULL,
flags INTEGER DEFAULT 0 NOT NULL,
state INTEGER DEFAULT 0 NOT NULL,
attrs VARCHAR(255) DEFAULT '',
description VARCHAR(128) DEFAULT '' NOT NULL,
CONSTRAINT dr_carriers_dr_carrier_idx UNIQUE (carrierid)
);
ALTER SEQUENCE dr_carriers_id_seq MAXVALUE 2147483647 CYCLE;
INSERT INTO version (table_name, table_version) values ('dr_groups','2');
CREATE TABLE dr_groups (
id SERIAL PRIMARY KEY NOT NULL,
username VARCHAR(64) NOT NULL,
domain VARCHAR(128) DEFAULT '' NOT NULL,
groupid INTEGER DEFAULT 0 NOT NULL,
description VARCHAR(128) DEFAULT '' NOT NULL
);
ALTER SEQUENCE dr_groups_id_seq MAXVALUE 2147483647 CYCLE;
INSERT INTO version (table_name, table_version) values ('dr_partitions','1');
CREATE TABLE dr_partitions (
id SERIAL PRIMARY KEY NOT NULL,
partition_name VARCHAR(255) NOT NULL,
db_url VARCHAR(255) NOT NULL,
drd_table VARCHAR(255),
drr_table VARCHAR(255),
drg_table VARCHAR(255),
drc_table VARCHAR(255),
ruri_avp VARCHAR(255),
gw_id_avp VARCHAR(255),
gw_priprefix_avp VARCHAR(255),
gw_sock_avp VARCHAR(255),
rule_id_avp VARCHAR(255),
rule_prefix_avp VARCHAR(255),
carrier_id_avp VARCHAR(255)
);
ALTER SEQUENCE dr_partitions_id_seq MAXVALUE 2147483647 CYCLE;
|