Change in osmo-sip-connector[master]: SIP re-INVITE: log media connection

laforge gerrit-no-reply at lists.osmocom.org
Tue Jun 1 12:45:28 UTC 2021


laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-sip-connector/+/24488 )

Change subject: SIP re-INVITE: log media connection
......................................................................

SIP re-INVITE: log media connection

Change-Id: I2d11be9fe65aa76e044a91f88ba0e9a1d8e756ec
---
M src/sip.c
1 file changed, 9 insertions(+), 3 deletions(-)

Approvals:
  Jenkins Builder: Verified
  fixeria: Looks good to me, but someone else must approve
  pespin: Looks good to me, approved
  laforge: Looks good to me, approved



diff --git a/src/sip.c b/src/sip.c
index 93ae69c..f0bc4c3 100644
--- a/src/sip.c
+++ b/src/sip.c
@@ -214,8 +214,8 @@
 	}
 
 	LOGP(DSIP, LOGL_DEBUG, "pre re-INVITE have IP:port (%s:%u)\n",
-	     osmo_sockaddr_ntop((struct sockaddr*)&leg->base.addr, ip_addr),
-	     osmo_sockaddr_port((struct sockaddr*)&leg->base.addr));
+	     osmo_sockaddr_ntop((struct sockaddr*)&prev_addr, ip_addr),
+	     osmo_sockaddr_port((struct sockaddr*)&prev_addr));
 
 	if (mode == sdp_sendonly) {
 		/* SIP side places call on HOLD */
@@ -235,9 +235,15 @@
 		     osmo_sockaddr_port((struct sockaddr*)&leg->base.addr));
 		if (osmo_sockaddr_cmp((struct osmo_sockaddr *)&prev_addr,
 				      (struct osmo_sockaddr *)&leg->base.addr)) {
-			LOGP(DSIP, LOGL_INFO, "re-INVITE changes media connection.\n");
+			LOGP(DSIP, LOGL_INFO, "re-INVITE changes media connection to %s:%u\n",
+			     osmo_sockaddr_ntop((struct sockaddr*)&leg->base.addr, ip_addr),
+			     osmo_sockaddr_port((struct sockaddr*)&leg->base.addr));
 			if (other->update_rtp)
 				other->update_rtp(leg->base.call->remote);
+		} else {
+			LOGP(DSIP, LOGL_INFO, "re-INVITE does not change media connection (%s:%u)\n",
+			     osmo_sockaddr_ntop((struct sockaddr*)&prev_addr, ip_addr),
+			     osmo_sockaddr_port((struct sockaddr*)&prev_addr));
 		}
 		sdp = sdp_create_file(leg, other, sdp_sendrecv);
 	}

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-sip-connector/+/24488
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sip-connector
Gerrit-Branch: master
Gerrit-Change-Id: I2d11be9fe65aa76e044a91f88ba0e9a1d8e756ec
Gerrit-Change-Number: 24488
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy at sysmocom.de>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210601/ded8f858/attachment.htm>


More information about the gerrit-log mailing list