Skip to content

Commit 4b366c5

Browse files
committed
call_center: add last_call_end column
1 parent 997ccd3 commit 4b366c5

File tree

9 files changed

+25
-3
lines changed

9 files changed

+25
-3
lines changed

db/schema/cc_agents.xml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,17 @@
7272
</description>
7373
</column>
7474

75+
<column id="last_call_end">
76+
<name>last_call_end</name>
77+
<type>int</type>
78+
<size>11</size>
79+
<default>0</default>
80+
<description>The timestamp of the last call of an agent.
81+
If different than 0, the agent will only receive calls after
82+
wrapup seconds pass after this timestamp.
83+
</description>
84+
</column>
85+
7586
<index>
7687
<name>unique_agentid</name>
7788
<colref linkend="agentid"/>
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
METADATA_COLUMNS
2-
id(int) agentid(str) location(str) logstate(int) skills(str)
2+
id(int) agentid(str) location(str) logstate(int) skills(str) last_call_end(int)
33
METADATA_KEY
44

55
METADATA_READONLY
66
0
77
METADATA_LOGFLAGS
88
0
99
METADATA_DEFAULTS
10-
NIL|NIL|NIL|0|NIL
10+
NIL|NIL|NIL|0|NIL|0

scripts/dbtext/opensips/cc_agents

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
id(int,auto) agentid(string) location(string) logstate(int) skills(string)
1+
id(int,auto) agentid(string) location(string) logstate(int) skills(string) last_call_end(int)

scripts/mysql/call_center-create.sql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ CREATE TABLE cc_agents (
1717
location CHAR(128) NOT NULL,
1818
logstate INT(10) UNSIGNED DEFAULT 0 NOT NULL,
1919
skills CHAR(255) NOT NULL,
20+
last_call_end INT(11) DEFAULT 0 NOT NULL,
2021
CONSTRAINT unique_agentid UNIQUE (agentid)
2122
) ENGINE=MyISAM;
2223

scripts/oracle/call_center-create.sql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ CREATE TABLE cc_agents (
2525
location VARCHAR2(128),
2626
logstate NUMBER(10) DEFAULT 0 NOT NULL,
2727
skills VARCHAR2(255),
28+
last_call_end NUMBER(10) DEFAULT 0 NOT NULL,
2829
CONSTRAINT cc_agents_unique_agentid UNIQUE (agentid)
2930
);
3031

scripts/pi_http/call_center-mod

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@
5959
<col><field>location</field></col>
6060
<col><field>logstate</field></col>
6161
<col><field>skills</field></col>
62+
<col><field>last_call_end</field></col>
6263
</query_cols>
6364
</cmd>
6465
<cmd><cmd_name>add</cmd_name>
@@ -69,6 +70,7 @@
6970
<col><field>location</field></col>
7071
<col><field>logstate</field></col>
7172
<col><field>skills</field></col>
73+
<col><field>last_call_end</field></col>
7274
</query_cols>
7375
</cmd>
7476
<cmd><cmd_name>update</cmd_name>
@@ -82,6 +84,7 @@
8284
<col><field>location</field></col>
8385
<col><field>logstate</field></col>
8486
<col><field>skills</field></col>
87+
<col><field>last_call_end</field></col>
8588
</query_cols>
8689
</cmd>
8790
<cmd><cmd_name>delete</cmd_name>

scripts/pi_http/call_center-table

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
<column><field>location</field><type>DB_STR</type></column>
2020
<column><field>logstate</field><type>DB_INT</type></column>
2121
<column><field>skills</field><type>DB_STR</type></column>
22+
<column><field>last_call_end</field><type>DB_INT</type></column>
2223
</db_table>
2324
<!-- Declaration of cc_cdrs table-->
2425
<db_table id="cc_cdrs">

scripts/pi_http/pi_framework.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,7 @@
246246
<column><field>location</field><type>DB_STR</type></column>
247247
<column><field>logstate</field><type>DB_INT</type></column>
248248
<column><field>skills</field><type>DB_STR</type></column>
249+
<column><field>last_call_end</field><type>DB_INT</type></column>
249250
</db_table>
250251
<!-- Declaration of cc_cdrs table-->
251252
<db_table id="cc_cdrs">
@@ -1623,6 +1624,7 @@
16231624
<col><field>location</field></col>
16241625
<col><field>logstate</field></col>
16251626
<col><field>skills</field></col>
1627+
<col><field>last_call_end</field></col>
16261628
</query_cols>
16271629
</cmd>
16281630
<cmd><cmd_name>add</cmd_name>
@@ -1633,6 +1635,7 @@
16331635
<col><field>location</field></col>
16341636
<col><field>logstate</field></col>
16351637
<col><field>skills</field></col>
1638+
<col><field>last_call_end</field></col>
16361639
</query_cols>
16371640
</cmd>
16381641
<cmd><cmd_name>update</cmd_name>
@@ -1646,6 +1649,7 @@
16461649
<col><field>location</field></col>
16471650
<col><field>logstate</field></col>
16481651
<col><field>skills</field></col>
1652+
<col><field>last_call_end</field></col>
16491653
</query_cols>
16501654
</cmd>
16511655
<cmd><cmd_name>delete</cmd_name>

scripts/postgres/call_center-create.sql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ CREATE TABLE cc_agents (
1818
location VARCHAR(128) NOT NULL,
1919
logstate INTEGER DEFAULT 0 NOT NULL,
2020
skills VARCHAR(255) NOT NULL,
21+
last_call_end INTEGER DEFAULT 0 NOT NULL,
2122
CONSTRAINT cc_agents_unique_agentid UNIQUE (agentid)
2223
);
2324

0 commit comments

Comments
 (0)