112 lines
3.7 KiB
C
112 lines
3.7 KiB
C
|
#ifndef __iptel_q931defs_h
|
||
|
#define __iptel_q931defs_h
|
||
|
|
||
|
// This module contains constants and enumerated types for values used in the Q.931 protocol.
|
||
|
// It does not contain any structures, definitions, or APIs relevant to any implementation.
|
||
|
|
||
|
|
||
|
|
||
|
// Q931_PROTOCOL_DISCRIMINATOR identifies Q.931 PDUs on links that may carry
|
||
|
// PDUs from more than one protocol, such as LAPD D-channel links on PRI.
|
||
|
#define Q931_PROTOCOL_DISCRIMINATOR 0x08
|
||
|
|
||
|
// the well-known Q.931 TSAP for TCP on IP is TCP port 1720
|
||
|
#define Q931_TSAP_IP_TCP 1720
|
||
|
#define Q931_TSAP_IP_TCP_SECURE 1300
|
||
|
|
||
|
|
||
|
enum Q931_MESSAGE_TYPE
|
||
|
{
|
||
|
// Call Establishment Message (000-----)
|
||
|
Q931_MESSAGE_TYPE_ALERTING = 0x01,
|
||
|
Q931_MESSAGE_TYPE_CALL_PROCEEDING = 0x02,
|
||
|
Q931_MESSAGE_TYPE_CONNECT = 0x07,
|
||
|
Q931_MESSAGE_TYPE_CONNECT_ACKNOWLEDGE = 0x0F,
|
||
|
Q931_MESSAGE_TYPE_PROGRESS = 0x03,
|
||
|
Q931_MESSAGE_TYPE_SETUP = 0x05,
|
||
|
Q931_MESSAGE_TYPE_SETUP_ACKNOWLEDGE = 0x0E,
|
||
|
Q931_MESSAGE_TYPE_FACILITY = 0x1C,
|
||
|
|
||
|
// Call Information Phase message (001-----)
|
||
|
Q931_MESSAGE_TYPE_RESUME = 0x26,
|
||
|
Q931_MESSAGE_TYPE_RESUME_ACKNOWLEDGE = 0x2E,
|
||
|
Q931_MESSAGE_TYPE_RESUME_REJECT = 0x22,
|
||
|
Q931_MESSAGE_TYPE_SUSPEND = 0x25,
|
||
|
Q931_MESSAGE_TYPE_SUSPEND_ACKNOWLEDGE = 0x2D,
|
||
|
Q931_MESSAGE_TYPE_SUSPEND_REJECT = 0x21,
|
||
|
Q931_MESSAGE_TYPE_USER_INFORMATION = 0x20,
|
||
|
|
||
|
// Call Clearing Messages (010-----)
|
||
|
Q931_MESSAGE_TYPE_DISCONNECT = 0x45,
|
||
|
Q931_MESSAGE_TYPE_RELEASE = 0x4D,
|
||
|
Q931_MESSAGE_TYPE_RELEASE_COMPLETE = 0x5A,
|
||
|
Q931_MESSAGE_TYPE_RESTART = 0x46,
|
||
|
Q931_MESSAGE_TYPE_RESTART_ACKNOWLEDGE = 0x4E,
|
||
|
|
||
|
// Miscellaneous Message (011-----)
|
||
|
Q931_MESSAGE_TYPE_SEGMENT = 0x60,
|
||
|
Q931_MESSAGE_TYPE_CONGESTION_CONTROL = 0x79,
|
||
|
Q931_MESSAGE_TYPE_INFORMATION = 0x7B,
|
||
|
Q931_MESSAGE_TYPE_NOTIFY = 0x6E,
|
||
|
Q931_MESSAGE_TYPE_STATUS = 0x7D,
|
||
|
Q931_MESSAGE_TYPE_STATUS_ENQUIRY = 0x75,
|
||
|
};
|
||
|
|
||
|
|
||
|
enum Q931_IE_IDENTIFIER
|
||
|
{
|
||
|
// Single-Octet Information Elements
|
||
|
Q931_IE_SHIFT = 0x90, // 1001----
|
||
|
Q931_IE_RESERVED = 0x80, // 1000----
|
||
|
Q931_IE_MORE_DATA = 0xA0, // 11000000
|
||
|
Q931_IE_SENDING_COMPLETE = 0xA1, // 11000001
|
||
|
Q931_IE_CONGESTION_CONTROL = 0xB0, // 1011----
|
||
|
Q931_IE_REPEAT_INDICATOR = 0xD0, // 1101----
|
||
|
|
||
|
// Variable-Length Information Elements
|
||
|
Q931_IE_SEGMENTED_MESSAGE = 0x00,
|
||
|
Q931_IE_BEARER_CAPABILITY = 0x04,
|
||
|
Q931_IE_CAUSE = 0x08,
|
||
|
Q931_IE_CALL_IDENTITIY = 0x10,
|
||
|
Q931_IE_CALL_STATE = 0x14,
|
||
|
Q931_IE_CHANNEL_IDENTIFICATION = 0x18,
|
||
|
Q931_IE_PROGRESS_INDICATOR = 0x1E,
|
||
|
Q931_IE_NETWORK_SPECIFIC_FACILITIES = 0x20,
|
||
|
Q931_IE_NOTIFICATION_INDICATOR = 0x27,
|
||
|
Q931_IE_DISPLAY = 0x28,
|
||
|
Q931_IE_DATE_TIME = 0x29,
|
||
|
Q931_IE_KEYPAD_FACILITY = 0x2A,
|
||
|
Q931_IE_SIGNAL = 0x34,
|
||
|
Q931_IE_INFORMATION_RATE = 0x40,
|
||
|
Q931_IE_END_TO_END_TRANSIT_DELAY = 0x42,
|
||
|
Q931_IE_TRANSIT_DELAY_SELECTION = 0x43,
|
||
|
Q931_IE_PACKET_LAYER_BINARY_PARAMETERS = 0x44,
|
||
|
Q931_IE_PACKET_LAYER_WINDOW_SIZE = 0x45,
|
||
|
Q931_IE_PACKET_SIZE = 0x46,
|
||
|
Q931_IE_CLOSED_USER_GROUP = 0x47,
|
||
|
Q931_IE_REVERSE_CHARGE_INDICATION = 0x4A,
|
||
|
Q931_IE_CALLING_PARTY_NUMBER = 0x6A,
|
||
|
Q931_IE_CALLING_PARTY_SUBADDRESS = 0x6B,
|
||
|
Q931_IE_CALLED_PARTY_NUMBER = 0x70,
|
||
|
Q931_IE_CALLED_PARTY_SUBADDRESS = 0x71,
|
||
|
Q931_IE_REDIRECTING_NUMBER = 0x74,
|
||
|
Q931_IE_TRANSIT_NETWORK_SELECTION = 0x78,
|
||
|
Q931_IE_RESTART_INDICATOR = 0x79,
|
||
|
Q931_IE_LOW_LAYER_COMPATIBILITY = 0x7C,
|
||
|
Q931_IE_HIGH_LAYER_COMPATIBILITY = 0x7D,
|
||
|
Q931_IE_USER_TO_USER = 0x7E,
|
||
|
Q931_IE_ESCAPE_FOR_EXTENSION = 0x7F,
|
||
|
};
|
||
|
|
||
|
enum Q931_UUIE_TYPE
|
||
|
{
|
||
|
Q931_UUIE_USER_SPECIFIC = 0x00,
|
||
|
Q931_UUIE_OSI = 0x01,
|
||
|
Q931_UUIE_X244 = 0x02,
|
||
|
Q931_UUIE_IA5_TEXT = 0x04,
|
||
|
Q931_UUIE_X208 = 0x05,
|
||
|
Q931_UUIE_V120_RATE_ADAPTION = 0x07,
|
||
|
Q931_UUIE_UNI_CALL_CONTROL = 0x08,
|
||
|
};
|
||
|
|
||
|
#endif // __iptel_q931defs_h
|