Module: sip-router
Branch: master
Commit: 6927fcf7bb48d88a708028a0c877a050150ef05d
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=6927fcf…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Tue Apr 17 11:47:34 2012 +0200
srdb1: new column reg_id to location and aliases tables
- stores the value of reg-id Contact parameter defined by RFC5626
---
lib/srdb1/schema/aliases.xml | 9 +++++++++
lib/srdb1/schema/location.xml | 8 ++++++++
utils/kamctl/db_berkeley/kamailio/aliases | 4 ++--
utils/kamctl/db_berkeley/kamailio/location | 4 ++--
utils/kamctl/db_sqlite/registrar-create.sql | 3 ++-
utils/kamctl/db_sqlite/usrloc-create.sql | 3 ++-
utils/kamctl/dbtext/kamailio/aliases | 2 +-
utils/kamctl/dbtext/kamailio/location | 2 +-
utils/kamctl/mysql/registrar-create.sql | 3 ++-
utils/kamctl/mysql/usrloc-create.sql | 3 ++-
utils/kamctl/oracle/registrar-create.sql | 3 ++-
utils/kamctl/oracle/usrloc-create.sql | 3 ++-
utils/kamctl/postgres/registrar-create.sql | 3 ++-
utils/kamctl/postgres/usrloc-create.sql | 3 ++-
14 files changed, 39 insertions(+), 14 deletions(-)
diff --git a/lib/srdb1/schema/aliases.xml b/lib/srdb1/schema/aliases.xml
index d5bad5a..fe7df18 100644
--- a/lib/srdb1/schema/aliases.xml
+++ b/lib/srdb1/schema/aliases.xml
@@ -171,6 +171,15 @@
<description>The value of SIP instance parameter for
GRUU.</description>
</column>
+ <column>
+ <name>reg_id</name>
+ <type>int</type>
+ <size>11</size>
+ <default>0</default>
+ <description>The value of reg-id contact parameter</description>
+ </column>
+
+
<index>
<name>alias_idx</name>
<colref linkend="username"/>
diff --git a/lib/srdb1/schema/location.xml b/lib/srdb1/schema/location.xml
index ddf0b48..0276212 100644
--- a/lib/srdb1/schema/location.xml
+++ b/lib/srdb1/schema/location.xml
@@ -171,6 +171,14 @@
<description>The value of SIP instance parameter for
GRUU.</description>
</column>
+ <column>
+ <name>reg_id</name>
+ <type>int</type>
+ <size>11</size>
+ <default>0</default>
+ <description>The value of reg-id contact parameter</description>
+ </column>
+
<index>
<name>account_contact_idx</name>
diff --git a/utils/kamctl/db_berkeley/kamailio/aliases
b/utils/kamctl/db_berkeley/kamailio/aliases
index 87bf7d5..edc1177 100644
--- a/utils/kamctl/db_berkeley/kamailio/aliases
+++ b/utils/kamctl/db_berkeley/kamailio/aliases
@@ -1,5 +1,5 @@
METADATA_COLUMNS
-id(int) ruid(str) username(str) domain(str) contact(str) received(str) path(str)
expires(datetime) q(double) callid(str) cseq(int) last_modified(datetime) flags(int)
cflags(int) user_agent(str) socket(str) methods(int) instance(str)
+id(int) ruid(str) username(str) domain(str) contact(str) received(str) path(str)
expires(datetime) q(double) callid(str) cseq(int) last_modified(datetime) flags(int)
cflags(int) user_agent(str) socket(str) methods(int) instance(str) reg_id(int)
METADATA_KEY
1 2 3
METADATA_READONLY
@@ -7,4 +7,4 @@ METADATA_READONLY
METADATA_LOGFLAGS
0
METADATA_DEFAULTS
-NIL|''|''|NULL|''|NULL|NULL|'2020-05-28
21:32:15'|1.0|'Default-Call-ID'|1|'1900-01-01
00:00:01'|0|0|''|NULL|NULL|NULL
+NIL|''|''|NULL|''|NULL|NULL|'2020-05-28
21:32:15'|1.0|'Default-Call-ID'|1|'1900-01-01
00:00:01'|0|0|''|NULL|NULL|NULL|0
diff --git a/utils/kamctl/db_berkeley/kamailio/location
b/utils/kamctl/db_berkeley/kamailio/location
index 87bf7d5..edc1177 100644
--- a/utils/kamctl/db_berkeley/kamailio/location
+++ b/utils/kamctl/db_berkeley/kamailio/location
@@ -1,5 +1,5 @@
METADATA_COLUMNS
-id(int) ruid(str) username(str) domain(str) contact(str) received(str) path(str)
expires(datetime) q(double) callid(str) cseq(int) last_modified(datetime) flags(int)
cflags(int) user_agent(str) socket(str) methods(int) instance(str)
+id(int) ruid(str) username(str) domain(str) contact(str) received(str) path(str)
expires(datetime) q(double) callid(str) cseq(int) last_modified(datetime) flags(int)
cflags(int) user_agent(str) socket(str) methods(int) instance(str) reg_id(int)
METADATA_KEY
1 2 3
METADATA_READONLY
@@ -7,4 +7,4 @@ METADATA_READONLY
METADATA_LOGFLAGS
0
METADATA_DEFAULTS
-NIL|''|''|NULL|''|NULL|NULL|'2020-05-28
21:32:15'|1.0|'Default-Call-ID'|1|'1900-01-01
00:00:01'|0|0|''|NULL|NULL|NULL
+NIL|''|''|NULL|''|NULL|NULL|'2020-05-28
21:32:15'|1.0|'Default-Call-ID'|1|'1900-01-01
00:00:01'|0|0|''|NULL|NULL|NULL|0
diff --git a/utils/kamctl/db_sqlite/registrar-create.sql
b/utils/kamctl/db_sqlite/registrar-create.sql
index 27a4d8f..8743517 100644
--- a/utils/kamctl/db_sqlite/registrar-create.sql
+++ b/utils/kamctl/db_sqlite/registrar-create.sql
@@ -17,7 +17,8 @@ CREATE TABLE aliases (
user_agent VARCHAR(255) DEFAULT '' NOT NULL,
socket VARCHAR(64) DEFAULT NULL,
methods INTEGER DEFAULT NULL,
- instance VARCHAR(255) DEFAULT NULL
+ instance VARCHAR(255) DEFAULT NULL,
+ reg_id INTEGER DEFAULT 0 NOT NULL
);
CREATE INDEX aliases_alias_idx ON aliases (username, domain, contact);
diff --git a/utils/kamctl/db_sqlite/usrloc-create.sql
b/utils/kamctl/db_sqlite/usrloc-create.sql
index 5d80120..72fd3d9 100644
--- a/utils/kamctl/db_sqlite/usrloc-create.sql
+++ b/utils/kamctl/db_sqlite/usrloc-create.sql
@@ -17,7 +17,8 @@ CREATE TABLE location (
user_agent VARCHAR(255) DEFAULT '' NOT NULL,
socket VARCHAR(64) DEFAULT NULL,
methods INTEGER DEFAULT NULL,
- instance VARCHAR(255) DEFAULT NULL
+ instance VARCHAR(255) DEFAULT NULL,
+ reg_id INTEGER DEFAULT 0 NOT NULL
);
CREATE INDEX location_account_contact_idx ON location (username, domain, contact);
diff --git a/utils/kamctl/dbtext/kamailio/aliases b/utils/kamctl/dbtext/kamailio/aliases
index 29c4968..f3f0c72 100644
--- a/utils/kamctl/dbtext/kamailio/aliases
+++ b/utils/kamctl/dbtext/kamailio/aliases
@@ -1 +1 @@
-id(int,auto) ruid(string) username(string) domain(string,null) contact(string)
received(string,null) path(string,null) expires(int) q(double) callid(string) cseq(int)
last_modified(int) flags(int) cflags(int) user_agent(string) socket(string,null)
methods(int,null) instance(string,null)
+id(int,auto) ruid(string) username(string) domain(string,null) contact(string)
received(string,null) path(string,null) expires(int) q(double) callid(string) cseq(int)
last_modified(int) flags(int) cflags(int) user_agent(string) socket(string,null)
methods(int,null) instance(string,null) reg_id(int)
diff --git a/utils/kamctl/dbtext/kamailio/location
b/utils/kamctl/dbtext/kamailio/location
index 29c4968..f3f0c72 100644
--- a/utils/kamctl/dbtext/kamailio/location
+++ b/utils/kamctl/dbtext/kamailio/location
@@ -1 +1 @@
-id(int,auto) ruid(string) username(string) domain(string,null) contact(string)
received(string,null) path(string,null) expires(int) q(double) callid(string) cseq(int)
last_modified(int) flags(int) cflags(int) user_agent(string) socket(string,null)
methods(int,null) instance(string,null)
+id(int,auto) ruid(string) username(string) domain(string,null) contact(string)
received(string,null) path(string,null) expires(int) q(double) callid(string) cseq(int)
last_modified(int) flags(int) cflags(int) user_agent(string) socket(string,null)
methods(int,null) instance(string,null) reg_id(int)
diff --git a/utils/kamctl/mysql/registrar-create.sql
b/utils/kamctl/mysql/registrar-create.sql
index 54d143f..73f808c 100644
--- a/utils/kamctl/mysql/registrar-create.sql
+++ b/utils/kamctl/mysql/registrar-create.sql
@@ -17,7 +17,8 @@ CREATE TABLE aliases (
user_agent VARCHAR(255) DEFAULT '' NOT NULL,
socket VARCHAR(64) DEFAULT NULL,
methods INT(11) DEFAULT NULL,
- instance VARCHAR(255) DEFAULT NULL
+ instance VARCHAR(255) DEFAULT NULL,
+ reg_id INT(11) DEFAULT 0 NOT NULL
) ENGINE=MyISAM;
CREATE INDEX alias_idx ON aliases (username, domain, contact);
diff --git a/utils/kamctl/mysql/usrloc-create.sql b/utils/kamctl/mysql/usrloc-create.sql
index 3e86737..dc1fa5a 100644
--- a/utils/kamctl/mysql/usrloc-create.sql
+++ b/utils/kamctl/mysql/usrloc-create.sql
@@ -17,7 +17,8 @@ CREATE TABLE location (
user_agent VARCHAR(255) DEFAULT '' NOT NULL,
socket VARCHAR(64) DEFAULT NULL,
methods INT(11) DEFAULT NULL,
- instance VARCHAR(255) DEFAULT NULL
+ instance VARCHAR(255) DEFAULT NULL,
+ reg_id INT(11) DEFAULT 0 NOT NULL
) ENGINE=MyISAM;
CREATE INDEX account_contact_idx ON location (username, domain, contact);
diff --git a/utils/kamctl/oracle/registrar-create.sql
b/utils/kamctl/oracle/registrar-create.sql
index 9ba6898..0409d84 100644
--- a/utils/kamctl/oracle/registrar-create.sql
+++ b/utils/kamctl/oracle/registrar-create.sql
@@ -17,7 +17,8 @@ CREATE TABLE aliases (
user_agent VARCHAR2(255) DEFAULT '',
socket VARCHAR2(64) DEFAULT NULL,
methods NUMBER(10) DEFAULT NULL,
- instance VARCHAR2(255) DEFAULT NULL
+ instance VARCHAR2(255) DEFAULT NULL,
+ reg_id NUMBER(10) DEFAULT 0 NOT NULL
);
CREATE OR REPLACE TRIGGER aliases_tr
diff --git a/utils/kamctl/oracle/usrloc-create.sql
b/utils/kamctl/oracle/usrloc-create.sql
index 144c859..386af40 100644
--- a/utils/kamctl/oracle/usrloc-create.sql
+++ b/utils/kamctl/oracle/usrloc-create.sql
@@ -17,7 +17,8 @@ CREATE TABLE location (
user_agent VARCHAR2(255) DEFAULT '',
socket VARCHAR2(64) DEFAULT NULL,
methods NUMBER(10) DEFAULT NULL,
- instance VARCHAR2(255) DEFAULT NULL
+ instance VARCHAR2(255) DEFAULT NULL,
+ reg_id NUMBER(10) DEFAULT 0 NOT NULL
);
CREATE OR REPLACE TRIGGER location_tr
diff --git a/utils/kamctl/postgres/registrar-create.sql
b/utils/kamctl/postgres/registrar-create.sql
index b8889a2..2771e01 100644
--- a/utils/kamctl/postgres/registrar-create.sql
+++ b/utils/kamctl/postgres/registrar-create.sql
@@ -17,7 +17,8 @@ CREATE TABLE aliases (
user_agent VARCHAR(255) DEFAULT '' NOT NULL,
socket VARCHAR(64) DEFAULT NULL,
methods INTEGER DEFAULT NULL,
- instance VARCHAR(255) DEFAULT NULL
+ instance VARCHAR(255) DEFAULT NULL,
+ reg_id INTEGER DEFAULT 0 NOT NULL
);
CREATE INDEX aliases_alias_idx ON aliases (username, domain, contact);
diff --git a/utils/kamctl/postgres/usrloc-create.sql
b/utils/kamctl/postgres/usrloc-create.sql
index c972d71..a74fe87 100644
--- a/utils/kamctl/postgres/usrloc-create.sql
+++ b/utils/kamctl/postgres/usrloc-create.sql
@@ -17,7 +17,8 @@ CREATE TABLE location (
user_agent VARCHAR(255) DEFAULT '' NOT NULL,
socket VARCHAR(64) DEFAULT NULL,
methods INTEGER DEFAULT NULL,
- instance VARCHAR(255) DEFAULT NULL
+ instance VARCHAR(255) DEFAULT NULL,
+ reg_id INTEGER DEFAULT 0 NOT NULL
);
CREATE INDEX location_account_contact_idx ON location (username, domain, contact);