浏览代码

schema: allow null value for active_watchers user-agent column

some UAs not sending Userg-Agent header on SUBSCRIBE
lazedo 7 年之前
父节点
当前提交
7653124c2d

+ 1 - 0
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>
 

+ 1 - 1
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)
 );
 

+ 1 - 1
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) 

+ 1 - 1
utils/kamctl/mongodb/kamailio/active_watchers.json

@@ -135,7 +135,7 @@
     "user_agent": {
       "type": "string",
       "default": "",
-      "null": false
+      "null": true
     }
   ]
 }

+ 1 - 1
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`)
 );
 

+ 1 - 1
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)
 );