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

neels gerrit-no-reply at lists.osmocom.org
Tue Jun 1 03:36:13 UTC 2021


neels has uploaded this change for review. ( 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(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-sip-connector refs/changes/88/24488/1

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-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210601/56ef1729/attachment.htm>


More information about the gerrit-log mailing list