summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/osmocom/gsm/protocol/gsm_08_08.h4
-rw-r--r--src/gsm/gsm0808.c14
-rw-r--r--src/gsm/libosmogsm.map1
3 files changed, 19 insertions, 0 deletions
diff --git a/include/osmocom/gsm/protocol/gsm_08_08.h b/include/osmocom/gsm/protocol/gsm_08_08.h
index db5f7fa2..bd5705f1 100644
--- a/include/osmocom/gsm/protocol/gsm_08_08.h
+++ b/include/osmocom/gsm/protocol/gsm_08_08.h
@@ -430,6 +430,10 @@ enum gsm0808_permitted_speech {
GSM0808_PERM_HR6 = 0x45, /*!< OHR AMR */
};
+extern const struct value_string gsm0808_permitted_speech_names[];
+static inline const char *gsm0808_permitted_speech_name(enum gsm0808_permitted_speech val)
+{ return get_value_string(gsm0808_permitted_speech_names, val); }
+
/*! 3GPP TS 48.008, 3.2.2.103 Speech Codec Type */
enum gsm0808_speech_codec_type {
GSM0808_SCT_FR1 = 0x0, /*!< GSM FR */
diff --git a/src/gsm/gsm0808.c b/src/gsm/gsm0808.c
index 625de81f..a26addd4 100644
--- a/src/gsm/gsm0808.c
+++ b/src/gsm/gsm0808.c
@@ -1153,6 +1153,20 @@ const struct value_string gsm0808_speech_codec_type_names[] = {
{ 0, NULL }
};
+const struct value_string gsm0808_permitted_speech_names[] = {
+ { GSM0808_PERM_FR1, "FR1" },
+ { GSM0808_PERM_FR2, "FR2" },
+ { GSM0808_PERM_FR3, "FR3" },
+ { GSM0808_PERM_FR4, "FR4" },
+ { GSM0808_PERM_FR5, "FR5" },
+ { GSM0808_PERM_HR1, "HR1" },
+ { GSM0808_PERM_HR2, "HR2" },
+ { GSM0808_PERM_HR3, "HR3" },
+ { GSM0808_PERM_HR4, "HR4" },
+ { GSM0808_PERM_HR6, "HR6" },
+ { 0, NULL }
+};
+
static const struct value_string gsm0808_cause_names[] = {
{ GSM0808_CAUSE_RADIO_INTERFACE_MESSAGE_FAILURE, "RADIO INTERFACE MESSAGE FAILURE" },
{ GSM0808_CAUSE_RADIO_INTERFACE_FAILURE, "RADIO INTERFACE FAILURE" },
diff --git a/src/gsm/libosmogsm.map b/src/gsm/libosmogsm.map
index 96779d22..5eed5b56 100644
--- a/src/gsm/libosmogsm.map
+++ b/src/gsm/libosmogsm.map
@@ -201,6 +201,7 @@ gsm0808_cell_id_u_name;
gsm0808_chan_type_to_speech_codec;
gsm0808_speech_codec_from_chan_type;
gsm0808_speech_codec_type_names;
+gsm0808_permitted_speech_names;
gsm0808_channel_type_name;
gsm0808_lcls_config_names;
gsm0808_lcls_control_names;