summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2013-03-31 11:57:38 +0200
committerAndreas Eversberg <jolly@eversberg.eu>2013-07-29 12:39:52 +0200
commit521e1a41c63847cfb58b5c0704252ba6475e4426 (patch)
tree670ffb459d03fb8c3c5ebb7d548365fde702aca6
parent525f5294db7851797a94ac1a77221564b5c27bbf (diff)
If requested TCH/H channel is not available, try assigning TCH/F
If MNCC application requests a half rate channel, the channel might not be available, due to different cell configuration, so the full rate channel is used.
-rw-r--r--openbsc/src/libbsc/abis_rsl.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/openbsc/src/libbsc/abis_rsl.c b/openbsc/src/libbsc/abis_rsl.c
index fbea70f80..de8207687 100644
--- a/openbsc/src/libbsc/abis_rsl.c
+++ b/openbsc/src/libbsc/abis_rsl.c
@@ -1385,6 +1385,12 @@ static int rsl_rx_chan_rqd(struct msgb *msg)
/* check availability / allocate channel */
lchan = lchan_alloc(bts, lctype, is_lu);
+ if (!lchan && (rqd_ref->ra & 0xf0) == 0x30) {
+ LOGP(DRSL, LOGL_NOTICE, "BTS %d CHAN RQD: no resources for %s 0x%x, retrying with %s\n",
+ msg->lchan->ts->trx->bts->nr, gsm_lchant_name(lctype), rqd_ref->ra, gsm_lchant_name(GSM_LCHAN_TCH_F));
+ lctype = GSM_LCHAN_TCH_F;
+ lchan = lchan_alloc(bts, lctype, is_lu);
+ }
if (!lchan) {
LOGP(DRSL, LOGL_NOTICE, "BTS %d CHAN RQD: no resources for %s 0x%x\n",
msg->lchan->ts->trx->bts->nr, gsm_lchant_name(lctype), rqd_ref->ra);
@@ -1889,6 +1895,11 @@ int rsl_ipacc_mdcx_to_rtpsock(struct gsm_lchan *lchan)
struct rtp_socket *rs = lchan->abis_ip.rtp_socket;
int rc;
+ if (!rs) {
+ LOGP(DRSL, LOGL_ERROR, "LCHAN has not rtp_socket\n");
+ return -EINVAL;
+ }
+
rc = rsl_ipacc_mdcx(lchan, ntohl(rs->rtp.sin_local.sin_addr.s_addr),
ntohs(rs->rtp.sin_local.sin_port),
/* FIXME: use RTP payload of bound socket, not BTS*/