summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2021-06-01 04:17:49 +0200
committerNeels Hofmeyr <neels@hofmeyr.de>2021-06-01 04:17:49 +0200
commite7d05f40ba33cc4fa44a8c12f375f5ab7b120fc9 (patch)
treef292432e880198c724416bab1797245bf3b307cb
parent0294e38243b8c95f71582e49e3a628963139233d (diff)
SIP re-INVITE: log media connectionneels/reinvite
-rw-r--r--src/sip.c12
1 files changed, 9 insertions, 3 deletions
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 @@ static void sip_handle_reinvite(struct sip_call_leg *leg, nua_handle_t *nh, cons
}
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 @@ static void sip_handle_reinvite(struct sip_call_leg *leg, nua_handle_t *nh, cons
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);
}