Coverage Report

Created: 2025-02-15 06:25

/src/wireshark/epan/dissectors/packet-ged125.c
Line
Count
Source (jump to first uncovered line)
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
579
0
  media_protocol = tvb_get_uint8(tvb, *offset);
580
0
  proto_tree_add_item(tree, hf_ged125_floating_media_protocol, tvb, *offset, 1, ENC_NA|ENC_ASCII);
581
0
  *offset += 1;
582
583
0
  switch (media_protocol)
584
0
  {
585
0
  case 'H':
586
0
  case 'S':
587
0
  case 'O':
588
0
  case 'F':
589
0
    proto_tree_add_item(tree, hf_ged125_floating_library_designator, tvb, *offset, 1, ENC_NA|ENC_ASCII);
590
0
    *offset += 1;
591
0
    proto_tree_add_item(tree, hf_ged125_floating_payload_strg, tvb, *offset, length - 2, ENC_NA|ENC_ASCII);
592
0
    break;
593
594
0
  case 'T':
595
0
    proto_tree_add_item(tree, hf_ged125_floating_payload_strg, tvb, *offset, length - 1, ENC_NA|ENC_ASCII);
596
0
    break;
597
598
0
  case 'D':
599
0
    proto_tree_add_item(tree, hf_ged125_Data_Playback_Type, tvb, *offset, 4, ENC_BIG_ENDIAN);
600
0
    *offset += 4;
601
0
    proto_tree_add_item(tree, hf_ged125_Data_Playback_Formats, tvb, *offset, 4, ENC_BIG_ENDIAN);
602
0
    *offset += 4;
603
0
    proto_tree_add_item(tree, hf_ged125_floating_payload_strg, tvb, *offset, length - 9, ENC_NA|ENC_ASCII);
604
0
    break;
605
0
  }
606
607
0
  *offset += length;
608
0
}
609
610
static void
611
floating_fields(tvbuff_t* tvb, packet_info *pinfo, proto_tree* tree, int offset, const int size)
612
0
{
613
0
  int32_t length = 4;
614
0
  uint32_t floating_type;
615
0
  proto_tree *ged125_tree, *float_tree;
616
0
  proto_item *ti;
617
618
0
  if (size - offset > 0)
619
0
    length = size - offset;
620
621
0
  ged125_tree = proto_tree_add_subtree(tree, tvb, offset, length, ett_ged125_floating, NULL, "Float Message");
622
623
  /*The Universal Floating-Fields Loop of Fun*/
624
0
  while (offset < size-2)
625
0
  {
626
0
    floating_type = tvb_get_uint8(tvb, offset);
627
0
    ti = proto_tree_add_uint_format(ged125_tree, hf_ged125_floating, tvb, offset, 1,
628
0
                      floating_type, "%s", val_to_str(floating_type,
629
0
                      vals_floating_point_types, "Unknown %d"));
630
0
    float_tree = proto_item_add_subtree(ti, ett_ged125_float_field);
631
0
    offset += 1;
632
633
0
    length = tvb_get_uint8(tvb, offset);
634
0
    proto_tree_add_uint(float_tree, hf_ged125_length, tvb, offset, 1, length);
635
0
    offset += 1;
636
637
0
    if ((offset + length > size) && (length > 0))
638
0
    {
639
0
      expert_add_info(pinfo, ti, &ei_ged125_length_bad);
640
0
      break;
641
0
    }
642
643
0
    switch (floating_type)
644
0
    {
645
0
    case 42:
646
0
    case 43:
647
0
      proto_tree_add_item(float_tree, hf_ged125_floating_payload_ECC_tag, tvb, offset, 4, ENC_BIG_ENDIAN);
648
0
      offset += 4;
649
0
      if (length-4 > 0)
650
0
      {
651
0
        proto_tree_add_item(float_tree, hf_ged125_floating_payload_strg, tvb, offset, length-4, ENC_NA|ENC_ASCII);
652
0
        offset += (length-4);
653
0
      }
654
0
      break;
655
656
0
    case 44: /*ECC_VAR_ARRAY*/
657
0
      proto_tree_add_item(float_tree, hf_ged125_floating_payload_ECC_tag, tvb, offset, 4, ENC_BIG_ENDIAN);
658
0
      offset += 4;
659
0
      proto_tree_add_item(float_tree, hf_ged125_floating_uchar_array_index, tvb, offset, 1, ENC_BIG_ENDIAN);
660
0
      offset += 1;
661
0
      if (length-5 > 0)
662
0
      {
663
0
        proto_tree_add_item(float_tree, hf_ged125_floating_payload_strg, tvb, offset, length-4, ENC_NA|ENC_ASCII);
664
0
        offset += (length-5);
665
0
      }
666
0
      break;
667
668
0
    case 47:
669
0
    case 48:
670
0
    case 49:
671
0
    case 50: /*MEDIA_SPECIFIER*/
672
0
      Media_Specifier_dissect(tvb, float_tree, &offset, length);
673
0
      break;
674
675
0
    case 19: /* unspec var type(UUI) */
676
0
      proto_tree_add_item(float_tree, hf_ged125_floating_payload_unspec, tvb, offset, length, ENC_NA);
677
0
      offset += length;
678
0
      break;
679
680
0
    case 1:
681
0
    case 18:
682
0
    case 20: case 21: case 22: case 23: case 24: case 25: case 26: case 27:
683
0
    case 28: case 29: case 30: case 31: case 32: case 33: case 34:
684
0
    case 37: case 38: case 39: case 40:
685
0
    case 51: case 52: case 53: case 54: case 55: case 56: case 57: case 58:
686
0
      proto_tree_add_item(float_tree, hf_ged125_floating_payload_strg, tvb, offset, length, ENC_NA|ENC_ASCII);
687
0
      offset += length;
688
0
      break;
689
690
0
    case 35:
691
0
    case 36:
692
0
      proto_tree_add_item(float_tree, hf_ged125_floating_payload_uint, tvb, offset, 4, ENC_BIG_ENDIAN);
693
0
      offset += length;
694
0
      break;
695
0
    case 41:
696
0
      proto_tree_add_item(float_tree, hf_ged125_floating_cause_code, tvb, offset, 4, ENC_BIG_ENDIAN);
697
0
      offset += length;
698
0
      break;
699
700
0
    case 45:
701
0
    case 46:
702
0
      proto_tree_add_item(float_tree, hf_ged125_floating_payload_bool, tvb, offset, 4, ENC_BIG_ENDIAN);
703
0
      offset += length;
704
0
      break;
705
0
    }
706
0
  }
707
0
}
708
709
static void
710
service_control_dissect(tvbuff_t* tvb,proto_tree* msg_tree, proto_tree* ged125_tree, packet_info* pinfo,
711
  int* offset, const int size)
712
0
{
713
0
  proto_item *ti;
714
0
  proto_tree *service_tree, *data_tree;
715
0
  uint32_t mess_type, DialogueID, SendSeqNo;
716
717
0
  service_tree = proto_tree_add_subtree(msg_tree, tvb, *offset, 12,
718
0
      ett_ged125_service_control_header, NULL, "Service-Control Header");
719
720
  /* get message sub type, don't want to output that just yet */
721
0
  mess_type = tvb_get_ntohl(tvb, *offset);
722
0
  *offset += 4;
723
724
0
  DialogueID = tvb_get_ntohl(tvb, *offset);
725
0
  proto_tree_add_item(service_tree, hf_ged125_DialogueID_num, tvb, *offset, 4, ENC_BIG_ENDIAN);
726
0
  *offset += 4;
727
728
0
  col_add_fstr(pinfo->cinfo, COL_INFO, "Service_Control->%s DIALOGUE_ID=%u LEN=%u",
729
0
      val_to_str(mess_type, vals_service_control_message_subvalues, "Unknown %d"), DialogueID, size);
730
731
0
  SendSeqNo = tvb_get_ntohl(tvb, *offset);
732
0
  ti = proto_tree_add_item(service_tree, hf_ged125_SendSeqNo_num, tvb, *offset, 4, ENC_BIG_ENDIAN);
733
0
  *offset += 4;
734
735
0
  if ((DialogueID != SendSeqNo) &&
736
0
    ((DialogueID == 0xFFFFFFFF) || (SendSeqNo == 0xFFFFFFFF)))
737
0
    expert_add_info(pinfo, ti, &ei_ged125_sendseqno_and_dialogueid);
738
739
0
  ti = proto_tree_add_uint(service_tree, hf_ged125_service_control_value,
740
0
                tvb, *offset-12, 4, mess_type);
741
0
  data_tree = proto_item_add_subtree(ti, ett_ged125_service_control_data);
742
743
0
  switch (mess_type)
744
0
  {
745
0
  case GED125_INIT_SERVICE_CTRL_REQ_VALUE:
746
0
  case GED125_INIT_SERVICE_CTRL_CONF_VALUE:
747
0
  case GED125_INIT_SERVICE_CTRL_END_VALUE:
748
0
    proto_tree_add_item(data_tree, hf_ged125_InvokeID, tvb, *offset, 4, ENC_BIG_ENDIAN);
749
0
    *offset += 4;
750
0
    break;
751
752
0
  case GED125_INIT_SERVICE_CTRL_DATA_VALUE:
753
0
    proto_tree_add_item(data_tree, hf_ged125_InvokeID, tvb, *offset, 4, ENC_BIG_ENDIAN);
754
0
    *offset += 4;
755
0
    proto_tree_add_item(data_tree, hf_ged125_ServiceFeatures, tvb, *offset, 4, ENC_BIG_ENDIAN);
756
0
    *offset += 4;
757
0
    break;
758
759
0
  case GED125_NEW_CALL_VALUE:
760
0
  case GED125_REQUEST_INSTRUCTION_VALUE:
761
0
    proto_tree_add_item(data_tree, hf_ged125_TrunkGroupID, tvb, *offset, 4, ENC_BIG_ENDIAN);
762
0
    *offset += 4;
763
0
    proto_tree_add_item(data_tree, hf_ged125_TrunkNumber, tvb, *offset, 4, ENC_BIG_ENDIAN);
764
0
    *offset += 4;
765
0
    proto_tree_add_item(data_tree, hf_ged125_ServiceID, tvb, *offset, 4, ENC_BIG_ENDIAN);
766
0
    *offset += 4;
767
0
    floating_fields(tvb, pinfo, ged125_tree, *offset, size);
768
0
    break;
769
770
0
  case GED125_RUN_SCRIPT_REQ_VALUE:
771
0
    proto_tree_add_item(data_tree, hf_ged125_InvokeID, tvb, *offset, 4, ENC_BIG_ENDIAN);
772
0
    *offset += 4;
773
0
    floating_fields(tvb, pinfo, ged125_tree, *offset, size);
774
0
    break;
775
776
0
  case GED125_RUN_SCRIPT_RESULT_VALUE:
777
0
    proto_tree_add_item(data_tree, hf_ged125_InvokeID, tvb, *offset, 4, ENC_BIG_ENDIAN);
778
0
    *offset += 4;
779
0
    proto_tree_add_item(data_tree, hf_ged125_ResultCode, 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_CONNECT_VALUE:
785
0
    proto_tree_add_item(data_tree, hf_ged125_LabelType, 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_EVENT_REPORT_VALUE:
791
0
    proto_tree_add_item(data_tree, hf_ged125_EventID, tvb, *offset, 4, ENC_BIG_ENDIAN);
792
0
    *offset += 4;
793
0
    floating_fields(tvb, pinfo, ged125_tree, *offset, size);
794
0
    break;
795
796
0
  case GED125_DIALOGUE_FAILURE_CONF_VALUE:
797
0
    proto_tree_add_item(data_tree, hf_ged125_InvokeID, tvb, *offset, 4, ENC_BIG_ENDIAN);
798
0
    *offset += 4;
799
0
    proto_tree_add_item(data_tree, hf_ged125_ErrorCode, tvb, *offset, 4, ENC_BIG_ENDIAN);
800
0
    *offset += 4;
801
0
    break;
802
803
0
  case GED125_DIALOGUE_FAILURE_EVENT_VALUE:
804
0
    proto_tree_add_item(data_tree, hf_ged125_ErrorCode, tvb, *offset, 4, ENC_BIG_ENDIAN);
805
0
    *offset += 4;
806
0
    break;
807
808
0
  case GED125_INIT_SERVICE_CTRL_TRKGRP_VALUE:
809
0
    proto_tree_add_item(data_tree, hf_ged125_InvokeID, tvb, *offset, 4, ENC_BIG_ENDIAN);
810
0
    *offset += 4;
811
0
    proto_tree_add_item(data_tree, hf_ged125_TrunkGroupID, tvb, *offset, 4, ENC_BIG_ENDIAN);
812
0
    *offset += 4;
813
0
    proto_tree_add_item(data_tree, hf_ged125_TrunkCount, tvb, *offset, 4, ENC_BIG_ENDIAN);
814
0
    *offset += 4;
815
0
    trunk_funk(tvb, data_tree, offset, size);
816
0
    break;
817
818
0
  case GED125_INIT_SERVICE_CTRL_SERVICE_VALUE:
819
0
    proto_tree_add_item(data_tree, hf_ged125_InvokeID, tvb, *offset, 4, ENC_BIG_ENDIAN);
820
0
    *offset += 4;
821
0
    proto_tree_add_item(data_tree, hf_ged125_ServiceID, tvb, *offset, 4, ENC_BIG_ENDIAN);
822
0
    *offset += 4;
823
0
    proto_tree_add_item(data_tree, hf_ged125_AvailableNow, tvb, *offset, 4, ENC_BIG_ENDIAN);
824
0
    *offset += 4;
825
0
    proto_tree_add_item(data_tree, hf_ged125_CallsInNow, tvb, *offset, 4, ENC_BIG_ENDIAN);
826
0
    *offset += 4;
827
0
    proto_tree_add_item(data_tree, hf_ged125_CallsOutNow, tvb, *offset, 4, ENC_BIG_ENDIAN);
828
0
    *offset += 4;
829
0
    break;
830
831
0
  case GED125_INIT_SERVICE_CTRL_VRU_VALUE:
832
0
    proto_tree_add_item(data_tree, hf_ged125_InvokeID, tvb, *offset, 4, ENC_BIG_ENDIAN);
833
0
    *offset += 4;
834
0
    proto_tree_add_item(data_tree, hf_ged125_CurrentTime_num, tvb, *offset, 4, ENC_BIG_ENDIAN);
835
0
    *offset += 4;
836
0
    proto_tree_add_item(data_tree, hf_ged125_TimeZoneDelta, tvb, *offset, 4, ENC_BIG_ENDIAN);
837
0
    *offset += 4;
838
0
    OperationalStatus_funk(tvb, pinfo, data_tree, offset);
839
0
    StatusVariable_funk(tvb, data_tree, offset, size);
840
0
    break;
841
842
0
  case GED125_TRKGRP_STATUS_VALUE:
843
0
    proto_tree_add_item(data_tree, hf_ged125_TrunkGroupID, tvb, *offset, 4, ENC_BIG_ENDIAN);
844
0
    *offset += 4;
845
0
    proto_tree_add_item(data_tree, hf_ged125_TrunkCount, tvb, *offset, 4, ENC_BIG_ENDIAN);
846
0
    *offset += 4;
847
0
    trunk_funk(tvb, data_tree, offset, size);
848
0
    break;
849
850
0
  case GED125_SERVICE_STATUS_VALUE:
851
0
    proto_tree_add_item(data_tree, hf_ged125_ServiceID, tvb, *offset, 4, ENC_BIG_ENDIAN);
852
0
    *offset += 4;
853
0
    proto_tree_add_item(data_tree, hf_ged125_ServiceAvailable, tvb, *offset, 4, ENC_BIG_ENDIAN);
854
0
    *offset += 4;
855
0
    break;
856
857
0
  case GED125_VRU_STATUS_VALUE:
858
0
    proto_tree_add_item(data_tree, hf_ged125_CurrentTime_num, tvb, *offset, 4, ENC_BIG_ENDIAN);
859
0
    *offset += 4;
860
0
    proto_tree_add_item(data_tree, hf_ged125_TimeZoneDelta, tvb, *offset, 4, ENC_BIG_ENDIAN);
861
0
    *offset += 4;
862
0
    OperationalStatus_funk(tvb, pinfo, data_tree, offset);
863
0
    StatusVariable_funk(tvb, data_tree, offset, size);
864
0
    break;
865
866
0
  case GED125_CANCEL_VALUE:
867
0
    proto_tree_add_item(data_tree, hf_ged125_InvokeID, tvb, *offset, 4, ENC_BIG_ENDIAN);
868
0
    *offset += 4;
869
0
    proto_tree_add_item(data_tree, hf_ged125_RequestID, tvb, *offset, 4, ENC_BIG_ENDIAN);
870
0
    *offset += 4;
871
0
    break;
872
873
0
  case GED125_RELEASE_VALUE:
874
0
    proto_tree_add_item(data_tree, hf_ged125_Cause_just_for_release_message, tvb, *offset, 4, ENC_BIG_ENDIAN);
875
0
    *offset += 4;
876
0
    break;
877
878
0
  case GED125_NEW_DIALOGUE_VALUE:
879
0
    proto_tree_add_item(data_tree, hf_ged125_CallID, tvb, *offset, 4, ENC_BIG_ENDIAN);
880
0
    *offset += 4;
881
0
    proto_tree_add_item(data_tree, hf_ged125_ServiceID, tvb, *offset, 4, ENC_BIG_ENDIAN);
882
0
    *offset += 4;
883
0
    floating_fields(tvb, pinfo, ged125_tree, *offset, size);
884
0
    break;
885
886
0
  case GED125_CONNECT_TO_RESOURCE_VALUE:
887
0
  case GED125_MICROAPP_CONTEXT_VALUE:
888
0
  case GED125_TEMPORARY_CONNECT_VALUE:
889
0
    floating_fields(tvb, pinfo, ged125_tree, *offset, size);
890
0
    break;
891
892
0
  case GED125_RESOURCE_CONNECTED_VALUE:
893
    /*nothing goes here*/
894
0
    break;
895
896
0
  case GED125_MICROAPP_PLAY_VALUE:
897
0
    proto_tree_add_item(data_tree, hf_ged125_InvokeID, tvb, *offset, 4, ENC_BIG_ENDIAN);
898
0
    *offset += 4;
899
0
    proto_tree_add_item(data_tree, hf_ged125_ToBeContinued, tvb, *offset, 4, ENC_BIG_ENDIAN);
900
0
    *offset += 4;
901
0
    proto_tree_add_item(data_tree, hf_ged125_Barge_In_Allowed, tvb, *offset, 4, ENC_BIG_ENDIAN);
902
0
    *offset += 4;
903
0
    floating_fields(tvb, pinfo, ged125_tree, *offset, size);
904
0
    break;
905
906
0
  case GED125_MICROAPP_PLAY_CONTINUE_VALUE:
907
0
    proto_tree_add_item(data_tree, hf_ged125_InvokeID, tvb, *offset, 4, ENC_BIG_ENDIAN);
908
0
    *offset += 4;
909
0
    proto_tree_add_item(data_tree, hf_ged125_ToBeContinued, tvb, *offset, 4, ENC_BIG_ENDIAN);
910
0
    *offset += 4;
911
0
    floating_fields(tvb, pinfo, ged125_tree, *offset, size);
912
0
    break;
913
914
0
  case GED125_MICROAPP_COLLECT_DATA_VALUE:
915
0
    proto_tree_add_item(data_tree, hf_ged125_InvokeID, tvb, *offset, 4, ENC_BIG_ENDIAN);
916
0
    *offset += 4;
917
0
    proto_tree_add_item(data_tree, hf_ged125_DTMF_Termination_Key, tvb, *offset, 4, ENC_BIG_ENDIAN);
918
0
    *offset += 4;
919
0
    proto_tree_add_item(data_tree, hf_ged125_No_Entry_Timeout, tvb, *offset, 4, ENC_BIG_ENDIAN);
920
0
    *offset += 4;
921
0
    proto_tree_add_item(data_tree, hf_ged125_Interdigit_Timeout, tvb, *offset, 4, ENC_BIG_ENDIAN);
922
0
    *offset += 4;
923
0
    proto_tree_add_item(data_tree, hf_ged125_Number_of_No_Entry_Tries, tvb, *offset, 4, ENC_BIG_ENDIAN);
924
0
    *offset += 4;
925
0
    proto_tree_add_item(data_tree, hf_ged125_Number_of_Invalid_Entry_Tries, tvb, *offset, 4, ENC_BIG_ENDIAN);
926
0
    *offset += 4;
927
0
    proto_tree_add_item(data_tree, hf_ged125_Min_Length, tvb, *offset, 4, ENC_BIG_ENDIAN);
928
0
    *offset += 4;
929
0
    proto_tree_add_item(data_tree, hf_ged125_Max_Length, tvb, *offset, 4, ENC_BIG_ENDIAN);
930
0
    *offset += 4;
931
0
    proto_tree_add_item(data_tree, hf_ged125_Barge_In_Allowed, tvb, *offset, 4, ENC_BIG_ENDIAN);
932
0
    *offset += 4;
933
0
    proto_tree_add_item(data_tree, hf_ged125_ASR_Allowed, tvb, *offset, 4, ENC_BIG_ENDIAN);
934
0
    *offset += 4;
935
0
    floating_fields(tvb, pinfo, ged125_tree, *offset, size);
936
0
    break;
937
938
0
  case GED125_MICROAPP_MENU_VALUE:
939
0
    proto_tree_add_item(data_tree, hf_ged125_InvokeID, tvb, *offset, 4, ENC_BIG_ENDIAN);
940
0
    *offset += 4;
941
0
    proto_tree_add_item(data_tree, hf_ged125_No_Entry_Timeout, tvb, *offset, 4, ENC_BIG_ENDIAN);
942
0
    *offset += 4;
943
0
    proto_tree_add_item(data_tree, hf_ged125_Number_of_No_Entry_Tries, tvb, *offset, 4, ENC_BIG_ENDIAN);
944
0
    *offset += 4;
945
0
    proto_tree_add_item(data_tree, hf_ged125_Number_of_Invalid_Entry_Tries, tvb, *offset, 4, ENC_BIG_ENDIAN);
946
0
    *offset += 4;
947
0
    proto_tree_add_item(data_tree, hf_ged125_DTMF_Menu_Keys, tvb, *offset, 4, ENC_BIG_ENDIAN);
948
0
    *offset += 4;
949
0
    proto_tree_add_item(data_tree, hf_ged125_Barge_In_Allowed, tvb, *offset, 4, ENC_BIG_ENDIAN);
950
0
    *offset += 4;
951
0
    proto_tree_add_item(data_tree, hf_ged125_ASR_Allowed, tvb, *offset, 4, ENC_BIG_ENDIAN);
952
0
    *offset += 4;
953
0
    floating_fields(tvb, pinfo, ged125_tree, *offset, size);
954
0
    break;
955
956
0
  case GED125_MICROAPP_RESULT_VALUE:
957
0
    proto_tree_add_item(data_tree, hf_ged125_InvokeID, tvb, *offset, 4, ENC_BIG_ENDIAN);
958
0
    *offset += 4;
959
0
    proto_tree_add_item(data_tree, hf_ged125_Microapp_Error_Code, tvb, *offset, 4, ENC_BIG_ENDIAN);
960
0
    *offset += 4;
961
0
    floating_fields(tvb, pinfo, ged125_tree, *offset, size);
962
0
    break;
963
964
0
  default:
965
0
    expert_add_info(pinfo, ti, &ei_ged125_service_control_value_unknown);
966
0
  }
967
0
}
968
969
static unsigned
970
get_ged125_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb,
971
                   int offset _U_, void *data _U_)
972
0
{
973
  /* XXX: why does this not use the offset to get the value? */
974
0
  return tvb_get_ntohl(tvb, 0) + 8;
975
0
}
976
977
static int
978
dissect_ged125_base_messages(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree, void* data _U_)
979
0
{
980
0
  int size = tvb_reported_length(tvb);
981
0
  proto_item *ti, *message_item;
982
0
  proto_tree *ged125_tree, *ged125_header_tree, *ged125_message_tree;
983
0
  int offset = 8; /*get to the fixed message, just outside of header*/
984
0
  uint32_t value,
985
0
      message_type = tvb_get_ntohl(tvb, 4);
986
987
0
  col_set_str(pinfo->cinfo, COL_PROTOCOL, "GED125");
988
0
  col_add_fstr(pinfo->cinfo, COL_INFO, "%s %u bytes",
989
0
      val_to_str(message_type, base_message_values, "Unknown %d"), size);
990
991
0
  ti = proto_tree_add_item(tree, proto_ged125, tvb, 0, -1, ENC_NA);
992
0
  ged125_tree = proto_item_add_subtree( ti, ett_ged125);
993
994
  /* Message header */
995
0
  ged125_header_tree = proto_tree_add_subtree(ged125_tree, tvb, 0, 8, ett_ged125_header, NULL, "GED125 Header");
996
997
0
  proto_tree_add_item(ged125_header_tree, hf_ged125_length, tvb, 0, 4, ENC_BIG_ENDIAN);
998
0
  proto_tree_add_item(ged125_header_tree, hf_ged125_value, tvb, 4, 4, ENC_BIG_ENDIAN);
999
1000
0
  ged125_message_tree = proto_tree_add_subtree(ged125_tree, tvb, offset, -1, ett_ged125_message, &message_item, "GED125 Message");
1001
1002
0
  switch (message_type)
1003
0
  {
1004
0
  case GED125_FAILURE_CONF_VALUE:
1005
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_InvokeID, tvb, offset, 4, ENC_BIG_ENDIAN);
1006
0
    offset += 4;
1007
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_Status, tvb, offset, 4, ENC_BIG_ENDIAN);
1008
0
    offset += 4;
1009
0
    break;
1010
1011
0
  case GED125_FAILURE_EVENT_VALUE:
1012
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_Status, tvb, offset, 4, ENC_BIG_ENDIAN);
1013
0
    offset += 4;
1014
0
    break;
1015
1016
0
  case GED125_OPEN_REQ_VALUE:
1017
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_InvokeID, tvb, offset, 4, ENC_BIG_ENDIAN);
1018
0
    offset += 4;
1019
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_VersionNumber, tvb, offset, 4, ENC_BIG_ENDIAN);
1020
0
    offset += 4;
1021
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_IdleTimeout, tvb, offset, 4, ENC_BIG_ENDIAN);
1022
0
    offset += 4;
1023
0
    break;
1024
1025
0
  case GED125_OPEN_CONF_VALUE:
1026
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_InvokeID, tvb, offset, 4, ENC_BIG_ENDIAN);
1027
0
    offset += 4;
1028
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_UseEventFeed, tvb, offset, 4, ENC_BIG_ENDIAN);
1029
0
    offset += 4;
1030
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_UsePolledFeed, tvb, offset, 4, ENC_BIG_ENDIAN);
1031
0
    offset += 4;
1032
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_UseCallRouting, tvb, offset, 4, ENC_BIG_ENDIAN);
1033
0
    offset += 4;
1034
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_UseTimeSynch, tvb, offset, 4, ENC_BIG_ENDIAN);
1035
0
    offset += 4;
1036
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_UseServiceControl, tvb, offset, 4, ENC_BIG_ENDIAN);
1037
0
    offset += 4;
1038
0
    break;
1039
1040
0
  case GED125_HEARTBEAT_REQ_VALUE:
1041
0
  case GED125_HEARTBEAT_CONF_VALUE:
1042
0
  case GED125_CLOSE_CONF_VALUE:
1043
0
  case GED125_INIT_DATA_REQ_VALUE:
1044
0
  case GED125_INIT_DATA_CONF_VALUE:
1045
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_InvokeID, tvb, offset, 4, ENC_BIG_ENDIAN);
1046
0
    offset += 4;
1047
0
    break;
1048
1049
0
  case GED125_CLOSE_REQ_VALUE:
1050
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_InvokeID, tvb, offset, 4, ENC_BIG_ENDIAN);
1051
0
    offset += 4;
1052
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_Status, tvb, offset, 4, ENC_BIG_ENDIAN);
1053
0
    offset += 4;
1054
0
    floating_fields(tvb, pinfo, ged125_tree, offset, size);
1055
0
    break;
1056
1057
0
  case GED125_INIT_TRKGRP_DATA_EVENT_VALUE:
1058
0
    value = tvb_get_ntohl(tvb, offset);
1059
0
    ti = proto_tree_add_item(ged125_message_tree, hf_ged125_InvokeID, tvb, offset, 4, ENC_BIG_ENDIAN);
1060
0
    offset += 4;
1061
0
    if (value > 65535)
1062
0
      expert_add_info(pinfo, ti, &ei_ged125_trunk_group_id);
1063
1064
0
    value = tvb_get_ntohl(tvb, offset);
1065
0
    ti = proto_tree_add_item(ged125_message_tree, hf_ged125_TrunkCount, tvb, offset, 4, ENC_BIG_ENDIAN);
1066
0
    offset += 4;
1067
0
    if (value > 1023)
1068
0
      expert_add_info(pinfo, ti, &ei_ged125_TrunkCount_invalid);
1069
1070
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_CallsInToday, tvb, offset, 4, ENC_BIG_ENDIAN);
1071
0
    offset += 4;
1072
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_CallsOutToday, tvb, offset, 4, ENC_BIG_ENDIAN);
1073
0
    offset += 4;
1074
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_InServiceTimeToday, tvb, offset, 4, ENC_BIG_ENDIAN);
1075
0
    offset += 4;
1076
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_InUseInboundTimeToday, tvb, offset, 4, ENC_BIG_ENDIAN);
1077
0
    offset += 4;
1078
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_InUseOutboundTimeToday, tvb, offset, 4, ENC_BIG_ENDIAN);
1079
0
    offset += 4;
1080
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_AllTrunksInUseTimeToday, tvb, offset, 4, ENC_BIG_ENDIAN);
1081
0
    offset += 4;
1082
1083
0
    trunk_funk(tvb, ged125_message_tree, &offset, size);
1084
0
    break;
1085
1086
0
  case GED125_INIT_SERVICE_DATA_EVENT_VALUE:
1087
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_InvokeID, tvb, offset, 4, ENC_BIG_ENDIAN);
1088
0
    offset += 4;
1089
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_ServiceID, tvb, offset, 4, ENC_BIG_ENDIAN);
1090
0
    offset += 4;
1091
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_AvailableNow, tvb, offset, 4, ENC_BIG_ENDIAN);
1092
0
    offset += 4;
1093
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_CallsInNow, tvb, offset, 4, ENC_BIG_ENDIAN);
1094
0
    offset += 4;
1095
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_CallsOutNow, tvb, offset, 4, ENC_BIG_ENDIAN);
1096
0
    offset += 4;
1097
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_CallsInToday, tvb, offset, 4, ENC_BIG_ENDIAN);
1098
0
    offset += 4;
1099
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_CallsOutToday, tvb, offset, 4, ENC_BIG_ENDIAN);
1100
0
    offset += 4;
1101
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_CallsHandledToday, tvb, offset, 4, ENC_BIG_ENDIAN);
1102
0
    offset += 4;
1103
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_HandleTimeToday, tvb, offset, 4, ENC_BIG_ENDIAN);
1104
0
    offset += 4;
1105
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_DivertedInToday, tvb, offset, 4, ENC_BIG_ENDIAN);
1106
0
    offset += 4;
1107
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_DivertedOutToday, tvb, offset, 4, ENC_BIG_ENDIAN);
1108
0
    offset += 4;
1109
0
    break;
1110
1111
0
  case GED125_INIT_VRU_DATA_EVENT_VALUE:
1112
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_InvokeID, tvb, offset, 4, ENC_BIG_ENDIAN);
1113
0
    offset += 4;
1114
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_TimeZoneDelta, tvb, offset, 4, ENC_BIG_ENDIAN);
1115
0
    offset += 4;
1116
1117
0
    OperationalStatus_funk(tvb, pinfo, ged125_message_tree, &offset);
1118
0
    StatusVariable_funk(tvb, ged125_message_tree, &offset, size);
1119
0
    break;
1120
1121
0
  case GED125_INIT_DATA_END_EVENT_VALUE:
1122
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_InvokeID, tvb, offset, 4, ENC_BIG_ENDIAN);
1123
0
    offset += 4;
1124
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_InitDataTime, tvb, offset, 4, ENC_BIG_ENDIAN);
1125
0
    offset += 4;
1126
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_StartOfDay, tvb, offset, 4, ENC_BIG_ENDIAN);
1127
0
    offset += 4;
1128
0
    break;
1129
1130
0
  case GED125_DELIVERED_EVENT_VALUE:
1131
0
  case GED125_ORIGINATED_EVENT_VALUE:
1132
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_CallID, tvb, offset, 4, ENC_BIG_ENDIAN);
1133
0
    offset += 4;
1134
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_TrunkGroupID, tvb, offset, 4, ENC_BIG_ENDIAN);
1135
0
    offset += 4;
1136
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_TrunkNumber, tvb, offset, 4, ENC_BIG_ENDIAN);
1137
0
    offset += 4;
1138
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_ServiceID, tvb, offset, 4, ENC_BIG_ENDIAN);
1139
0
    offset += 4;
1140
0
    floating_fields(tvb, pinfo, ged125_tree, offset, size);
1141
0
    break;
1142
1143
0
  case GED125_CALL_CLEARED_EVENT_VALUE:
1144
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_CallID, tvb, offset, 4, ENC_BIG_ENDIAN);
1145
0
    offset += 4;
1146
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_floating_CauseCode, tvb, offset, 4, ENC_BIG_ENDIAN);
1147
0
    offset += 4;
1148
0
    floating_fields(tvb, pinfo, ged125_tree, offset, size);
1149
0
    break;
1150
1151
0
  case GED125_CONFERENCED_EVENT_VALUE:
1152
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_ConferenceCallID, tvb, offset, 4, ENC_BIG_ENDIAN);
1153
0
    offset += 4;
1154
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_PrimaryCallID, tvb, offset, 4, ENC_BIG_ENDIAN);
1155
0
    offset += 4;
1156
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_SecondaryCallID, tvb, offset, 4, ENC_BIG_ENDIAN);
1157
0
    offset += 4;
1158
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_ServiceID, tvb, offset, 4, ENC_BIG_ENDIAN);
1159
0
    offset += 4;
1160
0
    break;
1161
1162
0
  case GED125_DIVERTED_EVENT_VALUE:
1163
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_CallID, tvb, offset, 4, ENC_BIG_ENDIAN);
1164
0
    offset += 4;
1165
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_NewServiceID, tvb, offset, 4, ENC_BIG_ENDIAN);
1166
0
    offset += 4;
1167
0
    break;
1168
1169
0
  case GED125_NEW_TRANSACTION_EVENT_VALUE:
1170
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_CallID, tvb, offset, 4, ENC_BIG_ENDIAN);
1171
0
    offset += 4;
1172
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_NewCallID, tvb, offset, 4, ENC_BIG_ENDIAN);
1173
0
    offset += 4;
1174
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_ServiceID, tvb, offset, 4, ENC_BIG_ENDIAN);
1175
0
    offset += 4;
1176
0
    break;
1177
1178
0
  case GED125_SET_CALL_VARIABLES_EVENT_VALUE:
1179
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_CallID, tvb, offset, 4, ENC_BIG_ENDIAN);
1180
0
    offset += 4;
1181
0
    floating_fields(tvb, pinfo, ged125_tree, offset, size);
1182
0
    break;
1183
1184
0
  case GED125_VRU_STATUS_EVENT_VALUE:
1185
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_CurrentTime_num, tvb, offset, 4, ENC_BIG_ENDIAN);
1186
0
    offset += 4;
1187
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_TimeZoneDelta, tvb, offset, 4, ENC_BIG_ENDIAN);
1188
0
    offset += 4;
1189
0
    OperationalStatus_funk(tvb, pinfo, ged125_message_tree, &offset);
1190
0
    StatusVariable_funk(tvb, ged125_message_tree, &offset, size);
1191
0
    break;
1192
1193
0
  case GED125_TRKGRP_STATUS_EVENT_VALUE:
1194
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_TrunkGroupID, tvb, offset, 4, ENC_BIG_ENDIAN);
1195
0
    offset += 4;
1196
1197
0
    value = tvb_get_ntohl(tvb, offset);
1198
0
    ti = proto_tree_add_item(ged125_message_tree, hf_ged125_TrunkCount, tvb, offset, 4, ENC_BIG_ENDIAN);
1199
0
    offset += 4;
1200
0
    if (value > 1023)
1201
0
      expert_add_info(pinfo, ti, &ei_ged125_TrunkCount_invalid);
1202
1203
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_InService, tvb, offset, 4, ENC_BIG_ENDIAN);
1204
0
    offset += 4;
1205
0
    trunk_funk_without_status(tvb, ged125_message_tree, &offset, size);
1206
0
    break;
1207
1208
0
  case GED125_SERVICE_STATUS_EVENT_VALUE:
1209
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_ServiceID, tvb, offset, 4, ENC_BIG_ENDIAN);
1210
0
    offset += 4;
1211
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_ServiceAvailable, tvb, offset, 4, ENC_BIG_ENDIAN);
1212
0
    offset += 4;
1213
0
    break;
1214
1215
0
  case GED125_ROUTE_REQUEST_EVENT_VALUE:
1216
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_CrossRefID, tvb, offset, 4, ENC_BIG_ENDIAN);
1217
0
    offset += 4;
1218
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_CallID, tvb, offset, 4, ENC_BIG_ENDIAN);
1219
0
    offset += 4;
1220
0
    floating_fields(tvb, pinfo, ged125_tree, offset, size);
1221
0
    return tvb_captured_length(tvb);
1222
1223
0
  case GED125_ROUTE_SELECT_VALUE:
1224
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_CrossRefID, tvb, offset, 4, ENC_BIG_ENDIAN);
1225
0
    offset += 4;
1226
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_LabelType, tvb, offset, 4, ENC_BIG_ENDIAN);
1227
0
    offset += 4;
1228
0
    floating_fields(tvb, pinfo, ged125_tree, offset, size);
1229
0
    break;
1230
1231
0
  case GED125_ROUTE_END_EVENT_VALUE:
1232
0
  case GED125_ROUTE_END_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_Status, tvb, offset, 4, ENC_BIG_ENDIAN);
1236
0
    offset += 4;
1237
0
    break;
1238
1239
0
  case GED125_TIME_SYNCH_REQ_VALUE:
1240
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_InvokeID, tvb, offset, 4, ENC_BIG_ENDIAN);
1241
0
    offset += 4;
1242
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_VRUTimeLag, tvb, offset, 4, ENC_BIG_ENDIAN);
1243
0
    offset += 4;
1244
0
    break;
1245
1246
0
  case GED125_TIME_SYNCH_CONF_VALUE:
1247
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_InvokeID, tvb, offset, 4, ENC_BIG_ENDIAN);
1248
0
    offset += 4;
1249
0
    break;
1250
1251
0
  case GED125_SERVICE_CONTROL_VALUE:
1252
0
    service_control_dissect(tvb, ged125_message_tree, ged125_tree, pinfo, &offset, size);
1253
0
    break;
1254
1255
0
  case GED125_SIMULATOR_RESET_EVENT_VALUE:
1256
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_simulator_reset_event, tvb, offset, 4, ENC_BIG_ENDIAN);
1257
0
    break;
1258
1259
0
  case GED125_REGISTER_VARIABLES_VALUE:
1260
0
    proto_tree_add_item(ged125_message_tree, hf_ged125_CallVarsMask, tvb, offset, 2, ENC_BIG_ENDIAN);
1261
0
    offset += 2;
1262
0
    floating_fields(tvb, pinfo, ged125_tree, offset, size);
1263
0
    break;
1264
0
  }
1265
1266
0
  proto_item_set_len(message_item, offset-8);
1267
0
  return tvb_captured_length(tvb);
1268
0
}
1269
1270
static int
1271
dissect_ged125(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
1272
0
{
1273
0
  int size;
1274
0
  uint32_t message_type;
1275
1276
0
  size = tvb_captured_length(tvb);
1277
1278
0
  if (size < 12)
1279
0
    return 0;
1280
1281
0
  message_type = tvb_get_ntohl(tvb, 4);
1282
1283
  /*checks to make sure it's of a ged125 base message type*/
1284
0
  if (try_val_to_str(message_type, base_message_values) == NULL)
1285
0
    return 0;   /* not a known command */
1286
1287
0
  tcp_dissect_pdus(tvb, pinfo, tree, ged125_desegment_body, 4,
1288
0
             get_ged125_pdu_len, dissect_ged125_base_messages, data);
1289
1290
0
  return size;
1291
0
}
1292
1293
void
1294
proto_register_ged125 (void)
1295
14
{
1296
14
  module_t* ged125_module;
1297
1298
14
  static hf_register_info hf[] = {
1299
14
    { &hf_ged125_length,
1300
14
      { "Package Length", "ged125.len",
1301
14
      FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
1302
1303
14
    { &hf_ged125_value,
1304
14
      { "Message value", "ged125.value",
1305
14
      FT_UINT32, BASE_DEC, VALS(base_message_values), 0x0, NULL, HFILL }},
1306
1307
14
    { &hf_ged125_service_control_value,
1308
14
      { "Sub-Service Control Message value", "ged125.service_control",
1309
14
      FT_UINT32,  BASE_DEC, VALS(vals_service_control_message_subvalues),
1310
14
      0x0, NULL, HFILL }},
1311
1312
14
    { &hf_ged125_DialogueID_num,
1313
14
      { "Dialogue Id", "ged125.dialogue_id",
1314
14
      FT_UINT32,  BASE_DEC, NULL, 0x0, NULL, HFILL }},
1315
1316
14
    { &hf_ged125_SendSeqNo_num,
1317
14
      { "SendSeqNo", "ged125.send_seq_no",
1318
14
      FT_UINT32, BASE_DEC, NULL, 0x0,
1319
14
      "Send sequence for the sent message", HFILL }},
1320
1321
14
    { &hf_ged125_CurrentTime_num,
1322
14
      { "Current Time", "ged125.current_time",
1323
14
      FT_UINT32, BASE_DEC, NULL, 0x0,
1324
14
      "The current UTC time (VRU clock)", HFILL }},
1325
1326
14
    { &hf_ged125_TimeZoneDelta,
1327
14
      { "Time Zone Delta", "ged125.time_zone_delta",
1328
14
      FT_INT32, BASE_DEC,NULL, 0x0,
1329
14
      "The current local time zone delta, expressed in seconds."
1330
14
      "This value is added to a UTC time to form a time in the local time zone",
1331
14
      HFILL }},
1332
1333
14
    { &hf_ged125_OperationalStatus,
1334
14
      { "Operational Status", "ged125.operational_status",
1335
14
      FT_UINT32, BASE_DEC, NULL, 0x0,
1336
14
      "Operational Status of the VRU", HFILL }},
1337
1338
14
    { &hf_ged125_StatusVariable,
1339
14
      { "Status Variable", "ged125.status_variable",
1340
14
      FT_INT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
1341
1342
14
    { &hf_ged125_InvokeID,
1343
14
      { "Invoke ID", "ged125.invoke_id",
1344
14
      FT_UINT32, BASE_DEC, NULL, 0x0,
1345
14
      "Same as the corresponding req. mess", HFILL }},
1346
1347
14
    { &hf_ged125_Status,
1348
14
      { "Status", "ged125.status",
1349
14
      FT_UINT32, BASE_DEC, VALS(error_codes), 0x0,
1350
14
      "Status: Indicates cause of failure", HFILL }},
1351
1352
14
    { &hf_ged125_VersionNumber,
1353
14
      { "Version Number", "ged125.version_number",
1354
14
      FT_UINT32, BASE_DEC, NULL, 0x0,
1355
14
      "Interface number requested by the Peripheral Gateway,"
1356
14
      "defines the version of all messages in the message set", HFILL }},
1357
1358
14
    { &hf_ged125_IdleTimeout,
1359
14
      { "Idle Timeout (ms)", "ged125.idle_timeout",
1360
14
      FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
1361
1362
14
    { &hf_ged125_floating_CauseCode,
1363
14
      { "Cause code", "ged125.cause_code",
1364
14
      FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
1365
1366
14
    { &hf_ged125_UseEventFeed,
1367
14
      { "Use Event Feed", "ged125.use_event_feed",
1368
14
      FT_BOOLEAN, 32, NULL, 0x00000001,
1369
14
      "Indicates if the VRU supports the Event Data Feed", HFILL }},
1370
1371
    /* only valid for ICM version 4 or lower*/
1372
14
    { &hf_ged125_UsePolledFeed,
1373
14
      { "Use Polled Feed", "ged125.use_polled_feed",
1374
14
      FT_BOOLEAN, 32, NULL, 0x00000001,
1375
14
      "Indicates if the VRU supports the Polled Data Feed.", HFILL }},
1376
1377
14
    { &hf_ged125_UseCallRouting,
1378
14
      { "Use Call Routing", "ged125.use_call_routing",
1379
14
      FT_BOOLEAN, 32, NULL, 0x00000001,
1380
14
      "Indicates if the VRU supports the Call Routing Interface", HFILL }},
1381
1382
14
    { &hf_ged125_UseTimeSynch,
1383
14
      { "Use Time Synch", "ged125.use_time_synch",
1384
14
      FT_BOOLEAN, 32, NULL, 0x00000001,
1385
14
      "Indicates if the VRU supports the Time Synchronization Interface", HFILL }},
1386
1387
    /*Requires Protocol Version 2 or later*/
1388
14
    { &hf_ged125_UseServiceControl,
1389
14
      { "Use Service Control", "ged125.use_service_control",
1390
14
      FT_BOOLEAN, 32, NULL, 0x00000001,
1391
14
      "Indicates if the VRU supports the Service Control Interface", HFILL }},
1392
1393
14
    { &hf_ged125_TrunkGroupID,
1394
14
      { "Trunk Group ID", "ged125.trunk_group_id",
1395
14
      FT_UINT32, BASE_DEC, NULL, 0x0,
1396
14
      "An ID assigned by the VRU to this trunk group, in the range 0 to 65535", HFILL }},
1397
1398
14
    { &hf_ged125_TrunkCount,
1399
14
      { "Trunk Count", "ged125.trunk_count",
1400
14
      FT_UINT32, BASE_DEC, NULL, 0x0,
1401
14
      "The number of trunks configured in this message. TrunkCount may not exceed 1024", HFILL }},
1402
1403
14
    { &hf_ged125_CallsInToday,
1404
14
      { "Calls In Today", "ged125.calls_in_today",
1405
14
      FT_UINT32, BASE_DEC, NULL, 0x0,
1406
14
      "The cumulative number of inbound calls that have arrived on the trunk group this day", HFILL }},
1407
1408
14
    { &hf_ged125_CallsOutToday,
1409
14
      { "Calls Out Today", "ged125.call_out_today",
1410
14
      FT_UINT32, BASE_DEC, NULL, 0x0,
1411
14
      "The cumulative number of outbound calls that have been placed on the trunk group this day", HFILL }},
1412
1413
14
    { &hf_ged125_InServiceTimeToday,
1414
14
      { "In Service Time Today", "ged125.in_service_time_today",
1415
14
      FT_UINT32, BASE_DEC, NULL, 0x0,
1416
14
      "The cumulative amount of time (sec) that trunks in the trunk group "
1417
14
      "have been in service this day", HFILL }},
1418
1419
14
    { &hf_ged125_InUseInboundTimeToday,
1420
14
      { "In Use Inbound Time Today", "ged125.in_use_inbound_time_today",
1421
14
      FT_UINT32, BASE_DEC,NULL, 0x0,
1422
14
      "The cumulative amount of time (sec) that trunks in the trunk group "
1423
14
      "have been in use on incoming calls this day", HFILL }},
1424
1425
14
    { &hf_ged125_InUseOutboundTimeToday,
1426
14
      { "In Use Outbound Time Today", "ged125.in_use_outbound_time_today",
1427
14
      FT_UINT32, BASE_DEC, NULL, 0x0,
1428
14
      "The cumulative amount of time (sec) that trunks in the trunk group "
1429
14
      "have been in use on outgoing calls this day", HFILL }},
1430
1431
14
    { &hf_ged125_AllTrunksInUseTimeToday,
1432
14
      { "All Trunks In Use Time Today", "ged125.all_trunks_in_use_time_today",
1433
14
      FT_UINT32, BASE_DEC, NULL, 0x0,
1434
14
      "The cumulative amount of time (sec) that all trunks in the trunk group "
1435
14
      "were simultaneously busy this day", HFILL }},
1436
1437
14
    { &hf_ged125_TrunkNumber,
1438
14
      { "Trunk Number", "ged125.trunk_number",
1439
14
      FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
1440
1441
14
    { &hf_ged125_TrunkStatus,
1442
14
      { "Trunk Status", "ged125.trunk_status",
1443
14
      FT_UINT16, BASE_DEC, VALS(status_code_trunk_status), 0x0, NULL, HFILL }},
1444
1445
14
    { &hf_ged125_ServiceID,
1446
14
      { "Service ID", "ged125.service_id",
1447
14
      FT_UINT32, BASE_DEC, NULL, 0x0,
1448
14
      "An ID assigned by the VRU to this service", HFILL }},
1449
1450
14
    { &hf_ged125_AvailableNow,
1451
14
      { "Available Now", "ged125.available_now",
1452
14
      FT_BOOLEAN, 32, NULL, 0x00000001,
1453
14
      "Current availability of the service", HFILL }},
1454
1455
14
    { &hf_ged125_CallsInNow,
1456
14
      { "Call In Now", "ged125.call_in_now",
1457
14
      FT_UINT32, BASE_DEC, NULL, 0x0,
1458
14
      "The number of inbound calls currently in progress on the service.", HFILL }},
1459
1460
14
    { &hf_ged125_CallsOutNow,
1461
14
      { "Call Out Now", "ged125.call_out_now",
1462
14
      FT_UINT32, BASE_DEC, NULL, 0x0,
1463
14
      "The number of outbound calls currently in progress on the service", HFILL }},
1464
1465
14
    { &hf_ged125_CallsHandledToday,
1466
14
      { "Calls Handled Today", "ged125.call_handled_today",
1467
14
      FT_UINT32, BASE_DEC, NULL, 0x0,
1468
14
      "The cumulative number of calls handled on the service this day", HFILL }},
1469
1470
14
    { &hf_ged125_HandleTimeToday,
1471
14
      { "Handle Time Today", "ged125.handle_time_today",
1472
14
      FT_UINT32, BASE_DEC, NULL, 0x0,
1473
14
      "The cumulative amount of time (secs) spent handling calls on the service this day", HFILL }},
1474
1475
14
    { &hf_ged125_DivertedInToday,
1476
14
      { "Diverted In Today", "ged125.diverted_in_today",
1477
14
      FT_UINT32, BASE_DEC, NULL, 0x0,
1478
14
      "The cumulative number of calls diverted from another service to this service this day", HFILL }},
1479
1480
14
    { &hf_ged125_DivertedOutToday,
1481
14
      { "Diverted Out Today", "ged125.diverted_out_today",
1482
14
      FT_UINT32, BASE_DEC, NULL, 0x0,
1483
14
      "The cumulative number of calls diverted from this service to another service this day", HFILL }},
1484
1485
14
    { &hf_ged125_InitDataTime,
1486
14
      { "Init Data Time", "ged125.init_data_time",
1487
14
      FT_UINT32, BASE_DEC, NULL, 0x0,
1488
14
      "The UTC time at which the initial snapshot was taken", HFILL }},
1489
1490
14
    { &hf_ged125_StartOfDay,
1491
14
      { "Start Of Day", "ged125.start_of_day",
1492
14
      FT_UINT32, BASE_DEC, NULL, 0x0,
1493
14
      "Corresponds to midnight local time at the VRU (UTC). However, this may refer "
1494
14
      "to a different time if the VRU has restarted", HFILL }},
1495
1496
14
    { &hf_ged125_CallID,
1497
14
      { "Call ID", "ged125.call_id",
1498
14
      FT_UINT32, BASE_DEC, NULL, 0x0,
1499
14
      "An ID assigned to the call by the VRU", HFILL }},
1500
1501
14
    { &hf_ged125_floating,
1502
14
      { "Field", "ged125.floating_field",
1503
14
      FT_UINT32, BASE_DEC, VALS(vals_floating_point_types), 0x0,
1504
14
      "Shows the type of floating field", HFILL }},
1505
1506
14
    { &hf_ged125_ServiceFeatures,
1507
14
      { "Service Features", "ged125.service_features",
1508
14
      FT_UINT32, BASE_HEX, NULL, 0x0,
1509
14
      "A bit mask that is a logical OR of the Service Control features supported by the VRU", HFILL }},
1510
1511
14
    { &hf_ged125_floating_payload_strg,
1512
14
      { "Floating Payload", "ged125.floating_payload.strg",
1513
14
      FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
1514
1515
14
    { &hf_ged125_floating_payload_uint,
1516
14
      { "Floating Payload", "ged125.floating_payload.uint",
1517
14
      FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
1518
1519
14
    { &hf_ged125_floating_payload_bool,
1520
14
      { "Floating Payload", "ged125.floating_payload.bool",
1521
14
      FT_BOOLEAN, 32, NULL, 0x00000001, NULL, HFILL }},
1522
1523
14
    { &hf_ged125_floating_payload_ECC_tag,
1524
14
      { "ECC VAR Tag", "ged125.ecc_var_tag",
1525
14
      FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
1526
1527
14
    { &hf_ged125_ResultCode,
1528
14
      { "Errors running script", "ged125.result_code",
1529
14
      FT_BOOLEAN, 32, NULL, 0x00000001, NULL, HFILL }},
1530
1531
14
    { &hf_ged125_LabelType,
1532
14
      { "Label Type", "ged125.label_type",
1533
14
      FT_UINT32, BASE_DEC, VALS(status_code_Label_values),0x0,
1534
14
      "The type of the label returned in the following field", HFILL }},
1535
1536
14
    { &hf_ged125_EventID,
1537
14
      { "Event ID", "ged125.event_id",
1538
14
      FT_UINT32, BASE_DEC, VALS(status_code_event_reportcodes), 0x0,
1539
14
      "A code that identifies the event detected by the VRU", HFILL }},
1540
1541
14
    { &hf_ged125_ErrorCode,
1542
14
      { "Error Code", "ged125.error_code",
1543
14
      FT_UINT32, BASE_DEC, VALS(error_codes), 0x0,
1544
14
      "A status code indicating the cause of the failure", HFILL }},
1545
1546
14
    { &hf_ged125_Cause_just_for_release_message,
1547
14
      { "Cause of Release", "ged125.call_release",
1548
14
      FT_UINT32, BASE_DEC, VALS(Cause_just_for_release_message_vals), 0x0,
1549
14
      "The reason the call was released", HFILL }},
1550
1551
14
    { &hf_ged125_InService,
1552
14
      { "In Service", "ged125.in_service",
1553
14
      FT_BOOLEAN, 32, NULL, 0x00000001,
1554
14
      "A flag indicating that the affected trunks have been placed into "
1555
14
      "service (True) or removed from service (False)", HFILL }},
1556
1557
14
    { &hf_ged125_ServiceAvailable,
1558
14
      { "Service Available", "ged125.service_available",
1559
14
      FT_BOOLEAN, 32, NULL, 0x00000001,
1560
14
      NULL, HFILL }},
1561
1562
14
    { &hf_ged125_RequestID,
1563
14
      { "Request ID", "ged125.request_id",
1564
14
      FT_UINT32, BASE_DEC, NULL, 0x0,
1565
14
      "The InvokeID of the previously issued request to be cancelled", HFILL }},
1566
1567
14
    { &hf_ged125_ToBeContinued,
1568
14
      { "To Be Continued", "ged125.to_be_continued",
1569
14
      FT_BOOLEAN, 32, NULL, 0x00000001,
1570
14
      "A flag which indicates whether additional MICROAPP_PLAY_CONTINUE messages will follow",  HFILL }},
1571
1572
14
    { &hf_ged125_Barge_In_Allowed,
1573
14
      { "Barge In Allowed", "ged125.barge_in_allowed",
1574
14
      FT_BOOLEAN, 32, NULL, 0x00000001,
1575
14
      "Indicates whether caller is allowed to interrupt playing", HFILL }},
1576
1577
14
    { &hf_ged125_floating_cause_code,/* table 34*/
1578
14
      { "Call Cleared Code", "ged125.call_cleared_code",
1579
14
      FT_UINT32, BASE_DEC,VALS(vals_status_code_call_cleared), 0x0,
1580
14
      "Termination Call Details", HFILL }},
1581
1582
14
    { &hf_ged125_DTMF_Termination_Key,
1583
14
      { "DTMF Termination Key", "ged125.dtmf_termination_key",
1584
14
      FT_UINT32,BASE_DEC, NULL,0x0,
1585
14
      "Terminates a variable length string of DTMF digits "
1586
14
      "(typically # key). The value is a bit map", HFILL }},
1587
1588
14
    { &hf_ged125_No_Entry_Timeout,
1589
14
      { "No Entry Timeout", "ged125.no_entry_timeout",
1590
14
      FT_UINT32, BASE_DEC, NULL, 0x0,
1591
14
      "Determines how many seconds a caller is allowed to start entering data", HFILL }},
1592
1593
14
    { &hf_ged125_Interdigit_Timeout,
1594
14
      { "Interdigit Timeout", "ged125.interdigit_timeout",
1595
14
      FT_UINT32, BASE_DEC, NULL, 0x0,
1596
14
      "Determines how many seconds the caller is allowed between digits, "
1597
14
      "before the system assumes the caller is finished", HFILL }},
1598
1599
14
    { &hf_ged125_Number_of_No_Entry_Tries,
1600
14
      { "Number of No Entry Tries", "ged125.number_of_no_entry_tries",
1601
14
      FT_UINT32, BASE_DEC, NULL, 0x0,
1602
14
      "Number of times VRU should repeat the 'Get data' cycle when the caller "
1603
14
      "doesn't enter any data", HFILL }},
1604
1605
14
    { &hf_ged125_Number_of_Invalid_Entry_Tries,
1606
14
      { "Number of Invalid Entry Tries", "ged125.number_of_invalid_entry_tries",
1607
14
      FT_UINT32, BASE_DEC, NULL, 0x0,
1608
14
      "Number of times VRU should repeat the 'Get data' cycle when the "
1609
14
      "caller enters invalid data", HFILL }},
1610
1611
14
    { &hf_ged125_Min_Length,
1612
14
      { "Min Length of Digits", "ged125.min_length",
1613
14
      FT_UINT32, BASE_DEC, NULL, 0x0,
1614
14
      "Minimum number of digits expected from the caller", HFILL }},
1615
1616
14
    { &hf_ged125_Max_Length,
1617
14
      { "Max Length of Digits", "ged125.max_length",
1618
14
      FT_UINT32, BASE_DEC, NULL, 0x0,
1619
14
      "Maximum number of digits expected from the caller", HFILL }},
1620
1621
14
    { &hf_ged125_ASR_Allowed,
1622
14
      { "ASR Allowed", "ged125.asr_allowed",
1623
14
      FT_BOOLEAN, 32, NULL, 0x00000001,
1624
14
      "Indicates whether Automatic Speech Recognition should be enabled for this request", HFILL }},
1625
1626
14
    { &hf_ged125_DTMF_Menu_Keys,
1627
14
      { "DTMF Menu Keys", "ged125.dtmf_menu_keys",
1628
14
      FT_UINT32, BASE_DEC, NULL, 0x0,
1629
14
      "Indicates which keypad keys represent valid menu choices", HFILL }},
1630
1631
14
    { &hf_ged125_Microapp_Error_Code,
1632
14
      { "Microapp Error Code", "ged125.microapp_error_code",
1633
14
      FT_UINT32, BASE_DEC,
1634
14
      VALS(status_code_microcapp_error_codes), 0x0, NULL, HFILL }},
1635
1636
14
    { &hf_ged125_ConferenceCallID,
1637
14
      { "Conference Call ID", "ged125.conference_call_id",
1638
14
      FT_UINT32, BASE_DEC, NULL, 0x0,
1639
14
      "An ID assigned to the resultant conference call by the VRU", HFILL }},
1640
1641
14
    { &hf_ged125_PrimaryCallID,
1642
14
      { "Primary Call ID", "ged125.primary_call_id",
1643
14
      FT_UINT32, BASE_DEC, NULL, 0x0,
1644
14
      "The ID of the primary (inbound) call being conferenced", HFILL }},
1645
1646
14
    { &hf_ged125_SecondaryCallID,
1647
14
      { "Secondary Call ID", "ged125.secondary_call_id",
1648
14
      FT_UINT32, BASE_DEC, NULL, 0x0,
1649
14
      "The ID of the secondary (outbound) call being conferenced", HFILL }},
1650
1651
14
    { &hf_ged125_NewServiceID,
1652
14
      { "New Service ID", "ged125.new_service_id",
1653
14
      FT_UINT32, BASE_DEC, NULL, 0x0,
1654
14
      "The ID of the new service to which the call was diverted", HFILL }},
1655
1656
14
    { &hf_ged125_NewCallID,
1657
14
      { "New Call ID", "ged125.new_call_id",
1658
14
      FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
1659
1660
14
    { &hf_ged125_simulator_reset_event,
1661
14
      { "Simulator Reset Event", "ged125.simulator_reset_event",
1662
14
      FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
1663
1664
14
    { &hf_ged125_CrossRefID,
1665
14
      { "Cross Reference ID", "ged125.cross_ref_id",
1666
14
      FT_UINT32, BASE_DEC, NULL, 0x0,
1667
14
      "A cross-reference identifier assigned by the VRU to this call routing dialogue", HFILL }},
1668
1669
14
    { &hf_ged125_VRUTimeLag,
1670
14
      { "VRU Time Lag", "ged125.vru_time_lag",
1671
14
      FT_INT32, BASE_DEC, NULL, 0x0,
1672
14
      "Number of seconds that the VRU clock lags the ICM clock", HFILL }},
1673
1674
14
    { &hf_ged125_CallVarsMask,
1675
14
      { "Call Vars Mask", "ged125.call_vars_mask",
1676
14
      FT_UINT32, BASE_HEX, NULL, 0x0,
1677
14
      "A bit map, with the least significant bit referring to Call Variable1", HFILL }},
1678
1679
14
    { &hf_ged125_floating_payload_unspec,
1680
14
      { "Unspec floating data-type", "ged125.floating_unspec",
1681
14
      FT_BYTES, BASE_NONE, NULL, 0x0,
1682
14
      "Unknown data type", HFILL }},
1683
1684
14
    { &hf_ged125_floating_media_protocol,
1685
14
      { "Media Protocol", "ged125.media_protocol",
1686
14
      FT_CHAR, BASE_HEX, VALS(floating_media_protocol_vals), 0x0,
1687
14
      "Type of media", HFILL }},
1688
1689
14
    { &hf_ged125_floating_library_designator,
1690
14
      { "Library Designator", "ged125.library_designator",
1691
14
      FT_CHAR, BASE_HEX, VALS(floating_media_library_designator_vals), 0x0,
1692
14
      "System or Application", HFILL }},
1693
1694
14
    { &hf_ged125_Data_Playback_Type,
1695
14
      { "Data Playback Type", "ged125.data_playback_type",
1696
14
      FT_UINT32, BASE_DEC, VALS(Data_Playback_Type), 0x0, NULL, HFILL }},
1697
1698
14
    { &hf_ged125_Data_Playback_Formats,
1699
14
      { "Data Playback Format", "ged125.data_playback_format",
1700
14
      FT_UINT32, BASE_DEC, VALS(Data_Playback_Formats),0x0,
1701
14
      "Only relevant if Data Playback Type is one of the time formats. "
1702
14
      "It should contain PLAYBACK_FORMAT_OTHER in all other cases", HFILL }},
1703
1704
14
    { &hf_ged125_floating_uchar_array_index,
1705
14
      { "Uchar-Array Index", "ged125.uchar_array_index",
1706
14
      FT_UINT32, BASE_DEC, NULL, 0x0,
1707
14
      "Array index of an ECC field", HFILL }}
1708
14
  };
1709
1710
14
  static int *ett[] = {
1711
14
    &ett_ged125,
1712
14
    &ett_ged125_header,
1713
14
    &ett_ged125_message,
1714
14
    &ett_ged125_floating,
1715
14
    &ett_ged125_float_field,
1716
14
    &ett_ged125_service_control_header,
1717
14
    &ett_ged125_service_control_data
1718
14
  };
1719
1720
14
  static ei_register_info ei[] = {
1721
14
    { &ei_ged125_OperationalStatus_normal, { "ged125.operational_status.normal", PI_PROTOCOL, PI_NOTE, "Normal Operation", EXPFILL }},
1722
14
    { &ei_ged125_OperationalStatus_loss_redundant_component, { "ged125.operational_status.loss_redundant_component", PI_PROTOCOL, PI_NOTE,
1723
14
      "Loss of redundant component or other transparent failure; still fully functional for call processing", EXPFILL }},
1724
14
    { &ei_ged125_OperationalStatus_degraded_call_processing, { "ged125.operational_status.degraded_call_processing", PI_PROTOCOL, PI_NOTE, "Degraded call processing", EXPFILL }},
1725
14
    { &ei_ged125_OperationalStatus_conditions_prevent_call, { "ged125.operational_status.conditions_prevent_call", PI_PROTOCOL, PI_NOTE, "Conditions prevent call processing", EXPFILL }},
1726
14
    { &ei_ged125_OperationalStatus_invalid_message, { "ged125.operational_status.invalid_message", PI_PROTOCOL, PI_WARN, "Error: Invalid message", EXPFILL }},
1727
14
    { &ei_ged125_length_bad, { "ged125.length.bad", PI_MALFORMED, PI_ERROR, "Incorrect size given in the packet (corrupted)", EXPFILL }},
1728
14
    { &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 }},
1729
14
    { &ei_ged125_service_control_value_unknown, { "ged125.service_control_value.unknown", PI_PROTOCOL, PI_WARN, "Unknown Service-Control Message Sub-type, aborting dissection", EXPFILL }},
1730
14
    { &ei_ged125_trunk_group_id, { "ged125.trunk_group_id.bad_range", PI_PROTOCOL, PI_WARN, "TrunkGroupID must be between 0-65535", EXPFILL }},
1731
14
    { &ei_ged125_TrunkCount_invalid, { "ged125.trunk_count.invalid", PI_PROTOCOL, PI_WARN, "Invalid number of trunks (max is 1023)", EXPFILL }},
1732
14
  };
1733
1734
14
  expert_module_t* expert_ged125;
1735
1736
14
  proto_ged125 = proto_register_protocol ("Cisco GED-125 Protocol", "GED125", "ged125");
1737
14
  proto_register_field_array (proto_ged125, hf, array_length (hf));
1738
14
  proto_register_subtree_array (ett, array_length (ett));
1739
14
  expert_ged125 = expert_register_protocol(proto_ged125);
1740
14
  expert_register_field_array(expert_ged125, ei, array_length(ei));
1741
1742
14
  ged125_handle = register_dissector("ged125", dissect_ged125, proto_ged125);
1743
1744
14
  ged125_module = prefs_register_protocol(proto_ged125, NULL);
1745
1746
14
  prefs_register_bool_preference(ged125_module, "desegment_body",
1747
14
     "Reassemble GED125 bodies spanning multiple TCP segments",
1748
14
     "Whether the GED125 dissector should desegment all messages spanning multiple TCP segments",
1749
14
     &ged125_desegment_body);
1750
14
}
1751
1752
void
1753
proto_reg_handoff_ged125(void)
1754
14
{
1755
  /* Register TCP port for dissection */
1756
14
  dissector_add_for_decode_as_with_preference("tcp.port", ged125_handle);
1757
14
}
1758
1759
/*
1760
 * Editor modelines  -  https://www.wireshark.org/tools/modelines.html
1761
 *
1762
 * Local variables:
1763
 * c-basic-offset: 8
1764
 * tab-width: 8
1765
 * indent-tabs-mode: t
1766
 * End:
1767
 *
1768
 * vi: set shiftwidth=8 tabstop=8 noexpandtab:
1769
 * :indentSize=8:tabSize=8:noTabs=false:
1770
 */