fixeria submitted this change.
library/gsup: add src/dst name IEs to all SS templates
This enables us to send/match OSMO_GSUP_{SOURCE,DESTINATION}_NAME
IEs (if needed) and brings consistency to all SS related templates.
This patch makes the following testcases pass [again]:
* TC_mt_ussd_for_unknown_subscr,
* TC_proc_ss_for_unknown_session.
At some point osmo-msc started including the Source Name IE in
OSMO_GSUP_MSGT_PROC_SS_ERROR messages, which we didn't expect.
Change-Id: I8d947313a99491d2e4790bc06db863fe09d8b5cf
---
M library/GSUP_Templates.ttcn
1 file changed, 61 insertions(+), 20 deletions(-)
diff --git a/library/GSUP_Templates.ttcn b/library/GSUP_Templates.ttcn
index e439bc6..3335125 100644
--- a/library/GSUP_Templates.ttcn
+++ b/library/GSUP_Templates.ttcn
@@ -1343,7 +1343,8 @@
/* 'ss' and 'cause' are mutually exclusive */
template (omit) octetstring ss := omit,
template (omit) integer cause := omit,
- template (omit) octetstring source_name := omit)
+ template (omit) octetstring src_name := omit,
+ template (omit) octetstring dst_name := omit)
return template (value) GSUP_IEs {
/* Mandatory IEs */
var template (value) GSUP_IEs ies := {
@@ -1364,9 +1365,12 @@
ies[lengthof(ies)] := ts_GSUP_IE_SSInfo(ss);
}
- /* OSMO_GSUP_SOURCE_NAME_IE */
- if (not istemplatekind(source_name, "omit")) {
- ies[lengthof(ies)] := ts_GSUP_IE_Source_Name(source_name);
+ /* OSMO_GSUP_{SOURCE,DESTINATION}_NAME_IE */
+ if (not istemplatekind(src_name, "omit")) {
+ ies[lengthof(ies)] := ts_GSUP_IE_Source_Name(src_name);
+ }
+ if (not istemplatekind(dst_name, "omit")) {
+ ies[lengthof(ies)] := ts_GSUP_IE_Destination_Name(dst_name);
}
return ies;
@@ -1377,7 +1381,8 @@
/* 'ss' and 'cause' are mutually exclusive */
template octetstring ss := omit,
template integer cause := omit,
- template octetstring destination_name := *)
+ template octetstring src_name := *,
+ template octetstring dst_name := *)
return template GSUP_IEs {
/* Mandatory IEs */
var template GSUP_IEs ies := {
@@ -1409,9 +1414,21 @@
idx := idx + 1;
}
- /* OSMO_GSUP_DESTINATION_NAME_IE */
- if (ispresent(destination_name)) {
- ies[idx] := tr_GSUP_IE_Destination_Name(destination_name);
+ /* FIXME: OSMO_GSUP_MESSAGE_CLASS_IE goes here */
+
+ /* OSMO_GSUP_{SOURCE,DESTINATION}_NAME_IE */
+ if (ispresent(src_name)) {
+ ies[idx] := tr_GSUP_IE_Source_Name(src_name);
+ idx := idx + 1;
+ } else if (istemplatekind(src_name, "*")) {
+ ies[idx] := *;
+ idx := idx + 1;
+ }
+ if (ispresent(dst_name)) {
+ ies[idx] := tr_GSUP_IE_Destination_Name(dst_name);
+ idx := idx + 1;
+ } else if (istemplatekind(dst_name, "*")) {
+ ies[idx] := *;
idx := idx + 1;
}
@@ -1428,52 +1445,76 @@
template (value) OCT4 sid,
template (value) GSUP_SessionState state,
template (omit) octetstring ss := omit,
- template (omit) octetstring source_name := omit) := {
+ template (omit) octetstring source_name := omit,
+ template (omit) octetstring destination_name := omit) := {
msg_type := OSMO_GSUP_MSGT_PROC_SS_REQUEST,
- ies := f_gen_ts_ss_ies(imsi, sid, state, ss, source_name := source_name)
+ ies := f_gen_ts_ss_ies(imsi, sid, state, ss,
+ src_name := source_name,
+ dst_name := destination_name)
};
template (present) GSUP_PDU
tr_GSUP_PROC_SS_REQ(template (present) hexstring imsi,
template (present) OCT4 sid := ?,
template (present) GSUP_SessionState state := ?,
- template octetstring ss := *) := {
+ template octetstring ss := *,
+ template octetstring source_name := *,
+ template octetstring destination_name := *) := {
msg_type := OSMO_GSUP_MSGT_PROC_SS_REQUEST,
- ies := f_gen_tr_ss_ies(imsi, sid, state, ss)
+ ies := f_gen_tr_ss_ies(imsi, sid, state, ss,
+ src_name := source_name,
+ dst_name := destination_name)
};
template (value) GSUP_PDU
ts_GSUP_PROC_SS_RES(template (value) hexstring imsi,
template (value) OCT4 sid,
template (value) GSUP_SessionState state,
- template (omit) octetstring ss := omit) := {
+ template (omit) octetstring ss := omit,
+ template (omit) octetstring source_name := omit,
+ template (omit) octetstring destination_name := omit) := {
msg_type := OSMO_GSUP_MSGT_PROC_SS_RESULT,
- ies := f_gen_ts_ss_ies(imsi, sid, state, ss)
+ ies := f_gen_ts_ss_ies(imsi, sid, state, ss,
+ src_name := source_name,
+ dst_name := destination_name)
};
template (present) GSUP_PDU
tr_GSUP_PROC_SS_RES(template (present) hexstring imsi,
template (present) OCT4 sid := ?,
template (present) GSUP_SessionState state := ?,
template octetstring ss := *,
- template octetstring destination_name := omit) := {
+ template octetstring source_name := *,
+ template octetstring destination_name := *) := {
msg_type := OSMO_GSUP_MSGT_PROC_SS_RESULT,
- ies := f_gen_tr_ss_ies(imsi, sid, state, ss, destination_name := destination_name)
+ ies := f_gen_tr_ss_ies(imsi, sid, state, ss,
+ src_name := source_name,
+ dst_name := destination_name)
};
template (value) GSUP_PDU
ts_GSUP_PROC_SS_ERR(template (value) hexstring imsi,
template (value) OCT4 sid,
template (value) GSUP_SessionState state,
- template (value) integer cause) := {
+ template (value) integer cause,
+ template (omit) octetstring source_name := omit,
+ template (omit) octetstring destination_name := omit) := {
msg_type := OSMO_GSUP_MSGT_PROC_SS_ERROR,
- ies := f_gen_ts_ss_ies(imsi, sid, state, cause := cause)
+ ies := f_gen_ts_ss_ies(imsi, sid, state,
+ cause := cause,
+ src_name := source_name,
+ dst_name := destination_name)
};
template (present) GSUP_PDU
tr_GSUP_PROC_SS_ERR(template (present) hexstring imsi,
template (present) OCT4 sid := ?,
template (present) GSUP_SessionState state := ?,
- template (present) integer cause := ?) := {
+ template (present) integer cause := ?,
+ template octetstring source_name := *,
+ template octetstring destination_name := *) := {
msg_type := OSMO_GSUP_MSGT_PROC_SS_ERROR,
- ies := f_gen_tr_ss_ies(imsi, sid, state, cause := cause)
+ ies := f_gen_tr_ss_ies(imsi, sid, state,
+ cause := cause,
+ src_name := source_name,
+ dst_name := destination_name)
};
template (value) GSUP_PDU ts_GSUP_MO_FORWARD_SM_REQ(
To view, visit change 38585. To unsubscribe, or for help writing mail filters, visit settings.