Module: kamailio
Branch: master
Commit: 7653124c2d3615e4f6229f12b699063f65b7afea
URL:
https://github.com/kamailio/kamailio/commit/7653124c2d3615e4f6229f12b699063…
Author: lazedo <luis.azedo(a)factorlusitano.com>
Committer: lazedo <luis.azedo(a)factorlusitano.com>
Date: 2018-02-09T11:28:05Z
schema: allow null value for active_watchers user-agent column
some UAs not sending Userg-Agent header on SUBSCRIBE
---
Modified: src/lib/srdb1/schema/pr_active_watchers.xml
Modified: utils/kamctl/db_sqlite/presence-create.sql
Modified: utils/kamctl/dbtext/kamailio/active_watchers
Modified: utils/kamctl/mongodb/kamailio/active_watchers.json
Modified: utils/kamctl/mysql/presence-create.sql
Modified: utils/kamctl/postgres/presence-create.sql
---
Diff:
https://github.com/kamailio/kamailio/commit/7653124c2d3615e4f6229f12b699063…
Patch:
https://github.com/kamailio/kamailio/commit/7653124c2d3615e4f6229f12b699063…
---
diff --git a/src/lib/srdb1/schema/pr_active_watchers.xml
b/src/lib/srdb1/schema/pr_active_watchers.xml
index 8e4fd0604d..3d53eaf46d 100644
--- a/src/lib/srdb1/schema/pr_active_watchers.xml
+++ b/src/lib/srdb1/schema/pr_active_watchers.xml
@@ -220,6 +220,7 @@
<type>string</type>
<size>&hf_len;</size>
<default/>
+ <null/>
<description>User-Agent header field contains information about the UAC
originating the request.</description>
</column>
diff --git a/utils/kamctl/db_sqlite/presence-create.sql
b/utils/kamctl/db_sqlite/presence-create.sql
index 637ff14b62..df121b96d5 100644
--- a/utils/kamctl/db_sqlite/presence-create.sql
+++ b/utils/kamctl/db_sqlite/presence-create.sql
@@ -46,7 +46,7 @@ CREATE TABLE active_watchers (
updated INTEGER NOT NULL,
updated_winfo INTEGER NOT NULL,
flags INTEGER DEFAULT 0 NOT NULL,
- user_agent VARCHAR(255) DEFAULT '' NOT NULL,
+ user_agent VARCHAR(255) DEFAULT '',
CONSTRAINT active_watchers_active_watchers_idx UNIQUE (callid, to_tag, from_tag)
);
diff --git a/utils/kamctl/dbtext/kamailio/active_watchers
b/utils/kamctl/dbtext/kamailio/active_watchers
index 19719b72d5..04e96b39bc 100644
--- a/utils/kamctl/dbtext/kamailio/active_watchers
+++ b/utils/kamctl/dbtext/kamailio/active_watchers
@@ -1 +1 @@
-id(int,auto) presentity_uri(string) watcher_username(string) watcher_domain(string)
to_user(string) to_domain(string) event(string) event_id(string,null) to_tag(string)
from_tag(string) callid(string) local_cseq(int) remote_cseq(int) contact(string)
record_route(string,null) expires(int) status(int) reason(string,null) version(int)
socket_info(string) local_contact(string) from_user(string) from_domain(string)
updated(int) updated_winfo(int) flags(int) user_agent(string)
+id(int,auto) presentity_uri(string) watcher_username(string) watcher_domain(string)
to_user(string) to_domain(string) event(string) event_id(string,null) to_tag(string)
from_tag(string) callid(string) local_cseq(int) remote_cseq(int) contact(string)
record_route(string,null) expires(int) status(int) reason(string,null) version(int)
socket_info(string) local_contact(string) from_user(string) from_domain(string)
updated(int) updated_winfo(int) flags(int) user_agent(string,null)
diff --git a/utils/kamctl/mongodb/kamailio/active_watchers.json
b/utils/kamctl/mongodb/kamailio/active_watchers.json
index 123692d988..5dc8df8256 100644
--- a/utils/kamctl/mongodb/kamailio/active_watchers.json
+++ b/utils/kamctl/mongodb/kamailio/active_watchers.json
@@ -135,7 +135,7 @@
"user_agent": {
"type": "string",
"default": "",
- "null": false
+ "null": true
}
]
}
\ No newline at end of file
diff --git a/utils/kamctl/mysql/presence-create.sql
b/utils/kamctl/mysql/presence-create.sql
index 9e7e71c138..d5fcc72770 100644
--- a/utils/kamctl/mysql/presence-create.sql
+++ b/utils/kamctl/mysql/presence-create.sql
@@ -46,7 +46,7 @@ CREATE TABLE `active_watchers` (
`updated` INT(11) NOT NULL,
`updated_winfo` INT(11) NOT NULL,
`flags` INT(11) DEFAULT 0 NOT NULL,
- `user_agent` VARCHAR(255) DEFAULT '' NOT NULL,
+ `user_agent` VARCHAR(255) DEFAULT '',
CONSTRAINT active_watchers_idx UNIQUE (`callid`, `to_tag`, `from_tag`)
);
diff --git a/utils/kamctl/postgres/presence-create.sql
b/utils/kamctl/postgres/presence-create.sql
index 2259c260a8..943aac0bd6 100644
--- a/utils/kamctl/postgres/presence-create.sql
+++ b/utils/kamctl/postgres/presence-create.sql
@@ -46,7 +46,7 @@ CREATE TABLE active_watchers (
updated INTEGER NOT NULL,
updated_winfo INTEGER NOT NULL,
flags INTEGER DEFAULT 0 NOT NULL,
- user_agent VARCHAR(255) DEFAULT '' NOT NULL,
+ user_agent VARCHAR(255) DEFAULT '',
CONSTRAINT active_watchers_active_watchers_idx UNIQUE (callid, to_tag, from_tag)
);