rsl: Output RTP stats before closing the socket.

It's useful to know RTP statistics (number of packets lost, jitter, etc)
when looking at voice call quality issues. Right now this information is
not avialable anywhere and this looks like the best place to start.
This commit is contained in:
Alexander Chemeris 2016-04-25 20:04:14 +02:00
parent b78554342c
commit f3d02b85ba
1 changed files with 4 additions and 0 deletions

View File

@ -837,6 +837,8 @@ static int rsl_rx_rf_chan_rel(struct gsm_lchan *lchan, uint8_t chan_nr)
{
if (lchan->abis_ip.rtp_socket) {
rsl_tx_ipac_dlcx_ind(lchan, RSL_ERR_NORMAL_UNSPEC);
osmo_rtp_socket_log_stats(lchan->abis_ip.rtp_socket, DRSL, LOGL_INFO,
"Closing RTP socket on Channel Release ");
osmo_rtp_socket_free(lchan->abis_ip.rtp_socket);
lchan->abis_ip.rtp_socket = NULL;
msgb_queue_flush(&lchan->dl_tch_queue);
@ -1502,6 +1504,8 @@ static int rsl_rx_ipac_dlcx(struct msgb *msg)
if (TLVP_PRESENT(&tp, RSL_IE_IPAC_CONN_ID))
inc_conn_id = 1;
osmo_rtp_socket_log_stats(lchan->abis_ip.rtp_socket, DRSL, LOGL_INFO,
"Closing RTP socket on DLCX ");
osmo_rtp_socket_free(lchan->abis_ip.rtp_socket);
lchan->abis_ip.rtp_socket = NULL;
msgb_queue_flush(&lchan->dl_tch_queue);