libosmogsm  0.9.3
Osmocom GSM library
include/osmocom/gsm/protocol/gsm_04_80.h
00001 #pragma once
00002 
00003 /* GSM TS 04.80  definitions (Supplementary Services Specification, Formats and Coding) */
00004 
00005 /* Section 3.4 */
00006 #define GSM0480_MTYPE_RELEASE_COMPLETE  0x2A
00007 #define GSM0480_MTYPE_FACILITY                  0x3A
00008 #define GSM0480_MTYPE_REGISTER                  0x3B
00009 
00010 /* Section 3.5 */
00011 #define GSM0480_IE_FACILITY                     0x1C
00012 #define GSM0480_IE_SS_VERSION                   0x7F
00013 
00014 /* Section 3.6.2 */
00015 #define GSM0480_CTYPE_INVOKE                    0xA1
00016 #define GSM0480_CTYPE_RETURN_RESULT             0xA2
00017 #define GSM0480_CTYPE_RETURN_ERROR              0xA3
00018 #define GSM0480_CTYPE_REJECT                    0xA4
00019 
00020 /* Section 3.6.3 */
00021 #define GSM0480_COMPIDTAG_INVOKE_ID             0x02
00022 #define GSM0480_COMPIDTAG_LINKED_ID             0x80
00023 
00024 /* Section 3.6.4 */
00025 #define GSM0480_OPERATION_CODE                  0x02
00026 
00027 /* Section 3.6.5 */
00028 #define GSM_0480_SEQUENCE_TAG                   0x30
00029 #define GSM_0480_SET_TAG                        0x31
00030 
00031 /* Section 3.6.6 */
00032 #define GSM_0480_ERROR_CODE_TAG                 0x02
00033 
00034 /* Section 3.6.7 */
00035 /* Table 3.13 */
00036 #define GSM_0480_PROBLEM_CODE_TAG_GENERAL       0x80
00037 #define GSM_0480_PROBLEM_CODE_TAG_INVOKE        0x81
00038 #define GSM_0480_PROBLEM_CODE_TAG_RETURN_RESULT 0x82
00039 #define GSM_0480_PROBLEM_CODE_TAG_RETURN_ERROR  0x83
00040 
00041 /* Table 3.14 */
00042 #define GSM_0480_GEN_PROB_CODE_UNRECOGNISED     0x00
00043 #define GSM_0480_GEN_PROB_CODE_MISTYPED         0x01
00044 #define GSM_0480_GEN_PROB_CODE_BAD_STRUCTURE    0x02
00045 
00046 /* Table 3.15 */
00047 #define GSM_0480_INVOKE_PROB_CODE_DUPLICATE_INVOKE_ID           0x00
00048 #define GSM_0480_INVOKE_PROB_CODE_UNRECOGNISED_OPERATION        0x01
00049 #define GSM_0480_INVOKE_PROB_CODE_MISTYPED_PARAMETER            0x02
00050 #define GSM_0480_INVOKE_PROB_CODE_RESOURCE_LIMITATION           0x03
00051 #define GSM_0480_INVOKE_PROB_CODE_INITIATING_RELEASE            0x04
00052 #define GSM_0480_INVOKE_PROB_CODE_UNRECOGNISED_LINKED_ID        0x05
00053 #define GSM_0480_INVOKE_PROB_CODE_UNEXPECTED_LINKED_RESPONSE    0x06
00054 #define GSM_0480_INVOKE_PROB_CODE_UNEXPECTED_LINKED_OPERATION   0x07
00055 
00056 /* Table 3.16 */
00057 #define GSM_0480_RESULT_PROB_CODE_UNRECOGNISED_INVOKE_ID        0x00
00058 #define GSM_0480_RESULT_PROB_CODE_RETURN_RESULT_UNEXPECTED      0x01
00059 #define GSM_0480_RESULT_PROB_CODE_MISTYPED_PARAMETER            0x02
00060 
00061 /* Table 3.17 */
00062 #define GSM_0480_ERROR_PROB_CODE_UNRECOGNISED_INVOKE_ID         0x00
00063 #define GSM_0480_ERROR_PROB_CODE_RETURN_ERROR_UNEXPECTED        0x01
00064 #define GSM_0480_ERROR_PROB_CODE_UNRECOGNISED_ERROR             0x02
00065 #define GSM_0480_ERROR_PROB_CODE_UNEXPECTED_ERROR               0x03
00066 #define GSM_0480_ERROR_PROB_CODE_MISTYPED_PARAMETER             0x04
00067 
00068 /* Section 4.5 */
00069 #define GSM0480_OP_CODE_REGISTER_SS             0x0A
00070 #define GSM0480_OP_CODE_ERASE_SS                0x0B
00071 #define GSM0480_OP_CODE_ACTIVATE_SS             0x0C
00072 #define GSM0480_OP_CODE_DEACTIVATE_SS           0x0D
00073 #define GSM0480_OP_CODE_INTERROGATE_SS          0x0E
00074 #define GSM0480_OP_CODE_NOTIFY_SS               0x10
00075 #define GSM0480_OP_CODE_REGISTER_PASSWORD       0x11
00076 #define GSM0480_OP_CODE_GET_PASSWORD            0x12
00077 #define GSM0480_OP_CODE_PROCESS_USS_DATA        0x13
00078 #define GSM0480_OP_CODE_FORWARD_CHECK_SS_IND    0x26
00079 #define GSM0480_OP_CODE_PROCESS_USS_REQ         0x3B
00080 #define GSM0480_OP_CODE_USS_REQUEST             0x3C
00081 #define GSM0480_OP_CODE_USS_NOTIFY              0x3D
00082 #define GSM0480_OP_CODE_FORWARD_CUG_INFO        0x78
00083 #define GSM0480_OP_CODE_SPLIT_MPTY              0x79
00084 #define GSM0480_OP_CODE_RETRIEVE_MPTY           0x7A
00085 #define GSM0480_OP_CODE_HOLD_MPTY               0x7B
00086 #define GSM0480_OP_CODE_BUILD_MPTY              0x7C
00087 #define GSM0480_OP_CODE_FORWARD_CHARGE_ADVICE   0x7D
00088 
00089 #define GSM0480_ERR_CODE_UNKNOWN_SUBSCRIBER                     0x01
00090 #define GSM0480_ERR_CODE_ILLEGAL_SUBSCRIBER                     0x09
00091 #define GSM0480_ERR_CODE_BEARER_SERVICE_NOT_PROVISIONED         0x0A
00092 #define GSM0480_ERR_CODE_TELESERVICE_NOT_PROVISIONED            0x0B
00093 #define GSM0480_ERR_CODE_ILLEGAL_EQUIPMENT                      0x0C
00094 #define GSM0480_ERR_CODE_CALL_BARRED                            0x0D
00095 #define GSM0480_ERR_CODE_ILLEGAL_SS_OPERATION                   0x10
00096 #define GSM0480_ERR_CODE_SS_ERROR_STATUS                        0x11
00097 #define GSM0480_ERR_CODE_SS_NOT_AVAILABLE                       0x12
00098 #define GSM0480_ERR_CODE_SS_SUBSCRIPTION_VIOLATION              0x13
00099 #define GSM0480_ERR_CODE_SS_INCOMPATIBILITY                     0x14
00100 #define GSM0480_ERR_CODE_FACILITY_NOT_SUPPORTED                 0x15
00101 #define GSM0480_ERR_CODE_ABSENT_SUBSCRIBER                      0x1B
00102 #define GSM0480_ERR_CODE_SYSTEM_FAILURE                         0x22
00103 #define GSM0480_ERR_CODE_DATA_MISSING                           0x23
00104 #define GSM0480_ERR_CODE_UNEXPECTED_DATA_VALUE                  0x24
00105 #define GSM0480_ERR_CODE_PW_REGISTRATION_FAILURE                0x25
00106 #define GSM0480_ERR_CODE_NEGATIVE_PW_CHECK                      0x26
00107 #define GSM0480_ERR_CODE_NUM_PW_ATTEMPTS_VIOLATION              0x2B
00108 #define GSM0480_ERR_CODE_UNKNOWN_ALPHABET                       0x47
00109 #define GSM0480_ERR_CODE_USSD_BUSY                              0x48
00110 #define GSM0480_ERR_CODE_MAX_MPTY_PARTICIPANTS                  0x7E
00111 #define GSM0480_ERR_CODE_RESOURCES_NOT_AVAILABLE                0x7F
00112 
00113 /* ASN.1 type-tags */
00114 #define ASN1_BOOLEAN_TAG                0x01
00115 #define ASN1_INTEGER_TAG                0x02
00116 #define ASN1_BIT_STRING_TAG             0x03
00117 #define ASN1_OCTET_STRING_TAG           0x04
00118 #define ASN1_NULL_TYPE_TAG              0x05
00119 #define ASN1_OBJECT_ID_TAG              0x06
00120 #define ASN1_UTF8_STRING_TAG            0x0C
00121 #define ASN1_PRINTABLE_STRING_TAG       0x13
00122 #define ASN1_IA5_STRING_TAG             0x16
00123 #define ASN1_UNICODE_STRING_TAG         0x1E