Coverage Report

Created: 2026-11-12 07:01

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/wireshark/epan/dissectors/packet-ged125.c
Line
Count
Source
1
/* packet-ged125.c
2
 * Routines for ged125 dissection
3
 * Copyright June/July 2008, Martin Corraine <mcorrain@cisco.com, mac1190@rit.edu>
4
 * Assistance was provided by the following:
5
 * Paul Antinori    <pantinor[AT]cisco.com>
6
 *
7
 * Wireshark - Network traffic analyzer
8
 * By Gerald Combs <gerald@wireshark.org>
9
 * Copyright 1998 Gerald Combs
10
 *
11
 * SPDX-License-Identifier: GPL-2.0-or-later
12
 *
13
 * GED125
14
 * This is Cisco's protocol that runs atop TCP (ged125 is in the payload of TCP).
15
 * The protocol serves as a way for the ICM and the VRU to communicate to each
16
 * other in Cisco's CVP. The spec sheet that was used to write this dissector was
17
 * Revision 3.1a of November 26, 2007.
18
 *
19
 * Protocol Structure
20
 *
21
 * All messages have an eight byte header. The first 4 bytes represent the package
22
 * length. This length doesn't include the length of the base header. Next, is the
23
 * message base type which is also 4 bytes. All ged125 messages have this format
24
 * unless a message spans across several packets. The most common message is the
25
 * service control type. This message type will have its own header and with in
26
 * that header have a few other things. One of these things is a sub-message type.
27
 */
28
29
#include "config.h"
30
31
#include <epan/packet.h>
32
#include <epan/expert.h>
33
#include <epan/prefs.h>
34
#include "packet-tcp.h"
35
36
void proto_register_ged125(void);
37
void proto_reg_handoff_ged125(void);
38
39
static int proto_ged125;
40
41
static int hf_ged125_length;
42
static int hf_ged125_value;
43
static int hf_ged125_service_control_value;
44
static int hf_ged125_DialogueID_num;
45
static int hf_ged125_SendSeqNo_num;
46
static int hf_ged125_CurrentTime_num;
47
static int hf_ged125_TimeZoneDelta;
48
static int hf_ged125_OperationalStatus;
49
static int hf_ged125_StatusVariable;
50
static int hf_ged125_InvokeID;
51
static int hf_ged125_Status;
52
static int hf_ged125_VersionNumber;
53
static int hf_ged125_IdleTimeout;
54
static int hf_ged125_UseEventFeed;
55
static int hf_ged125_UsePolledFeed;
56
static int hf_ged125_UseCallRouting;
57
static int hf_ged125_UseTimeSynch;
58
static int hf_ged125_UseServiceControl;
59
static int hf_ged125_TrunkGroupID;
60
static int hf_ged125_TrunkCount;
61
static int hf_ged125_CallsInToday;
62
static int hf_ged125_CallsOutToday;
63
static int hf_ged125_InServiceTimeToday;
64
static int hf_ged125_InUseInboundTimeToday;
65
static int hf_ged125_InUseOutboundTimeToday;
66
static int hf_ged125_AllTrunksInUseTimeToday;
67
static int hf_ged125_TrunkNumber;
68
static int hf_ged125_TrunkStatus;
69
static int hf_ged125_ServiceID;
70
static int hf_ged125_AvailableNow;
71
static int hf_ged125_CallsInNow;
72
static int hf_ged125_CallsOutNow;
73
static int hf_ged125_CallsHandledToday;
74
static int hf_ged125_HandleTimeToday;
75
static int hf_ged125_DivertedInToday;
76
static int hf_ged125_DivertedOutToday;
77
static int hf_ged125_StartOfDay;
78
static int hf_ged125_InitDataTime;
79
static int hf_ged125_CallID;
80
static int hf_ged125_floating;
81
static int hf_ged125_floating_CauseCode;
82
static int hf_ged125_ServiceFeatures;
83
static int hf_ged125_floating_payload_strg;
84
static int hf_ged125_floating_payload_uint;
85
static int hf_ged125_floating_payload_bool;
86
static int hf_ged125_floating_payload_ECC_tag;
87
static int hf_ged125_ResultCode;
88
static int hf_ged125_LabelType;
89
static int hf_ged125_Cause_just_for_release_message;
90
static int hf_ged125_EventID;
91
static int hf_ged125_ErrorCode;
92
static int hf_ged125_InService;
93
static int hf_ged125_ServiceAvailable;
94
static int hf_ged125_RequestID;
95
static int hf_ged125_ToBeContinued;
96
static int hf_ged125_Barge_In_Allowed;
97
static int hf_ged125_floating_cause_code;
98
static int hf_ged125_DTMF_Termination_Key;
99
static int hf_ged125_No_Entry_Timeout;
100
static int hf_ged125_Interdigit_Timeout;
101
static int hf_ged125_Number_of_No_Entry_Tries;
102
static int hf_ged125_Number_of_Invalid_Entry_Tries;
103
static int hf_ged125_Min_Length;
104
static int hf_ged125_Max_Length;
105
static int hf_ged125_ASR_Allowed;
106
static int hf_ged125_DTMF_Menu_Keys;
107
static int hf_ged125_Microapp_Error_Code;
108
static int hf_ged125_ConferenceCallID;
109
static int hf_ged125_PrimaryCallID;
110
static int hf_ged125_SecondaryCallID;
111
static int hf_ged125_NewServiceID;
112
static int hf_ged125_NewCallID;
113
static int hf_ged125_simulator_reset_event;
114
static int hf_ged125_CrossRefID;
115
static int hf_ged125_VRUTimeLag;
116
static int hf_ged125_CallVarsMask;
117
static int hf_ged125_floating_payload_unspec;
118
static int hf_ged125_floating_uchar_array_index;
119
static int hf_ged125_floating_media_protocol;
120
static int hf_ged125_floating_library_designator;
121
static int hf_ged125_Data_Playback_Type;
122
static int hf_ged125_Data_Playback_Formats;
123
124
static int ett_ged125;
125
static int ett_ged125_header;
126
static int ett_ged125_message;
127
static int ett_ged125_floating;
128
static int ett_ged125_float_field;
129
static int ett_ged125_service_control_header;
130
static int ett_ged125_service_control_data;
131
132
static expert_field ei_ged125_OperationalStatus_normal;
133
static expert_field ei_ged125_OperationalStatus_loss_redundant_component;
134
static expert_field ei_ged125_OperationalStatus_degraded_call_processing;
135
static expert_field ei_ged125_OperationalStatus_conditions_prevent_call;
136
static expert_field ei_ged125_OperationalStatus_invalid_message;
137
static expert_field ei_ged125_length_bad;
138
static expert_field ei_ged125_sendseqno_and_dialogueid;
139
static expert_field ei_ged125_service_control_value_unknown;
140
static expert_field ei_ged125_trunk_group_id;
141
static expert_field ei_ged125_TrunkCount_invalid;
142
143
static dissector_handle_t ged125_handle;
144
145
/* Preferences */
146
static bool ged125_desegment_body = true;
147
148
0
#define GED125_FAILURE_CONF_VALUE 1
149
0
#define GED125_FAILURE_EVENT_VALUE 2
150
0
#define GED125_OPEN_REQ_VALUE 3
151
0
#define GED125_OPEN_CONF_VALUE 4
152
0
#define GED125_HEARTBEAT_REQ_VALUE 5
153
0
#define GED125_HEARTBEAT_CONF_VALUE 6
154
0
#define GED125_CLOSE_REQ_VALUE 7
155
0
#define GED125_CLOSE_CONF_VALUE 8
156
0
#define GED125_INIT_DATA_REQ_VALUE 9
157
0
#define GED125_INIT_DATA_CONF_VALUE 10
158
0
#define GED125_INIT_TRKGRP_DATA_EVENT_VALUE 11
159
0
#define GED125_INIT_SERVICE_DATA_EVENT_VALUE 12
160
0
#define GED125_INIT_VRU_DATA_EVENT_VALUE 13
161
0
#define GED125_INIT_DATA_END_EVENT_VALUE 14
162
0
#define GED125_DELIVERED_EVENT_VALUE 15
163
0
#define GED125_ORIGINATED_EVENT_VALUE 16
164
0
#define GED125_CALL_CLEARED_EVENT_VALUE 17
165
0
#define GED125_CONFERENCED_EVENT_VALUE 18
166
0
#define GED125_DIVERTED_EVENT_VALUE 19
167
0
#define GED125_NEW_TRANSACTION_EVENT_VALUE 20
168
0
#define GED125_SET_CALL_VARIABLES_EVENT_VALUE 21
169
0
#define GED125_VRU_STATUS_EVENT_VALUE 22
170
0
#define GED125_TRKGRP_STATUS_EVENT_VALUE 23
171
0
#define GED125_SERVICE_STATUS_EVENT_VALUE 24
172
0
#define GED125_ROUTE_REQUEST_EVENT_VALUE 41
173
0
#define GED125_ROUTE_SELECT_VALUE 42
174
0
#define GED125_ROUTE_END_EVENT_VALUE 43
175
0
#define GED125_ROUTE_END_VALUE 44
176
0
#define GED125_TIME_SYNCH_REQ_VALUE 45
177
0
#define GED125_TIME_SYNCH_CONF_VALUE 46
178
0
#define GED125_SERVICE_CONTROL_VALUE 47
179
0
#define GED125_SIMULATOR_RESET_EVENT_VALUE 48
180
0
#define GED125_REGISTER_VARIABLES_VALUE 49
181
182
0
#define GED125_INIT_SERVICE_CTRL_REQ_VALUE 1
183
0
#define GED125_INIT_SERVICE_CTRL_CONF_VALUE 2
184
0
#define GED125_INIT_SERVICE_CTRL_DATA_VALUE 3
185
0
#define GED125_INIT_SERVICE_CTRL_END_VALUE 4
186
0
#define GED125_NEW_CALL_VALUE 5
187
0
#define GED125_REQUEST_INSTRUCTION_VALUE 6
188
0
#define GED125_RUN_SCRIPT_REQ_VALUE 7
189
0
#define GED125_RUN_SCRIPT_RESULT_VALUE 8
190
0
#define GED125_CONNECT_VALUE 9
191
0
#define GED125_EVENT_REPORT_VALUE 10
192
0
#define GED125_DIALOGUE_FAILURE_CONF_VALUE 11
193
0
#define GED125_DIALOGUE_FAILURE_EVENT_VALUE 12
194
0
#define GED125_INIT_SERVICE_CTRL_TRKGRP_VALUE 13
195
0
#define GED125_INIT_SERVICE_CTRL_SERVICE_VALUE 14
196
0
#define GED125_INIT_SERVICE_CTRL_VRU_VALUE 15
197
0
#define GED125_TRKGRP_STATUS_VALUE 16
198
0
#define GED125_SERVICE_STATUS_VALUE 17
199
0
#define GED125_VRU_STATUS_VALUE 18
200
0
#define GED125_CANCEL_VALUE 19
201
0
#define GED125_RELEASE_VALUE 20
202
0
#define GED125_NEW_DIALOGUE_VALUE 21
203
0
#define GED125_CONNECT_TO_RESOURCE_VALUE 22
204
0
#define GED125_RESOURCE_CONNECTED_VALUE 23
205
0
#define GED125_MICROAPP_CONTEXT_VALUE 24
206
0
#define GED125_MICROAPP_PLAY_VALUE 25
207
0
#define GED125_MICROAPP_PLAY_CONTINUE_VALUE 26
208
0
#define GED125_MICROAPP_COLLECT_DATA_VALUE 27
209
0
#define GED125_MICROAPP_MENU_VALUE 28
210
0
#define GED125_MICROAPP_RESULT_VALUE 29
211
0
#define GED125_TEMPORARY_CONNECT_VALUE 30
212
213
/*Message Element Names and values*/
214
static const value_string vals_floating_point_types[] = {
215
  { 0x0, "Invalid"},
216
  { 0x1, "Text" },
217
  { 0x12, "ANI: Calling-line ID of the caller" },
218
  { 0x13, "UUI" },
219
  { 0x14, "DNIS" },
220
  { 0x15, "Digits Dialed" },
221
  { 0x16, "Call Variable 1" },
222
  { 0x17, "Call Variable 2" },
223
  { 0x18, "Call Variable 3" },
224
  { 0x19, "Call Variable 4" },
225
  { 0x1A, "Call Variable 5" },
226
  { 0x1B, "Call Variable 6" },
227
  { 0x1C, "Call Variable 7" },
228
  { 0x1D, "Call Variable 8" },
229
  { 0x1E, "Call Variable 9" },
230
  { 0x1F, "Call Variable 10" },
231
  { 0x20, "Dialed Number" },
232
  { 0x21, "CED" },
233
  { 0x22, "Label" },
234
  { 0x23, "Trunk_Group_ID" },
235
  { 0x24, "TRUNK_NUMBER" },
236
  { 0x25, "Called_Number" },
237
  { 0x26, "Script_ID" },
238
  { 0x27, "Script Configuration" },
239
  { 0x28, "Correlation_ID" },
240
  { 0x29, "Cause_Code" },
241
  { 0x2a, "Exp Call Var Name" },
242
  { 0x2b, "Exp Call Var Value" },
243
  { 0x2c, "EXP CALL VAR ARRAY" },
244
  { 0x2d, "New Transaction Tag" },
245
  { 0x2e, "Transfer Hint Tag" },
246
  { 0x2f, "Media_Specifier" },
247
  { 0x30, "Initial Prompt-(MEDIA_SPECIFIER)" },
248
  { 0x31, "Invalid Entry Prompt-(MEDIA_SPECIFIER)" },
249
  { 0x32, "Timeout_Prompt-(MEDIA_SPECIFIER)" },
250
  { 0x33, "Customer ID" },
251
  { 0x34, "Application_Media_Library" },
252
  { 0x35, "System Media Library" },
253
  { 0x36, "Locale" },
254
  { 0x37, "Media-Server_Set" },
255
  { 0x38, "Microapp-Error Text" },
256
  { 0x39, "ASR Grammar" },
257
  { 0x3a, "Currency" },
258
  { 0, NULL}
259
};
260
261
/*RELEASE Message type*/
262
static const value_string Cause_just_for_release_message_vals[] = {
263
  {0, "Normal-Call Clearing" },
264
  {1, "No Route to Destination" },
265
  {0, NULL}
266
};
267
268
/*Base Message for the ged125*/
269
static const value_string base_message_values[] = {
270
  { GED125_FAILURE_CONF_VALUE,             "FAILURE_CONF" },
271
  { GED125_FAILURE_EVENT_VALUE,            "FAILURE_EVENT" },
272
  { GED125_OPEN_REQ_VALUE,                 "OPEN_REQ" },
273
  { GED125_OPEN_CONF_VALUE,                "OPEN_CONF" },
274
  { GED125_HEARTBEAT_REQ_VALUE,            "HEARTBEAT_REQ" },
275
  { GED125_HEARTBEAT_CONF_VALUE,           "HEARTBEAT_CONF" },
276
  { GED125_CLOSE_REQ_VALUE,                "CLOSE_REQ" },
277
  { GED125_CLOSE_CONF_VALUE,               "CLOSE_CONF" },
278
  { GED125_INIT_DATA_REQ_VALUE,            "INIT_DATA_REQ" },
279
  { GED125_INIT_DATA_CONF_VALUE,           "INIT_DATA_CONF" },
280
  { GED125_INIT_TRKGRP_DATA_EVENT_VALUE,   "INIT_TRKGRP_DATA_EVENT" },
281
  { GED125_INIT_SERVICE_DATA_EVENT_VALUE,  "INIT_SERVICE_DATA_EVENT" },
282
  { GED125_INIT_VRU_DATA_EVENT_VALUE,      "INIT_VRU_DATA_EVENT" },
283
  { GED125_INIT_DATA_END_EVENT_VALUE,      "INIT_DATA_END_EVENT" },
284
  { GED125_DELIVERED_EVENT_VALUE,          "DELIVERED_EVENT" },
285
  { GED125_ORIGINATED_EVENT_VALUE,         "ORIGINATED_EVENT" },
286
  { GED125_CALL_CLEARED_EVENT_VALUE,       "CALL_CLEARED_EVENT" },
287
  { GED125_CONFERENCED_EVENT_VALUE,        "CONFERENCED_EVENT" },
288
  { GED125_DIVERTED_EVENT_VALUE,           "DIVERTED_EVENT" },
289
  { GED125_NEW_TRANSACTION_EVENT_VALUE,    "NEW_TRANSACTION_EVENT" },
290
  { GED125_SET_CALL_VARIABLES_EVENT_VALUE, "SET_CALL_VARIABLES_EVENT" },
291
  { GED125_VRU_STATUS_EVENT_VALUE,         "VRU_STATUS_EVENT" },
292
  { GED125_TRKGRP_STATUS_EVENT_VALUE,      "TRKGRP_STATUS_EVENT" },
293
  { GED125_SERVICE_STATUS_EVENT_VALUE,     "SERVICE_STATUS_EVENT" },
294
  { GED125_ROUTE_REQUEST_EVENT_VALUE,      "ROUTE_REQUEST_EVENT" },
295
  { GED125_ROUTE_SELECT_VALUE,             "ROUTE_SELECT" },
296
  { GED125_ROUTE_END_EVENT_VALUE,          "ROUTE_END_EVENT" },
297
  { GED125_ROUTE_END_VALUE,                "ROUTE_END" },
298
  { GED125_TIME_SYNCH_REQ_VALUE,           "TIME_SYNCH_REQ" },
299
  { GED125_TIME_SYNCH_CONF_VALUE,          "TIME_SYNCH_CONF" },
300
  { GED125_SERVICE_CONTROL_VALUE,          "SERVICE_CONTROL" },
301
  { GED125_SIMULATOR_RESET_EVENT_VALUE,    "SIMULATOR_RESET_EVENT" },
302
  { GED125_REGISTER_VARIABLES_VALUE,       "REGISTER_VARIABLES" },
303
  { 0, NULL}
304
};
305
306
/*status codes that may be included in the FAILURE_CONF, FAILURE_EVENT,
307
 DIALOGUE_FAILURE_CONF, DIALOGUE_FAILURE_EVENT, ROUTE_END_EVENT, and
308
 ROUTE_END messages.*/
309
static const value_string error_codes[] = {
310
  { 0x0, "E_NO_ERROR"},
311
  { 0x1, "E_INVALID_VERSION" },
312
  { 0x2, "E_SESSION_ALREADY_ACTIVE" },
313
  { 0x3, "E_VRU_OFFLINE" },
314
  { 0x4, "E_SESSION_NOT_ACTIVE" },
315
  { 0x5, "E_INVALID_DIALED_NUMBER"},
316
  { 0x6, "E_EVENTS_NOT_SUPPORTED"},
317
  { 0x7, "E_EVENTS_NOT_SUPPORTED"},
318
  { 0x8, "E_ROUTING_NOT_SUPPORTED"},
319
  { 0x9, "E_TIME_SYNCH_NOT_SUPPORTED"},
320
  { 0xA, "E_TIMEOUT"},
321
  { 0xB, "E_PG_OFFLINE"},
322
  { 0xC, "E_REQUEST_REFUSED"},
323
  { 0xD, "E_ROUTING_NOT_AVAILABLE"},
324
  { 0xE, "E_ROUTE_NOT_ACCEPTED"},
325
  { 0xF, "E_UNSPECIFIED_FAILURE"},
326
  { 0x10, "E_INVALID_INVOKEID"},
327
  { 0x11, "E_SERVICE_CTRL_NOT_SUPPORTED"},
328
  { 0x12, "E_NO_SCRIPT"},
329
  { 0x13, "E_CALL_VARIABLE1"},
330
  { 0x14, "E_CALL_VARIABLE2"},
331
  { 0x15, "E_CALL_VARIABLE3"},
332
  { 0x16, "E_CALL_VARIABLE4"},
333
  { 0x17, "E_CALL_VARIABLE5"},
334
  { 0x18, "E_CALL_VARIABLE6"},
335
  { 0x19, "E_CALL_VARIABLE7"},
336
  { 0x1A, "E_CALL_VARIABLE8"},
337
  { 0x1B, "E_CALL_VARIABLE9"},
338
  { 0x1C, "E_CALL_VARIABLE10"},
339
  { 0x1E, "E_INVALID_SCRIPT"},
340
  { 0x1F, "E_INVALID_CALLID"},
341
  { 0x20, "E_DUPLICATE_DIALOGUEID"},
342
  { 0x21, "E_INVALID_MESSAGE"},
343
  { 0x22, "E_INVALID_DIALOGUEID"},
344
  { 0x23, "E_OPERATION_CANCELLED"},
345
  { 0x24, "E_OPERATION_NOT_CANCELLED"},
346
  { 0x25, "E_SIMULATOR_RESET"},
347
  { 0x26, "E_SIMULATOR_REINIT"},
348
  { 0, NULL}
349
};
350
351
/*Call Cleared Causes*/
352
static const value_string vals_status_code_call_cleared[] = {
353
  { 0x1, "DBCD_DROP_HANDLED_PRIMARY_ROUTE-(Normal Completion)"},
354
  { 0x2, "DBCD_ABAND_AGENT_TERMINAL-(Call Abandoned)"},
355
  { 0x3, "DBCD_BLIND_TRANSFER-(Call Transferred)"},
356
  { 0x4, "DBCD_DROP_HANDLED_PRIMARY_ROUTE-(Normal Completion)"},
357
  { 0x5, "DBCD_DROP_BUSY-(Busy)"},
358
  { 0x6, "DBCD_DROP_NO_ANSWER-(No Answer)"},
359
  { 0x7, "DBCD_TIME_OUT-(Maintenance)"},
360
  { 0x8, "DBCD_FORCED_BUSY-(Net Congestion)"},
361
  { 0x9, "DBCD_INTERCEPT_REORDER-(Net Not Obtainable)"},
362
  { 0xA, "DBCD_DROP_REORDER-(Reorder Tone)"},
363
  { 0xB, "DBCD_INTERCEPT_DENIAL-(Resources Not Available)"},
364
  { 0xC, "DBCD_FORCED_BUSY-(Net Congestion)"},
365
  { 0xD, "DBCD_CALLED_PARTY_DISCONNECTED-(Called Party Disconnected)"},
366
  { 0, NULL}
367
};
368
369
/*Trunk Status Definitions*/
370
static const value_string status_code_trunk_status[] = {
371
  { 1, "TRUNK_OUT_OF_SERVICE"},
372
  { 2, "TRUNK_IN_USE_INBOUND"},
373
  { 3, "TRUNK_IN_USE_OUTBOUND"},
374
  { 4, "TRUNK_IDLE"},
375
  { 0, NULL}
376
};
377
378
#if 0
379
/*Label values*/
380
static const value_string vals_status_code_label_values[] = {
381
  { 0x1, "NORMAL"},
382
  { 0x2, "BUSY"},
383
  { 0x3, "RING"},
384
  { 0x5, "DEFAULT"},
385
  { 0, NULL}
386
};
387
#endif
388
389
/*Service Control Message Sub-values*/
390
static const value_string vals_service_control_message_subvalues[] = {
391
  { GED125_INIT_SERVICE_CTRL_REQ_VALUE,     "INIT_SERVICE_CTRL_REQ"},
392
  { GED125_INIT_SERVICE_CTRL_CONF_VALUE,    "INIT_SERVICE_CTRL_CONF"},
393
  { GED125_INIT_SERVICE_CTRL_DATA_VALUE,    "INIT_SERVICE_CTRL_DATA"},
394
  { GED125_INIT_SERVICE_CTRL_END_VALUE,     "INIT_SERVICE_CTRL_END"},
395
  { GED125_NEW_CALL_VALUE,                  "NEW_CALL"},
396
  { GED125_REQUEST_INSTRUCTION_VALUE,       "REQUEST_INSTRUCTION"},
397
  { GED125_RUN_SCRIPT_REQ_VALUE,            "RUN_SCRIPT_REQ"},
398
  { GED125_RUN_SCRIPT_RESULT_VALUE,         "RUN_SCRIPT_RESULT"},
399
  { GED125_CONNECT_VALUE,                   "CONNECT"},
400
  { GED125_EVENT_REPORT_VALUE,              "EVENT_REPORT"},
401
  { GED125_DIALOGUE_FAILURE_CONF_VALUE,     "DIALOGUE_FAILURE_CONF"},
402
  { GED125_DIALOGUE_FAILURE_EVENT_VALUE,    "DIALOGUE_FAILURE_EVENT"},
403
  { GED125_INIT_SERVICE_CTRL_TRKGRP_VALUE,  "INIT_SERVICE_CTRL_TRKGRP"},
404
  { GED125_INIT_SERVICE_CTRL_SERVICE_VALUE, "INIT_SERVICE_CTRL_SERVICE"},
405
  { GED125_INIT_SERVICE_CTRL_VRU_VALUE,     "INIT_SERVICE_CTRL_VRU"},
406
  { GED125_TRKGRP_STATUS_VALUE,             "TRKGRP_STATUS"},
407
  { GED125_SERVICE_STATUS_VALUE,            "SERVICE_STATUS"},
408
  { GED125_VRU_STATUS_VALUE,                "VRU_STATUS"},
409
  { GED125_CANCEL_VALUE,                    "CANCEL"},
410
  { GED125_RELEASE_VALUE,                   "RELEASE"},
411
  { GED125_NEW_DIALOGUE_VALUE,              "NEW_DIALOGUE"},
412
  { GED125_CONNECT_TO_RESOURCE_VALUE,       "CONNECT_TO_RESOURCE"},
413
  { GED125_RESOURCE_CONNECTED_VALUE,        "RESOURCE_CONNECTED"},
414
  { GED125_MICROAPP_CONTEXT_VALUE,          "MICROAPP_CONTEXT"},
415
  { GED125_MICROAPP_PLAY_VALUE,             "MICROAPP_PLAY"},
416
  { GED125_MICROAPP_PLAY_CONTINUE_VALUE,    "MICROAPP_PLAY_CONTINUE"},
417
  { GED125_MICROAPP_COLLECT_DATA_VALUE,     "MICROAPP_COLLECT_DATA"},
418
  { GED125_MICROAPP_MENU_VALUE,             "MICROAPP_MENU"},
419
  { GED125_MICROAPP_RESULT_VALUE,           "MICROAPP_RESULT"},
420
  { GED125_TEMPORARY_CONNECT_VALUE,         "TEMPORARY_CONNECT"},
421
  { 0, NULL}
422
};
423
424
/*Microapp Error Codes*/
425
static const value_string status_code_microcapp_error_codes[] = {
426
  { 0, "MICROAPP_E_OK" },
427
  { 1, "MICROAPP_E_ERROR" },
428
  { 2, "MICROAPP_E_VRU_TIMED_OUT" },
429
  { 3, "MICROAPP_E_ABORTED" },
430
  { 4, "MICROAPP_E_DIALOG_FAILED" },
431
  { 5, "MICROAPP_E_VRU_SCRIPT_NOT_FOUND"},
432
  { 1001, "MICROAPP_E_INTERNAL" },
433
  { 1002, "MICROAPP_E_MAX_INVALID" },
434
  { 1003, "MICROAPP_E_MAX_NO_ENTRY" },
435
  { 1004, "MICROAPP_E_MEDIA_PROTOCOL" },
436
  { 1005, "MICROAPP_E_MEDIA_VALUE" },
437
  { 1006, "MICROAPP_E_NETWORK" },
438
  { 1007, "MICROAPP_E_NO_MEDIA" },
439
  { 1008, "MICROAPP_E_NUMBER_FORMAT" },
440
  { 1009, "MICROAPP_E_PARAMETER" },
441
  { 1010, "MICROAPP_E_SYSTEM" },
442
  { 1011, "MICROAPP_E_UNSUPPORTED" },
443
  { 1012, "MICROAPP_E_DATA_RANGE" },
444
  { 1013, "MICROAPP_E_INTERNAL_TIMEOUT" },
445
  { 1014, "MICROAPP_E_RECOGNITION" },
446
  { 1999, "MICROAPP_E_OTHER" },
447
  { 0, NULL}
448
};
449
450
/*Label values*/
451
static const value_string status_code_Label_values[] = {
452
  { 1, "NORMAL" },
453
  { 2, "BUSY" },
454
  { 3, "RING" },
455
  { 4, "Not Supported" },
456
  { 5, "DEFAULT" },
457
  { 0, NULL}
458
};
459
460
/*Event Report Codes*/
461
static const value_string status_code_event_reportcodes[] = {
462
  { 1, "CONNECT_FAILURE" },
463
  { 2, "BUSY" },
464
  { 3, "NO_ANSWER" },
465
  { 4, "ANSWER" },
466
  { 5, "ABANDON" },
467
  { 6, "DISCONNECT" },
468
  { 7, "CONNECT_INVALID" },
469
  { 0, NULL}
470
};
471
472
/*values for the media specifier fields*/
473
static const value_string Data_Playback_Type[] = {
474
  { 1, "PLAYBACK_TYPE_NUMBER" },
475
  { 2, "PLAYBACK_TYPE_CHAR" },
476
  { 3, "PLAYBACK_TYPE_ETIME" },
477
  { 4, "PLAYBACK_TYPE_TOD" },
478
  { 5, "PLAYBACK_TYPE_24TOD" },
479
  { 6, "PLAYBACK_TYPE_DOW" },
480
  { 7, "PLAYBACK_TYPE_DATE" },
481
  { 8, "PLAYBACK_TYPE_CURRENCY" },
482
  { 9, "PLAYBACK_TYPE_TEXT" },
483
  { 0, NULL}
484
};
485
486
/*values for the media specifier fields*/
487
static const value_string Data_Playback_Formats[] = {
488
  { 1, "PLAYBACK_FORMAT_HHMM" },
489
  { 2, "PLAYBACK_FORMAT_HHMMSS" },
490
  { 3, "PLAYBACK_FORMAT_HHMMAP" },
491
  { 4, "PLAYBACK_FORMAT_OTHER" },
492
  { 0, NULL}
493
};
494
495
static const value_string floating_media_protocol_vals[] = {
496
  { 'H', "(HTTP)" },
497
  { 'S', "(Streaming)" },
498
  { 'O', "(Other)" },
499
  { 'F', "(File)" },
500
  { 'T', "(Text)" },
501
  { 'D', "(DATA)" },
502
  { 0, NULL}
503
};
504
505
static const value_string floating_media_library_designator_vals[] = {
506
  { 'A', "(Application)" },
507
  { 'S', "(System)" },
508
  { 0, NULL}
509
};
510
511
static void
512
OperationalStatus_funk(tvbuff_t* tvb, packet_info *pinfo, proto_tree* tree, int* offset)
513
0
{
514
0
  uint32_t value;
515
0
  proto_item* ti;
516
517
0
  value = tvb_get_ntohl(tvb, *offset);
518
0
  ti = proto_tree_add_item(tree, hf_ged125_OperationalStatus, tvb, *offset, 4, ENC_BIG_ENDIAN);
519
520
0
  if (value == 0)
521
0
    expert_add_info(pinfo, ti, &ei_ged125_OperationalStatus_normal);
522
0
  else if (value <= 31 && value >0)
523
0
    expert_add_info(pinfo, ti, &ei_ged125_OperationalStatus_loss_redundant_component);
524
0
  else if (value <= 63 && value >= 32 ) /*32-63*/
525
0
    expert_add_info(pinfo, ti, &ei_ged125_OperationalStatus_degraded_call_processing);
526
0
  else if (value <= 127 && value >= 64  ) /*64-127*/
527
0
    expert_add_info(pinfo, ti, &ei_ged125_OperationalStatus_conditions_prevent_call);
528
0
  else if (value > 127) /*error*/
529
0
    expert_add_info(pinfo, ti, &ei_ged125_OperationalStatus_invalid_message);
530
531
0
  *offset += 4;
532
0
}
533
534
535
static void
536
StatusVariable_funk(tvbuff_t* tvb, proto_tree* tree, int* offset, const int size)
537
0
{
538
0
  while(*offset+4 <= size)
539
0
  {
540
0
    proto_tree_add_item(tree, hf_ged125_StatusVariable, tvb, *offset, 4, ENC_BIG_ENDIAN);
541
0
    *offset += 4;
542
0
  }
543
0
}
544
545
static void
546
trunk_funk_without_status(tvbuff_t* tvb, proto_tree* z_tree, int* offset, const int size)
547
0
{
548
0
  int count = 0;
549
550
0
  while(*offset+2 <= size && count < 1024)
551
0
  {
552
0
    proto_tree_add_item(z_tree, hf_ged125_TrunkNumber, tvb, *offset, 2, ENC_BIG_ENDIAN);
553
0
    *offset += 2;
554
0
    count++;
555
0
  }
556
0
}
557
558
static void
559
trunk_funk(tvbuff_t* tvb, proto_tree* tree, int* offset, const int size)
560
0
{
561
0
  uint16_t count = 0;
562
563
  /* 1023 max trunks, the trunk loop(counting from 0 from 1023 is 1024)*/
564
0
  while(*offset+4 <= size && count < 1024) {
565
0
    proto_tree_add_item(tree, hf_ged125_TrunkNumber, tvb, *offset, 2, ENC_BIG_ENDIAN);
566
0
    *offset += 2;
567
0
    proto_tree_add_item(tree, hf_ged125_TrunkStatus, tvb, *offset, 2, ENC_BIG_ENDIAN);
568
0
    *offset += 2;
569
570
0
    count++;
571
0
  }
572
0
}
573
574
static void
575
Media_Specifier_dissect(tvbuff_t* tvb, proto_tree* tree, int* offset, uint32_t length)
576
0
{
577
0
  uint8_t media_protocol;
578
0
  const int start = *offset;
579
580
0
  if (length == 0)
581
0
    return;
582
583
0
  media_protocol = tvb_get_uint8(tvb, *offset);
584
0
  proto_tree_add_item(tree, hf_ged125_floating_media_protocol, tvb, *offset, 1, ENC_ASCII);
585
0
  *offset += 1;
586
587
0
  switch (media_protocol)
588
0
  {
589
0
  case 'H':
590
0
  case 'S':
591
0
  case 'O':
592
0
  case 'F':
593
0
    if (length < 2)
594
0
      break;
595
0
    proto_tree_add_item(tree, hf_ged125_floating_library_designator, tvb, *offset, 1, ENC_ASCII);
596
0
    *offset += 1;
597
0
    proto_tree_add_item(tree, hf_ged125_floating_payload_strg, tvb, *offset, length - 2, ENC_ASCII);
598
0
    break;
599
600
0
  case 'T':
601
0
    proto_tree_add_item(tree, hf_ged125_floating_payload_strg, tvb, *offset, length - 1, ENC_ASCII);
602
0
    break;
603
604
0
  case 'D':
605
0
    if (length < 9)
606
0
      break;
607
0
    proto_tree_add_item(tree, hf_ged125_Data_Playback_Type, tvb, *offset, 4, ENC_BIG_ENDIAN);
608
0
    *offset += 4;
609
0
    proto_tree_add_item(tree, hf_ged125_Data_Playback_Formats, tvb, *offset, 4, ENC_BIG_ENDIAN);
610
0
    *offset += 4;
611
0
    proto_tree_add_item(tree, hf_ged125_floating_payload_strg, tvb, *offset, length - 9, ENC_ASCII);
612
0
    break;
613
0
  }
614
615
  /* The length covers the whole value, including the fields above */
616
0
  *offset = start + (int)length;
617
0
}
618
619
static void
620
floating_fields(tvbuff_t* tvb, packet_info *pinfo, proto_tree* tree, int offset, const int size)
621
0
{
622
0
  int32_t length;
623
0
  uint32_t floating_type;
624
0
  proto_tree *ged125_tree, *float_tree;
625
0
  proto_item *ti;
626
627
  /* No floating fields in this message */
628
0
  if (size - offset <= 0)
629
0
    return;
630
0
  length = size - offset;
631
632
0
  ged125_tree = proto_tree_add_subtree(tree, tvb, offset, length, ett_ged125_floating, NULL, "Float Message");
633
634
  /*The Universal Floating-Fields Loop of Fun*/
635
0
  while (offset < size-2)
636
0
  {
637
0
    floating_type = tvb_get_uint8(tvb, offset);
638
0
    ti = proto_tree_add_uint_format(ged125_tree, hf_ged125_floating, tvb, offset, 1,
639
0
                      floating_type, "%s", val_to_str(pinfo->pool, floating_type,
640
0
                      vals_floating_point_types, "Unknown %d"));
641
0
    float_tree = proto_item_add_subtree(ti, ett_ged125_float_field);
642
0
    offset += 1;
643
644
0
    length = tvb_get_uint8(tvb, offset);
645
0
    proto_tree_add_uint(float_tree, hf_ged125_length, tvb, offset, 1, length);
646
0
    offset += 1;
647
648
0
    if ((offset + length > size) && (length > 0))
649
0
    {
650
0
      expert_add_info(pinfo, ti, &ei_ged125_length_bad);
651
0
      break;
652
0
    }
653
654
0
    switch (floating_type)
655
0
    {
656
0
    case 42:
657
0
    case 43:
658
0
      proto_tree_add_item(float_tree, hf_ged125_floating_payload_ECC_tag, tvb, offset, 4, ENC_BIG_ENDIAN);
659
0
      offset += 4;
660
0
      if (length-4 > 0)
661
0
      {
662
0
        proto_tree_add_item(float_tree, hf_ged125_floating_payload_strg, tvb, offset, length-4, ENC_ASCII);
663
0
        offset += (length-4);
664
0
      }
665
0
      break;
666
667
0
    case 44: /*ECC_VAR_ARRAY*/
668
0
      proto_tree_add_item(float_tree, hf_ged125_floating_payload_ECC_tag, tvb, offset, 4, ENC_BIG_ENDIAN);
669
0
      offset += 4;
670
0
      proto_tree_add_item(float_tree, hf_ged125_floating_uchar_array_index, tvb, offset, 1, ENC_BIG_ENDIAN);
671
0
      offset += 1;
672
0
      if (length-5 > 0)
673
0
      {
674
0
        proto_tree_add_item(float_tree, hf_ged125_floating_payload_strg, tvb, offset, length-5, ENC_ASCII);
675
0
        offset += (length-5);
676
0
      }
677
0
      break;
678
679
0
    case 47:
680
0
    case 48:
681
0
    case 49:
682
0
    case 50: /*MEDIA_SPECIFIER*/
683
0
      Media_Specifier_dissect(tvb, float_tree, &offset, length);
684
0
      break;
685
686
0
    case 19: /* unspec var type(UUI) */
687
0
      proto_tree_add_item(float_tree, hf_ged125_floating_payload_unspec, tvb, offset, length, ENC_NA);
688
0
      offset += length;
689
0
      break;
690
691
0
    case 1:
692
0
    case 18:
693
0
    case 20: case 21: case 22: case 23: case 24: case 25: case 26: case 27:
694
0
    case 28: case 29: case 30: case 31: case 32: case 33: case 34:
695
0
    case 37: case 38: case 39: case 40:
696
0
    case 51: case 52: case 53: case 54: case 55: case 56: case 57: case 58:
697
0
      proto_tree_add_item(float_tree, hf_ged125_floating_payload_strg, tvb, offset, length, ENC_ASCII);
698
0
      offset += length;
699
0
      break;
700
701
0
    case 35:
702
0
    case 36:
703
0
      proto_tree_add_item(float_tree, hf_ged125_floating_payload_uint, tvb, offset, 4, ENC_BIG_ENDIAN);
704
0
      offset += length;
705
0
      break;
706
0
    case 41:
707
0
      proto_tree_add_item(float_tree, hf_ged125_floating_cause_code, tvb, offset, 4, ENC_BIG_ENDIAN);
708
0
      offset += length;
709
0
      break;
710
711
0
    case 45:
712
0
    case 46:
713
0
      proto_tree_add_item(float_tree, hf_ged125_floating_payload_bool, tvb, offset, 4, ENC_BIG_ENDIAN);
714
0
      offset += length;
715
0
      break;
716
717
0
    default:
718
      /* Unknown floating field type: skip its value */
719
0
      offset += length;
720
0
      break;
721
0
    }
722
0
  }
723
0
}
724
725
static void
726
service_control_dissect(tvbuff_t* tvb,proto_tree* msg_tree, proto_tree* ged125_tree, packet_info* pinfo,
727
  int* offset, const int size)
728
0
{
729
0
  proto_item *ti;
730
0
  proto_tree *service_tree, *data_tree;
731
0
  uint32_t mess_type, DialogueID, SendSeqNo;
732
733
0
  service_tree = proto_tree_add_subtree(msg_tree, tvb, *offset, 12,
734
0
      ett_ged125_service_control_header, NULL, "Service-Control Header");
735
736
  /* get message sub type, don't want to output that just yet */
737
0
  mess_type = tvb_get_ntohl(tvb, *offset);
738
0
  *offset += 4;
739
740
0
  proto_tree_add_item_ret_uint(service_tree, hf_ged125_DialogueID_num, tvb, *offset, 4, ENC_BIG_ENDIAN, &DialogueID);
741
0
  *offset += 4;
742
743
0
  col_add_fstr(pinfo->cinfo, COL_INFO, "Service_Control->%s DIALOGUE_ID=%u LEN=%u",
744
0
      val_to_str(pinfo->pool, mess_type, vals_service_control_message_subvalues, "Unknown %d"), DialogueID, size);
745
746
0
  ti = proto_tree_add_item_ret_uint(service_tree, hf_ged125_SendSeqNo_num, tvb, *offset, 4, ENC_BIG_ENDIAN, &SendSeqNo);
747
0
  *offset += 4;
748
749
0
  if ((DialogueID != SendSeqNo) &&
750
0
    ((DialogueID == 0xFFFFFFFF) || (SendSeqNo == 0xFFFFFFFF)))
751
0
    expert_add_info(pinfo, ti, &ei_ged125_sendseqno_and_dialogueid);
752
753
0
  ti = proto_tree_add_uint(service_tree, hf_ged125_service_control_value,
754
0
                tvb, *offset-12, 4, mess_type);
755
0
  data_tree = proto_item_add_subtree(ti, ett_ged125_service_control_data);
756
757
0
  switch (mess_type)
758
0
  {
759
0
  case GED125_INIT_SERVICE_CTRL_REQ_VALUE:
760
0
  case GED125_INIT_SERVICE_CTRL_CONF_VALUE:
761
0
  case GED125_INIT_SERVICE_CTRL_END_VALUE:
762
0
    proto_tree_add_item(data_tree, hf_ged125_InvokeID, tvb, *offset, 4, ENC_BIG_ENDIAN);
763
0
    *offset += 4;
764
0
    break;
765
766
0
  case GED125_INIT_SERVICE_CTRL_DATA_VALUE:
767
0
    proto_tree_add_item(data_tree, hf_ged125_InvokeID, tvb, *offset, 4, ENC_BIG_ENDIAN);
768
0
    *offset += 4;
769
0
    proto_tree_add_item(data_tree, hf_ged125_ServiceFeatures, tvb, *offset, 4, ENC_BIG_ENDIAN);
770
0
    *offset += 4;
771
0
    break;
772
773
0
  case GED125_NEW_CALL_VALUE:
774
0
  case GED125_REQUEST_INSTRUCTION_VALUE:
775
0
    proto_tree_add_item(data_tree, hf_ged125_TrunkGroupID, tvb, *offset, 4, ENC_BIG_ENDIAN);
776
0
    *offset += 4;
777
0
    proto_tree_add_item(data_tree, hf_ged125_TrunkNumber, tvb, *offset, 4, ENC_BIG_ENDIAN);
778
0
    *offset += 4;
779
0
    proto_tree_add_item(data_tree, hf_ged125_ServiceID, tvb, *offset, 4, ENC_BIG_ENDIAN);
780
0
    *offset += 4;
781
0
    floating_fields(tvb, pinfo, ged125_tree, *offset, size);
782
0
    break;
783
784
0
  case GED125_RUN_SCRIPT_REQ_VALUE:
785
0
    proto_tree_add_item(data_tree, hf_ged125_InvokeID, tvb, *offset, 4, ENC_BIG_ENDIAN);
786
0
    *offset += 4;
787
0
    floating_fields(tvb, pinfo, ged125_tree, *offset, size);
788
0
    break;
789
790
0
  case GED125_RUN_SCRIPT_RESULT_VALUE:
791
0
    proto_tree_add_item(data_tree, hf_ged125_InvokeID, tvb, *offset, 4, ENC_BIG_ENDIAN);
792
0
    *offset += 4;
793
0
    proto_tree_add_item(data_tree, hf_ged125_ResultCode, tvb, *offset, 4, ENC_BIG_ENDIAN);
794
0
    *offset += 4;
795
0
    floating_fields(tvb, pinfo, ged125_tree, *offset, size);
796
0
    break;
797
798
0
  case GED125_CONNECT_VALUE:
799
0
    proto_tree_add_item(data_tree, hf_ged125_LabelType, tvb, *offset, 4, ENC_BIG_ENDIAN);
800
0
    *offset += 4;
801
0
    floating_fields(tvb, pinfo, ged125_tree, *offset, size);
802
0
    break;
803
804
0
  case GED125_EVENT_REPORT_VALUE:
805
0
    proto_tree_add_item(data_tree, hf_ged125_EventID, tvb, *offset, 4, ENC_BIG_ENDIAN);
806
0
    *offset += 4;
807
0
    floating_fields(tvb, pinfo, ged125_tree, *offset, size);
808
0
    break;
809
810
0
  case GED125_DIALOGUE_FAILURE_CONF_VALUE:
811
0
    proto_tree_add_item(data_tree, hf_ged125_InvokeID, tvb, *offset, 4, ENC_BIG_ENDIAN);
812
0
    *offset += 4;
813
0
    proto_tree_add_item(data_tree, hf_ged125_ErrorCode, tvb, *offset, 4, ENC_BIG_ENDIAN);
814
0
    *offset += 4;
815
0
    break;
816
817
0
  case GED125_DIALOGUE_FAILURE_EVENT_VALUE:
818
0
    proto_tree_add_item(data_tree, hf_ged125_ErrorCode, tvb, *offset, 4, ENC_BIG_ENDIAN);
819
0
    *offset += 4;
820
0
    break;
821
822
0
  case GED125_INIT_SERVICE_CTRL_TRKGRP_VALUE:
823
0
    proto_tree_add_item(data_tree, hf_ged125_InvokeID, tvb, *offset, 4, ENC_BIG_ENDIAN);
824
0
    *offset += 4;
825
0
    proto_tree_add_item(data_tree, hf_ged125_TrunkGroupID, tvb, *offset, 4, ENC_BIG_ENDIAN);
826
0
    *offset += 4;
827
0
    proto_tree_add_item(data_tree, hf_ged125_TrunkCount, tvb, *offset, 4, ENC_BIG_ENDIAN);
828
0
    *offset += 4;
829
0
    trunk_funk(tvb, data_tree, offset, size);
830
0
    break;
831
832
0
  case GED125_INIT_SERVICE_CTRL_SERVICE_VALUE:
833
0
    proto_tree_add_item(data_tree, hf_ged125_InvokeID, tvb, *offset, 4, ENC_BIG_ENDIAN);
834
0
    *offset += 4;
835
0
    proto_tree_add_item(data_tree, hf_ged125_ServiceID, tvb, *offset, 4, ENC_BIG_ENDIAN);
836
0
    *offset += 4;
837
0
    proto_tree_add_item(data_tree, hf_ged125_AvailableNow, tvb, *offset, 4, ENC_BIG_ENDIAN);
838
0
    *offset += 4;
839
0
    proto_tree_add_item(data_tree, hf_ged125_CallsInNow, tvb, *offset, 4, ENC_BIG_ENDIAN);
840
0
    *offset += 4;
841
0
    proto_tree_add_item(data_tree, hf_ged125_CallsOutNow, tvb, *offset, 4, ENC_BIG_ENDIAN);
842
0
    *offset += 4;
843
0
    break;
844
845
0
  case GED125_INIT_SERVICE_CTRL_VRU_VALUE:
846
0
    proto_tree_add_item(data_tree, hf_ged125_InvokeID, tvb, *offset, 4, ENC_BIG_ENDIAN);
847
0
    *offset += 4;
848
0
    proto_tree_add_item(data_tree, hf_ged125_CurrentTime_num, tvb, *offset, 4, ENC_BIG_ENDIAN);
849
0
    *offset += 4;
850
0
    proto_tree_add_item(data_tree, hf_ged125_TimeZoneDelta, tvb, *offset, 4, ENC_BIG_ENDIAN);
851
0
    *offset += 4;
852
0
    OperationalStatus_funk(tvb, pinfo, data_tree, offset);
853
0
    StatusVariable_funk(tvb, data_tree, offset, size);
854
0
    break;
855
856
0
  case GED125_TRKGRP_STATUS_VALUE:
857
0
    proto_tree_add_item(data_tree, hf_ged125_TrunkGroupID, tvb, *offset, 4, ENC_BIG_ENDIAN);
858
0
    *offset += 4;
859
0
    proto_tree_add_item(data_tree, hf_ged125_TrunkCount, tvb, *offset, 4, ENC_BIG_ENDIAN);
860
0
    *offset += 4;
861
0
    trunk_funk(tvb, data_tree, offset, size);
862
0
    break;
863
864
0
  case GED125_SERVICE_STATUS_VALUE:
865
0
    proto_tree_add_item(data_tree, hf_ged125_ServiceID, tvb, *offset, 4, ENC_BIG_ENDIAN);
866
0
    *offset += 4;
867
0
    proto_tree_add_item(data_tree, hf_ged125_ServiceAvailable, tvb, *offset, 4, ENC_BIG_ENDIAN);
868
0
    *offset += 4;
869
0
    break;
870
871
0
  case GED125_VRU_STATUS_VALUE:
872
0
    proto_tree_add_item(data_tree, hf_ged125_CurrentTime_num, tvb, *offset, 4, ENC_BIG_ENDIAN);
873
0
    *offset += 4;
874
0
    proto_tree_add_item(data_tree, hf_ged125_TimeZoneDelta, tvb, *offset, 4, ENC_BIG_ENDIAN);
875
0
    *offset += 4;
876
0
    OperationalStatus_funk(tvb, pinfo, data_tree, offset);
877
0
    StatusVariable_funk(tvb, data_tree, offset, size);
878
0
    break;
879
880
0
  case GED125_CANCEL_VALUE:
881
0
    proto_tree_add_item(data_tree, hf_ged125_InvokeID, tvb, *offset, 4, ENC_BIG_ENDIAN);
882
0
    *offset += 4;
883
0
    proto_tree_add_item(data_tree, hf_ged125_RequestID, tvb, *offset, 4, ENC_BIG_ENDIAN);
884
0
    *offset += 4;
885
0
    break;
886
887
0
  case GED125_RELEASE_VALUE:
888
0
    proto_tree_add_item(data_tree, hf_ged125_Cause_just_for_release_message, tvb, *offset, 4, ENC_BIG_ENDIAN);
889
0
    *offset += 4;
890
0
    break;
891
892
0
  case GED125_NEW_DIALOGUE_VALUE:
893
0
    proto_tree_add_item(data_tree, hf_ged125_CallID, tvb, *offset, 4, ENC_BIG_ENDIAN);
894
0
    *offset += 4;
895
0
    proto_tree_add_item(data_tree, hf_ged125_ServiceID, tvb, *offset, 4, ENC_BIG_ENDIAN);
896
0
    *offset += 4;
897
0
    floating_fields(tvb, pinfo, ged125_tree, *offset, size);
898
0
    break;
899
900
0
  case GED125_CONNECT_TO_RESOURCE_VALUE:
901
0
  case GED125_MICROAPP_CONTEXT_VALUE:
902
0
  case GED125_TEMPORARY_CONNECT_VALUE:
903
0
    floating_fields(tvb, pinfo, ged125_tree, *offset, size);
904
0
    break;
905
906
0
  case GED125_RESOURCE_CONNECTED_VALUE:
907
    /*nothing goes here*/
908
0
    break;
909
910
0
  case GED125_MICROAPP_PLAY_VALUE:
911
0
    proto_tree_add_item(data_tree, hf_ged125_InvokeID, tvb, *offset, 4, ENC_BIG_ENDIAN);
912
0
    *offset += 4;
913
0
    proto_tree_add_item(data_tree, hf_ged125_ToBeContinued, tvb, *offset, 4, ENC_BIG_ENDIAN);
914
0
    *offset += 4;
915
0
    proto_tree_add_item(data_tree, hf_ged125_Barge_In_Allowed, tvb, *offset, 4, ENC_BIG_ENDIAN);
916
0
    *offset += 4;
917
0
    floating_fields(tvb, pinfo, ged125_tree, *offset, size);
918
0
    break;
919
920
0
  case GED125_MICROAPP_PLAY_CONTINUE_VALUE:
921
0
    proto_tree_add_item(data_tree, hf_ged125_InvokeID, tvb, *offset, 4, ENC_BIG_ENDIAN);
922
0
    *offset += 4;
923
0
    proto_tree_add_item(data_tree, hf_ged125_ToBeContinued, tvb, *offset, 4, ENC_BIG_ENDIAN);
924
0
    *offset += 4;
925
0
    floating_fields(tvb, pinfo, ged125_tree, *offset, size);
926
0
    break;
927
928
0
  case GED125_MICROAPP_COLLECT_DATA_VALUE:
929
0
    proto_tree_add_item(data_tree, hf_ged125_InvokeID, tvb, *offset, 4, ENC_BIG_ENDIAN);
930
0
    *offset += 4;
931
0
    proto_tree_add_item(data_tree, hf_ged125_DTMF_Termination_Key, tvb, *offset, 4, ENC_BIG_ENDIAN);
932
0
    *offset += 4;
933
0
    proto_tree_add_item(data_tree, hf_ged125_No_Entry_Timeout, tvb, *offset, 4, ENC_BIG_ENDIAN);
934
0
    *offset += 4;
935
0
    proto_tree_add_item(data_tree, hf_ged125_Interdigit_Timeout, tvb, *offset, 4, ENC_BIG_ENDIAN);
936
0
    *offset += 4;
937
0
    proto_tree_add_item(data_tree, hf_ged125_Number_of_No_Entry_Tries, tvb, *offset, 4, ENC_BIG_ENDIAN);
938
0
    *offset += 4;
939
0
    proto_tree_add_item(data_tree, hf_ged125_Number_of_Invalid_Entry_Tries, tvb, *offset, 4, ENC_BIG_ENDIAN);
940
0
    *offset += 4;
941
0
    proto_tree_add_item(data_tree, hf_ged125_Min_Length, tvb, *offset, 4, ENC_BIG_ENDIAN);
942
0
    *offset += 4;
943
0
    proto_tree_add_item(data_tree, hf_ged125_Max_Length, tvb, *offset, 4, ENC_BIG_ENDIAN);
944
0
    *offset += 4;
945
0
    proto_tree_add_item(data_tree, hf_ged125_Barge_In_Allowed, tvb, *offset, 4, ENC_BIG_ENDIAN);
946
0
    *offset += 4;
947
0
    proto_tree_add_item(data_tree, hf_ged125_ASR_Allowed, tvb, *offset, 4, ENC_BIG_ENDIAN);
948
0
    *offset += 4;
949
0
    floating_fields(tvb, pinfo, ged125_tree, *offset, size);
950
0
    break;
951
952
0
  case GED125_MICROAPP_MENU_VALUE:
953
0
    proto_tree_add_item(data_tree, hf_ged125_InvokeID, tvb, *offset, 4, ENC_BIG_ENDIAN);
954
0
    *offset += 4;
955
0
    proto_tree_add_item(data_tree, hf_ged125_No_Entry_Timeout, tvb, *offset, 4, ENC_BIG_ENDIAN);
956
0
    *offset += 4;
957
0
    proto_tree_add_item(data_tree, hf_ged125_Number_of_No_Entry_Tries, tvb, *offset, 4, ENC_BIG_ENDIAN);
958
0
    *offset += 4;
959
0
    proto_tree_add_item(data_tree, hf_ged125_Number_of_Invalid_Entry_Tries, tvb, *offset, 4, ENC_BIG_ENDIAN);
960
0
    *offset += 4;
961
0
    proto_tree_add_item(data_tree, hf_ged125_DTMF_Menu_Keys, tvb, *offset, 4, ENC_BIG_ENDIAN);
962
0
    *offset += 4;
963
0
    proto_tree_add_item(data_tree, hf_ged125_Barge_In_Allowed, tvb, *offset, 4, ENC_BIG_ENDIAN);
964
0
    *offset += 4;
965
0
    proto_tree_add_item(data_tree, hf_ged125_ASR_Allowed, tvb, *offset, 4, ENC_BIG_ENDIAN);
966
0
    *offset += 4;
967
0
    floating_fields(tvb, pinfo, ged125_tree, *offset, size);
968
0
    break;
969
970
0
  case GED125_MICROAPP_RESULT_VALUE:
971
0
    proto_tree_add_item(data_tree, hf_ged125_InvokeID, tvb, *offset, 4, ENC_BIG_ENDIAN);
972
0
    *offset += 4;
973
0
    proto_tree_add_item(data_tree, hf_ged125_Microapp_Error_Code, tvb, *offset, 4, ENC_BIG_ENDIAN);
974
0
    *offset += 4;
975
0
    floating_fields(tvb, pinfo, ged125_tree, *offset, size);
976
0
    break;
977
978
0
  default:
979
0
    expert_add_info(pinfo, ti, &ei_ged125_service_control_value_unknown);
980
0
  }
981
0
}
982
983
static unsigned
984
get_ged125_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb,
985
                   int offset, void *data _U_)
986
0
{
987
0
  uint32_t len = tvb_get_ntohl(tvb, offset);
988
  /* Do not wrap around */
989
0
  if (len > UINT32_MAX - 8)
990
0
    return UINT32_MAX;
991
0
  return len + 8;
992
0
}
993
994
static int
995
dissect_ged125_base_messages(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree, void* data _U_)
996
0
{
997
0
  int size = tvb_reported_length(tvb);
998
0
  proto_item *ti, *message_item;
999
0
  proto_tree *ged125_tree, *ged125_header_tree, *ged125_message_tree;
1000
0
  int offset = 8; /*get to the fixed message, just outside of header*/
1001
0
  uint32_t value,
1002
0
      message_type = tvb_get_ntohl(tvb, 4);
1003
1004
0
  col_set_str(pinfo->cinfo, COL_PROTOCOL, "GED125");
1005
0
  col_add_fstr(pinfo->cinfo, COL_INFO, "%s %u bytes",
1006
0
      val_to_str(pinfo->pool, message_type, base_message_values, "Unknown %d"), size);
1007
1008
0
  ti = proto_tree_add_item(tree, proto_ged125, tvb, 0, -1, ENC_NA);
1009
0
  ged125_tree = proto_item_add_subtree( ti, ett_ged125);
1010
1011
  /* Message header */
1012
0
  ged125_header_tree = proto_tree_add_subtree(ged125_tree, tvb, 0, 8, ett_ged125_header, NULL, "GED125 Header");
1013
1014
0
  proto_tree_add_item(ged125_header_tree, hf_ged125_length, tvb, 0, 4, ENC_BIG_ENDIAN);
1015
0
  proto_tree_add_item(ged125_header_tree, hf_ged125_value, tvb, 4, 4, ENC_BIG_ENDIAN);
1016
1017
0
  ged125_message_tree = proto_tree_add_subtree(ged125_tree, tvb, offset, -1, ett_ged125_message, &message_item, "GED125 Message");
1018
1019
0
  switch (message_type)
1020
0
  {
1021
0
  case GED125_FAILURE_CONF_VALUE:
1022
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_InvokeID, tvb, offset, 4, ENC_BIG_ENDIAN);
1023
0
    offset += 4;
1024
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_Status, tvb, offset, 4, ENC_BIG_ENDIAN);
1025
0
    offset += 4;
1026
0
    break;
1027
1028
0
  case GED125_FAILURE_EVENT_VALUE:
1029
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_Status, tvb, offset, 4, ENC_BIG_ENDIAN);
1030
0
    offset += 4;
1031
0
    break;
1032
1033
0
  case GED125_OPEN_REQ_VALUE:
1034
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_InvokeID, tvb, offset, 4, ENC_BIG_ENDIAN);
1035
0
    offset += 4;
1036
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_VersionNumber, tvb, offset, 4, ENC_BIG_ENDIAN);
1037
0
    offset += 4;
1038
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_IdleTimeout, tvb, offset, 4, ENC_BIG_ENDIAN);
1039
0
    offset += 4;
1040
0
    break;
1041
1042
0
  case GED125_OPEN_CONF_VALUE:
1043
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_InvokeID, tvb, offset, 4, ENC_BIG_ENDIAN);
1044
0
    offset += 4;
1045
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_UseEventFeed, tvb, offset, 4, ENC_BIG_ENDIAN);
1046
0
    offset += 4;
1047
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_UsePolledFeed, tvb, offset, 4, ENC_BIG_ENDIAN);
1048
0
    offset += 4;
1049
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_UseCallRouting, tvb, offset, 4, ENC_BIG_ENDIAN);
1050
0
    offset += 4;
1051
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_UseTimeSynch, tvb, offset, 4, ENC_BIG_ENDIAN);
1052
0
    offset += 4;
1053
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_UseServiceControl, tvb, offset, 4, ENC_BIG_ENDIAN);
1054
0
    offset += 4;
1055
0
    break;
1056
1057
0
  case GED125_HEARTBEAT_REQ_VALUE:
1058
0
  case GED125_HEARTBEAT_CONF_VALUE:
1059
0
  case GED125_CLOSE_CONF_VALUE:
1060
0
  case GED125_INIT_DATA_REQ_VALUE:
1061
0
  case GED125_INIT_DATA_CONF_VALUE:
1062
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_InvokeID, tvb, offset, 4, ENC_BIG_ENDIAN);
1063
0
    offset += 4;
1064
0
    break;
1065
1066
0
  case GED125_CLOSE_REQ_VALUE:
1067
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_InvokeID, tvb, offset, 4, ENC_BIG_ENDIAN);
1068
0
    offset += 4;
1069
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_Status, tvb, offset, 4, ENC_BIG_ENDIAN);
1070
0
    offset += 4;
1071
0
    floating_fields(tvb, pinfo, ged125_tree, offset, size);
1072
0
    break;
1073
1074
0
  case GED125_INIT_TRKGRP_DATA_EVENT_VALUE:
1075
0
    value = tvb_get_ntohl(tvb, offset);
1076
0
    ti = proto_tree_add_item(ged125_message_tree, hf_ged125_InvokeID, tvb, offset, 4, ENC_BIG_ENDIAN);
1077
0
    offset += 4;
1078
0
    if (value > 65535)
1079
0
      expert_add_info(pinfo, ti, &ei_ged125_trunk_group_id);
1080
1081
0
    value = tvb_get_ntohl(tvb, offset);
1082
0
    ti = proto_tree_add_item(ged125_message_tree, hf_ged125_TrunkCount, tvb, offset, 4, ENC_BIG_ENDIAN);
1083
0
    offset += 4;
1084
0
    if (value > 1023)
1085
0
      expert_add_info(pinfo, ti, &ei_ged125_TrunkCount_invalid);
1086
1087
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_CallsInToday, tvb, offset, 4, ENC_BIG_ENDIAN);
1088
0
    offset += 4;
1089
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_CallsOutToday, tvb, offset, 4, ENC_BIG_ENDIAN);
1090
0
    offset += 4;
1091
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_InServiceTimeToday, tvb, offset, 4, ENC_BIG_ENDIAN);
1092
0
    offset += 4;
1093
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_InUseInboundTimeToday, tvb, offset, 4, ENC_BIG_ENDIAN);
1094
0
    offset += 4;
1095
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_InUseOutboundTimeToday, tvb, offset, 4, ENC_BIG_ENDIAN);
1096
0
    offset += 4;
1097
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_AllTrunksInUseTimeToday, tvb, offset, 4, ENC_BIG_ENDIAN);
1098
0
    offset += 4;
1099
1100
0
    trunk_funk(tvb, ged125_message_tree, &offset, size);
1101
0
    break;
1102
1103
0
  case GED125_INIT_SERVICE_DATA_EVENT_VALUE:
1104
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_InvokeID, tvb, offset, 4, ENC_BIG_ENDIAN);
1105
0
    offset += 4;
1106
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_ServiceID, tvb, offset, 4, ENC_BIG_ENDIAN);
1107
0
    offset += 4;
1108
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_AvailableNow, tvb, offset, 4, ENC_BIG_ENDIAN);
1109
0
    offset += 4;
1110
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_CallsInNow, tvb, offset, 4, ENC_BIG_ENDIAN);
1111
0
    offset += 4;
1112
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_CallsOutNow, tvb, offset, 4, ENC_BIG_ENDIAN);
1113
0
    offset += 4;
1114
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_CallsInToday, tvb, offset, 4, ENC_BIG_ENDIAN);
1115
0
    offset += 4;
1116
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_CallsOutToday, tvb, offset, 4, ENC_BIG_ENDIAN);
1117
0
    offset += 4;
1118
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_CallsHandledToday, tvb, offset, 4, ENC_BIG_ENDIAN);
1119
0
    offset += 4;
1120
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_HandleTimeToday, tvb, offset, 4, ENC_BIG_ENDIAN);
1121
0
    offset += 4;
1122
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_DivertedInToday, tvb, offset, 4, ENC_BIG_ENDIAN);
1123
0
    offset += 4;
1124
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_DivertedOutToday, tvb, offset, 4, ENC_BIG_ENDIAN);
1125
0
    offset += 4;
1126
0
    break;
1127
1128
0
  case GED125_INIT_VRU_DATA_EVENT_VALUE:
1129
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_InvokeID, tvb, offset, 4, ENC_BIG_ENDIAN);
1130
0
    offset += 4;
1131
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_TimeZoneDelta, tvb, offset, 4, ENC_BIG_ENDIAN);
1132
0
    offset += 4;
1133
1134
0
    OperationalStatus_funk(tvb, pinfo, ged125_message_tree, &offset);
1135
0
    StatusVariable_funk(tvb, ged125_message_tree, &offset, size);
1136
0
    break;
1137
1138
0
  case GED125_INIT_DATA_END_EVENT_VALUE:
1139
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_InvokeID, tvb, offset, 4, ENC_BIG_ENDIAN);
1140
0
    offset += 4;
1141
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_InitDataTime, tvb, offset, 4, ENC_BIG_ENDIAN);
1142
0
    offset += 4;
1143
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_StartOfDay, tvb, offset, 4, ENC_BIG_ENDIAN);
1144
0
    offset += 4;
1145
0
    break;
1146
1147
0
  case GED125_DELIVERED_EVENT_VALUE:
1148
0
  case GED125_ORIGINATED_EVENT_VALUE:
1149
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_CallID, tvb, offset, 4, ENC_BIG_ENDIAN);
1150
0
    offset += 4;
1151
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_TrunkGroupID, tvb, offset, 4, ENC_BIG_ENDIAN);
1152
0
    offset += 4;
1153
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_TrunkNumber, tvb, offset, 4, ENC_BIG_ENDIAN);
1154
0
    offset += 4;
1155
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_ServiceID, tvb, offset, 4, ENC_BIG_ENDIAN);
1156
0
    offset += 4;
1157
0
    floating_fields(tvb, pinfo, ged125_tree, offset, size);
1158
0
    break;
1159
1160
0
  case GED125_CALL_CLEARED_EVENT_VALUE:
1161
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_CallID, tvb, offset, 4, ENC_BIG_ENDIAN);
1162
0
    offset += 4;
1163
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_floating_CauseCode, tvb, offset, 4, ENC_BIG_ENDIAN);
1164
0
    offset += 4;
1165
0
    floating_fields(tvb, pinfo, ged125_tree, offset, size);
1166
0
    break;
1167
1168
0
  case GED125_CONFERENCED_EVENT_VALUE:
1169
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_ConferenceCallID, tvb, offset, 4, ENC_BIG_ENDIAN);
1170
0
    offset += 4;
1171
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_PrimaryCallID, tvb, offset, 4, ENC_BIG_ENDIAN);
1172
0
    offset += 4;
1173
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_SecondaryCallID, tvb, offset, 4, ENC_BIG_ENDIAN);
1174
0
    offset += 4;
1175
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_ServiceID, tvb, offset, 4, ENC_BIG_ENDIAN);
1176
0
    offset += 4;
1177
0
    break;
1178
1179
0
  case GED125_DIVERTED_EVENT_VALUE:
1180
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_CallID, tvb, offset, 4, ENC_BIG_ENDIAN);
1181
0
    offset += 4;
1182
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_NewServiceID, tvb, offset, 4, ENC_BIG_ENDIAN);
1183
0
    offset += 4;
1184
0
    break;
1185
1186
0
  case GED125_NEW_TRANSACTION_EVENT_VALUE:
1187
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_CallID, tvb, offset, 4, ENC_BIG_ENDIAN);
1188
0
    offset += 4;
1189
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_NewCallID, tvb, offset, 4, ENC_BIG_ENDIAN);
1190
0
    offset += 4;
1191
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_ServiceID, tvb, offset, 4, ENC_BIG_ENDIAN);
1192
0
    offset += 4;
1193
0
    break;
1194
1195
0
  case GED125_SET_CALL_VARIABLES_EVENT_VALUE:
1196
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_CallID, tvb, offset, 4, ENC_BIG_ENDIAN);
1197
0
    offset += 4;
1198
0
    floating_fields(tvb, pinfo, ged125_tree, offset, size);
1199
0
    break;
1200
1201
0
  case GED125_VRU_STATUS_EVENT_VALUE:
1202
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_CurrentTime_num, tvb, offset, 4, ENC_BIG_ENDIAN);
1203
0
    offset += 4;
1204
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_TimeZoneDelta, tvb, offset, 4, ENC_BIG_ENDIAN);
1205
0
    offset += 4;
1206
0
    OperationalStatus_funk(tvb, pinfo, ged125_message_tree, &offset);
1207
0
    StatusVariable_funk(tvb, ged125_message_tree, &offset, size);
1208
0
    break;
1209
1210
0
  case GED125_TRKGRP_STATUS_EVENT_VALUE:
1211
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_TrunkGroupID, tvb, offset, 4, ENC_BIG_ENDIAN);
1212
0
    offset += 4;
1213
1214
0
    value = tvb_get_ntohl(tvb, offset);
1215
0
    ti = proto_tree_add_item(ged125_message_tree, hf_ged125_TrunkCount, tvb, offset, 4, ENC_BIG_ENDIAN);
1216
0
    offset += 4;
1217
0
    if (value > 1023)
1218
0
      expert_add_info(pinfo, ti, &ei_ged125_TrunkCount_invalid);
1219
1220
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_InService, tvb, offset, 4, ENC_BIG_ENDIAN);
1221
0
    offset += 4;
1222
0
    trunk_funk_without_status(tvb, ged125_message_tree, &offset, size);
1223
0
    break;
1224
1225
0
  case GED125_SERVICE_STATUS_EVENT_VALUE:
1226
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_ServiceID, tvb, offset, 4, ENC_BIG_ENDIAN);
1227
0
    offset += 4;
1228
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_ServiceAvailable, tvb, offset, 4, ENC_BIG_ENDIAN);
1229
0
    offset += 4;
1230
0
    break;
1231
1232
0
  case GED125_ROUTE_REQUEST_EVENT_VALUE:
1233
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_CrossRefID, tvb, offset, 4, ENC_BIG_ENDIAN);
1234
0
    offset += 4;
1235
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_CallID, tvb, offset, 4, ENC_BIG_ENDIAN);
1236
0
    offset += 4;
1237
0
    floating_fields(tvb, pinfo, ged125_tree, offset, size);
1238
0
    return tvb_captured_length(tvb);
1239
1240
0
  case GED125_ROUTE_SELECT_VALUE:
1241
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_CrossRefID, tvb, offset, 4, ENC_BIG_ENDIAN);
1242
0
    offset += 4;
1243
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_LabelType, tvb, offset, 4, ENC_BIG_ENDIAN);
1244
0
    offset += 4;
1245
0
    floating_fields(tvb, pinfo, ged125_tree, offset, size);
1246
0
    break;
1247
1248
0
  case GED125_ROUTE_END_EVENT_VALUE:
1249
0
  case GED125_ROUTE_END_VALUE:
1250
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_CrossRefID, tvb, offset, 4, ENC_BIG_ENDIAN);
1251
0
    offset += 4;
1252
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_Status, tvb, offset, 4, ENC_BIG_ENDIAN);
1253
0
    offset += 4;
1254
0
    break;
1255
1256
0
  case GED125_TIME_SYNCH_REQ_VALUE:
1257
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_InvokeID, tvb, offset, 4, ENC_BIG_ENDIAN);
1258
0
    offset += 4;
1259
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_VRUTimeLag, tvb, offset, 4, ENC_BIG_ENDIAN);
1260
0
    offset += 4;
1261
0
    break;
1262
1263
0
  case GED125_TIME_SYNCH_CONF_VALUE:
1264
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_InvokeID, tvb, offset, 4, ENC_BIG_ENDIAN);
1265
0
    offset += 4;
1266
0
    break;
1267
1268
0
  case GED125_SERVICE_CONTROL_VALUE:
1269
0
    service_control_dissect(tvb, ged125_message_tree, ged125_tree, pinfo, &offset, size);
1270
0
    break;
1271
1272
0
  case GED125_SIMULATOR_RESET_EVENT_VALUE:
1273
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_simulator_reset_event, tvb, offset, 4, ENC_BIG_ENDIAN);
1274
0
    break;
1275
1276
0
  case GED125_REGISTER_VARIABLES_VALUE:
1277
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_CallVarsMask, tvb, offset, 2, ENC_BIG_ENDIAN);
1278
0
    offset += 2;
1279
0
    floating_fields(tvb, pinfo, ged125_tree, offset, size);
1280
0
    break;
1281
0
  }
1282
1283
0
  proto_item_set_len(message_item, offset-8);
1284
0
  return tvb_captured_length(tvb);
1285
0
}
1286
1287
static int
1288
dissect_ged125(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
1289
0
{
1290
0
  int size;
1291
0
  uint32_t message_type;
1292
1293
0
  size = tvb_captured_length(tvb);
1294
1295
0
  if (size < 12)
1296
0
    return 0;
1297
1298
0
  message_type = tvb_get_ntohl(tvb, 4);
1299
1300
  /*checks to make sure it's of a ged125 base message type*/
1301
0
  if (try_val_to_str(message_type, base_message_values) == NULL)
1302
0
    return 0;   /* not a known command */
1303
1304
0
  tcp_dissect_pdus(tvb, pinfo, tree, ged125_desegment_body, 4,
1305
0
             get_ged125_pdu_len, dissect_ged125_base_messages, data);
1306
1307
0
  return size;
1308
0
}
1309
1310
void
1311
proto_register_ged125 (void)
1312
16
{
1313
16
  module_t* ged125_module;
1314
1315
16
  static hf_register_info hf[] = {
1316
16
    { &hf_ged125_length,
1317
16
      { "Package Length", "ged125.len",
1318
16
      FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
1319
1320
16
    { &hf_ged125_value,
1321
16
      { "Message value", "ged125.value",
1322
16
      FT_UINT32, BASE_DEC, VALS(base_message_values), 0x0, NULL, HFILL }},
1323
1324
16
    { &hf_ged125_service_control_value,
1325
16
      { "Sub-Service Control Message value", "ged125.service_control",
1326
16
      FT_UINT32,  BASE_DEC, VALS(vals_service_control_message_subvalues),
1327
16
      0x0, NULL, HFILL }},
1328
1329
16
    { &hf_ged125_DialogueID_num,
1330
16
      { "Dialogue Id", "ged125.dialogue_id",
1331
16
      FT_UINT32,  BASE_DEC, NULL, 0x0, NULL, HFILL }},
1332
1333
16
    { &hf_ged125_SendSeqNo_num,
1334
16
      { "SendSeqNo", "ged125.send_seq_no",
1335
16
      FT_UINT32, BASE_DEC, NULL, 0x0,
1336
16
      "Send sequence for the sent message", HFILL }},
1337
1338
16
    { &hf_ged125_CurrentTime_num,
1339
16
      { "Current Time", "ged125.current_time",
1340
16
      FT_UINT32, BASE_DEC, NULL, 0x0,
1341
16
      "The current UTC time (VRU clock)", HFILL }},
1342
1343
16
    { &hf_ged125_TimeZoneDelta,
1344
16
      { "Time Zone Delta", "ged125.time_zone_delta",
1345
16
      FT_INT32, BASE_DEC,NULL, 0x0,
1346
16
      "The current local time zone delta, expressed in seconds."
1347
16
      "This value is added to a UTC time to form a time in the local time zone",
1348
16
      HFILL }},
1349
1350
16
    { &hf_ged125_OperationalStatus,
1351
16
      { "Operational Status", "ged125.operational_status",
1352
16
      FT_UINT32, BASE_DEC, NULL, 0x0,
1353
16
      "Operational Status of the VRU", HFILL }},
1354
1355
16
    { &hf_ged125_StatusVariable,
1356
16
      { "Status Variable", "ged125.status_variable",
1357
16
      FT_INT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
1358
1359
16
    { &hf_ged125_InvokeID,
1360
16
      { "Invoke ID", "ged125.invoke_id",
1361
16
      FT_UINT32, BASE_DEC, NULL, 0x0,
1362
16
      "Same as the corresponding req. mess", HFILL }},
1363
1364
16
    { &hf_ged125_Status,
1365
16
      { "Status", "ged125.status",
1366
16
      FT_UINT32, BASE_DEC, VALS(error_codes), 0x0,
1367
16
      "Status: Indicates cause of failure", HFILL }},
1368
1369
16
    { &hf_ged125_VersionNumber,
1370
16
      { "Version Number", "ged125.version_number",
1371
16
      FT_UINT32, BASE_DEC, NULL, 0x0,
1372
16
      "Interface number requested by the Peripheral Gateway,"
1373
16
      "defines the version of all messages in the message set", HFILL }},
1374
1375
16
    { &hf_ged125_IdleTimeout,
1376
16
      { "Idle Timeout (ms)", "ged125.idle_timeout",
1377
16
      FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
1378
1379
16
    { &hf_ged125_floating_CauseCode,
1380
16
      { "Cause code", "ged125.cause_code",
1381
16
      FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
1382
1383
16
    { &hf_ged125_UseEventFeed,
1384
16
      { "Use Event Feed", "ged125.use_event_feed",
1385
16
      FT_BOOLEAN, 32, NULL, 0x00000001,
1386
16
      "Indicates if the VRU supports the Event Data Feed", HFILL }},
1387
1388
    /* only valid for ICM version 4 or lower*/
1389
16
    { &hf_ged125_UsePolledFeed,
1390
16
      { "Use Polled Feed", "ged125.use_polled_feed",
1391
16
      FT_BOOLEAN, 32, NULL, 0x00000001,
1392
16
      "Indicates if the VRU supports the Polled Data Feed.", HFILL }},
1393
1394
16
    { &hf_ged125_UseCallRouting,
1395
16
      { "Use Call Routing", "ged125.use_call_routing",
1396
16
      FT_BOOLEAN, 32, NULL, 0x00000001,
1397
16
      "Indicates if the VRU supports the Call Routing Interface", HFILL }},
1398
1399
16
    { &hf_ged125_UseTimeSynch,
1400
16
      { "Use Time Synch", "ged125.use_time_synch",
1401
16
      FT_BOOLEAN, 32, NULL, 0x00000001,
1402
16
      "Indicates if the VRU supports the Time Synchronization Interface", HFILL }},
1403
1404
    /*Requires Protocol Version 2 or later*/
1405
16
    { &hf_ged125_UseServiceControl,
1406
16
      { "Use Service Control", "ged125.use_service_control",
1407
16
      FT_BOOLEAN, 32, NULL, 0x00000001,
1408
16
      "Indicates if the VRU supports the Service Control Interface", HFILL }},
1409
1410
16
    { &hf_ged125_TrunkGroupID,
1411
16
      { "Trunk Group ID", "ged125.trunk_group_id",
1412
16
      FT_UINT32, BASE_DEC, NULL, 0x0,
1413
16
      "An ID assigned by the VRU to this trunk group, in the range 0 to 65535", HFILL }},
1414
1415
16
    { &hf_ged125_TrunkCount,
1416
16
      { "Trunk Count", "ged125.trunk_count",
1417
16
      FT_UINT32, BASE_DEC, NULL, 0x0,
1418
16
      "The number of trunks configured in this message. TrunkCount may not exceed 1024", HFILL }},
1419
1420
16
    { &hf_ged125_CallsInToday,
1421
16
      { "Calls In Today", "ged125.calls_in_today",
1422
16
      FT_UINT32, BASE_DEC, NULL, 0x0,
1423
16
      "The cumulative number of inbound calls that have arrived on the trunk group this day", HFILL }},
1424
1425
16
    { &hf_ged125_CallsOutToday,
1426
16
      { "Calls Out Today", "ged125.call_out_today",
1427
16
      FT_UINT32, BASE_DEC, NULL, 0x0,
1428
16
      "The cumulative number of outbound calls that have been placed on the trunk group this day", HFILL }},
1429
1430
16
    { &hf_ged125_InServiceTimeToday,
1431
16
      { "In Service Time Today", "ged125.in_service_time_today",
1432
16
      FT_UINT32, BASE_DEC, NULL, 0x0,
1433
16
      "The cumulative amount of time (sec) that trunks in the trunk group "
1434
16
      "have been in service this day", HFILL }},
1435
1436
16
    { &hf_ged125_InUseInboundTimeToday,
1437
16
      { "In Use Inbound Time Today", "ged125.in_use_inbound_time_today",
1438
16
      FT_UINT32, BASE_DEC,NULL, 0x0,
1439
16
      "The cumulative amount of time (sec) that trunks in the trunk group "
1440
16
      "have been in use on incoming calls this day", HFILL }},
1441
1442
16
    { &hf_ged125_InUseOutboundTimeToday,
1443
16
      { "In Use Outbound Time Today", "ged125.in_use_outbound_time_today",
1444
16
      FT_UINT32, BASE_DEC, NULL, 0x0,
1445
16
      "The cumulative amount of time (sec) that trunks in the trunk group "
1446
16
      "have been in use on outgoing calls this day", HFILL }},
1447
1448
16
    { &hf_ged125_AllTrunksInUseTimeToday,
1449
16
      { "All Trunks In Use Time Today", "ged125.all_trunks_in_use_time_today",
1450
16
      FT_UINT32, BASE_DEC, NULL, 0x0,
1451
16
      "The cumulative amount of time (sec) that all trunks in the trunk group "
1452
16
      "were simultaneously busy this day", HFILL }},
1453
1454
16
    { &hf_ged125_TrunkNumber,
1455
16
      { "Trunk Number", "ged125.trunk_number",
1456
16
      FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
1457
1458
16
    { &hf_ged125_TrunkStatus,
1459
16
      { "Trunk Status", "ged125.trunk_status",
1460
16
      FT_UINT16, BASE_DEC, VALS(status_code_trunk_status), 0x0, NULL, HFILL }},
1461
1462
16
    { &hf_ged125_ServiceID,
1463
16
      { "Service ID", "ged125.service_id",
1464
16
      FT_UINT32, BASE_DEC, NULL, 0x0,
1465
16
      "An ID assigned by the VRU to this service", HFILL }},
1466
1467
16
    { &hf_ged125_AvailableNow,
1468
16
      { "Available Now", "ged125.available_now",
1469
16
      FT_BOOLEAN, 32, NULL, 0x00000001,
1470
16
      "Current availability of the service", HFILL }},
1471
1472
16
    { &hf_ged125_CallsInNow,
1473
16
      { "Call In Now", "ged125.call_in_now",
1474
16
      FT_UINT32, BASE_DEC, NULL, 0x0,
1475
16
      "The number of inbound calls currently in progress on the service.", HFILL }},
1476
1477
16
    { &hf_ged125_CallsOutNow,
1478
16
      { "Call Out Now", "ged125.call_out_now",
1479
16
      FT_UINT32, BASE_DEC, NULL, 0x0,
1480
16
      "The number of outbound calls currently in progress on the service", HFILL }},
1481
1482
16
    { &hf_ged125_CallsHandledToday,
1483
16
      { "Calls Handled Today", "ged125.call_handled_today",
1484
16
      FT_UINT32, BASE_DEC, NULL, 0x0,
1485
16
      "The cumulative number of calls handled on the service this day", HFILL }},
1486
1487
16
    { &hf_ged125_HandleTimeToday,
1488
16
      { "Handle Time Today", "ged125.handle_time_today",
1489
16
      FT_UINT32, BASE_DEC, NULL, 0x0,
1490
16
      "The cumulative amount of time (secs) spent handling calls on the service this day", HFILL }},
1491
1492
16
    { &hf_ged125_DivertedInToday,
1493
16
      { "Diverted In Today", "ged125.diverted_in_today",
1494
16
      FT_UINT32, BASE_DEC, NULL, 0x0,
1495
16
      "The cumulative number of calls diverted from another service to this service this day", HFILL }},
1496
1497
16
    { &hf_ged125_DivertedOutToday,
1498
16
      { "Diverted Out Today", "ged125.diverted_out_today",
1499
16
      FT_UINT32, BASE_DEC, NULL, 0x0,
1500
16
      "The cumulative number of calls diverted from this service to another service this day", HFILL }},
1501
1502
16
    { &hf_ged125_InitDataTime,
1503
16
      { "Init Data Time", "ged125.init_data_time",
1504
16
      FT_UINT32, BASE_DEC, NULL, 0x0,
1505
16
      "The UTC time at which the initial snapshot was taken", HFILL }},
1506
1507
16
    { &hf_ged125_StartOfDay,
1508
16
      { "Start Of Day", "ged125.start_of_day",
1509
16
      FT_UINT32, BASE_DEC, NULL, 0x0,
1510
16
      "Corresponds to midnight local time at the VRU (UTC). However, this may refer "
1511
16
      "to a different time if the VRU has restarted", HFILL }},
1512
1513
16
    { &hf_ged125_CallID,
1514
16
      { "Call ID", "ged125.call_id",
1515
16
      FT_UINT32, BASE_DEC, NULL, 0x0,
1516
16
      "An ID assigned to the call by the VRU", HFILL }},
1517
1518
16
    { &hf_ged125_floating,
1519
16
      { "Field", "ged125.floating_field",
1520
16
      FT_UINT32, BASE_DEC, VALS(vals_floating_point_types), 0x0,
1521
16
      "Shows the type of floating field", HFILL }},
1522
1523
16
    { &hf_ged125_ServiceFeatures,
1524
16
      { "Service Features", "ged125.service_features",
1525
16
      FT_UINT32, BASE_HEX, NULL, 0x0,
1526
16
      "A bit mask that is a logical OR of the Service Control features supported by the VRU", HFILL }},
1527
1528
16
    { &hf_ged125_floating_payload_strg,
1529
16
      { "Floating Payload", "ged125.floating_payload.strg",
1530
16
      FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
1531
1532
16
    { &hf_ged125_floating_payload_uint,
1533
16
      { "Floating Payload", "ged125.floating_payload.uint",
1534
16
      FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
1535
1536
16
    { &hf_ged125_floating_payload_bool,
1537
16
      { "Floating Payload", "ged125.floating_payload.bool",
1538
16
      FT_BOOLEAN, 32, NULL, 0x00000001, NULL, HFILL }},
1539
1540
16
    { &hf_ged125_floating_payload_ECC_tag,
1541
16
      { "ECC VAR Tag", "ged125.ecc_var_tag",
1542
16
      FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
1543
1544
16
    { &hf_ged125_ResultCode,
1545
16
      { "Errors running script", "ged125.result_code",
1546
16
      FT_BOOLEAN, 32, NULL, 0x00000001, NULL, HFILL }},
1547
1548
16
    { &hf_ged125_LabelType,
1549
16
      { "Label Type", "ged125.label_type",
1550
16
      FT_UINT32, BASE_DEC, VALS(status_code_Label_values),0x0,
1551
16
      "The type of the label returned in the following field", HFILL }},
1552
1553
16
    { &hf_ged125_EventID,
1554
16
      { "Event ID", "ged125.event_id",
1555
16
      FT_UINT32, BASE_DEC, VALS(status_code_event_reportcodes), 0x0,
1556
16
      "A code that identifies the event detected by the VRU", HFILL }},
1557
1558
16
    { &hf_ged125_ErrorCode,
1559
16
      { "Error Code", "ged125.error_code",
1560
16
      FT_UINT32, BASE_DEC, VALS(error_codes), 0x0,
1561
16
      "A status code indicating the cause of the failure", HFILL }},
1562
1563
16
    { &hf_ged125_Cause_just_for_release_message,
1564
16
      { "Cause of Release", "ged125.call_release",
1565
16
      FT_UINT32, BASE_DEC, VALS(Cause_just_for_release_message_vals), 0x0,
1566
16
      "The reason the call was released", HFILL }},
1567
1568
16
    { &hf_ged125_InService,
1569
16
      { "In Service", "ged125.in_service",
1570
16
      FT_BOOLEAN, 32, NULL, 0x00000001,
1571
16
      "A flag indicating that the affected trunks have been placed into "
1572
16
      "service (True) or removed from service (False)", HFILL }},
1573
1574
16
    { &hf_ged125_ServiceAvailable,
1575
16
      { "Service Available", "ged125.service_available",
1576
16
      FT_BOOLEAN, 32, NULL, 0x00000001,
1577
16
      NULL, HFILL }},
1578
1579
16
    { &hf_ged125_RequestID,
1580
16
      { "Request ID", "ged125.request_id",
1581
16
      FT_UINT32, BASE_DEC, NULL, 0x0,
1582
16
      "The InvokeID of the previously issued request to be cancelled", HFILL }},
1583
1584
16
    { &hf_ged125_ToBeContinued,
1585
16
      { "To Be Continued", "ged125.to_be_continued",
1586
16
      FT_BOOLEAN, 32, NULL, 0x00000001,
1587
16
      "A flag which indicates whether additional MICROAPP_PLAY_CONTINUE messages will follow",  HFILL }},
1588
1589
16
    { &hf_ged125_Barge_In_Allowed,
1590
16
      { "Barge In Allowed", "ged125.barge_in_allowed",
1591
16
      FT_BOOLEAN, 32, NULL, 0x00000001,
1592
16
      "Indicates whether caller is allowed to interrupt playing", HFILL }},
1593
1594
16
    { &hf_ged125_floating_cause_code,/* table 34*/
1595
16
      { "Call Cleared Code", "ged125.call_cleared_code",
1596
16
      FT_UINT32, BASE_DEC,VALS(vals_status_code_call_cleared), 0x0,
1597
16
      "Termination Call Details", HFILL }},
1598
1599
16
    { &hf_ged125_DTMF_Termination_Key,
1600
16
      { "DTMF Termination Key", "ged125.dtmf_termination_key",
1601
16
      FT_UINT32,BASE_DEC, NULL,0x0,
1602
16
      "Terminates a variable length string of DTMF digits "
1603
16
      "(typically # key). The value is a bit map", HFILL }},
1604
1605
16
    { &hf_ged125_No_Entry_Timeout,
1606
16
      { "No Entry Timeout", "ged125.no_entry_timeout",
1607
16
      FT_UINT32, BASE_DEC, NULL, 0x0,
1608
16
      "Determines how many seconds a caller is allowed to start entering data", HFILL }},
1609
1610
16
    { &hf_ged125_Interdigit_Timeout,
1611
16
      { "Interdigit Timeout", "ged125.interdigit_timeout",
1612
16
      FT_UINT32, BASE_DEC, NULL, 0x0,
1613
16
      "Determines how many seconds the caller is allowed between digits, "
1614
16
      "before the system assumes the caller is finished", HFILL }},
1615
1616
16
    { &hf_ged125_Number_of_No_Entry_Tries,
1617
16
      { "Number of No Entry Tries", "ged125.number_of_no_entry_tries",
1618
16
      FT_UINT32, BASE_DEC, NULL, 0x0,
1619
16
      "Number of times VRU should repeat the 'Get data' cycle when the caller "
1620
16
      "doesn't enter any data", HFILL }},
1621
1622
16
    { &hf_ged125_Number_of_Invalid_Entry_Tries,
1623
16
      { "Number of Invalid Entry Tries", "ged125.number_of_invalid_entry_tries",
1624
16
      FT_UINT32, BASE_DEC, NULL, 0x0,
1625
16
      "Number of times VRU should repeat the 'Get data' cycle when the "
1626
16
      "caller enters invalid data", HFILL }},
1627
1628
16
    { &hf_ged125_Min_Length,
1629
16
      { "Min Length of Digits", "ged125.min_length",
1630
16
      FT_UINT32, BASE_DEC, NULL, 0x0,
1631
16
      "Minimum number of digits expected from the caller", HFILL }},
1632
1633
16
    { &hf_ged125_Max_Length,
1634
16
      { "Max Length of Digits", "ged125.max_length",
1635
16
      FT_UINT32, BASE_DEC, NULL, 0x0,
1636
16
      "Maximum number of digits expected from the caller", HFILL }},
1637
1638
16
    { &hf_ged125_ASR_Allowed,
1639
16
      { "ASR Allowed", "ged125.asr_allowed",
1640
16
      FT_BOOLEAN, 32, NULL, 0x00000001,
1641
16
      "Indicates whether Automatic Speech Recognition should be enabled for this request", HFILL }},
1642
1643
16
    { &hf_ged125_DTMF_Menu_Keys,
1644
16
      { "DTMF Menu Keys", "ged125.dtmf_menu_keys",
1645
16
      FT_UINT32, BASE_DEC, NULL, 0x0,
1646
16
      "Indicates which keypad keys represent valid menu choices", HFILL }},
1647
1648
16
    { &hf_ged125_Microapp_Error_Code,
1649
16
      { "Microapp Error Code", "ged125.microapp_error_code",
1650
16
      FT_UINT32, BASE_DEC,
1651
16
      VALS(status_code_microcapp_error_codes), 0x0, NULL, HFILL }},
1652
1653
16
    { &hf_ged125_ConferenceCallID,
1654
16
      { "Conference Call ID", "ged125.conference_call_id",
1655
16
      FT_UINT32, BASE_DEC, NULL, 0x0,
1656
16
      "An ID assigned to the resultant conference call by the VRU", HFILL }},
1657
1658
16
    { &hf_ged125_PrimaryCallID,
1659
16
      { "Primary Call ID", "ged125.primary_call_id",
1660
16
      FT_UINT32, BASE_DEC, NULL, 0x0,
1661
16
      "The ID of the primary (inbound) call being conferenced", HFILL }},
1662
1663
16
    { &hf_ged125_SecondaryCallID,
1664
16
      { "Secondary Call ID", "ged125.secondary_call_id",
1665
16
      FT_UINT32, BASE_DEC, NULL, 0x0,
1666
16
      "The ID of the secondary (outbound) call being conferenced", HFILL }},
1667
1668
16
    { &hf_ged125_NewServiceID,
1669
16
      { "New Service ID", "ged125.new_service_id",
1670
16
      FT_UINT32, BASE_DEC, NULL, 0x0,
1671
16
      "The ID of the new service to which the call was diverted", HFILL }},
1672
1673
16
    { &hf_ged125_NewCallID,
1674
16
      { "New Call ID", "ged125.new_call_id",
1675
16
      FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
1676
1677
16
    { &hf_ged125_simulator_reset_event,
1678
16
      { "Simulator Reset Event", "ged125.simulator_reset_event",
1679
16
      FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
1680
1681
16
    { &hf_ged125_CrossRefID,
1682
16
      { "Cross Reference ID", "ged125.cross_ref_id",
1683
16
      FT_UINT32, BASE_DEC, NULL, 0x0,
1684
16
      "A cross-reference identifier assigned by the VRU to this call routing dialogue", HFILL }},
1685
1686
16
    { &hf_ged125_VRUTimeLag,
1687
16
      { "VRU Time Lag", "ged125.vru_time_lag",
1688
16
      FT_INT32, BASE_DEC, NULL, 0x0,
1689
16
      "Number of seconds that the VRU clock lags the ICM clock", HFILL }},
1690
1691
16
    { &hf_ged125_CallVarsMask,
1692
16
      { "Call Vars Mask", "ged125.call_vars_mask",
1693
16
      FT_UINT32, BASE_HEX, NULL, 0x0,
1694
16
      "A bit map, with the least significant bit referring to Call Variable1", HFILL }},
1695
1696
16
    { &hf_ged125_floating_payload_unspec,
1697
16
      { "Unspec floating data-type", "ged125.floating_unspec",
1698
16
      FT_BYTES, BASE_NONE, NULL, 0x0,
1699
16
      "Unknown data type", HFILL }},
1700
1701
16
    { &hf_ged125_floating_media_protocol,
1702
16
      { "Media Protocol", "ged125.media_protocol",
1703
16
      FT_CHAR, BASE_HEX, VALS(floating_media_protocol_vals), 0x0,
1704
16
      "Type of media", HFILL }},
1705
1706
16
    { &hf_ged125_floating_library_designator,
1707
16
      { "Library Designator", "ged125.library_designator",
1708
16
      FT_CHAR, BASE_HEX, VALS(floating_media_library_designator_vals), 0x0,
1709
16
      "System or Application", HFILL }},
1710
1711
16
    { &hf_ged125_Data_Playback_Type,
1712
16
      { "Data Playback Type", "ged125.data_playback_type",
1713
16
      FT_UINT32, BASE_DEC, VALS(Data_Playback_Type), 0x0, NULL, HFILL }},
1714
1715
16
    { &hf_ged125_Data_Playback_Formats,
1716
16
      { "Data Playback Format", "ged125.data_playback_format",
1717
16
      FT_UINT32, BASE_DEC, VALS(Data_Playback_Formats),0x0,
1718
16
      "Only relevant if Data Playback Type is one of the time formats. "
1719
16
      "It should contain PLAYBACK_FORMAT_OTHER in all other cases", HFILL }},
1720
1721
16
    { &hf_ged125_floating_uchar_array_index,
1722
16
      { "Uchar-Array Index", "ged125.uchar_array_index",
1723
16
      FT_UINT32, BASE_DEC, NULL, 0x0,
1724
16
      "Array index of an ECC field", HFILL }}
1725
16
  };
1726
1727
16
  static int *ett[] = {
1728
16
    &ett_ged125,
1729
16
    &ett_ged125_header,
1730
16
    &ett_ged125_message,
1731
16
    &ett_ged125_floating,
1732
16
    &ett_ged125_float_field,
1733
16
    &ett_ged125_service_control_header,
1734
16
    &ett_ged125_service_control_data
1735
16
  };
1736
1737
16
  static ei_register_info ei[] = {
1738
16
    { &ei_ged125_OperationalStatus_normal, { "ged125.operational_status.normal", PI_PROTOCOL, PI_NOTE, "Normal Operation", EXPFILL }},
1739
16
    { &ei_ged125_OperationalStatus_loss_redundant_component, { "ged125.operational_status.loss_redundant_component", PI_PROTOCOL, PI_NOTE,
1740
16
      "Loss of redundant component or other transparent failure; still fully functional for call processing", EXPFILL }},
1741
16
    { &ei_ged125_OperationalStatus_degraded_call_processing, { "ged125.operational_status.degraded_call_processing", PI_PROTOCOL, PI_NOTE, "Degraded call processing", EXPFILL }},
1742
16
    { &ei_ged125_OperationalStatus_conditions_prevent_call, { "ged125.operational_status.conditions_prevent_call", PI_PROTOCOL, PI_NOTE, "Conditions prevent call processing", EXPFILL }},
1743
16
    { &ei_ged125_OperationalStatus_invalid_message, { "ged125.operational_status.invalid_message", PI_PROTOCOL, PI_WARN, "Error: Invalid message", EXPFILL }},
1744
16
    { &ei_ged125_length_bad, { "ged125.length.bad", PI_MALFORMED, PI_ERROR, "Incorrect size given in the packet (corrupted)", EXPFILL }},
1745
16
    { &ei_ged125_sendseqno_and_dialogueid, { "ged125.sendseqno_and_dialogueid", PI_PROTOCOL, PI_WARN, "Both SendSeqNo & DialogueID must be NULL because at least one is NULL", EXPFILL }},
1746
16
    { &ei_ged125_service_control_value_unknown, { "ged125.service_control_value.unknown", PI_PROTOCOL, PI_WARN, "Unknown Service-Control Message Sub-type, aborting dissection", EXPFILL }},
1747
16
    { &ei_ged125_trunk_group_id, { "ged125.trunk_group_id.bad_range", PI_PROTOCOL, PI_WARN, "TrunkGroupID must be between 0-65535", EXPFILL }},
1748
16
    { &ei_ged125_TrunkCount_invalid, { "ged125.trunk_count.invalid", PI_PROTOCOL, PI_WARN, "Invalid number of trunks (max is 1023)", EXPFILL }},
1749
16
  };
1750
1751
16
  expert_module_t* expert_ged125;
1752
1753
16
  proto_ged125 = proto_register_protocol ("Cisco GED-125 Protocol", "GED125", "ged125");
1754
16
  proto_register_field_array (proto_ged125, hf, array_length (hf));
1755
16
  proto_register_subtree_array (ett, array_length (ett));
1756
16
  expert_ged125 = expert_register_protocol(proto_ged125);
1757
16
  expert_register_field_array(expert_ged125, ei, array_length(ei));
1758
1759
16
  ged125_handle = register_dissector("ged125", dissect_ged125, proto_ged125);
1760
1761
16
  ged125_module = prefs_register_protocol(proto_ged125, NULL);
1762
1763
16
  prefs_register_bool_preference(ged125_module, "desegment_body",
1764
16
     "Reassemble GED125 bodies spanning multiple TCP segments",
1765
16
     "Whether the GED125 dissector should desegment all messages spanning multiple TCP segments",
1766
16
     &ged125_desegment_body);
1767
16
}
1768
1769
void
1770
proto_reg_handoff_ged125(void)
1771
16
{
1772
  /* Register TCP port for dissection */
1773
16
  dissector_add_for_decode_as_with_preference("tcp.port", ged125_handle);
1774
16
}
1775
1776
/*
1777
 * Editor modelines  -  https://www.wireshark.org/tools/modelines.html
1778
 *
1779
 * Local variables:
1780
 * c-basic-offset: 8
1781
 * tab-width: 8
1782
 * indent-tabs-mode: t
1783
 * End:
1784
 *
1785
 * vi: set shiftwidth=8 tabstop=8 noexpandtab:
1786
 * :indentSize=8:tabSize=8:noTabs=false:
1787
 */