Change in libosmocore[master]: Add CC_CAUSE value_string array

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Mon Sep 3 12:12:39 UTC 2018


Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/10732 )

Change subject: Add CC_CAUSE value_string array
......................................................................

Add CC_CAUSE value_string array

Adds a value_string array for GSM 04.08 Call Control
cause values

Change-Id: I296f208581ce2550805f9d96e20f7319e1199023
---
M include/osmocom/gsm/protocol/gsm_04_08.h
M src/gsm/gsm48.c
M src/gsm/libosmogsm.map
3 files changed, 59 insertions(+), 0 deletions(-)

Approvals:
  Jenkins Builder: Verified
  Harald Welte: Looks good to me, approved



diff --git a/include/osmocom/gsm/protocol/gsm_04_08.h b/include/osmocom/gsm/protocol/gsm_04_08.h
index 4635014..e218295 100644
--- a/include/osmocom/gsm/protocol/gsm_04_08.h
+++ b/include/osmocom/gsm/protocol/gsm_04_08.h
@@ -1495,6 +1495,10 @@
 	GSM48_CC_CAUSE_INTERWORKING	= 127,
 };
 
+extern const struct value_string gsm48_cc_cause_names[];
+static inline const char *gsm48_cc_cause_name(enum gsm48_cc_cause val)
+{ return get_value_string(gsm48_cc_cause_names, val); }
+
 /* Annex G, GSM specific cause values for mobility management */
 enum gsm48_reject_value {
 	GSM48_REJECT_IMSI_UNKNOWN_IN_HLR	= 2,
diff --git a/src/gsm/gsm48.c b/src/gsm/gsm48.c
index 136b937..fc3b973 100644
--- a/src/gsm/gsm48.c
+++ b/src/gsm/gsm48.c
@@ -945,6 +945,60 @@
 	{ 0, NULL }
 };
 
+/*! TS 04.08 10.5..4.11 Call Control Cause Values */
+const struct value_string gsm48_cc_cause_names[] = {
+	{ GSM48_CC_CAUSE_UNASSIGNED_NR,		"UNASSIGNED_NR" },
+	{ GSM48_CC_CAUSE_NO_ROUTE,		"NO_ROUTE" },
+	{ GSM48_CC_CAUSE_CHAN_UNACCEPT,		"CHAN_UNACCEPT" },
+	{ GSM48_CC_CAUSE_OP_DET_BARRING,	"OP_DET_BARRING" },
+	{ GSM48_CC_CAUSE_NORM_CALL_CLEAR,	"NORM_CALL_CLEAR" },
+	{ GSM48_CC_CAUSE_USER_BUSY,		"USER_BUSY" },
+	{ GSM48_CC_CAUSE_USER_NOTRESPOND,	"USER_NOTRESPOND" },
+	{ GSM48_CC_CAUSE_USER_ALERTING_NA,	"USER_ALERTING_NA" },
+	{ GSM48_CC_CAUSE_CALL_REJECTED,		"CALL_REJECTED" },
+	{ GSM48_CC_CAUSE_NUMBER_CHANGED,	"NUMBER_CHANGED" },
+	{ GSM48_CC_CAUSE_PRE_EMPTION,		"PRE_EMPTION" },
+	{ GSM48_CC_CAUSE_NONSE_USER_CLR,	"NONSE_USER_CLR" },
+	{ GSM48_CC_CAUSE_DEST_OOO,		"DEST_OOO" },
+	{ GSM48_CC_CAUSE_INV_NR_FORMAT,		"INV_NR_FORMAT" },
+	{ GSM48_CC_CAUSE_FACILITY_REJ,		"FACILITY_REJ" },
+	{ GSM48_CC_CAUSE_RESP_STATUS_INQ,	"RESP_STATUS_INQ" },
+	{ GSM48_CC_CAUSE_NORMAL_UNSPEC,		"NORMAL_UNSPEC" },
+	{ GSM48_CC_CAUSE_NO_CIRCUIT_CHAN,	"NO_CIRCUIT_CHAN" },
+	{ GSM48_CC_CAUSE_NETWORK_OOO,		"NETWORK_OOO" },
+	{ GSM48_CC_CAUSE_TEMP_FAILURE,		"TEMP_FAILURE" },
+	{ GSM48_CC_CAUSE_SWITCH_CONG,		"SWITCH_CONG" },
+	{ GSM48_CC_CAUSE_ACC_INF_DISCARD,	"ACC_INF_DISCARD" },
+	{ GSM48_CC_CAUSE_REQ_CHAN_UNAVAIL,	"REQ_CHAN_UNAVAIL" },
+	{ GSM48_CC_CAUSE_RESOURCE_UNAVAIL,	"RESOURCE_UNAVAIL" },
+	{ GSM48_CC_CAUSE_QOS_UNAVAIL,		"QOS_UNAVAIL" },
+	{ GSM48_CC_CAUSE_REQ_FAC_NOT_SUBSC,	"REQ_FAC_NOT_SUBSC" },
+	{ GSM48_CC_CAUSE_INC_BARRED_CUG,	"INC_BARRED_CUG" },
+	{ GSM48_CC_CAUSE_BEARER_CAP_UNAUTH,	"BEARER_CAP_UNAUTH" },
+	{ GSM48_CC_CAUSE_BEARER_CA_UNAVAIL,	"BEARER_CA_UNAVAIL" },
+	{ GSM48_CC_CAUSE_SERV_OPT_UNAVAIL,	"SERV_OPT_UNAVAIL" },
+	{ GSM48_CC_CAUSE_BEARERSERV_UNIMPL,	"BEARERSERV_UNIMPL" },
+	{ GSM48_CC_CAUSE_ACM_GE_ACM_MAX,	"ACM_GE_ACM_MAX" },
+	{ GSM48_CC_CAUSE_REQ_FAC_NOTIMPL,	"REQ_FAC_NOTIMPL" },
+	{ GSM48_CC_CAUSE_RESTR_BCAP_AVAIL,	"RESTR_BCAP_AVAIL" },
+	{ GSM48_CC_CAUSE_SERV_OPT_UNIMPL,	"SERV_OPT_UNIMPL" },
+	{ GSM48_CC_CAUSE_INVAL_TRANS_ID,	"INVAL_TRANS_ID" },
+	{ GSM48_CC_CAUSE_USER_NOT_IN_CUG,	"USER_NOT_IN_CUG" },
+	{ GSM48_CC_CAUSE_INCOMPAT_DEST,		"INCOMPAT_DEST" },
+	{ GSM48_CC_CAUSE_INVAL_TRANS_NET,	"INVAL_TRANS_NET" },
+	{ GSM48_CC_CAUSE_SEMANTIC_INCORR,	"SEMANTIC_INCORR" },
+	{ GSM48_CC_CAUSE_INVAL_MAND_INF,	"INVAL_MAND_INF" },
+	{ GSM48_CC_CAUSE_MSGTYPE_NOTEXIST,	"MSGTYPE_NOTEXIST" },
+	{ GSM48_CC_CAUSE_MSGTYPE_INCOMPAT,	"MSGTYPE_INCOMPAT" },
+	{ GSM48_CC_CAUSE_IE_NOTEXIST,		"IE_NOTEXIST" },
+	{ GSM48_CC_CAUSE_COND_IE_ERR,		"COND_IE_ERR" },
+	{ GSM48_CC_CAUSE_MSG_INCOMP_STATE,	"MSG_INCOMP_STATE" },
+	{ GSM48_CC_CAUSE_RECOVERY_TIMER,	"RECOVERY_TIMER" },
+	{ GSM48_CC_CAUSE_PROTO_ERR,		"PROTO_ERR" },
+	{ GSM48_CC_CAUSE_INTERWORKING,		"INTERWORKING" },
+	{ 0 , NULL }
+};
+
 /*! TS 04.80, section 3.4 Messages for supplementary services control */
 const struct value_string gsm48_nc_ss_msgtype_names[] = {
 	OSMO_VALUE_STRING(GSM0480_MTYPE_RELEASE_COMPLETE),
diff --git a/src/gsm/libosmogsm.map b/src/gsm/libosmogsm.map
index 1da398c..60d6ed8 100644
--- a/src/gsm/libosmogsm.map
+++ b/src/gsm/libosmogsm.map
@@ -321,6 +321,7 @@
 gsm48_rr_msgtype_names;
 gsm48_mm_msgtype_names;
 gsm48_cc_msgtype_names;
+gsm48_cc_cause_names;
 gsm48_pdisc_msgtype_name;
 gsm48_reject_value_names;
 

-- 
To view, visit https://gerrit.osmocom.org/10732
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I296f208581ce2550805f9d96e20f7319e1199023
Gerrit-Change-Number: 10732
Gerrit-PatchSet: 2
Gerrit-Owner: Keith Whyte <keith at rhizomatica.org>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Keith Whyte <keith at rhizomatica.org>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20180903/0c3fdaf4/attachment.htm>


More information about the gerrit-log mailing list