This file is indexed.

/usr/share/opensips/postgres/b2b-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
INSERT INTO version (table_name, table_version) values ('b2b_entities','1');
CREATE TABLE b2b_entities (
    id SERIAL PRIMARY KEY NOT NULL,
    type INTEGER NOT NULL,
    state INTEGER NOT NULL,
    ruri VARCHAR(128),
    from_uri VARCHAR(128) NOT NULL,
    to_uri VARCHAR(128) NOT NULL,
    from_dname VARCHAR(64),
    to_dname VARCHAR(64),
    tag0 VARCHAR(64) NOT NULL,
    tag1 VARCHAR(64),
    callid VARCHAR(64) NOT NULL,
    cseq0 INTEGER NOT NULL,
    cseq1 INTEGER,
    contact0 VARCHAR(128) NOT NULL,
    contact1 VARCHAR(128),
    route0 TEXT,
    route1 TEXT,
    sockinfo_srv VARCHAR(64),
    param VARCHAR(128) NOT NULL,
    lm INTEGER NOT NULL,
    lrc INTEGER,
    lic INTEGER,
    leg_cseq INTEGER,
    leg_route TEXT,
    leg_tag VARCHAR(64),
    leg_contact VARCHAR(128),
    leg_sockinfo VARCHAR(128),
    CONSTRAINT b2b_entities_b2b_entities_idx UNIQUE (type, tag0, tag1, callid)
);

ALTER SEQUENCE b2b_entities_id_seq MAXVALUE 2147483647 CYCLE;
CREATE INDEX b2b_entities_b2b_entities_param ON b2b_entities (param);

INSERT INTO version (table_name, table_version) values ('b2b_logic','3');
CREATE TABLE b2b_logic (
    id SERIAL PRIMARY KEY NOT NULL,
    si_key VARCHAR(64) NOT NULL,
    scenario VARCHAR(64),
    sstate INTEGER NOT NULL,
    next_sstate INTEGER NOT NULL,
    sparam0 VARCHAR(64),
    sparam1 VARCHAR(64),
    sparam2 VARCHAR(64),
    sparam3 VARCHAR(64),
    sparam4 VARCHAR(64),
    sdp TEXT,
    lifetime INTEGER DEFAULT 0 NOT NULL,
    e1_type INTEGER NOT NULL,
    e1_sid VARCHAR(64),
    e1_from VARCHAR(128) NOT NULL,
    e1_to VARCHAR(128) NOT NULL,
    e1_key VARCHAR(64) NOT NULL,
    e2_type INTEGER NOT NULL,
    e2_sid VARCHAR(64),
    e2_from VARCHAR(128) NOT NULL,
    e2_to VARCHAR(128) NOT NULL,
    e2_key VARCHAR(64) NOT NULL,
    e3_type INTEGER,
    e3_sid VARCHAR(64),
    e3_from VARCHAR(128),
    e3_to VARCHAR(128),
    e3_key VARCHAR(64),
    CONSTRAINT b2b_logic_b2b_logic_idx UNIQUE (si_key)
);

ALTER SEQUENCE b2b_logic_id_seq MAXVALUE 2147483647 CYCLE;