Skip to content

Commit

Permalink
Merge pull request #761 from adubovikov/master
Browse files Browse the repository at this point in the history
modules/sipcapture: fixed priorisation X-RTP headers
  • Loading branch information
adubovikov committed Aug 29, 2016
2 parents 0dcf9cf + 8cc1c06 commit 46c59ce
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions modules/sipcapture/sipcapture.c
Expand Up @@ -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 */
Expand All @@ -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;

Expand Down

0 comments on commit 46c59ce

Please sign in to comment.