[sr-dev] git:master:8cc1c065: modules/sipcapture fixed priorisation X-RTP headers

Alexandr Dubovikov alexandr.dubovikov at gmail.com
Mon Aug 29 16:37:51 CEST 2016


Module: kamailio
Branch: master
Commit: 8cc1c0657c6cf95d48e88f90027a4bb051414f68
URL: https://github.com/kamailio/kamailio/commit/8cc1c0657c6cf95d48e88f90027a4bb051414f68

Author: Alexandr Dubovikov <alexandr.dubovikov at gmail.com>
Committer: Alexandr Dubovikov <alexandr.dubovikov at gmail.com>
Date: 2016-08-29T16:36:24+02:00

modules/sipcapture fixed priorisation X-RTP headers

---

Modified: modules/sipcapture/sipcapture.c

---

Diff:  https://github.com/kamailio/kamailio/commit/8cc1c0657c6cf95d48e88f90027a4bb051414f68.diff
Patch: https://github.com/kamailio/kamailio/commit/8cc1c0657c6cf95d48e88f90027a4bb051414f68.patch

---

diff --git a/modules/sipcapture/sipcapture.c b/modules/sipcapture/sipcapture.c
index 33c96cd..466b7d7 100644
--- a/modules/sipcapture/sipcapture.c
+++ b/modules/sipcapture/sipcapture.c
@@ -1840,8 +1840,16 @@ static int sip_capture(struct sip_msg *msg, str *_table, _capture_mode_data_t *
 		sco.originator_port = 0;
 	}
 
+	/* X-RTP-Stat-Add */
+	if((tmphdr[3] = get_hdr_by_name(msg,"X-RTP-Stat-Add", 14)) != NULL) {
+		sco.rtp_stat =  tmphdr[3]->body;
+	}
+	/* X-RTP-Stat-T38 */
+	else if((tmphdr[3] = get_hdr_by_name(msg,"X-RTP-Stat-T38", 14)) != NULL) {
+		sco.rtp_stat =  tmphdr[3]->body;
+	}
 	/* X-RTP-Stat */
-	if((tmphdr[3] = get_hdr_by_name(msg,"X-RTP-Stat", 10)) != NULL) {
+	else if((tmphdr[3] = get_hdr_by_name(msg,"X-RTP-Stat", 10)) != NULL) {
 		sco.rtp_stat =  tmphdr[3]->body;
 	}
 	/* P-RTP-Stat */
@@ -1860,17 +1868,8 @@ static int sip_capture(struct sip_msg *msg, str *_table, _capture_mode_data_t *
 	else if((tmphdr[3] = get_hdr_by_name(msg,"RTP-RxStat", 10)) != NULL) {
 		sco.rtp_stat =  tmphdr[3]->body;
 	}
-	/* X-RTP-Stat-Add */
-	else if((tmphdr[3] = get_hdr_by_name(msg,"X-RTP-Stat-Add", 14)) != NULL) {
-		sco.rtp_stat =  tmphdr[3]->body;
-	}
-	/* X-RTP-Stat-T38 */
-	else if((tmphdr[3] = get_hdr_by_name(msg,"X-RTP-Stat-T38", 14)) != NULL) {
-		sco.rtp_stat =  tmphdr[3]->body;
-	}
 	else { EMPTY_STR(sco.rtp_stat); }
 
-
 	/* PROTO TYPE */
 	sco.proto = msg->rcv.proto;
 




More information about the sr-dev mailing list