[sr-dev] git:master:701dc853: Merge pull request #651 from adubovikov/master

Alexandr Dubovikov alexandr.dubovikov at gmail.com
Wed Jun 1 16:57:31 CEST 2016


Module: kamailio
Branch: master
Commit: 701dc8530ddca76a89fd13c3d408cf78d99423a1
URL: https://github.com/kamailio/kamailio/commit/701dc8530ddca76a89fd13c3d408cf78d99423a1

Author: Alexandr Dubovikov <alexandr.dubovikov at gmail.com>
Committer: Alexandr Dubovikov <alexandr.dubovikov at gmail.com>
Date: 2016-06-01T16:57:23+02:00

Merge pull request #651 from adubovikov/master

module/sipcapture added missed diversion.

---

Modified: modules/sipcapture/sipcapture.c

---

Diff:  https://github.com/kamailio/kamailio/commit/701dc8530ddca76a89fd13c3d408cf78d99423a1.diff
Patch: https://github.com/kamailio/kamailio/commit/701dc8530ddca76a89fd13c3d408cf78d99423a1.patch

---

diff --git a/modules/sipcapture/sipcapture.c b/modules/sipcapture/sipcapture.c
index 83eae4d..55a96c0 100644
--- a/modules/sipcapture/sipcapture.c
+++ b/modules/sipcapture/sipcapture.c
@@ -94,7 +94,7 @@ MODULE_VERSION
 
 #define TABLE_LEN 256
 
-#define NR_KEYS 40
+#define NR_KEYS 41
 #define RTCP_NR_KEYS 12
 
 #define MAX_HEADERS 16
@@ -181,7 +181,7 @@ static str callid_aleg_column 	= str_init("callid_aleg");
 static str via_1_column 	= str_init("via_1");
 static str via_1_branch_column 	= str_init("via_1_branch");
 static str cseq_column		= str_init("cseq");
-static str diversion_column 	= str_init("diversion_user");
+static str diversion_column 	= str_init("diversion");
 static str reason_column 	= str_init("reason");
 static str content_type_column 	= str_init("content_type");
 static str authorization_column = str_init("auth");
@@ -1451,15 +1451,20 @@ static int sip_capture_store(struct _sipcapture_object *sco, str *dtable, _captu
 	db_vals[38].nul = 0;
 	db_vals[38].val.str_val = sco->ruri_domain;
 
-	db_keys[39] = &msg_column;
-	db_vals[39].type = DB1_BLOB;
+	db_keys[39] = &diversion_column;
+	db_vals[39].type = DB1_STR;
 	db_vals[39].nul = 0;
+	db_vals[39].val.str_val = sco->diversion;
+
+	db_keys[40] = &msg_column;
+	db_vals[40].type = DB1_BLOB;
+	db_vals[40].nul = 0;
 
 	/*we don't have empty spaces now */
 	tmp.s = sco->msg.s;
 	tmp.len = sco->msg.len;
 
-	db_vals[39].val.blob_val = tmp;
+	db_vals[40].val.blob_val = tmp;
 
 	if (dtable){
 		table = dtable;




More information about the sr-dev mailing list