aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/tests
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2016-09-07 13:39:07 +0200
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2017-03-16 15:32:32 +0100
commitfcf34f8c1bdd83e4f0789e6f80aeb430ea5727f7 (patch)
treea40823a6661bcf95b7b26123c6a0da14eff85c61 /openbsc/tests
parentc852f12748db0dd4eefa29dab30f5907eb2ee17e (diff)
IuCS: implement msc_call_assignment() for IuCS
Send IuCS RAB Activation upon MNCC_CALL_PROC_REQ. Implement function msc_call_assignment(): decide between sending A-iface BSSMAP Assignment Request or IuCS RAB Assignment Request. Implement iu_rab_act_cs() to send the IuCS RAB Assignment Request. The IP address and port of the MGCPGW sent in the RAB Assignment are still hardcoded. The A-interface extension is not implemented yet. Declare ranap_new_msg_rab_assign_voice() to avoid including ranap_msg_factory.h, which would require adding ASN1 CFLAGS to Makefile.am. The mgcpgw_client as well as some more osmo-iuh functions are now linked from libmsc, hence add some dummy stubs to libiudummy and db_test.c. Change-Id: Iaae51d1fbbfc28fad1c0b85e161d53d80a420a19
Diffstat (limited to 'openbsc/tests')
-rw-r--r--openbsc/tests/db/db_test.c11
-rw-r--r--openbsc/tests/libiudummy/iudummy.c15
2 files changed, 26 insertions, 0 deletions
diff --git a/openbsc/tests/db/db_test.c b/openbsc/tests/db/db_test.c
index a54f11b26..f5787f102 100644
--- a/openbsc/tests/db/db_test.c
+++ b/openbsc/tests/db/db_test.c
@@ -22,6 +22,7 @@
#include <openbsc/db.h>
#include <openbsc/gsm_subscriber.h>
#include <openbsc/gsm_04_11.h>
+#include <openbsc/mgcp.h>
#include <osmocom/core/application.h>
@@ -261,3 +262,13 @@ void vlr_subscr_rx_auth_resp() {}
void vlr_loc_update() {}
void vlr_proc_acc_req() {}
void vlr_init() {}
+unsigned int mgcpgw_client_next_endpoint(struct mgcpgw_client *client)
+{ return 0; }
+int mgcpgw_client_tx_crcx(struct mgcpgw_client *client,
+ uint16_t rtp_endpoint, unsigned int call_id,
+ enum mgcp_connection_mode mode)
+{ return -ENOTSUP; }
+const char *mgcpgw_client_remote_addr_str(struct mgcpgw_client *mgcp)
+{ return "0.0.0.0"; }
+uint32_t mgcpgw_client_remote_addr_n(struct mgcpgw_client *mgcp)
+{ return 0; }
diff --git a/openbsc/tests/libiudummy/iudummy.c b/openbsc/tests/libiudummy/iudummy.c
index 32ffaa172..d2d0d5930 100644
--- a/openbsc/tests/libiudummy/iudummy.c
+++ b/openbsc/tests/libiudummy/iudummy.c
@@ -1,4 +1,5 @@
#include <stdint.h>
+#include <stdbool.h>
#include <osmocom/core/logging.h>
#include <osmocom/vty/logging.h>
@@ -34,6 +35,20 @@ int iu_page_ps(const char *imsi, const uint32_t *ptmsi, uint16_t lac, uint8_t ra
return 0;
}
+struct msgb *ranap_new_msg_rab_assign_voice(uint8_t rab_id, uint32_t rtp_ip,
+ uint16_t rtp_port,
+ bool use_x213_nsap)
+{
+ LOGP(DLGLOBAL, LOGL_INFO, "ranap_new_msg_rab_assign_voice() dummy called, NOT composing RAB Assignment\n");
+ return NULL;
+}
+
+int iu_rab_act(struct ue_conn_ctx *ue_ctx, struct msgb *msg)
+{
+ LOGP(DLGLOBAL, LOGL_INFO, "iu_rab_act() dummy called, NOT activating RAB\n");
+ return 0;
+}
+
int iu_tx_common_id(struct ue_conn_ctx *uectx, const char *imsi)
{
LOGP(DLGLOBAL, LOGL_INFO, "iu_tx_common_id() dummy called, NOT sending CommonID\n");