Skip to content

Commit

Permalink
Revert change that broke multi-stream SIP handling
Browse files Browse the repository at this point in the history
  • Loading branch information
salcock committed Sep 22, 2024
1 parent 203bbdf commit a542041
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/collector/collector_sync_voip.c
Original file line number Diff line number Diff line change
Expand Up @@ -773,7 +773,8 @@ static int process_sip_183sessprog(collector_sync_voip_t *sync,
dir = 1;
}

if (dir != 0xff && thisrtp->invitecseq_stack == 1) {
while (dir != 0xff && thisrtp->invitecseq_stack == 1 && portstr &&
mediatype && ipstr) {

if ((changed = update_rtp_stream(sync, thisrtp, ipstr,
portstr, mediatype, dir)) == -1) {
Expand Down Expand Up @@ -832,7 +833,11 @@ static int process_sip_200ok(collector_sync_voip_t *sync,
dir = 1;
}

if (dir != 0xff && thisrtp->invitecseq_stack == 1) {
/* while loop here because there may be multiple media streams
* in the SDP body (e.g. video and audio).
*/
while (dir != 0xff && thisrtp->invitecseq_stack == 1 && portstr &&
ipstr && mediatype) {
if ((changed = update_rtp_stream(sync, thisrtp, ipstr,
portstr, mediatype, dir)) == -1) {
if (sync->log_bad_sip) {
Expand Down Expand Up @@ -1267,7 +1272,7 @@ static int process_sip_invite(collector_sync_voip_t *sync, char *callid,
dir = 1;
}

if (dir != 0xff && ipstr && portstr && !badsip && mediatype) {
while (dir != 0xff && ipstr && portstr && !badsip && mediatype) {
int changed;
if ((changed = update_rtp_stream(sync, thisrtp, ipstr,
portstr, mediatype, dir)) == -1) {
Expand Down

0 comments on commit a542041

Please sign in to comment.