Browse code

uac: add functionality to specify a custom socket for each uacreg table entry

- add functionality to specify a custom socket for each uacreg table entry
- necessary if you need to REGISTER over different outgoing interfaces with uac
- add socket column to module database schemes
- bump uacreg database table version from 3 to 4
- add database version check helper to module
- extend RPC commands to output and also add this value
- add documentation for the new functionality

Henning Westerholt authored on 24/08/2019 09:57:07
Showing 18 changed files
... ...
@@ -9,7 +9,7 @@
9 9
 
10 10
 <table id="uacreg" xmlns:db="http://docbook.org/ns/docbook">
11 11
     <name>uacreg</name>
12
-    <version>3</version>
12
+    <version>4</version>
13 13
     <type db="mysql">&MYSQL_TABLE_TYPE;</type>
14 14
     <description>
15 15
 		<db:para>
... ...
@@ -134,7 +134,15 @@
134 134
         <description>Initial registration delay</description>
135 135
     </column>
136 136
 
137
-	<index>
137
+    <column id="socket">
138
+        <name>socket</name>
139
+        <type>string</type>
140
+        <size>&uri_len;</size>
141
+        <default/>
142
+        <description>Used socket for sending out requests</description>
143
+    </column>
144
+
145
+    <index>
138 146
         <name>l_uuid_idx</name>
139 147
         <colref linkend="l_uuid"/>
140 148
         <unique/>
... ...
@@ -567,8 +567,12 @@ modparam("uac", "reg_gc_interval", 60)
567 567
 		<para>
568 568
 			Default socket to be used for generating registration requests and sending
569 569
 			requests with the function uac_req_send(). Useful e.g. when several public
570
-			interfaces are available. A send socket in the $uac_reg variable used
571
-			together with the uac_req_send() function will override this parameter.
570
+			interfaces are available.
571
+		</para>
572
+		<para>
573
+		A send socket in the $uac_reg variable used together with the uac_req_send()
574
+		function will override this parameter. A socket value in the uacreg table will
575
+		also override the parameter for this particular entry.
572 576
 		</para>
573 577
 		<para>
574 578
 		<emphasis>
... ...
@@ -1353,6 +1357,13 @@ event_route[uac:reply] {
1353 1357
 			<emphasis>reg_delay</emphasis> - delay initial registration with at least reg_delay seconds, e.g.,: 3
1354 1358
 			</para></listitem>
1355 1359
 		</itemizedlist>
1360
+		<itemizedlist>
1361
+			<listitem><para>
1362
+			<emphasis>socket</emphasis> - Used socket for sending out registration requests,
1363
+			e.g.:, udp:192.168.0.125:5060
1364
+			</para></listitem>
1365
+		</itemizedlist>
1366
+
1356 1367
 		<para>
1357 1368
 		The module takes care of sending REGISTER and refresh registrations
1358 1369
 		before they expire.
... ...
@@ -76,6 +76,7 @@ typedef struct _reg_uac
76 76
 	str   auth_username;
77 77
 	str   auth_password;
78 78
 	str   callid;
79
+	str   socket;
79 80
 	unsigned int cseq;
80 81
 	unsigned int flags;
81 82
 	unsigned int expires;
... ...
@@ -136,6 +137,7 @@ str auth_proxy_column = str_init("auth_proxy");
136 137
 str expires_column = str_init("expires");
137 138
 str flags_column = str_init("flags");
138 139
 str reg_delay_column = str_init("reg_delay");
140
+str socket_column = str_init("socket");
139 141
 
140 142
 str str_empty = str_init("");
141 143
 
... ...
@@ -526,6 +528,7 @@ int reg_ht_add(reg_uac_t *reg)
526 528
 		+ reg->auth_proxy.len + 1
527 529
 		+ reg->auth_username.len + 1
528 530
 		+ reg->auth_password.len + 1
531
+		+ reg->socket.len + 1
529 532
 		+ (reg_keep_callid ? UAC_REG_TM_CALLID_SIZE : 0) + 1;
530 533
 	nr = (reg_uac_t*)shm_malloc(sizeof(reg_uac_t) + len);
531 534
 	if(nr==NULL)
... ...
@@ -555,6 +558,7 @@ int reg_ht_add(reg_uac_t *reg)
555 558
 	reg_copy_shm(&nr->auth_proxy, &reg->auth_proxy, 0);
556 559
 	reg_copy_shm(&nr->auth_username, &reg->auth_username, 0);
557 560
 	reg_copy_shm(&nr->auth_password, &reg->auth_password, 0);
561
+	reg_copy_shm(&nr->socket, &reg->socket, 0);
558 562
 	reg_copy_shm(&nr->callid, &str_empty, reg_keep_callid ? UAC_REG_TM_CALLID_SIZE : 0);
559 563
 
560 564
 	reg_ht_add_byuser(nr);
... ...
@@ -1128,9 +1132,18 @@ int uac_reg_update(reg_uac_t *reg, time_t tn)
1128 1132
 
1129 1133
 		ret = uac_tmb.t_request_within(&uac_r);
1130 1134
 	} else {
1135
+		/* custom socket */
1136
+		if(reg->socket.s != NULL && reg->socket.len > 0) {
1137
+			LM_DBG("using custom socket %.*s to send request\n",
1138
+				reg->socket.len, reg->socket.s);
1139
+			uac_r.ssock = &reg->socket;
1140
+		}
1131 1141
 		/* default socket */
1132
-		if(uac_default_socket.s != NULL && uac_default_socket.len > 0) {
1133
-			uac_r.ssock = &uac_default_socket;
1142
+		else {
1143
+			if(uac_default_socket.s != NULL && uac_default_socket.len > 0) {
1144
+				LM_DBG("using configured default_socket to send request\n");
1145
+				uac_r.ssock = &uac_default_socket;
1146
+			}
1134 1147
 		}
1135 1148
 		ret = uac_tmb.t_request(&uac_r,  /* UAC Req */
1136 1149
 				&s_ruri, /* Request-URI */
... ...
@@ -1227,6 +1240,11 @@ static inline int uac_reg_db_to_reg(reg_uac_t *reg, db1_res_t* db_res, int i, db
1227 1240
 	reg->expires = (unsigned int)RES_ROWS(db_res)[i].values[9].val.int_val;
1228 1241
 	reg->flags = (unsigned int)RES_ROWS(db_res)[i].values[10].val.int_val;
1229 1242
 	reg->reg_delay = (unsigned int)RES_ROWS(db_res)[i].values[11].val.int_val;
1243
+	/* socket may be empty */
1244
+	if(!VAL_NULL(&RES_ROWS(db_res)[i].values[12])) {
1245
+		reg->socket.s = (char*)(RES_ROWS(db_res)[i].values[12].val.string_val);
1246
+		reg->socket.len = strlen(reg->socket.s);
1247
+	}
1230 1248
 	return 0;
1231 1249
 }
1232 1250
 
... ...
@@ -1239,7 +1257,7 @@ int uac_reg_load_db(void)
1239 1257
 	db1_con_t *reg_db_con = NULL;
1240 1258
 	db_func_t reg_dbf;
1241 1259
 	reg_uac_t reg;
1242
-	db_key_t db_cols[12] = {
1260
+	db_key_t db_cols[13] = {
1243 1261
 		&l_uuid_column,
1244 1262
 		&l_username_column,
1245 1263
 		&l_domain_column,
... ...
@@ -1251,7 +1269,8 @@ int uac_reg_load_db(void)
1251 1269
 		&auth_proxy_column,
1252 1270
 		&expires_column,
1253 1271
 		&flags_column,
1254
-		&reg_delay_column
1272
+		&reg_delay_column,
1273
+		&socket_column
1255 1274
 	};
1256 1275
 	db1_res_t* db_res = NULL;
1257 1276
 	int i, ret;
... ...
@@ -1283,6 +1302,12 @@ int uac_reg_load_db(void)
1283 1302
 		LM_ERR("failed to connect to the database\n");
1284 1303
 		return -1;
1285 1304
 	}
1305
+
1306
+	if(db_check_table_version(&reg_dbf, reg_db_con, &reg_db_table, UACREG_TABLE_VERSION) < 0) {
1307
+		DB_TABLE_VERSION_ERROR(reg_db_table);
1308
+		return -1;
1309
+	}
1310
+
1286 1311
 	if (reg_dbf.use_table(reg_db_con, &reg_db_table) < 0)
1287 1312
 	{
1288 1313
 		LM_ERR("failed to use_table\n");
... ...
@@ -1290,7 +1315,7 @@ int uac_reg_load_db(void)
1290 1315
 	}
1291 1316
 
1292 1317
 	if (DB_CAPABILITY(reg_dbf, DB_CAP_FETCH)) {
1293
-		if(reg_dbf.query(reg_db_con, 0, 0, 0, db_cols, 0, 12, 0, 0) < 0)
1318
+		if(reg_dbf.query(reg_db_con, 0, 0, 0, db_cols, 0, 13, 0, 0) < 0)
1294 1319
 		{
1295 1320
 			LM_ERR("Error while querying db\n");
1296 1321
 			return -1;
... ...
@@ -1309,7 +1334,7 @@ int uac_reg_load_db(void)
1309 1334
 		}
1310 1335
 	} else {
1311 1336
 		if((ret=reg_dbf.query(reg_db_con, NULL, NULL, NULL, db_cols,
1312
-						0, 12, 0, &db_res))!=0
1337
+						0, 13, 0, &db_res))!=0
1313 1338
 				|| RES_ROW_N(db_res)<=0 )
1314 1339
 		{
1315 1340
 			reg_dbf.free_result(reg_db_con, db_res);
... ...
@@ -1367,7 +1392,7 @@ int uac_reg_db_refresh(str *pl_uuid)
1367 1392
 	db_func_t reg_dbf;
1368 1393
 	reg_uac_t reg;
1369 1394
 	reg_uac_t *cur_reg;
1370
-	db_key_t db_cols[12] = {
1395
+	db_key_t db_cols[13] = {
1371 1396
 		&l_uuid_column,
1372 1397
 		&l_username_column,
1373 1398
 		&l_domain_column,
... ...
@@ -1379,7 +1404,8 @@ int uac_reg_db_refresh(str *pl_uuid)
1379 1404
 		&auth_proxy_column,
1380 1405
 		&expires_column,
1381 1406
 		&flags_column,
1382
-		&reg_delay_column
1407
+		&reg_delay_column,
1408
+		&socket_column
1383 1409
 	};
1384 1410
 	db_key_t db_keys[1] = {&l_uuid_column};
1385 1411
 	db_val_t db_vals[1];
... ...
@@ -1426,7 +1452,7 @@ int uac_reg_db_refresh(str *pl_uuid)
1426 1452
 	db_vals[0].val.str_val.len = pl_uuid->len;
1427 1453
 
1428 1454
 	if((ret=reg_dbf.query(reg_db_con, db_keys, NULL, db_vals, db_cols,
1429
-					1 /*nr keys*/, 12 /*nr cols*/, 0, &db_res))!=0
1455
+					1 /*nr keys*/, 13 /*nr cols*/, 0, &db_res))!=0
1430 1456
 			|| RES_ROW_N(db_res)<=0 )
1431 1457
 	{
1432 1458
 		reg_dbf.free_result(reg_db_con, db_res);
... ...
@@ -1756,7 +1782,7 @@ static int rpc_uac_reg_add_node_helper(rpc_t* rpc, void* ctx, reg_uac_t *reg, ti
1756 1782
 		rpc->fault(ctx, 500, "Internal error creating rpc");
1757 1783
 		return -1;
1758 1784
 	}
1759
-	if (rpc->struct_add(th, "SSSSSSSSSdddddd",
1785
+	if (rpc->struct_add(th, "SSSSSSSSSddddddS",
1760 1786
 				"l_uuid",        &reg->l_uuid,
1761 1787
 				"l_username",    &reg->l_username,
1762 1788
 				"l_domain",      &reg->l_domain,
... ...
@@ -1772,7 +1798,8 @@ static int rpc_uac_reg_add_node_helper(rpc_t* rpc, void* ctx, reg_uac_t *reg, ti
1772 1798
 				"diff_expires",  (int)(reg->timer_expires - tn),
1773 1799
 				"timer_expires", (int)reg->timer_expires,
1774 1800
 				"reg_init",      (int)reg->reg_init,
1775
-				"reg_delay",     (int)reg->reg_delay
1801
+				"reg_delay",     (int)reg->reg_delay,
1802
+				"socket",        &reg->socket
1776 1803
 				)<0) {
1777 1804
 		rpc->fault(ctx, 500, "Internal error adding item");
1778 1805
 		return -1;
... ...
@@ -2016,7 +2043,7 @@ static void rpc_uac_reg_add(rpc_t* rpc, void* ctx)
2016 2043
 	reg_uac_t reg;
2017 2044
 	reg_uac_t *cur_reg;
2018 2045
 
2019
-	if(rpc->scan(ctx, "SSSSSSSSSddd",
2046
+	if(rpc->scan(ctx, "SSSSSSSSSdddS",
2020 2047
 				&reg.l_uuid,
2021 2048
 				&reg.l_username,
2022 2049
 				&reg.l_domain,
... ...
@@ -2028,7 +2055,8 @@ static void rpc_uac_reg_add(rpc_t* rpc, void* ctx)
2028 2055
 				&reg.auth_proxy,
2029 2056
 				&reg.expires,
2030 2057
 				&reg.flags,
2031
-				&reg.reg_delay
2058
+				&reg.reg_delay,
2059
+				&reg.socket
2032 2060
 			)<1)
2033 2061
 	{
2034 2062
 		rpc->fault(ctx, 400, "Invalid Parameters");
... ...
@@ -23,6 +23,8 @@
23 23
 
24 24
 #include "../../core/pvar.h"
25 25
 
26
+#define UACREG_TABLE_VERSION 4
27
+
26 28
 extern int reg_timer_interval;
27 29
 extern int reg_retry_interval;
28 30
 extern int reg_htable_size;
... ...
@@ -46,6 +48,7 @@ extern str auth_username_column;
46 48
 extern str auth_password_column;
47 49
 extern str auth_proxy_column;
48 50
 extern str expires_column;
51
+extern str socket_column;
49 52
 
50 53
 int uac_reg_load_db(void);
51 54
 int uac_reg_init_ht(unsigned int sz);
... ...
@@ -1,5 +1,5 @@
1 1
 METADATA_COLUMNS
2
-id(int) l_uuid(str) l_username(str) l_domain(str) r_username(str) r_domain(str) realm(str) auth_username(str) auth_password(str) auth_ha1(str) auth_proxy(str) expires(int) flags(int) reg_delay(int)
2
+id(int) l_uuid(str) l_username(str) l_domain(str) r_username(str) r_domain(str) realm(str) auth_username(str) auth_password(str) auth_ha1(str) auth_proxy(str) expires(int) flags(int) reg_delay(int) socket(str)
3 3
 METADATA_KEY
4 4
 
5 5
 METADATA_READONLY
... ...
@@ -7,4 +7,4 @@ METADATA_READONLY
7 7
 METADATA_LOGFLAGS
8 8
 0
9 9
 METADATA_DEFAULTS
10
-NIL|''|''|''|''|''|''|''|''|''|''|0|0|0
10
+NIL|''|''|''|''|''|''|''|''|''|''|0|0|0|''
... ...
@@ -64,6 +64,8 @@ imc_members|
64 64
 imc_members|1
65 65
 imc_rooms|
66 66
 imc_rooms|1
67
+METADATA_DEFAULTS
68
+NIL|NIL|''|NIL|NIL|NULL|NULL|NULL|NULL|'2030-05-28 21:32:15'|1.0|'Default-Call-ID'|1|'2000-01-01 00:00:01'|0|0|''|NULL|NULL|NULL
67 69
 lcr_gw|
68 70
 lcr_gw|3
69 71
 lcr_rule|
... ...
@@ -123,7 +125,7 @@ topos_t|1
123 125
 trusted|
124 126
 trusted|6
125 127
 uacreg|
126
-uacreg|3
128
+uacreg|4
127 129
 uid_credentials|
128 130
 uid_credentials|7
129 131
 uid_domain|
... ...
@@ -1,2 +1,2 @@
1
-id/int,l_uuid/string,l_username/string,l_domain/string,r_username/string,r_domain/string,realm/string,auth_username/string,auth_password/string,auth_ha1/string,auth_proxy/string,expires/int,flags/int,reg_delay/int,
2
-3
1
+id/int,l_uuid/string,l_username/string,l_domain/string,r_username/string,r_domain/string,realm/string,auth_username/string,auth_password/string,auth_ha1/string,auth_proxy/string,expires/int,flags/int,reg_delay/int,socket/string,
2
+4
... ...
@@ -13,8 +13,9 @@ CREATE TABLE uacreg (
13 13
     expires INTEGER DEFAULT 0 NOT NULL,
14 14
     flags INTEGER DEFAULT 0 NOT NULL,
15 15
     reg_delay INTEGER DEFAULT 0 NOT NULL,
16
+    socket VARCHAR(128) DEFAULT '' NOT NULL,
16 17
     CONSTRAINT uacreg_l_uuid_idx UNIQUE (l_uuid)
17 18
 );
18 19
 
19
-INSERT INTO version (table_name, table_version) values ('uacreg','3');
20
+INSERT INTO version (table_name, table_version) values ('uacreg','4');
20 21
 
... ...
@@ -1 +1 @@
1
-id(int,auto) l_uuid(string) l_username(string) l_domain(string) r_username(string) r_domain(string) realm(string) auth_username(string) auth_password(string) auth_ha1(string) auth_proxy(string) expires(int) flags(int) reg_delay(int) 
1
+id(int,auto) l_uuid(string) l_username(string) l_domain(string) r_username(string) r_domain(string) realm(string) auth_username(string) auth_password(string) auth_ha1(string) auth_proxy(string) expires(int) flags(int) reg_delay(int) socket(string) 
... ...
@@ -56,7 +56,7 @@ subscriber:7
56 56
 topos_d:1
57 57
 topos_t:1
58 58
 trusted:6
59
-uacreg:3
59
+uacreg:4
60 60
 uid_credentials:7
61 61
 uid_domain:2
62 62
 uid_domain_attrs:1
... ...
@@ -1,6 +1,6 @@
1 1
 {
2 2
   "name": "uacreg",
3
-  "version": 3,
3
+  "version": 4,
4 4
   "columns": [
5 5
     "id": {
6 6
       "type": "int",
... ...
@@ -71,6 +71,11 @@
71 71
       "type": "int",
72 72
       "default": 0,
73 73
       "null": false
74
+    },
75
+    "socket": {
76
+      "type": "string",
77
+      "default": "",
78
+      "null": false
74 79
     }
75 80
   ]
76 81
 }
77 82
\ No newline at end of file
... ...
@@ -56,7 +56,7 @@ db.getCollection("version").insert({ table_name: "subscriber", table_version: Nu
56 56
 db.getCollection("version").insert({ table_name: "topos_d", table_version: NumberInt(1) });
57 57
 db.getCollection("version").insert({ table_name: "topos_t", table_version: NumberInt(1) });
58 58
 db.getCollection("version").insert({ table_name: "trusted", table_version: NumberInt(6) });
59
-db.getCollection("version").insert({ table_name: "uacreg", table_version: NumberInt(3) });
59
+db.getCollection("version").insert({ table_name: "uacreg", table_version: NumberInt(4) });
60 60
 db.getCollection("version").insert({ table_name: "uid_credentials", table_version: NumberInt(7) });
61 61
 db.getCollection("version").insert({ table_name: "uid_domain", table_version: NumberInt(2) });
62 62
 db.getCollection("version").insert({ table_name: "uid_domain_attrs", table_version: NumberInt(1) });
... ...
@@ -13,8 +13,9 @@ CREATE TABLE `uacreg` (
13 13
     `expires` INT DEFAULT 0 NOT NULL,
14 14
     `flags` INT DEFAULT 0 NOT NULL,
15 15
     `reg_delay` INT DEFAULT 0 NOT NULL,
16
+    `socket` VARCHAR(128) DEFAULT '' NOT NULL,
16 17
     CONSTRAINT l_uuid_idx UNIQUE (`l_uuid`)
17 18
 );
18 19
 
19
-INSERT INTO version (table_name, table_version) values ('uacreg','3');
20
+INSERT INTO version (table_name, table_version) values ('uacreg','4');
20 21
 
... ...
@@ -13,6 +13,7 @@ CREATE TABLE uacreg (
13 13
     expires NUMBER(10) DEFAULT 0 NOT NULL,
14 14
     flags NUMBER(10) DEFAULT 0 NOT NULL,
15 15
     reg_delay NUMBER(10) DEFAULT 0 NOT NULL,
16
+    socket VARCHAR2(128) DEFAULT '',
16 17
     CONSTRAINT uacreg_l_uuid_idx  UNIQUE (l_uuid)
17 18
 );
18 19
 
... ...
@@ -24,5 +25,5 @@ END uacreg_tr;
24 25
 /
25 26
 BEGIN map2users('uacreg'); END;
26 27
 /
27
-INSERT INTO version (table_name, table_version) values ('uacreg','3');
28
+INSERT INTO version (table_name, table_version) values ('uacreg','4');
28 29
 
... ...
@@ -13,8 +13,9 @@ CREATE TABLE uacreg (
13 13
     expires INTEGER DEFAULT 0 NOT NULL,
14 14
     flags INTEGER DEFAULT 0 NOT NULL,
15 15
     reg_delay INTEGER DEFAULT 0 NOT NULL,
16
+    socket VARCHAR(128) DEFAULT '' NOT NULL,
16 17
     CONSTRAINT uacreg_l_uuid_idx UNIQUE (l_uuid)
17 18
 );
18 19
 
19
-INSERT INTO version (table_name, table_version) values ('uacreg','3');
20
+INSERT INTO version (table_name, table_version) values ('uacreg','4');
20 21
 
... ...
@@ -219,6 +219,17 @@
219 219
 		<column><field>attrs</field><type>DB1_STR</type></column>
220 220
 		<column><field>description</field><type>DB1_STR</type></column>
221 221
 	</db_table>
222
+	<!-- Declaration of domainpolicy table-->
223
+	<db_table id="domainpolicy">
224
+		<table_name>domainpolicy</table_name>
225
+		<db_url_id>mysql</db_url_id>
226
+		<column><field>id</field><type>DB1_INT</type></column>
227
+		<column><field>rule</field><type>DB1_STR</type></column>
228
+		<column><field>type</field><type>DB1_STR</type></column>
229
+		<column><field>att</field><type>DB1_STR</type></column>
230
+		<column><field>val</field><type>DB1_STR</type></column>
231
+		<column><field>description</field><type>DB1_STR</type></column>
232
+	</db_table>
222 233
 	<!-- Declaration of domain table-->
223 234
 	<db_table id="domain">
224 235
 		<table_name>domain</table_name>
... ...
@@ -239,17 +250,6 @@
239 250
 		<column><field>value</field><type>DB1_STR</type></column>
240 251
 		<column><field>last_modified</field><type>DB1_DATETIME</type></column>
241 252
 	</db_table>
242
-	<!-- Declaration of domainpolicy table-->
243
-	<db_table id="domainpolicy">
244
-		<table_name>domainpolicy</table_name>
245
-		<db_url_id>mysql</db_url_id>
246
-		<column><field>id</field><type>DB1_INT</type></column>
247
-		<column><field>rule</field><type>DB1_STR</type></column>
248
-		<column><field>type</field><type>DB1_STR</type></column>
249
-		<column><field>att</field><type>DB1_STR</type></column>
250
-		<column><field>val</field><type>DB1_STR</type></column>
251
-		<column><field>description</field><type>DB1_STR</type></column>
252
-	</db_table>
253 253
 	<!-- Declaration of dr_gateways table-->
254 254
 	<db_table id="dr_gateways">
255 255
 		<table_name>dr_gateways</table_name>
... ...
@@ -828,6 +828,7 @@
828 828
 		<column><field>expires</field><type>DB1_INT</type></column>
829 829
 		<column><field>flags</field><type>DB1_INT</type></column>
830 830
 		<column><field>reg_delay</field><type>DB1_INT</type></column>
831
+		<column><field>socket</field><type>DB1_STR</type></column>
831 832
 	</db_table>
832 833
 	<!-- Declaration of uid_credentials table-->
833 834
 	<db_table id="uid_credentials">
... ...
@@ -4146,6 +4147,7 @@
4146 4147
 				<col><field>expires</field></col>
4147 4148
 				<col><field>flags</field></col>
4148 4149
 				<col><field>reg_delay</field></col>
4150
+				<col><field>socket</field></col>
4149 4151
 			</query_cols>
4150 4152
 		</cmd>
4151 4153
 		<cmd><cmd_name>add</cmd_name>
... ...
@@ -4165,6 +4167,7 @@
4165 4167
 				<col><field>expires</field></col>
4166 4168
 				<col><field>flags</field></col>
4167 4169
 				<col><field>reg_delay</field></col>
4170
+				<col><field>socket</field></col>
4168 4171
 			</query_cols>
4169 4172
 		</cmd>
4170 4173
 		<cmd><cmd_name>update</cmd_name>
... ...
@@ -4187,6 +4190,7 @@
4187 4190
 				<col><field>expires</field></col>
4188 4191
 				<col><field>flags</field></col>
4189 4192
 				<col><field>reg_delay</field></col>
4193
+				<col><field>socket</field></col>
4190 4194
 			</query_cols>
4191 4195
 		</cmd>
4192 4196
 		<cmd><cmd_name>delete</cmd_name>
... ...
@@ -18,6 +18,7 @@
18 18
 				<col><field>expires</field></col>
19 19
 				<col><field>flags</field></col>
20 20
 				<col><field>reg_delay</field></col>
21
+				<col><field>socket</field></col>
21 22
 			</query_cols>
22 23
 		</cmd>
23 24
 		<cmd><cmd_name>add</cmd_name>
... ...
@@ -37,6 +38,7 @@
37 38
 				<col><field>expires</field></col>
38 39
 				<col><field>flags</field></col>
39 40
 				<col><field>reg_delay</field></col>
41
+				<col><field>socket</field></col>
40 42
 			</query_cols>
41 43
 		</cmd>
42 44
 		<cmd><cmd_name>update</cmd_name>
... ...
@@ -59,6 +61,7 @@
59 61
 				<col><field>expires</field></col>
60 62
 				<col><field>flags</field></col>
61 63
 				<col><field>reg_delay</field></col>
64
+				<col><field>socket</field></col>
62 65
 			</query_cols>
63 66
 		</cmd>
64 67
 		<cmd><cmd_name>delete</cmd_name>
... ...
@@ -16,4 +16,5 @@
16 16
 		<column><field>expires</field><type>DB1_INT</type></column>
17 17
 		<column><field>flags</field><type>DB1_INT</type></column>
18 18
 		<column><field>reg_delay</field><type>DB1_INT</type></column>
19
+		<column><field>socket</field><type>DB1_STR</type></column>
19 20
 	</db_table>