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