aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/libmsc
diff options
context:
space:
mode:
authorAndreas Eversberg <andreas@eversberg.eu>2013-12-05 14:37:11 +0100
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2014-01-27 14:39:06 +0100
commitdcf38e1c9623f997d9b87c1a5868862581aa05cf (patch)
tree107d4b9f9122fe805df405158ff7524a7da95acd /openbsc/src/libmsc
parent88012b6e870d100e7d97b91f44897ce2d136d486 (diff)
Add function to update TRAU muxer after assignment or handover
E1 based BTS use TRAU muxer to decode TRAU frames. After changing channel from one timeslot to another (due to handover or assignment), the TRAU muxer must be updated. The call reference of the call is disconnected from the old channel and connected to the new channel.
Diffstat (limited to 'openbsc/src/libmsc')
-rw-r--r--openbsc/src/libmsc/gsm_04_08.c19
1 files changed, 16 insertions, 3 deletions
diff --git a/openbsc/src/libmsc/gsm_04_08.c b/openbsc/src/libmsc/gsm_04_08.c
index 0c6b100a6..bc4a9c31b 100644
--- a/openbsc/src/libmsc/gsm_04_08.c
+++ b/openbsc/src/libmsc/gsm_04_08.c
@@ -1648,6 +1648,9 @@ static int tch_recv_mncc(struct gsm_network *net, uint32_t callref, int enable)
lchan = trans->conn->lchan;
bts = lchan->ts->trx->bts;
+ /* store receive state */
+ trans->tch_recv = enable;
+
switch (bts->type) {
case GSM_BTS_TYPE_NANOBTS:
case GSM_BTS_TYPE_OSMO_SYSMO:
@@ -1655,10 +1658,12 @@ static int tch_recv_mncc(struct gsm_network *net, uint32_t callref, int enable)
LOGP(DCC, LOGL_ERROR, "Error: RTP proxy is disabled\n");
return -EINVAL;
}
- /* in case, we don't have a RTP socket yet, we note this
- * in the transaction and try later */
+ /* In case, we don't have a RTP socket to the BTS yet, the BTS
+ * will not be connected to our RTP proxy and the socket will
+ * not be assigned to the application interface. This method
+ * will be called again, once the audio socket is created and
+ * connected. */
if (!lchan->abis_ip.rtp_socket) {
- trans->tch_recv = enable;
DEBUGP(DCC, "queue tch_recv_mncc request (%d)\n", enable);
return 0;
}
@@ -1677,6 +1682,14 @@ static int tch_recv_mncc(struct gsm_network *net, uint32_t callref, int enable)
case GSM_BTS_TYPE_BS11:
case GSM_BTS_TYPE_RBS2000:
case GSM_BTS_TYPE_NOKIA_SITE:
+ /* In case we don't have a TCH with correct mode, the TRAU muxer
+ * will not be asigned to the application interface. This is
+ * performed by switch_trau_mux() after successful handover or
+ * assignment. */
+ if (lchan->tch_mode == GSM48_CMODE_SIGN) {
+ DEBUGP(DCC, "queue tch_recv_mncc request (%d)\n", enable);
+ return 0;
+ }
if (enable)
return trau_recv_lchan(lchan, callref);
return trau_mux_unmap(NULL, callref);