aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilipp Maier <pmaier@sysmocom.de>2020-06-05 15:49:35 +0200
committerlaforge <laforge@osmocom.org>2020-06-22 16:00:04 +0000
commitf34d945f4fecc41fe9c46cea3ecb1bcb3fa55d5d (patch)
treee467486c8a15f678edbe67e7303f726d71af1d1d
parent53a5ff7da9e98b8a9021f1b33173cc56c076964c (diff)
msc_a: add callref as call id to ASSIGNMENT REQ.
The BSSMAP message ASSIGNMENT REQUEST may contain an optional CALL IDENTIFIER IE. While this IE is optional some BSC implementions may require it. Change-Id: I4288f47e4a6d61ec672f431723f6e72c7c6b0799 Related: OS#4582
-rw-r--r--include/osmocom/msc/ran_msg.h2
-rw-r--r--src/libmsc/msc_a.c2
-rw-r--r--src/libmsc/ran_msg_a.c6
3 files changed, 9 insertions, 1 deletions
diff --git a/include/osmocom/msc/ran_msg.h b/include/osmocom/msc/ran_msg.h
index 1b0e2e8b6..3b08b466c 100644
--- a/include/osmocom/msc/ran_msg.h
+++ b/include/osmocom/msc/ran_msg.h
@@ -86,6 +86,8 @@ struct ran_assignment_command {
enum nsap_addr_enc rab_assign_addr_enc;
bool osmux_present;
uint8_t osmux_cid;
+ bool call_id_present;
+ uint32_t call_id;
};
struct ran_cipher_mode_command {
diff --git a/src/libmsc/msc_a.c b/src/libmsc/msc_a.c
index 4d856d0f8..3bfc0f839 100644
--- a/src/libmsc/msc_a.c
+++ b/src/libmsc/msc_a.c
@@ -541,6 +541,8 @@ static void msc_a_call_leg_ran_local_addr_available(struct msc_a *msc_a)
.channel_type = &channel_type,
.osmux_present = msc_a->cc.call_leg->rtp[RTP_TO_RAN]->use_osmux,
.osmux_cid = msc_a->cc.call_leg->rtp[RTP_TO_RAN]->local_osmux_cid,
+ .call_id_present = true,
+ .call_id = cc_trans->callref,
},
};
if (msc_a_ran_down(msc_a, MSC_ROLE_I, &msg)) {
diff --git a/src/libmsc/ran_msg_a.c b/src/libmsc/ran_msg_a.c
index 28f99ceee..e6dee52d5 100644
--- a/src/libmsc/ran_msg_a.c
+++ b/src/libmsc/ran_msg_a.c
@@ -959,6 +959,7 @@ static struct msgb *ran_a_make_assignment_command(struct osmo_fsm_inst *log_fi,
struct sockaddr_storage rtp_addr;
struct sockaddr_storage *use_rtp_addr = NULL;
struct msgb *msg;
+ const uint32_t *call_id = NULL;
int rc;
if (!ac->channel_type) {
@@ -999,7 +1000,10 @@ static struct msgb *ran_a_make_assignment_command(struct osmo_fsm_inst *log_fi,
}
}
- msg = gsm0808_create_ass(ac->channel_type, NULL, use_rtp_addr, use_scl, NULL);
+ if(ac->call_id_present == true)
+ call_id = &ac->call_id;
+
+ msg = gsm0808_create_ass(ac->channel_type, NULL, use_rtp_addr, use_scl, call_id);
if (ac->osmux_present)
_gsm0808_assignment_extend_osmux(msg, ac->osmux_cid);
return msg;