aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/libmsc/msc_ifaces.c
diff options
context:
space:
mode:
authorPhilipp Maier <pmaier@sysmocom.de>2017-05-29 13:18:44 +0200
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2017-06-18 17:50:08 +0200
commitdfe085d979ba8b7266a6c66ecb13bf5a11a8d86f (patch)
tree20a343521ce9e91024471c7b4e9728f2ddcf26d5 /openbsc/src/libmsc/msc_ifaces.c
parente818b91729de56db7643c0961f810c1652f65701 (diff)
osmo-msc: Integrate A interface into existing call control
The MSC already has some basic call control handling mechanism, that was primarily used with 3G before. However, the already existing code that handles the 3G calls is also perfectly fine for handling 2G calls. This commit integrates the A interface without breaking it for 3G.
Diffstat (limited to 'openbsc/src/libmsc/msc_ifaces.c')
-rw-r--r--openbsc/src/libmsc/msc_ifaces.c20
1 files changed, 16 insertions, 4 deletions
diff --git a/openbsc/src/libmsc/msc_ifaces.c b/openbsc/src/libmsc/msc_ifaces.c
index e0e4773ad..7162f5f12 100644
--- a/openbsc/src/libmsc/msc_ifaces.c
+++ b/openbsc/src/libmsc/msc_ifaces.c
@@ -172,9 +172,17 @@ static void mgcp_response_rab_act_cs_crcx(struct mgcp_response *r, void *priv)
conn->iu.mgcp_rtp_port_cn = r->audio_port;
rtp_ip = mgcpgw_client_remote_addr_n(conn->network->mgcpgw.client);
- iu_rab_act_cs(uectx, conn->iu.rab_id, rtp_ip,
- conn->iu.mgcp_rtp_port_ue);
- /* use_x213_nsap == 0 for ip.access nano3G */
+
+ if (trans->conn->via_ran == RAN_UTRAN_IU) {
+ /* Assign a voice channel via RANAP on 3G */
+ iu_rab_act_cs(uectx, conn->iu.rab_id, rtp_ip,
+ conn->iu.mgcp_rtp_port_ue);
+ /* use_x213_nsap == 0 for ip.access nano3G */
+ } else if (trans->conn->via_ran == RAN_GERAN_A) {
+ /* Assign a voice channel via A on 2G */
+ return a_assign(trans);
+ } else
+ goto rab_act_cs_error;
rab_act_cs_error:
/* FIXME abort call, invalidate conn, ... */
@@ -213,7 +221,11 @@ int msc_call_assignment(struct gsm_trans *trans)
switch (conn->via_ran) {
case RAN_GERAN_A:
- return a_assign(trans);
+ /* FIXME We first go for conn_iu_rab_act_cs(), this function
+ * will create a loopback rtp connection first and then call
+ * a_assign(). Probably we need to find another name for
+ * conn_iu_rab_act_cs? */
+ return conn_iu_rab_act_cs(trans);
case RAN_UTRAN_IU:
#ifdef BUILD_IU