SIP re-INVITE: log media connection

Change-Id: I2d11be9fe65aa76e044a91f88ba0e9a1d8e756ec
changes/88/24488/1
Neels Hofmeyr 1 year ago
parent 0294e38243
commit e7d05f40ba
  1. 12
      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);
}

Loading…
Cancel
Save