diff options
author | Neels Hofmeyr <neels@hofmeyr.de> | 2018-07-12 05:06:06 +0200 |
---|---|---|
committer | Neels Hofmeyr <neels@hofmeyr.de> | 2018-07-16 16:24:26 +0200 |
commit | 37d69833b58efdac1b57f3c74ffe57b1bf622357 (patch) | |
tree | 26d2e13b63a1fe57872294fa72a2839ef97fbe05 | |
parent | a3a681ef319b68c281dd2cb2615367a688c0b9dc (diff) |
fix RTP: send to MGW's IP:port, not back to the BTS itself
Change-Id: I277908b451ef2d3b34ba1cccd24d884898f6425a
-rw-r--r-- | src/osmo-bsc/lchan_fsm.c | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/src/osmo-bsc/lchan_fsm.c b/src/osmo-bsc/lchan_fsm.c index f3758ccd8..893cb0c9e 100644 --- a/src/osmo-bsc/lchan_fsm.c +++ b/src/osmo-bsc/lchan_fsm.c @@ -821,30 +821,24 @@ static void lchan_fsm_wait_ipacc_mdcx_ack_onenter(struct osmo_fsm_inst *fi, uint { int rc; struct gsm_lchan *lchan = lchan_fi_lchan(fi); - - uint32_t ip = lchan->abis_ip.bound_ip; - int port = lchan->abis_ip.bound_port; + const struct mgcp_conn_peer *mgw_rtp; if (lchan->release_requested) { lchan_fail("Release requested while activating"); return; } - if (!ip) { - lchan_fail("Cannot send IPACC MDCX to BTS:" - " there is no RTP IP set that the BTS should send RTP to."); - return; - } + mgw_rtp = mgwep_ci_get_rtp_info(lchan->mgw_endpoint_ci_bts); - if (port <= 0 || port > 65535) { + if (!mgw_rtp) { lchan_fail("Cannot send IPACC MDCX to BTS:" - " invalid port number that the BTS should send RTP to: %d", port); + " there is no RTP IP+port set that the BTS should send RTP to."); return; } /* Other RTP settings were already setup in lchan_fsm_wait_ipacc_crcx_ack_onenter() */ - lchan->abis_ip.connect_ip = ip; - lchan->abis_ip.connect_port = port; + lchan->abis_ip.connect_ip = ntohl(inet_addr(mgw_rtp->addr)); + lchan->abis_ip.connect_port = mgw_rtp->port; /* send-recv */ ipacc_speech_mode_set_direction(&lchan->abis_ip.speech_mode, true); |