Module: sip-router
Branch: master
Commit: 288a80235fb261f2db4b7f092ea1b8c4e5b589a5
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=288a802…
Author: Henning Westerholt <henning.westerholt(a)1und1.de>
Committer: Henning Westerholt <henning.westerholt(a)1und1.de>
Date: Wed Jul 27 17:29:14 2011 +0200
alias_db(k): rephrase documentation a bit to make it hopefully better understandable
---
modules_k/alias_db/README | 18 ++++++++++--------
modules_k/alias_db/doc/alias_db_admin.xml | 12 +++++++-----
2 files changed, 17 insertions(+), 13 deletions(-)
diff --git a/modules_k/alias_db/README b/modules_k/alias_db/README
index 8c18133..33743d4 100644
--- a/modules_k/alias_db/README
+++ b/modules_k/alias_db/README
@@ -83,15 +83,17 @@ Chapter 1. Admin Guide
1. Overview
- ALIAS_DB module can be used as an alternative for user aliases via
+ The ALIAS_DB module can be used as an alternative for user aliases via
usrloc. The main feature is that it does not store all addiacent data
- as for user location and always uses database for search (no memory
- caching).
-
- Having no memory caching the speed of search can decrease but the
- provisioning is easier. With very fast databases like MySQL the speed
- penalty can be lowered. Also, the search can be performed on different
- tables in the same script.
+ as for user location and always uses the database for search (no memory
+ caching). A common use case is to provide additional user aliases, i.e.
+ to supplement the registration in the location database. Users are this
+ way on a proxy reachable with several request URIs.
+
+ As the module use no memory caching the lookup is a bit slower but the
+ data provisioning is easier. With very fast databases like MySQL the
+ speed penalty can be lowered. Also, the search can be performed on
+ different tables in the same script.
2. Dependencies
diff --git a/modules_k/alias_db/doc/alias_db_admin.xml b/modules_k/alias_db/doc/alias_db_admin.xml
index 1e662b5..02b2913 100644
--- a/modules_k/alias_db/doc/alias_db_admin.xml
+++ b/modules_k/alias_db/doc/alias_db_admin.xml
@@ -17,14 +17,16 @@
<section>
<title>Overview</title>
<para>
- ALIAS_DB module can be used as an alternative for user aliases
+ The ALIAS_DB module can be used as an alternative for user aliases
via usrloc. The main feature is that it does not store all addiacent
- data as for user location and always uses database for search (no
- memory caching).
+ data as for user location and always uses the database for search (no
+ memory caching). A common use case is to provide additional user
+ aliases, i.e. to supplement the registration in the location database.
+ Users are this way on a proxy reachable with several request URIs.
</para>
<para>
- Having no memory caching the speed of search can decrease but the
- provisioning is easier. With very fast databases like MySQL the speed
+ As the module use no memory caching the lookup is a bit slower but the
+ data provisioning is easier. With very fast databases like MySQL the speed
penalty can be lowered. Also, the search can be performed on different
tables in the same script.
</para>
Module: sip-router
Branch: pd/crocodile
Commit: 6033da2e644ccdca7fa57bee03f82cb03c36e45e
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=6033da2…
Author: pd <peter.dunkley(a)crocodile-rcs.com>
Committer: pd <peter.dunkley(a)crocodile-rcs.com>
Date: Wed Jul 27 12:13:25 2011 +0100
srdb1, modules_k/xcap_server: Added support for XML documents larger than 64k in MySQL
- It is easily possible for some XML documents (particularly resource lists
used as a Network Address Book) to exceed 64k in size.
- Feature added by Andrew Miller at Crocodile RCS
---
lib/srdb1/schema/pr_xcap.xml | 2 +-
modules_k/xcap_server/xcap_server.c | 2 +-
utils/kamctl/mysql/presence-create.sql | 70 ++++++++++++++++----------------
3 files changed, 37 insertions(+), 37 deletions(-)
diff --git a/lib/srdb1/schema/pr_xcap.xml b/lib/srdb1/schema/pr_xcap.xml
index 92ffda3..ef30273 100644
--- a/lib/srdb1/schema/pr_xcap.xml
+++ b/lib/srdb1/schema/pr_xcap.xml
@@ -44,7 +44,7 @@
<column>
<name>doc</name>
- <type>binary</type>
+ <type>largebinary</type>
<description>doc</description>
</column>
diff --git a/modules_k/xcap_server/xcap_server.c b/modules_k/xcap_server/xcap_server.c
index 1a041e3..db1e0f5 100644
--- a/modules_k/xcap_server/xcap_server.c
+++ b/modules_k/xcap_server/xcap_server.c
@@ -351,7 +351,7 @@ static int xcaps_put_db(str* user, str *domain, xcap_uri_t *xuri, str *etag,
ncols++;
qcols[ncols] = &str_doc_col;
- qvals[ncols].type = DB1_STR;
+ qvals[ncols].type = DB1_BLOB;
qvals[ncols].nul = 0;
qvals[ncols].val.str_val= *doc;
ncols++;
diff --git a/utils/kamctl/mysql/presence-create.sql b/utils/kamctl/mysql/presence-create.sql
index 740149b..3b2608c 100644
--- a/utils/kamctl/mysql/presence-create.sql
+++ b/utils/kamctl/mysql/presence-create.sql
@@ -1,20 +1,20 @@
INSERT INTO version (table_name, table_version) values ('presentity','3');
CREATE TABLE presentity (
- id INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL,
+ id SERIAL PRIMARY KEY NOT NULL,
username VARCHAR(64) NOT NULL,
domain VARCHAR(64) NOT NULL,
event VARCHAR(64) NOT NULL,
etag VARCHAR(64) NOT NULL,
- expires INT(11) NOT NULL,
- received_time INT(11) NOT NULL,
- body BLOB NOT NULL,
+ expires INTEGER NOT NULL,
+ received_time INTEGER NOT NULL,
+ body BYTEA NOT NULL,
sender VARCHAR(128) NOT NULL,
- CONSTRAINT presentity_idx UNIQUE (username, domain, event, etag)
-) ENGINE=MyISAM;
+ CONSTRAINT presentity_presentity_idx UNIQUE (username, domain, event, etag)
+);
INSERT INTO version (table_name, table_version) values ('active_watchers','9');
CREATE TABLE active_watchers (
- id INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL,
+ id SERIAL PRIMARY KEY NOT NULL,
presentity_uri VARCHAR(128) NOT NULL,
watcher_username VARCHAR(64) NOT NULL,
watcher_domain VARCHAR(64) NOT NULL,
@@ -25,68 +25,68 @@ CREATE TABLE active_watchers (
to_tag VARCHAR(64) NOT NULL,
from_tag VARCHAR(64) NOT NULL,
callid VARCHAR(255) NOT NULL,
- local_cseq INT(11) NOT NULL,
- remote_cseq INT(11) NOT NULL,
+ local_cseq INTEGER NOT NULL,
+ remote_cseq INTEGER NOT NULL,
contact VARCHAR(128) NOT NULL,
record_route TEXT,
- expires INT(11) NOT NULL,
- status INT(11) DEFAULT 2 NOT NULL,
+ expires INTEGER NOT NULL,
+ status INTEGER DEFAULT 2 NOT NULL,
reason VARCHAR(64) NOT NULL,
- version INT(11) DEFAULT 0 NOT NULL,
+ version INTEGER DEFAULT 0 NOT NULL,
socket_info VARCHAR(64) NOT NULL,
local_contact VARCHAR(128) NOT NULL,
- CONSTRAINT active_watchers_idx UNIQUE (presentity_uri, callid, to_tag, from_tag)
-) ENGINE=MyISAM;
+ CONSTRAINT active_watchers_active_watchers_idx UNIQUE (presentity_uri, callid, to_tag, from_tag)
+);
INSERT INTO version (table_name, table_version) values ('watchers','3');
CREATE TABLE watchers (
- id INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL,
+ id SERIAL PRIMARY KEY NOT NULL,
presentity_uri VARCHAR(128) NOT NULL,
watcher_username VARCHAR(64) NOT NULL,
watcher_domain VARCHAR(64) NOT NULL,
event VARCHAR(64) DEFAULT 'presence' NOT NULL,
- status INT(11) NOT NULL,
+ status INTEGER NOT NULL,
reason VARCHAR(64),
- inserted_time INT(11) NOT NULL,
- CONSTRAINT watcher_idx UNIQUE (presentity_uri, watcher_username, watcher_domain, event)
-) ENGINE=MyISAM;
+ inserted_time INTEGER NOT NULL,
+ CONSTRAINT watchers_watcher_idx UNIQUE (presentity_uri, watcher_username, watcher_domain, event)
+);
INSERT INTO version (table_name, table_version) values ('xcap','3');
CREATE TABLE xcap (
- id INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL,
+ id SERIAL PRIMARY KEY NOT NULL,
username VARCHAR(64) NOT NULL,
domain VARCHAR(64) NOT NULL,
- doc BLOB NOT NULL,
- doc_type INT(11) NOT NULL,
+ doc BYTEA NOT NULL,
+ doc_type INTEGER NOT NULL,
etag VARCHAR(64) NOT NULL,
- source INT(11) NOT NULL,
+ source INTEGER NOT NULL,
doc_uri VARCHAR(128) NOT NULL,
- port INT(11) NOT NULL,
- CONSTRAINT account_doc_type_idx UNIQUE (username, domain, doc_type, doc_uri)
-) ENGINE=MyISAM;
+ port INTEGER NOT NULL,
+ CONSTRAINT xcap_account_doc_type_idx UNIQUE (username, domain, doc_type, doc_uri)
+);
-CREATE INDEX source_idx ON xcap (source);
+CREATE INDEX xcap_source_idx ON xcap (source);
INSERT INTO version (table_name, table_version) values ('pua','6');
CREATE TABLE pua (
- id INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL,
+ id SERIAL PRIMARY KEY NOT NULL,
pres_uri VARCHAR(128) NOT NULL,
pres_id VARCHAR(255) NOT NULL,
- event INT(11) NOT NULL,
- expires INT(11) NOT NULL,
- desired_expires INT(11) NOT NULL,
- flag INT(11) NOT NULL,
+ event INTEGER NOT NULL,
+ expires INTEGER NOT NULL,
+ desired_expires INTEGER NOT NULL,
+ flag INTEGER NOT NULL,
etag VARCHAR(64) NOT NULL,
tuple_id VARCHAR(64),
watcher_uri VARCHAR(128) NOT NULL,
call_id VARCHAR(128) NOT NULL,
to_tag VARCHAR(64) NOT NULL,
from_tag VARCHAR(64) NOT NULL,
- cseq INT(11) NOT NULL,
+ cseq INTEGER NOT NULL,
record_route TEXT,
contact VARCHAR(128) NOT NULL,
remote_contact VARCHAR(128) NOT NULL,
- version INT(11) NOT NULL,
+ version INTEGER NOT NULL,
extra_headers TEXT NOT NULL
-) ENGINE=MyISAM;
+);
Module: sip-router
Branch: pd/crocodile
Commit: fce0a50f90d3fc7625f9d8d4984d34a01079a4d4
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=fce0a50…
Author: pd <peter.dunkley(a)crocodile-rcs.com>
Committer: pd <peter.dunkley(a)crocodile-rcs.com>
Date: Wed Jul 27 13:49:50 2011 +0100
srdb1: Fixed merge error made in commit 8623eeb1c2762d299cd88e0b7bc8d8fdb8fa2a72
- When copying utils/kamctl/mysql/siptrace-create.sql from my local SVN I accidently
copied across utils/kamctl/postgres/siptrace-create.sql.
---
utils/kamctl/mysql/siptrace-create.sql | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/utils/kamctl/mysql/siptrace-create.sql b/utils/kamctl/mysql/siptrace-create.sql
index 9021d0c..806fc34 100644
--- a/utils/kamctl/mysql/siptrace-create.sql
+++ b/utils/kamctl/mysql/siptrace-create.sql
@@ -1,20 +1,20 @@
INSERT INTO version (table_name, table_version) values ('sip_trace','2');
CREATE TABLE sip_trace (
- id SERIAL PRIMARY KEY NOT NULL,
- time_stamp TIMESTAMP WITHOUT TIME ZONE DEFAULT '1900-01-01 00:00:01' NOT NULL,
+ id INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL,
+ time_stamp DATETIME DEFAULT '1900-01-01 00:00:01' NOT NULL,
callid VARCHAR(255) DEFAULT '' NOT NULL,
traced_user VARCHAR(128) DEFAULT '' NOT NULL,
- msg TEXT NOT NULL,
+ msg MEDIUMTEXT NOT NULL,
method VARCHAR(50) DEFAULT '' NOT NULL,
status VARCHAR(128) DEFAULT '' NOT NULL,
fromip VARCHAR(50) DEFAULT '' NOT NULL,
toip VARCHAR(50) DEFAULT '' NOT NULL,
fromtag VARCHAR(64) DEFAULT '' NOT NULL,
direction VARCHAR(4) DEFAULT '' NOT NULL
-);
+) ENGINE=MyISAM;
-CREATE INDEX sip_trace_traced_user_idx ON sip_trace (traced_user);
-CREATE INDEX sip_trace_date_idx ON sip_trace (time_stamp);
-CREATE INDEX sip_trace_fromip_idx ON sip_trace (fromip);
-CREATE INDEX sip_trace_callid_idx ON sip_trace (callid);
+CREATE INDEX traced_user_idx ON sip_trace (traced_user);
+CREATE INDEX date_idx ON sip_trace (time_stamp);
+CREATE INDEX fromip_idx ON sip_trace (fromip);
+CREATE INDEX callid_idx ON sip_trace (callid);
Module: sip-router
Branch: pd/crocodile
Commit: 8623eeb1c2762d299cd88e0b7bc8d8fdb8fa2a72
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=8623eeb…
Author: pd <peter.dunkley(a)crocodile-rcs.com>
Committer: pd <peter.dunkley(a)crocodile-rcs.com>
Date: Wed Jul 27 12:18:05 2011 +0100
srdb1: Added support for logging of messages > 64k in sip_trace with MySQL
- Some SIP requests - especially full-state NOTIFYs for large resource
losts - can easily exceed 64k.
- This change makes MySQL use the mediumtext type for message contents.
- Feature added by Andrew Miller at Crocodile RCS
---
lib/srdb1/schema/sip_trace.xml | 2 +-
utils/kamctl/mysql/siptrace-create.sql | 14 +++++++-------
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/lib/srdb1/schema/sip_trace.xml b/lib/srdb1/schema/sip_trace.xml
index 0b492c4..630f0dc 100644
--- a/lib/srdb1/schema/sip_trace.xml
+++ b/lib/srdb1/schema/sip_trace.xml
@@ -53,7 +53,7 @@
<column>
<name>msg</name>
- <type>text</type>
+ <type>largetext</type>
<description>Full SIP message</description>
</column>
diff --git a/utils/kamctl/mysql/siptrace-create.sql b/utils/kamctl/mysql/siptrace-create.sql
index da4a11f..9021d0c 100644
--- a/utils/kamctl/mysql/siptrace-create.sql
+++ b/utils/kamctl/mysql/siptrace-create.sql
@@ -1,7 +1,7 @@
INSERT INTO version (table_name, table_version) values ('sip_trace','2');
CREATE TABLE sip_trace (
- id INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL,
- time_stamp DATETIME DEFAULT '1900-01-01 00:00:01' NOT NULL,
+ id SERIAL PRIMARY KEY NOT NULL,
+ time_stamp TIMESTAMP WITHOUT TIME ZONE DEFAULT '1900-01-01 00:00:01' NOT NULL,
callid VARCHAR(255) DEFAULT '' NOT NULL,
traced_user VARCHAR(128) DEFAULT '' NOT NULL,
msg TEXT NOT NULL,
@@ -11,10 +11,10 @@ CREATE TABLE sip_trace (
toip VARCHAR(50) DEFAULT '' NOT NULL,
fromtag VARCHAR(64) DEFAULT '' NOT NULL,
direction VARCHAR(4) DEFAULT '' NOT NULL
-) ENGINE=MyISAM;
+);
-CREATE INDEX traced_user_idx ON sip_trace (traced_user);
-CREATE INDEX date_idx ON sip_trace (time_stamp);
-CREATE INDEX fromip_idx ON sip_trace (fromip);
-CREATE INDEX callid_idx ON sip_trace (callid);
+CREATE INDEX sip_trace_traced_user_idx ON sip_trace (traced_user);
+CREATE INDEX sip_trace_date_idx ON sip_trace (time_stamp);
+CREATE INDEX sip_trace_fromip_idx ON sip_trace (fromip);
+CREATE INDEX sip_trace_callid_idx ON sip_trace (callid);
Daniel,
The value in the structure (tcp_options.c line 117) is not a default, it
is a maximum. If this is not increased then setting tcp_rd_buf_size >
64K has no effect; it truncates to 65536.
The default (DEFAULT_TCP_BUF_SIZE tcp_init.h line 42) remains at 4069.
Andy
>> *From:* Daniel-Constantin Mierla <miconda(a)gmail.com
>> <mailto:miconda@gmail.com>>
>> *Date:* 27 July 2011 08:56:10 GMT+01:00
>> *To:* Development mailing list of the sip-router project
>> <sr-dev(a)lists.sip-router.org <mailto:sr-dev@lists.sip-router.org>>
>> *Cc:* Peter Dunkley <peter.dunkley(a)crocodile-rcs.com
>> <mailto:peter.dunkley@crocodile-rcs.com>>
>> *Subject:* *Re: [sr-dev] git:master: core: support for receiving
>> requests > 64kb on TCP*
>> *Reply-To:* miconda(a)gmail.com <mailto:miconda@gmail.com>
>>
>> Hello,
>>
>> If I haven't missed the purpose, this commit is not necessary. Having
>> the default value very big is not common in usual scenarios and the
>> value can be changed via global parameter:
>> http://www.kamailio.org/dokuwiki/doku.php/core-cookbook:3.1.x#tcp_rd_buf_si…
>>
>> tcp_rd_buf_size=16777216
>>
>> It should be set back to 64k unless the issue is something else.
>>
>> Cheers,
>> Daniel
>>
>>
>>
>> On 7/25/11 11:55 AM, Peter Dunkley wrote:
>>> Module: sip-router
>>> Branch: master
>>> Commit: 3c9a176bac4878983d324ce82354cd844b916373
>>> URL:
>>> http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=3c9a176…
>>>
>>> Author: pd<peter.dunkley(a)crocodile-rcs.com
>>> <mailto:peter.dunkley@crocodile-rcs.com>>
>>> Committer: pd<peter.dunkley(a)crocodile-rcs.com
>>> <mailto:peter.dunkley@crocodile-rcs.com>>
>>> Date: Mon Jul 25 10:53:10 2011 +0100
>>>
>>> core: support for receiving requests> 64kb on TCP
>>>
>>> - Issue found and fixed by Andrew Miller at Crocodile RCS
>>>
>>> ---
>>>
>>> tcp_options.c | 2 +-
>>> 1 files changed, 1 insertions(+), 1 deletions(-)
>>>
>>> diff --git a/tcp_options.c b/tcp_options.c
>>> index 734f9fb..122965a 100644
>>> --- a/tcp_options.c
>>> +++ b/tcp_options.c
>>> @@ -114,7 +114,7 @@ static cfg_def_t tcp_cfg_def[] = {
>>> "accept TCP messges without Content-Lenght "},
>>> /* internal and/or "fixed" versions of some vars
>>> (not supposed to be writeable, read will provide only
>>> debugging value*/
>>> - { "rd_buf_size", CFG_VAR_INT | CFG_ATOMIC, 512, 65536,
>>> 0, 0,
>>> + { "rd_buf_size", CFG_VAR_INT | CFG_ATOMIC, 512, 16777216,
>>> 0, 0,
>>> "internal read buffer size (should be> max. expected
>>> datagram)"},
>>> { "wq_blk_size", CFG_VAR_INT | CFG_ATOMIC, 1, 65535, 0,
>>> 0,
>>> "internal async write block size (debugging use only for
>>> now)"},
>>>
>>>
>>> _______________________________________________
>>> sr-dev mailing list
>>> sr-dev(a)lists.sip-router.org <mailto:sr-dev@lists.sip-router.org>
>>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
>>
>> --
>> Daniel-Constantin Mierla -- http://www.asipto.com
>> Kamailio Advanced Training, Oct 10-13, Berlin: http://asipto.com/u/kat
>> http://linkedin.com/in/miconda -- http://twitter.com/miconda
>>