This source file includes following definitions.
- boost_full_event
1
2
3
4
5
6
7
8
9
10
11
12
13
14 #ifndef _SIGBOOST_H_
15 #define _SIGBOOST_H_
16
17 #define SIGBOOST_VERSION 103
18
19
20 #include <freetdm.h>
21
22 enum e_sigboost_event_id_values
23 {
24 SIGBOOST_EVENT_CALL_START = 0x80,
25 SIGBOOST_EVENT_CALL_START_ACK = 0x81,
26 SIGBOOST_EVENT_CALL_START_NACK = 0x82,
27 SIGBOOST_EVENT_CALL_START_NACK_ACK = 0x83,
28 SIGBOOST_EVENT_CALL_ANSWERED = 0x84,
29 SIGBOOST_EVENT_CALL_STOPPED = 0x85,
30 SIGBOOST_EVENT_CALL_STOPPED_ACK = 0x86,
31 SIGBOOST_EVENT_SYSTEM_RESTART = 0x87,
32 SIGBOOST_EVENT_SYSTEM_RESTART_ACK = 0x88,
33
34
35
36
37
38
39
40
41
42
43
44
45 SIGBOOST_EVENT_CALL_RELEASED = 0x51,
46 SIGBOOST_EVENT_CALL_PROGRESS = 0x50,
47
48 SIGBOOST_EVENT_HEARTBEAT = 0x89,
49 SIGBOOST_EVENT_INSERT_CHECK_LOOP = 0x8a,
50 SIGBOOST_EVENT_REMOVE_CHECK_LOOP = 0x8b,
51 SIGBOOST_EVENT_AUTO_CALL_GAP_ABATE = 0x8c,
52 SIGBOOST_EVENT_DIGIT_IN = 0x8d,
53 };
54
55 #define BOOST_DECODE_EVENT_ID(id) \
56 (id==SIGBOOST_EVENT_CALL_START)?"SIGBOOST_EVENT_CALL_START": \
57 (id==SIGBOOST_EVENT_CALL_START_ACK)?"SIGBOOST_EVENT_CALL_START_ACK": \
58 (id==SIGBOOST_EVENT_CALL_START_NACK)?"SIGBOOST_EVENT_CALL_START_NACK": \
59 (id==SIGBOOST_EVENT_CALL_ANSWERED)?"SIGBOOST_EVENT_CALL_ANSWERED": \
60 (id==SIGBOOST_EVENT_CALL_STOPPED)?"SIGBOOST_EVENT_CALL_STOPPED": \
61 (id==SIGBOOST_EVENT_CALL_STOPPED_ACK)?"SIGBOOST_EVENT_CALL_STOPPED_ACK": \
62 (id==SIGBOOST_EVENT_SYSTEM_RESTART)?"SIGBOOST_EVENT_SYSTEM_RESTART": \
63 (id==SIGBOOST_EVENT_SYSTEM_RESTART_ACK)?"SIGBOOST_EVENT_SYSTEM_RESTART_ACK": \
64 (id==SIGBOOST_EVENT_CALL_RELEASED)?"SIGBOOST_EVENT_CALL_RELEASED": \
65 (id==SIGBOOST_EVENT_CALL_PROGRESS)?"SIGBOOST_EVENT_CALL_PROGRESS": \
66 (id==SIGBOOST_EVENT_HEARTBEAT)?"SIGBOOST_EVENT_HEARTBEAT": \
67 (id==SIGBOOST_EVENT_INSERT_CHECK_LOOP)?"SIGBOOST_EVENT_INSERT_CHECK_LOOP": \
68 (id==SIGBOOST_EVENT_REMOVE_CHECK_LOOP)?"SIGBOOST_EVENT_REMOVE_CHECK_LOOP": \
69 (id==SIGBOOST_EVENT_AUTO_CALL_GAP_ABATE)?"SIGBOOST_EVENT_AUTO_CALL_GAP_ABATE": \
70 (id==SIGBOOST_EVENT_DIGIT_IN)?"SIGBOOST_EVENT_DIGIT_IN": "Unknown"
71
72 enum e_sigboost_release_cause_values
73 {
74 SIGBOOST_RELEASE_CAUSE_UNDEFINED = 0,
75 SIGBOOST_RELEASE_CAUSE_NORMAL = 16,
76
77
78
79
80
81 };
82
83 enum e_sigboost_call_setup_ack_nack_cause_values
84 {
85
86 SIGBOOST_CALL_SETUP_NACK_ALL_CKTS_BUSY = 117,
87
88
89 SIGBOOST_CALL_SETUP_NACK_TEST_CKT_BUSY = 17,
90 SIGBOOST_CALL_SETUP_NACK_INVALID_NUMBER = 28,
91 SIGBOOST_CALL_SETUP_CSUPID_DBL_USE = 200,
92 };
93
94
95 enum e_sigboost_huntgroup_values
96 {
97 SIGBOOST_HUNTGRP_SEQ_ASC = 0x00,
98 SIGBOOST_HUNTGRP_SEQ_DESC = 0x01,
99 SIGBOOST_HUNTGRP_RR_ASC = 0x02,
100 SIGBOOST_HUNTGRP_RR_DESC = 0x03,
101 };
102
103 enum e_sigboost_event_info_par_values
104 {
105 SIGBOOST_EVI_SPARE = 0x00,
106 SIGBOOST_EVI_ALERTING = 0x01,
107 SIGBOOST_EVI_PROGRESS = 0x02,
108 };
109
110 enum e_sigboost_progress_flags
111 {
112 SIGBOOST_PROGRESS_RING = (1 << 0),
113 SIGBOOST_PROGRESS_MEDIA = (1 << 1)
114 };
115
116 #define MAX_DIALED_DIGITS 31
117
118
119
120
121 #define CORE_MAX_SPANS 200
122 #define CORE_MAX_CHAN_PER_SPAN 32
123 #define MAX_PENDING_CALLS CORE_MAX_SPANS * CORE_MAX_CHAN_PER_SPAN
124
125
126
127 #define MAX_CALL_SETUP_ID 0xFFFF
128
129 #define SIZE_CUSTOM 900
130 #define SIZE_RDNIS SIZE_CUSTOM
131
132
133 #pragma pack(1)
134
135 typedef struct
136 {
137 uint8_t capability;
138 uint8_t uil1p;
139 } t_sigboost_bearer;
140
141 typedef struct
142 {
143 uint8_t digits_count;
144 char digits [MAX_DIALED_DIGITS + 1];
145 uint8_t npi;
146 uint8_t ton;
147 uint8_t screening_ind;
148 uint8_t presentation_ind;
149 }t_sigboost_digits;
150
151 typedef struct
152 {
153 uint16_t version;
154 uint32_t event_id;
155
156 uint32_t fseqno;
157 uint32_t bseqno;
158 uint16_t call_setup_id;
159 uint32_t trunk_group;
160 uint8_t span;
161 uint8_t chan;
162 uint32_t flags;
163
164 t_sigboost_digits called;
165 t_sigboost_digits calling;
166 t_sigboost_digits rdnis;
167
168 char calling_name[MAX_DIALED_DIGITS + 1];
169 t_sigboost_bearer bearer;
170 uint8_t hunt_group;
171 uint16_t custom_data_size;
172 char custom_data[SIZE_CUSTOM];
173
174 } t_sigboost_callstart;
175
176 #define called_number_digits_count called.digits_count
177 #define called_number_digits called.digits
178 #define calling_number_digits_count calling.digits_count
179 #define calling_number_digits calling.digits
180 #define calling_number_screening_ind calling.screening_ind
181 #define calling_number_presentation calling.presentation_ind
182
183 #define isup_in_rdnis_size custom_data_size
184 #define isup_in_rdnis custom_data
185
186
187 #define MIN_SIZE_CALLSTART_MSG sizeof(t_sigboost_callstart) - SIZE_CUSTOM
188
189 typedef struct
190 {
191 uint16_t version;
192 uint32_t event_id;
193
194 uint32_t fseqno;
195 uint32_t bseqno;
196 uint16_t call_setup_id;
197 uint32_t trunk_group;
198 uint8_t span;
199 uint8_t chan;
200 uint32_t flags;
201
202 uint8_t release_cause;
203 } t_sigboost_short;
204 #pragma pack()
205
206
207 static __inline__ int boost_full_event(int event_id)
208 {
209 switch (event_id) {
210 case SIGBOOST_EVENT_CALL_START:
211 case SIGBOOST_EVENT_DIGIT_IN:
212 case SIGBOOST_EVENT_CALL_PROGRESS:
213 return 1;
214 default:
215 break;
216 }
217
218 return 0;
219 }
220
221 #endif