aboutsummaryrefslogtreecommitdiffstats
path: root/tests/msc_vlr/msc_vlr_tests.h
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2019-10-21 03:24:11 +0200
committerNeels Hofmeyr <neels@hofmeyr.de>2019-12-23 19:02:34 +0100
commitd1e028108e90d358c0b1199a86fd54ec4497e1be (patch)
tree5d8d553183c21cf7164b4a608e0e747879fc7d9f /tests/msc_vlr/msc_vlr_tests.h
parent3d6a8be0f989ea57ddee2fb378fcda681481d0ac (diff)
add full SDP codec information to the MNCC socket
This way osmo-msc can benefit from the complete codec information received via SIP, which was so far terminated at osmo-sip-connector. osmo-sip-connector could/should have translated the received SDP to MNCC bearer_cap, but this was never implemented properly. Since osmo-msc already handles SDP towards the MGW, it makes most sense to pass SDP to osmo-msc transparently. To be able to send a valid RTP IP:port in the SDP upon the first MNCC_SETUP_IND going out, move the CN side CRCX to the very start of establishing a voice call. As a result, first create MGW conns for both RAN and CN before starting. The voice_call_full.msc chart shows the change in message sequence for MO and MT voice calls. Implement cc_sdp.c, which accumulates codec information from various sources (MS, BSS, Assignment, remote call leg) and provides filtering to get the available set of codecs at any point in time. Implement codec_sdp_cc_t9n.c, to translate between SDP and the various libosmo-mgcp-client, CC and BSSMAP representations of codecs: - Speech Version, - Permitted Speech, - Speech Codec Type, - default Payload Type numbers, - enum mgcp_codecs, - FR/HR compatibility - SDP audio codec names, - various AMR configurations. A codec_map lists these relations in one large data record. Various functions provide conversions by traversing this map. Add trans->cc.mnccc_release_sent: so far, avoiding to send an MNCC release during trans_free() was done by setting the callref = 0. But that also skips CC Release. On codec mismatch, we send a specific MNCC error code but still want a normal CC Release: hence send the MNCC message, set mnccc_release_sent = true and do normal CC Release in trans_free(). (A better way to do this would be to adopt the mncc_call FSM from inter-MSC handover also for local voice calls, but that is out of scope for now. I want to try that soon, as time permits.) Change-Id: I8c3b2de53ffae4ec3a66b9dabf308c290a2c999f
Diffstat (limited to 'tests/msc_vlr/msc_vlr_tests.h')
-rw-r--r--tests/msc_vlr/msc_vlr_tests.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/tests/msc_vlr/msc_vlr_tests.h b/tests/msc_vlr/msc_vlr_tests.h
index 23dc9daa8..e6d4db8ac 100644
--- a/tests/msc_vlr/msc_vlr_tests.h
+++ b/tests/msc_vlr/msc_vlr_tests.h
@@ -55,6 +55,8 @@ extern bool _log_lines;
#define comment_start() fprintf(stderr, "===== %s\n", __func__);
#define comment_end() fprintf(stderr, "===== %s: SUCCESS\n\n", __func__);
+extern void *msc_vlr_tests_ctx;
+
extern struct msub *g_msub;
extern struct gsm_network *net;
extern void *msgb_ctx;
@@ -115,6 +117,7 @@ extern uint32_t cc_to_mncc_tx_expected_msg_type;
extern const char *cc_to_mncc_tx_expected_imsi;
extern bool cc_to_mncc_tx_confirmed;
extern uint32_t cc_to_mncc_tx_got_callref;
+extern char cc_to_mncc_tx_last_sdp[1024];
extern struct gsm_mncc *on_call_release_mncc_sends_to_cc_data;
@@ -147,6 +150,7 @@ static inline void expect_release_clear(enum osmo_rat_type via_ran)
extern bool bssap_assignment_expected;
extern bool bssap_assignment_sent;
+extern struct gsm0808_channel_type bssap_assignment_command_last_channel_type;
extern bool iu_rab_assignment_expected;
extern bool iu_rab_assignment_sent;
@@ -182,10 +186,12 @@ void paging_expect_imsi(const char *imsi);
void paging_expect_tmsi(uint32_t tmsi);
void ms_sends_msg(const char *hex);
+void ms_sends_msgf(const char *fmt, ...);
+void ms_sends_compl_l3(const char *hex, const struct gsm0808_speech_codec_list *codec_list_bss_supported);
void ms_sends_classmark_update(const struct osmo_gsm48_classmark *classmark);
void ms_sends_ciphering_mode_complete(const char *inner_nas_msg);
void ms_sends_security_mode_complete();
-void ms_sends_assignment_complete(enum mgcp_codecs assigned_codec);
+void ms_sends_assignment_complete(const char *sdp_codec_name);
void gsup_rx(const char *rx_hex, const char *expect_tx_hex);
void send_sms(struct vlr_subscr *receiver,
struct vlr_subscr *sender,
@@ -274,5 +280,5 @@ extern const struct timeval fake_time_start_time;
#define EUSE_TO_MSC_USSD "0a0103"
#define MSC_USSD_TO_EUSE "0a0103"
-extern bool got_crcx;
void expect_crcx(enum rtp_direction towards);
+bool crcx_scheduled(enum rtp_direction towards);