HACK: pinfo->private_data points to smb_info again
[wireshark-wip.git] / epan / dissectors / packet-ua3g.c
blob346bd7952d83fd77b845687317c25231b0b860d7
1 /* packet-ua3g.c
2 * Routines for UA/UDP (Universal Alcatel over UDP) packet dissection.
3 * Copyright 2012, Alcatel-Lucent Enterprise <lars.ruoff@alcatel-lucent.com>
5 * $Id$
7 * Wireshark - Network traffic analyzer
8 * By Gerald Combs <gerald@wireshark.org>
9 * Copyright 1998 Gerald Combs
11 * This program is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU General Public License
13 * as published by the Free Software Foundation; either version 2
14 * of the License, or (at your option) any later version.
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
21 * You should have received a copy of the GNU General Public License
22 * along with this program; if not, write to the Free Software
23 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
26 #include "config.h"
28 #include <ctype.h>
30 #include <glib.h>
32 #include "epan/packet.h"
33 #include "epan/wmem/wmem.h"
34 #include "packet-uaudp.h"
37 /*-----------------------------------------------------------------------------
38 Globals
39 ---------------------------------------------------------------------------*/
41 #if 0
42 static dissector_table_t ua3g_opcode_dissector_table;
43 #endif
46 static int proto_ua3g = -1;
47 static gint ett_ua3g = -1;
48 static gint ett_ua3g_body = -1;
49 static gint ett_ua3g_param = -1;
50 static gint ett_ua3g_param_sub = -1;
51 static gint ett_ua3g_option = -1;
53 static int hf_ua3g_length = -1;
54 static int hf_ua3g_opcode_sys = -1;
55 static int hf_ua3g_opcode_term = -1;
56 static int hf_ua3g_opcode_production_test = -1;
57 static int hf_ua3g_opcode_subservice_reset = -1;
58 static int hf_ua3g_opcode_are_you_there = -1;
59 static int hf_ua3g_opcode_set_speaker_vol = -1;
60 static int hf_ua3g_opcode_trace_on = -1;
61 static int hf_ua3g_ip = -1;
62 static int hf_ua3g_ip_cs = -1;
63 static int hf_ua3g_command_led = -1;
64 static int hf_ua3g_command_lcd_line = -1;
65 static int hf_ua3g_main_voice_mode = -1;
66 static int hf_ua3g_command_set_clck = -1;
67 static int hf_ua3g_external_ringing_command= -1;
68 static int hf_ua3g_lcd_cursor = -1;
69 static int hf_ua3g_command_beep = -1;
70 static int hf_ua3g_command_sidetone = -1;
71 static int hf_ua3g_command_mute = -1;
72 static int hf_ua3g_command_feedback = -1;
73 static int hf_ua3g_command_audio_config = -1;
74 static int hf_ua3g_command_key_release = -1;
75 static int hf_ua3g_command_amplified_handset = -1;
76 static int hf_ua3g_command_loudspeaker = -1;
77 static int hf_ua3g_command_announce = -1;
78 static int hf_ua3g_command_ring = -1;
79 static int hf_ua3g_command_ua_dwl_protocol = -1;
80 static int hf_ua3g_command_unsolicited_msg = -1;
81 static int hf_ua3g_ip_device_routing_stop_rtp_parameter = -1;
82 static int hf_ua3g_ip_device_routing_stop_rtp_parameter_length = -1;
83 static int hf_ua3g_ip_device_routing_stop_rtp_parameter_value_num = -1;
84 static int hf_ua3g_ip_device_routing_stop_rtp_parameter_value_bytes = -1;
85 /* Generated from convert_proto_tree_add_text.pl */
86 static int hf_ua3g_ip_device_routing_start_tone_direction = -1;
87 static int hf_ua3g_ip_device_routing_start_tone_num_entries = -1;
88 static int hf_ua3g_ip_device_routing_def_tones_num_entries = -1;
89 static int hf_ua3g_cs_ip_device_routing_cmd00_characteristic_number = -1;
90 static int hf_ua3g_subdevice_msg_subdev_type = -1;
91 static int hf_ua3g_unsolicited_msg_next_byte_of_bad_segment = -1;
92 static int hf_ua3g_ip_device_routing_start_tone_identification = -1;
93 static int hf_ua3g_ip_device_routing_def_tones_level_2 = -1;
94 static int hf_ua3g_r_w_peripheral_content = -1;
95 static int hf_ua3g_subdevice_metastate_subchannel_address = -1;
96 static int hf_ua3g_subdevice_parameter_bytes = -1;
97 static int hf_ua3g_subdevice_msg_parameter_bytes = -1;
98 static int hf_ua3g_set_clck_timer_pos_call_timer_column_number = -1;
99 static int hf_ua3g_unsolicited_msg_segment_failure_s = -1;
100 static int hf_ua3g_ip_device_routing_reset_parameter = -1;
101 static int hf_ua3g_ip_device_routing_get_param_req_parameter = -1;
102 static int hf_ua3g_set_lcd_contrast_driver_number = -1;
103 static int hf_ua3g_dwl_special_char_character_number = -1;
104 static int hf_ua3g_cs_ip_device_routing_cmd00_vta_type = -1;
105 static int hf_ua3g_ua_dwl_protocol_cause = -1;
106 static int hf_ua3g_audio_padded_path_emission_padded_level = -1;
107 static int hf_ua3g_set_clck_timer_pos_clock_column_number = -1;
108 static int hf_ua3g_segment_msg_num_remaining = -1;
109 static int hf_ua3g_ip_device_routing_digit_value = -1;
110 static int hf_ua3g_super_msg_data = -1;
111 static int hf_ua3g_unsolicited_msg_hardware_version = -1;
112 static int hf_ua3g_voice_channel_announce = -1;
113 static int hf_ua3g_ring_silent = -1;
114 static int hf_ua3g_audio_config_handsfree_return = -1;
115 static int hf_ua3g_dwl_dtmf_clck_format_inter_digit_pause_time = -1;
116 static int hf_ua3g_ip_device_routing_set_param_req_parameter_length = -1;
117 static int hf_ua3g_unsolicited_msg_opcode_bad_segment = -1;
118 static int hf_ua3g_unsolicited_msg_firmware_version_loader = -1;
119 static int hf_ua3g_debug_in_line = -1;
120 static int hf_ua3g_voice_channel_b_microphones = -1;
121 static int hf_ua3g_beep_beep_number = -1;
122 static int hf_ua3g_main_voice_mode_tune = -1;
123 static int hf_ua3g_super_msg_length = -1;
124 static int hf_ua3g_ip_device_routing_redirect_parameter = -1;
125 static int hf_ua3g_unsolicited_msg_next_byte_of_bad_command = -1;
126 static int hf_ua3g_unsolicited_msg_self_test_result = -1;
127 static int hf_ua3g_beep_on_off = -1;
128 static int hf_ua3g_ua_dwl_protocol_binary_length = -1;
129 static int hf_ua3g_ring_speaker_level = -1;
130 static int hf_ua3g_voice_channel_channel_mode = -1;
131 static int hf_ua3g_cs_ip_device_routing_cmd02_parameter_length = -1;
132 static int hf_ua3g_ip_device_routing_start_rtp_parameter = -1;
133 static int hf_ua3g_subdevice_metastate_new_metastate = -1;
134 static int hf_ua3g_unsolicited_msg_other_information_2 = -1;
135 static int hf_ua3g_set_lcd_contrast_contrast_value = -1;
136 static int hf_ua3g_unsolicited_msg_vta_type = -1;
137 static int hf_ua3g_ua_dwl_protocol_packet_number = -1;
138 static int hf_ua3g_unsolicited_msg_segment_failure_l = -1;
139 static int hf_ua3g_voice_channel_b_ear_piece = -1;
140 static int hf_ua3g_subdevice_msg_subdev_address = -1;
141 static int hf_ua3g_ring_progressive = -1;
142 static int hf_ua3g_ua_dwl_protocol_item_version = -1;
143 static int hf_ua3g_ip_device_routing_reset_parameter_length = -1;
144 static int hf_ua3g_dwl_dtmf_clck_format_minimum_on_time = -1;
145 static int hf_ua3g_ring_melody = -1;
146 static int hf_ua3g_ua_dwl_protocol_item_identifier = -1;
147 static int hf_ua3g_main_voice_mode_speaker_volume = -1;
148 static int hf_ua3g_ip_device_routing_listen_rtp_parameter_length = -1;
149 static int hf_ua3g_ringing_cadence_length = -1;
150 static int hf_ua3g_software_reset = -1;
151 static int hf_ua3g_feedback_level = -1;
152 static int hf_ua3g_ip_phone_warmstart = -1;
153 static int hf_ua3g_subdevice_opcode = -1;
154 static int hf_ua3g_unsolicited_msg_device_event = -1;
155 static int hf_ua3g_segment_message_data = -1;
156 static int hf_ua3g_main_voice_mode_sending_level = -1;
157 static int hf_ua3g_subdevice_msg_subdevice_opcode = -1;
158 static int hf_ua3g_cs_ip_device_routing_cmd03_parameter = -1;
159 static int hf_ua3g_audio_padded_path_reception_padded_level = -1;
160 static int hf_ua3g_ua_dwl_protocol_force_mode = -1;
161 static int hf_ua3g_lcd_line_cmd_starting_column = -1;
162 static int hf_ua3g_subdevice_address = -1;
163 static int hf_ua3g_ip_device_routing_pause_restart_rtp_parameter = -1;
164 static int hf_ua3g_audio_config_ignored = -1;
165 static int hf_ua3g_lcd_line_cmd_lcd_options = -1;
166 static int hf_ua3g_main_voice_mode_cadence = -1;
167 static int hf_ua3g_segment_msg_length = -1;
168 static int hf_ua3g_ua_dwl_protocol_acknowledge = -1;
169 static int hf_ua3g_command_led_number = -1;
170 static int hf_ua3g_set_clck_timer_pos_call_timer_line_number = -1;
171 static int hf_ua3g_unsolicited_msg_segment_failure_t = -1;
172 static int hf_ua3g_ip_device_routing_start_tone_duration = -1;
173 static int hf_ua3g_unsolicited_msg_other_information_1 = -1;
174 static int hf_ua3g_unsolicited_msg_firmware_datas_patch_version = -1;
175 static int hf_ua3g_ring_beep_number = -1;
176 static int hf_ua3g_feedback_duration = -1;
177 static int hf_ua3g_ip_device_routing_start_stop_record_rtp_parameter_length = -1;
178 static int hf_ua3g_audio_config_law = -1;
179 static int hf_ua3g_ua_dwl_protocol_checksum = -1;
180 static int hf_ua3g_ip_device_routing_pause_restart_rtp_parameter_value = -1;
181 static int hf_ua3g_audio_config_handsfree_handsfree = -1;
182 static int hf_ua3g_ringing_cadence_cadence = -1;
183 static int hf_ua3g_lcd_cursor_line_number = -1;
184 static int hf_ua3g_ip_device_routing_def_tones_level_1 = -1;
185 static int hf_ua3g_unsolicited_msg_opcode_of_bad_command = -1;
186 static int hf_ua3g_ua_dwl_protocol_download_ack_status = -1;
187 static int hf_ua3g_voice_channel_main_voice = -1;
188 static int hf_ua3g_ip_device_routing_pause_restart_rtp_parameter_length = -1;
189 static int hf_ua3g_icon_cmd_segment = -1;
190 static int hf_ua3g_cs_ip_device_routing_cmd01_incident_0 = -1;
191 static int hf_ua3g_beep_destination = -1;
192 static int hf_ua3g_ip_device_routing_def_tones_frequency_1 = -1;
193 static int hf_ua3g_unsolicited_msg_datas_version = -1;
194 static int hf_ua3g_dwl_dtmf_clck_format_dtmf_country_adaptation = -1;
195 static int hf_ua3g_ringing_cadence_on_off = -1;
196 static int hf_ua3g_audio_config_volume_level = -1;
197 static int hf_ua3g_voice_channel_b_general = -1;
198 static int hf_ua3g_beep_terminator = -1;
199 static int hf_ua3g_cs_ip_device_routing_cmd02_parameter = -1;
200 static int hf_ua3g_unsolicited_msg_firmware_version_bootloader = -1;
201 static int hf_ua3g_ip_device_routing_set_param_req_parameter = -1;
202 static int hf_ua3g_ip_device_routing_start_rtp_direction = -1;
203 static int hf_ua3g_set_clck_timer_pos_clock_line_number = -1;
204 static int hf_ua3g_voice_channel_b_loud_speaker = -1;
205 static int hf_ua3g_ip_device_routing_start_stop_record_rtp_parameter = -1;
206 static int hf_ua3g_on_off_level_level_on_loudspeaker = -1;
207 static int hf_ua3g_cs_ip_device_routing_cmd03_parameter_length = -1;
208 static int hf_ua3g_main_voice_mode_microphone_volume = -1;
209 static int hf_ua3g_sidetone_level = -1;
210 static int hf_ua3g_beep_number_of_notes = -1;
211 static int hf_ua3g_unsolicited_msg_segment_failure_num = -1;
212 static int hf_ua3g_dwl_special_char_byte = -1;
213 static int hf_ua3g_ring_cadence = -1;
214 static int hf_ua3g_unsolicited_msg_device_type = -1;
215 static int hf_ua3g_voice_channel_codec = -1;
216 static int hf_ua3g_ip_device_routing_redirect_parameter_length = -1;
217 static int hf_ua3g_ip_device_routing_listen_rtp_parameter = -1;
218 static int hf_ua3g_beep_cadence = -1;
219 static int hf_ua3g_voice_channel_voice_channel = -1;
220 static int hf_ua3g_unsolicited_msg_other_information = -1;
221 static int hf_ua3g_ip_device_routing_def_tones_frequency_2 = -1;
222 static int hf_ua3g_digit_dialed_digit_value = -1;
223 static int hf_ua3g_unsolicited_msg_subdevice_address = -1;
224 static int hf_ua3g_ua_dwl_protocol_packet_download_end_ack_ok_status = -1;
225 static int hf_ua3g_r_w_peripheral_address = -1;
226 static int hf_ua3g_icon_cmd_icon_number = -1;
227 static int hf_ua3g_dwl_dtmf_clck_format_clock_time_format = -1;
228 static int hf_ua3g_ip_device_routing_start_rtp_parameter_length = -1;
229 static int hf_ua3g_i_m_here_id_code = -1;
230 static int hf_ua3g_ua_dwl_protocol_item_version_nc = -1;
231 static int hf_ua3g_unsolicited_msg_firmware_version = -1;
232 static int hf_ua3g_segment_msg_segment = -1;
233 static int hf_ua3g_ip_device_routing_reset_parameter_noe_update = -1;
234 static int hf_ua3g_ip_device_routing_reset_parameter_noe_update_bootloader = -1;
235 static int hf_ua3g_ip_device_routing_reset_parameter_noe_update_data = -1;
236 static int hf_ua3g_ip_device_routing_reset_parameter_noe_update_customization = -1;
237 static int hf_ua3g_ip_device_routing_reset_parameter_noe_update_localization = -1;
238 static int hf_ua3g_ip_device_routing_reset_parameter_noe_update_code = -1;
239 static int hf_ua3g_ip_device_routing_reset_parameter_noe_update_sip = -1;
240 static int hf_ua3g_ip_device_routing_reset_parameter_value = -1;
241 static int hf_ua3g_ip_device_routing_reset_parameter_bad_sec_mode = -1;
242 static int hf_ua3g_ip_device_routing_reset_parameter_cust_name = -1;
243 static int hf_ua3g_ip_device_routing_reset_parameter_l10n_name = -1;
244 static int hf_ua3g_ip_device_routing_start_rtp_parameter_ip = -1;
245 static int hf_ua3g_ip_device_routing_start_rtp_parameter_compressor = -1;
246 static int hf_ua3g_ip_device_routing_start_rtp_parameter_value = -1;
247 static int hf_ua3g_ip_device_routing_start_rtp_parameter_enabler = -1;
248 static int hf_ua3g_ip_device_routing_start_rtp_parameter_send_qos = -1;
249 static int hf_ua3g_ip_device_routing_start_rtp_parameter_dtmf_sending = -1;
250 static int hf_ua3g_ip_device_routing_start_rtp_parameter_rfc2198 = -1;
251 static int hf_ua3g_ip_device_routing_start_rtp_parameter_srtp_encryption = -1;
252 static int hf_ua3g_ip_device_routing_start_rtp_parameter_uint = -1;
253 static int hf_ua3g_ip_device_routing_redirect_parameter_ip = -1;
254 static int hf_ua3g_ip_device_routing_redirect_parameter_uint = -1;
255 static int hf_ua3g_ip_device_routing_redirect_parameter_value = -1;
256 static int hf_ua3g_ip_device_routing_listen_rtp_parameter_ip = -1;
257 static int hf_ua3g_ip_device_routing_listen_rtp_parameter_port = -1;
258 static int hf_ua3g_ip_device_routing_listen_rtp_parameter_value = -1;
259 static int hf_ua3g_ip_device_routing_set_param_req_parameter_compressor = -1;
260 static int hf_ua3g_ip_device_routing_set_param_req_parameter_err_string = -1;
261 static int hf_ua3g_ip_device_routing_set_param_req_parameter_tftp_backup_ip = -1;
262 static int hf_ua3g_ip_device_routing_set_param_req_parameter_set_pc_port_status = -1;
263 static int hf_ua3g_ip_device_routing_set_param_req_parameter_record_rtp_auth = -1;
264 static int hf_ua3g_ip_device_routing_set_param_req_parameter_security_flag_filter = -1;
265 static int hf_ua3g_ip_device_routing_set_param_req_parameter_uint = -1;
266 static int hf_ua3g_ip_device_routing_set_param_req_parameter_value = -1;
267 static int hf_ua3g_ip_device_routing_pause_restart_rtp_parameter_uint = -1;
268 static int hf_ua3g_ip_device_routing_start_stop_record_rtp_parameter_remote_ip = -1;
269 static int hf_ua3g_ip_device_routing_start_stop_record_rtp_parameter_uint = -1;
270 static int hf_ua3g_ip_device_routing_start_stop_record_rtp_parameter_value = -1;
271 static int hf_ua3g_main_voice_mode_handset_level = -1;
272 static int hf_ua3g_main_voice_mode_headset_level = -1;
273 static int hf_ua3g_main_voice_mode_handsfree_level = -1;
274 static int hf_ua3g_audio_config_dpi_chan_ua_tx1 = -1;
275 static int hf_ua3g_audio_config_dpi_chan_ua_tx2 = -1;
276 static int hf_ua3g_audio_config_dpi_chan_gci_tx1 = -1;
277 static int hf_ua3g_audio_config_dpi_chan_gci_tx2 = -1;
278 static int hf_ua3g_audio_config_dpi_chan_cod_tx = -1;
279 static int hf_ua3g_audio_config_audio_circuit_dth = -1;
280 static int hf_ua3g_audio_config_audio_circuit_dtr = -1;
281 static int hf_ua3g_audio_config_audio_circuit_dtf = -1;
282 static int hf_ua3g_audio_config_audio_circuit_str = -1;
283 static int hf_ua3g_audio_config_audio_circuit_ahp1 = -1;
284 static int hf_ua3g_audio_config_audio_circuit_ahp2 = -1;
285 static int hf_ua3g_audio_config_audio_circuit_ath = -1;
286 static int hf_ua3g_audio_config_audio_circuit_atr = -1;
287 static int hf_ua3g_audio_config_audio_circuit_atf = -1;
288 static int hf_ua3g_audio_config_audio_circuit_alm = -1;
289 static int hf_ua3g_audio_config_loudspeaker_aco_param_group_listen = -1;
290 static int hf_ua3g_audio_config_loudspeaker_aco_param_handsfree_attenuation = -1;
291 static int hf_ua3g_audio_config_loudspeaker_aco_param_handsfree_stay_in_send = -1;
292 static int hf_ua3g_audio_config_loudspeaker_aco_param_handsfree_shift_right_mtx = -1;
293 static int hf_ua3g_audio_config_loudspeaker_aco_param_handsfree_shift_right_mrc = -1;
294 static int hf_ua3g_audio_config_loudspeaker_aco_param_handsfree_idle_trans_threshold = -1;
295 static int hf_ua3g_audio_config_loudspeaker_aco_param_handsfree_low_trans_threshold = -1;
296 static int hf_ua3g_audio_config_loudspeaker_aco_param_handsfree_idle_recv_threshold = -1;
297 static int hf_ua3g_audio_config_loudspeaker_aco_param_handsfree_low_recv_threshold = -1;
298 static int hf_ua3g_audio_config_loudspeaker_aco_param_handsfree_med_recv_threshold = -1;
299 static int hf_ua3g_audio_config_loudspeaker_aco_param_handsfree_high_recv_threshold = -1;
300 static int hf_ua3g_ua_dwl_protocol_files_inc_boot_binary = -1;
301 static int hf_ua3g_ua_dwl_protocol_files_inc_loader_binary = -1;
302 static int hf_ua3g_ua_dwl_protocol_files_inc_appli_binary = -1;
303 static int hf_ua3g_ua_dwl_protocol_files_inc_data_binary = -1;
304 static int hf_ua3g_ua_dwl_protocol_model_selection_a = -1;
305 static int hf_ua3g_ua_dwl_protocol_model_selection_b = -1;
306 static int hf_ua3g_ua_dwl_protocol_model_selection_c = -1;
307 static int hf_ua3g_ua_dwl_protocol_model_selection_country_ver = -1;
308 static int hf_ua3g_ua_dwl_protocol_hardware_selection_ivanoe1 = -1;
309 static int hf_ua3g_ua_dwl_protocol_hardware_selection_ivanoe2 = -1;
310 static int hf_ua3g_ua_dwl_protocol_memory_sizes_flash = -1;
311 static int hf_ua3g_ua_dwl_protocol_memory_sizes_ext_ram = -1;
312 static int hf_ua3g_unsolicited_msg_char_num_vta_subtype = -1;
313 static int hf_ua3g_unsolicited_msg_char_num_generation = -1;
314 static int hf_ua3g_unsolicited_msg_char_num_design = -1;
315 static int hf_ua3g_unsolicited_msg_hardware_config_vta_type = -1;
316 static int hf_ua3g_unsolicited_msg_hardware_config_design = -1;
317 static int hf_ua3g_unsolicited_msg_hardware_config_subtype = -1;
318 static int hf_ua3g_unsolicited_msg_hardware_config_hard_config_chip = -1;
319 static int hf_ua3g_unsolicited_msg_hardware_config_hard_config_flash = -1;
320 static int hf_ua3g_unsolicited_msg_hardware_config_config_ram = -1;
321 static int hf_ua3g_unsolicited_msg_hardware_config_hard_config_ip = -1;
322 static int hf_ua3g_unsolicited_msg_hook_status = -1;
323 static int hf_ua3g_special_key_shift = -1;
324 static int hf_ua3g_special_key_ctrl = -1;
325 static int hf_ua3g_special_key_alt = -1;
326 static int hf_ua3g_special_key_cmd = -1;
327 static int hf_ua3g_special_key_shift_prime = -1;
328 static int hf_ua3g_special_key_ctrl_prime = -1;
329 static int hf_ua3g_special_key_alt_prime = -1;
330 static int hf_ua3g_special_key_cmd_prime = -1;
331 static int hf_ua3g_lcd_line_cmd_lcd_options_call_timer = -1;
332 static int hf_ua3g_lcd_line_cmd_lcd_options_blink = -1;
333 static int hf_ua3g_lcd_line_cmd_lcd_options_call_timer_control = -1;
334 static int hf_ua3g_lcd_line_cmd_lcd_options_call_timer_display = -1;
335 static int hf_ua3g_lcd_line_cmd_lcd_options_time_of_day_display = -1;
336 static int hf_ua3g_lcd_line_cmd_lcd_options_suspend_display_refresh = -1;
337 static int hf_ua3g_cs_ip_device_routing_cmd02_parameter_firmware_version = -1;
338 static int hf_ua3g_cs_ip_device_routing_cmd02_parameter_ip = -1;
339 static int hf_ua3g_cs_ip_device_routing_cmd02_parameter_default_codec_uint = -1;
340 static int hf_ua3g_cs_ip_device_routing_cmd02_parameter_default_codec_bytes = -1;
341 static int hf_ua3g_cs_ip_device_routing_cmd02_parameter_mac_address = -1;
342 static int hf_ua3g_cs_ip_device_routing_cmd02_parameter_uint = -1;
343 static int hf_ua3g_cs_ip_device_routing_cmd02_parameter_value = -1;
344 static int hf_ua3g_cs_ip_device_routing_cmd02_parameter_eth_driver_config_port_lan_speed = -1;
345 static int hf_ua3g_cs_ip_device_routing_cmd02_parameter_eth_driver_config_port_lan_duplex = -1;
346 static int hf_ua3g_cs_ip_device_routing_cmd02_parameter_eth_driver_config_port_pc_speed = -1;
347 static int hf_ua3g_cs_ip_device_routing_cmd02_parameter_eth_driver_config_port_pc_duplex = -1;
348 static int hf_ua3g_cs_ip_device_routing_cmd03_parameter_type_of_equip1 = -1;
349 static int hf_ua3g_cs_ip_device_routing_cmd03_parameter_type_of_equip2 = -1;
350 static int hf_ua3g_cs_ip_device_routing_cmd03_parameter_ip = -1;
351 static int hf_ua3g_cs_ip_device_routing_cmd03_parameter_string = -1;
352 static int hf_ua3g_cs_ip_device_routing_cmd03_parameter_default_codec = -1;
353 static int hf_ua3g_cs_ip_device_routing_cmd03_parameter_vad = -1;
354 static int hf_ua3g_cs_ip_device_routing_cmd03_parameter_ece = -1;
355 static int hf_ua3g_cs_ip_device_routing_cmd03_parameter_voice_mode = -1;
356 static int hf_ua3g_cs_ip_device_routing_cmd03_parameter_delay_distribution = -1;
357 static int hf_ua3g_cs_ip_device_routing_cmd03_parameter_consecutive_bfi = -1;
358 static int hf_ua3g_cs_ip_device_routing_cmd03_parameter_bfi_distribution = -1;
359 static int hf_ua3g_cs_ip_device_routing_cmd03_parameter_8021Q_used = -1;
360 static int hf_ua3g_cs_ip_device_routing_cmd03_parameter_8021P_priority = -1;
361 static int hf_ua3g_cs_ip_device_routing_cmd03_parameter_vlan_id = -1;
362 static int hf_ua3g_cs_ip_device_routing_cmd03_parameter_diffserv = -1;
363 static int hf_ua3g_cs_ip_device_routing_cmd03_parameter_bfi_distribution_200ms = -1;
364 static int hf_ua3g_cs_ip_device_routing_cmd03_parameter_consecutive_rtp_lost = -1;
365 static int hf_ua3g_cs_ip_device_routing_cmd03_parameter_uint = -1;
366 static int hf_ua3g_cs_ip_device_routing_cmd03_parameter_jitter_depth_distribution = -1;
368 /* Definition of opcodes */
369 /* System To Terminal */
370 #define SC_NOP 0x00
371 #define SC_PRODUCTION_TEST 0x01 /* IP Phone */
372 #define SC_SUBDEVICE_ESCAPE 0x02 /* IP Phone */
373 #define SC_SOFT_RESET 0x03
374 #define SC_IP_PHONE_WARMSTART 0x04 /* IP Phone */
375 #define SC_HE_ROUTING 0x05 /* IP Phone - NOT EXPECTED */
376 #define SC_SUBDEVICE_RESET 0x06
377 #define SC_LOOPBACK_ON 0x07 /* IP Phone & UA NOE */
378 #define SC_LOOPBACK_OFF 0x08 /* IP Phone & UA NOE */
379 #define SC_VIDEO_ROUTING 0x09 /* IP Phone - NOT EXPECTED */
380 #define SC_SUPER_MSG 0x0B
381 #define SC_SEGMENT_MSG 0x0C
382 #define SC_REMOTE_UA_ROUTING 0x0D /* IP Phone - NOT EXPECTED */
383 #define SC_VERY_REMOTE_UA_ROUTING 0x0E /* IP Phone - NOT EXPECTED */
384 #define SC_OSI_ROUTING 0x0F /* IP Phone - NOT EXPECTED */
385 #define SC_ABC_A_ROUTING 0x11 /* IP Phone - NOT EXPECTED */
386 #define SC_IBS_ROUTING 0x12 /* IP Phone - NOT EXPECTED */
387 #define SC_IP_DEVICE_ROUTING 0x13
388 #define SC_M_REFLEX_HUB_ROUTING 0x14 /* IP Phone - NOT EXPECTED */
389 #if 0
390 #define SC_NOE_CS_ROUTING 0x15 /* Decoded by packet-noe.c */
391 #define SC_NOE_PS_ROUTING 0x16 /* Decoded by packet-noe.c */
392 #endif
393 #define SC_SUPER_MSG_2 0x17
394 #define SC_DEBUG_IN_LINE 0x18
395 #define SC_LED_COMMAND 0x21 /* IP Phone */
396 #define SC_START_BUZZER 0x22 /* VTA */
397 #define SC_STOP_BUZZER 0x23 /* VTA */
398 #define SC_ENABLE_DTMF 0x24 /* Only IP NOE */
399 #define SC_DISABLE_DTMF 0x25 /* Only IP NOE */
400 #define SC_CLEAR_LCD_DISP 0x26 /* IP Phone */
401 #define SC_LCD_LINE_1_CMD 0x27 /* IP Phone */
402 #define SC_LCD_LINE_2_CMD 0x28 /* IP Phone */
403 #define SC_MAIN_VOICE_MODE 0x29
404 #define SC_VERSION_INQUIRY 0x2A
405 #define SC_ARE_YOU_THERE 0x2B /* IP Phone & UA NOE */
406 #define SC_SUBDEVICE_METASTATE 0x2C
407 #define SC_VTA_STATUS_INQUIRY 0x2D /* IP Phone */
408 #define SC_SUBDEVICE_STATE 0x2E
409 #define SC_DWL_DTMF_CLCK_FORMAT 0x30 /* IP Phone */
410 #define SC_SET_CLCK 0x31 /* IP Phone */
411 #define SC_VOICE_CHANNEL 0x32 /* IP Phone & UA NOE */
412 #define SC_EXTERNAL_RINGING 0x33
413 #define SC_LCD_CURSOR 0x35 /* IP Phone */
414 #define SC_DWL_SPECIAL_CHAR 0x36 /* IP Phone */
415 #define SC_SET_CLCK_TIMER_POS 0x38 /* IP Phone */
416 #define SC_SET_LCD_CONTRAST 0x39 /* IP Phone */
417 #define SC_AUDIO_IDLE 0x3A
418 #define SC_SET_SPEAKER_VOL 0x3B /* IP Phone */
419 #define SC_BEEP 0x3C
420 #define SC_SIDETONE 0x3D
421 #define SC_RINGING_CADENCE 0x3E
422 #define SC_MUTE 0x3F
423 #define SC_FEEDBACK 0x40
424 #define SC_KEY_RELEASE 0x41 /* IP Phone */
425 #define SC_TRACE_ON 0x42 /* IP Phone - NOT EXPECTED */
426 #define SC_TRACE_OFF 0x43 /* IP Phone - NOT EXPECTED */
427 #define SC_READ_PERIPHERAL 0x44 /* IP Phone - NOT EXPECTED */
428 #define SC_WRITE_PERIPHERAL 0x45 /* IP Phone - NOT EXPECTED */
429 #define SC_ALL_ICONS_OFF 0x46 /* IP Phone */
430 #define SC_ICON_CMD 0x47 /* IP Phone */
431 #define SC_AMPLIFIED_HANDSET 0x48 /* IP Phone */
432 #define SC_AUDIO_CONFIG 0x49
433 #define SC_AUDIO_PADDED_PATH 0x4A /* IP Phone */
434 #define SC_RELEASE_RADIO_LINK 0x4B /* IP Phone - NOT EXPECTED */
435 #define SC_DECT_HANDOVER 0x4C /* IP Phone - NOT EXPECTED */
436 #define SC_LOUDSPEAKER 0x4D
437 #define SC_ANNOUNCE 0x4E
438 #define SC_RING 0x4F
439 #define SC_UA_DWL_PROTOCOL 0x50 /* Only UA NOE */
441 /* Terminal To System */
442 #define CS_NOP_ACK 0x00
443 #define CS_HANDSET_OFFHOOK 0x01 /* IP Phone */
444 #define CS_HANDSET_ONHOOK 0x02 /* IP Phone */
445 #define CS_DIGIT_DIALED 0x03 /* IP Phone */
446 #define CS_SUBDEVICE_MSG 0x04
447 #define CS_HE_ROUTING 0x05 /* IP Phone - NOT EXPECTED */
448 #define CS_LOOPBACK_ON 0x06 /* IP Phone & UA NOE */
449 #define CS_LOOPBACK_OFF 0x07 /* IP Phone & UA NOE */
450 #define CS_VIDEO_ROUTING 0x09 /* IP Phone - NOT EXPECTED */
451 #define CS_WARMSTART_ACK 0x0A /* IP Phone */
452 #define CS_SUPER_MSG 0x0B /* IP Phone - NOT EXPECTED */
453 #define CS_SEGMENT_MSG 0x0C
454 #define CS_REMOTE_UA_ROUTING 0x0D /* IP Phone - NOT EXPECTED */
455 #define CS_VERY_REMOTE_UA_R 0x0E /* IP Phone - NOT EXPECTED */
456 #define CS_OSI_ROUTING 0x0F /* IP Phone - NOT EXPECTED */
457 #define CS_ABC_A_ROUTING 0x11 /* IP Phone - NOT EXPECTED */
458 #define CS_IBS_ROUTING 0x12 /* IP Phone - NOT EXPECTED */
459 #define CS_IP_DEVICE_ROUTING 0x13
460 #if 0
461 #define CS_NOE_CS_ROUTING 0x15 /* Decoded by packet-noe.c */
462 #define CS_NOE_PS_ROUTING 0x16 /* Decoded by packet-noe.c */
463 #endif
464 #define CS_SUPER_MSG_2 0x17
465 #define CS_DEBUG_IN_LINE 0x18
466 #define CS_NON_DIGIT_KEY_PUSHED 0x20 /* IP Phone */
467 #define CS_VERSION_RESPONSE 0x21
468 #define CS_I_M_HERE 0x22
469 #define CS_RSP_STATUS_INQUIRY 0x23 /* IP Phone */
470 #define CS_SUBDEVICE_STATE 0x24
471 #define CS_DIGIT_KEY_RELEASED 0x26 /* IP Phone */
472 #define CS_TRACE_ON_ACK 0x27 /* IP Phone */
473 #define CS_TRACE_OFF_ACK 0x28 /* IP Phone */
474 #define CS_SPECIAL_KEY_STATUS 0x29 /* IP Phone */
475 #define CS_KEY_RELEASED 0x2A /* IP Phone */
476 #define CS_PERIPHERAL_CONTENT 0x2B /* IP Phone */
477 #define CS_TM_KEY_PUSHED 0x2D /* IP Phone */
478 #define CS_UA_DWL_PROTOCOL 0x50 /* Only UA NOE */
479 #define CS_UNSOLICITED_MSG 0x9F
481 /* System To Terminal Opcodes */
482 static const value_string opcodes_vals_sys[] =
484 {SC_NOP , "NOP"},
485 {SC_PRODUCTION_TEST , "Production Test"}, /* IP Phone */
486 {SC_SUBDEVICE_ESCAPE , "Subdevice Escape To Subdevice"}, /* IP Phone */
487 {SC_SOFT_RESET , "Software Reset"},
488 {SC_IP_PHONE_WARMSTART , "IP-Phone Warmstart"}, /* IP Phone */
489 {SC_HE_ROUTING , "HE Routing Code"}, /* IP Phone - NOT EXPECTED */
490 {SC_SUBDEVICE_RESET , "Subdevice Reset"},
491 {SC_LOOPBACK_ON , "Loopback On"},
492 {SC_LOOPBACK_OFF , "Loopback Off"},
493 {SC_VIDEO_ROUTING , "Video Routing Code"}, /* IP Phone - NOT EXPECTED */
494 {SC_SUPER_MSG , "Super Message"},
495 {SC_SEGMENT_MSG , "Segment Message"},
496 {SC_REMOTE_UA_ROUTING , "Remote UA Routing Code"}, /* IP Phone - NOT EXPECTED */
497 {SC_VERY_REMOTE_UA_ROUTING , "Very Remote UA Routing Code"}, /* IP Phone - NOT EXPECTED */
498 {SC_OSI_ROUTING , "OSI Routing Code"}, /* IP Phone - NOT EXPECTED */
499 {SC_ABC_A_ROUTING , "ABC-A Routing Code"}, /* IP Phone - NOT EXPECTED */
500 {SC_IBS_ROUTING , "IBS Routing Code"}, /* IP Phone - NOT EXPECTED */
501 {SC_IP_DEVICE_ROUTING , "IP Device Routing"},
502 {SC_M_REFLEX_HUB_ROUTING , "Mutli-Reflex Hub Routing Code"}, /* IP Phone - NOT EXPECTED */
503 {SC_SUPER_MSG_2 , "Super Message 2"},
504 {SC_DEBUG_IN_LINE , "Debug In Line"},
505 {SC_LED_COMMAND , "Led Command"}, /* IP Phone */
506 {SC_START_BUZZER , "Start Buzzer"}, /* VTA */
507 {SC_STOP_BUZZER , "Stop Buzzer"}, /* VTA */
508 {SC_ENABLE_DTMF , "Enable DTMF"},
509 {SC_DISABLE_DTMF , "Disable DTMF"},
510 {SC_CLEAR_LCD_DISP , "Clear LCD Display"}, /* IP Phone */
511 {SC_LCD_LINE_1_CMD , "LCD Line 1 Commands"}, /* IP Phone */
512 {SC_LCD_LINE_2_CMD , "LCD Line 2 Commands"}, /* IP Phone */
513 {SC_MAIN_VOICE_MODE , "Main Voice Mode"},
514 {SC_VERSION_INQUIRY , "Version Inquiry"},
515 {SC_ARE_YOU_THERE , "Are You There?"},
516 {SC_SUBDEVICE_METASTATE , "Subdevice Metastate"},
517 {SC_VTA_STATUS_INQUIRY , "VTA Status Inquiry"}, /* IP Phone */
518 {SC_SUBDEVICE_STATE , "Subdevice State?"},
519 {SC_DWL_DTMF_CLCK_FORMAT , "Download DTMF & Clock Format"}, /* IP Phone */
520 {SC_SET_CLCK , "Set Clock"}, /* IP Phone */
521 {SC_VOICE_CHANNEL , "Voice Channel"}, /* IP Phone & UA NOE */
522 {SC_EXTERNAL_RINGING , "External Ringing"},
523 {SC_LCD_CURSOR , "LCD Cursor"}, /* IP Phone */
524 {SC_DWL_SPECIAL_CHAR , "Download Special Character"}, /* IP Phone */
525 {SC_SET_CLCK_TIMER_POS , "Set Clock/Timer Position"}, /* IP Phone */
526 {SC_SET_LCD_CONTRAST , "Set LCD Contrast"}, /* IP Phone */
527 {SC_AUDIO_IDLE , "Audio Idle"},
528 {SC_SET_SPEAKER_VOL , "Set Speaker Volume"}, /* IP Phone */
529 {SC_BEEP , "Beep"},
530 {SC_SIDETONE , "Sidetone"},
531 {SC_RINGING_CADENCE , "Set Programmable Ringing Cadence"},
532 {SC_MUTE , "Mute"},
533 {SC_FEEDBACK , "Feedback"},
534 {SC_KEY_RELEASE , "Key Release"}, /* IP Phone */
535 {SC_TRACE_ON , "Trace On"}, /* IP Phone - NOT EXPECTED */
536 {SC_TRACE_OFF , "Trace Off"}, /* IP Phone - NOT EXPECTED */
537 {SC_READ_PERIPHERAL , "Read Peripheral"}, /* IP Phone - NOT EXPECTED */
538 {SC_WRITE_PERIPHERAL , "Write Peripheral"}, /* IP Phone - NOT EXPECTED */
539 {SC_ALL_ICONS_OFF , "All Icons Off"}, /* IP Phone */
540 {SC_ICON_CMD , "Icon Command"}, /* IP Phone */
541 {SC_AMPLIFIED_HANDSET , "Amplified Handset (Boost)"}, /* IP Phone */
542 {SC_AUDIO_CONFIG , "Audio Config"},
543 {SC_AUDIO_PADDED_PATH , "Audio Padded Path"}, /* IP Phone */
544 {SC_RELEASE_RADIO_LINK , "Release Radio Link"}, /* IP Phone - NOT EXPECTED */
545 {SC_DECT_HANDOVER , "DECT External Handover Routing Code"}, /* IP Phone - NOT EXPECTED */
546 {SC_LOUDSPEAKER , "Loudspeaker"},
547 {SC_ANNOUNCE , "Announce"},
548 {SC_RING , "Ring"},
549 {SC_UA_DWL_PROTOCOL , "UA Download Protocol"},
550 {0, NULL}
552 static value_string_ext opcodes_vals_sys_ext = VALUE_STRING_EXT_INIT(opcodes_vals_sys);
554 /* Terminal To System Opcodes */
555 static const value_string opcodes_vals_term[] =
557 {CS_NOP_ACK , "NOP Acknowledge"},
558 {CS_HANDSET_OFFHOOK , "Handset Offhook"}, /* IP Phone */
559 {CS_HANDSET_ONHOOK , "Hansdet Onhook"}, /* IP Phone */
560 {CS_DIGIT_DIALED , "Digital Dialed"}, /* IP Phone */
561 {CS_SUBDEVICE_MSG , "Subdevice Message"},
562 {CS_HE_ROUTING , "HE Routing Response Code"}, /* IP Phone - NOT EXPECTED */
563 {CS_LOOPBACK_ON , "Loopback On Acknowledge"}, /* Same as CS To Terminal */
564 {CS_LOOPBACK_OFF , "Loopback Off Acknowledge"}, /* Same as CS To Terminal */
565 {CS_VIDEO_ROUTING , "Video Routing Response Code"}, /* IP Phone - NOT EXPECTED */
566 {CS_WARMSTART_ACK , "Warmstart Acknowledge"}, /* IP Phone */
567 {CS_SUPER_MSG , "Super Message"}, /* IP Phone - NOT EXPECTED */
568 {CS_SEGMENT_MSG , "Segment Message"}, /* Same as CS To Terminal */
569 {CS_REMOTE_UA_ROUTING , "Remote UA Routing Response Code"}, /* IP Phone - NOT EXPECTED */
570 {CS_VERY_REMOTE_UA_R , "Very Remote UA Routing Response Code"}, /* IP Phone - NOT EXPECTED */
571 {CS_OSI_ROUTING , "OSI Response Code"}, /* IP Phone - NOT EXPECTED */
572 {CS_ABC_A_ROUTING , "ABC-A Routing Response Code"}, /* IP Phone - NOT EXPECTED */
573 {CS_IBS_ROUTING , "IBS Routing Response Code"}, /* IP Phone - NOT EXPECTED */
574 {CS_IP_DEVICE_ROUTING , "IP Device Routing"},
575 {CS_SUPER_MSG_2 , "Super Message 2"}, /* Same as CS To Terminal */
576 {CS_DEBUG_IN_LINE , "Debug Message"},
577 {CS_NON_DIGIT_KEY_PUSHED , "Non-Digit Key Pushed"}, /* IP Phone */
578 {CS_VERSION_RESPONSE , "Version Information"},
579 {CS_I_M_HERE , "I'm Here Response"},
580 {CS_RSP_STATUS_INQUIRY , "Response To Status Inquiry"}, /* IP Phone */
581 {CS_SUBDEVICE_STATE , "Subdevice State Response"},
582 {CS_DIGIT_KEY_RELEASED , "Digit Key Released"}, /* IP Phone */
583 {CS_TRACE_ON_ACK , "Trace On Acknowledge"}, /* IP Phone - NOT EXPECTED */
584 {CS_TRACE_OFF_ACK , "Trace Off Acknowledge"}, /* IP Phone - NOT EXPECTED */
585 {CS_SPECIAL_KEY_STATUS , "Special Key Status"}, /* IP Phone */
586 {CS_KEY_RELEASED , "Key Released"}, /* IP Phone */
587 {CS_PERIPHERAL_CONTENT , "Peripheral Content"}, /* IP Phone - NOT EXPECTED */
588 {CS_TM_KEY_PUSHED , "TM Key Pushed"}, /* IP Phone - NOT EXPECTED */
589 {CS_UA_DWL_PROTOCOL , "Download Protocol"},
590 {CS_UNSOLICITED_MSG , "Unsolicited Message"},
591 {0, NULL}
593 static value_string_ext opcodes_vals_term_ext = VALUE_STRING_EXT_INIT(opcodes_vals_term);
595 static const value_string str_digit[] = {
596 { 0, "0"},
597 { 1, "1"},
598 { 2, "2"},
599 { 3, "3"},
600 { 4, "4"},
601 { 5, "5"},
602 { 6, "6"},
603 { 7, "7"},
604 { 8, "8"},
605 { 9, "9"},
606 {10, "*"},
607 {11, "#"},
608 {12, "A"},
609 {13, "B"},
610 {14, "C"},
611 {15, "D"},
612 {16, "Flash"},
613 {0, NULL}
615 static value_string_ext str_digit_ext = VALUE_STRING_EXT_INIT(str_digit);
617 #define STR_ON_OFF(arg) ((arg) ? "On" : "Off")
618 #define STR_YES_NO(arg) ((arg) ? "Yes" : "No")
621 static const value_string str_device_type[] = {
622 {0x00, "Voice Terminal Adaptor"},
623 {0, NULL}
627 /*-----------------------------------------------------------------------------
628 VERSION NUMBER COMPUTER - This function computes a version number (S.SZ.AB) from a 16 bits number
629 ---------------------------------------------------------------------------*/
630 static void
631 version_number_computer( gchar *result, guint32 hexa_version )
633 int release, vers, fix;
635 release = (int)(hexa_version / 10000);
636 vers = (int)((hexa_version % 10000) / 100);
637 fix = (hexa_version % 10000) % 100;
638 g_snprintf( result, ITEM_LABEL_LENGTH, "%d.%02d.%02d", release, vers, fix);
642 /*-----------------------------------------------------------------------------
643 Function for UA3G message with opcode and one parameter
645 PRODUCTION TEST - 01h (MESSAGE FROM THE SYSTEM)
646 SUBDEVICE RESET - 06h (MESSAGE FROM THE SYSTEM)
647 ARE YOU THERE - 2Bh - IPhone & UA NOE (MESSAGE FROM THE SYSTEM)
648 SET SPEAKER VOLUME - 3Bh (MESSAGE FROM THE SYSTEM)
649 TRACE ON - 42h (MESSAGE FROM THE SYSTEM)
650 ---------------------------------------------------------------------------*/
651 static void
652 decode_with_one_parameter(proto_tree *tree, tvbuff_t *tvb,
653 packet_info *pinfo _U_, guint offset, guint length,
654 int hf_opcode)
656 if (length == 0)
657 return;
659 proto_tree_add_item(tree, hf_opcode, tvb, offset, 1, ENC_NA);
663 /*-----------------------------------------------------------------------------
664 SUBDEVICE ESCAPE TO SUBDEVICE - 02h (MESSAGE FROM THE SYSTEM)
665 ---------------------------------------------------------------------------*/
666 static void
667 decode_subdevice_escape(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_,
668 guint offset, guint length)
670 proto_tree_add_item(tree, hf_ua3g_subdevice_address, tvb, offset, 1, ENC_NA);
671 proto_tree_add_item(tree, hf_ua3g_subdevice_opcode, tvb, offset+1, 1, ENC_NA);
672 if (length > 2) {
673 proto_tree_add_item(tree, hf_ua3g_subdevice_parameter_bytes, tvb, offset+2, length-2, ENC_NA);
678 /*-----------------------------------------------------------------------------
679 SOFTWARE RESET - 03h (MESSAGE FROM THE SYSTEM)
680 ---------------------------------------------------------------------------*/
681 static const value_string software_reset_verswitch_vals[] = {
682 {0x00, "Reset Without Version Switch"},
683 {0x01, "Reset With Version Switch"},
684 {0, NULL}
687 static void
688 decode_software_reset(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_,
689 guint offset, guint length)
691 if (length == 0)
692 return;
694 proto_tree_add_item(tree, hf_ua3g_software_reset, tvb, offset, 1, ENC_NA);
698 /*-----------------------------------------------------------------------------
699 IP-PHONE WARMSTART - 04h (MESSAGE FROM THE SYSTEM)
700 ---------------------------------------------------------------------------*/
701 static const value_string str_command_ip_phone_warmstart[] = {
702 {0x00, "Run In UA2G Emulation Mode"},
703 {0x01, "Run In Full UA3G Mode"},
704 {0, NULL}
707 static void
708 decode_ip_phone_warmstart(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_,
709 guint offset, guint length)
711 if (length == 0)
712 return;
714 proto_tree_add_item(tree, hf_ua3g_ip_phone_warmstart, tvb, offset, 1, ENC_NA);
718 /*-----------------------------------------------------------------------------
719 SUPER MESSAGE - 0Bh (MESSAGE FROM THE SYSTEM)
720 SUPER MESSAGE 2 - 17h (MESSAGE FROM THE SYSTEM)
721 ---------------------------------------------------------------------------*/
722 static void
723 decode_super_msg(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_,
724 guint offset, guint length, guint8 opcode)
726 proto_tree *ua3g_body_tree = tree;
727 int j = 0, parameter_length;
729 if (!ua3g_body_tree)
730 return;
732 while (length > 0) {
733 if (opcode == 0x17) {
734 parameter_length = tvb_get_ntohs(tvb, offset);
735 proto_tree_add_uint_format(ua3g_body_tree, hf_ua3g_super_msg_length, tvb, offset, 2,
736 parameter_length, "Length %d: %d", j++, parameter_length);
737 offset += 2;
738 length -= 2;
739 } else {
740 parameter_length = tvb_get_guint8(tvb, offset);
741 proto_tree_add_uint_format(ua3g_body_tree, hf_ua3g_super_msg_length, tvb, offset, 1,
742 parameter_length, "Length %d: %d", j++, parameter_length);
743 offset++;
744 length--;
747 if (parameter_length > 0) {
748 proto_tree_add_item(ua3g_body_tree, hf_ua3g_super_msg_data, tvb, offset, parameter_length, ENC_NA);
749 offset += parameter_length;
750 length -= parameter_length;
756 /*-----------------------------------------------------------------------------
757 SEGMENT MESSAGE - 0Ch (MESSAGE FROM THE TERMINAL AND FROM THE SYSTEM)
758 ---------------------------------------------------------------------------*/
759 const true_false_string tfs_segment_msg_segment = { "First Segment", "Subsequent Segment" };
761 static void
762 decode_segment_msg(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_,
763 guint offset, guint length)
765 guint8 val;
767 if (!tree)
768 return;
770 val = tvb_get_guint8(tvb, offset);
771 proto_tree_add_item(tree, hf_ua3g_segment_msg_segment, tvb, offset, 1, ENC_NA);
772 proto_tree_add_item(tree, hf_ua3g_segment_msg_num_remaining, tvb, offset, 1, ENC_NA);
773 offset++;
774 length--;
776 if (val & 0x80) {
777 proto_tree_add_item(tree, hf_ua3g_segment_msg_length, tvb, offset, 2, ENC_BIG_ENDIAN);
778 offset += 2;
779 length -= 2;
782 if (length > 0) {
783 proto_tree_add_item(tree, hf_ua3g_segment_message_data, tvb, offset, length, ENC_NA);
788 /*-----------------------------------------------------------------------------
789 IP DEVICE ROUTING - 13h (MESSAGE FROM THE SYSTEM)
790 ---------------------------------------------------------------------------*/
791 static const value_string str_command_ip_device_routing[] = {
792 {0x00, "Reset"},
793 {0x01, "Start RTP"},
794 {0x02, "Stop RTP"},
795 {0x03, "Redirect"},
796 {0x04, "Tone Definition"},
797 {0x05, "Start Tone"},
798 {0x06, "Stop Tone"},
799 {0x07, "Start Listen RTP"},
800 {0x08, "Stop Listen RTP"},
801 {0x09, "Get Parameters Value"},
802 {0x0A, "Set Parameters Value"},
803 {0x0B, "Send Digit"},
804 {0x0C, "Pause RTP"},
805 {0x0D, "Restart RTP"},
806 {0x0E, "Start Record RTP"},
807 {0x0F, "Stop Record RTP"},
808 {0, NULL}
811 static const value_string ip_device_routing_cmd_reset_vals[] = {
812 {0x00, "Update Mode"},
813 {0x01, "Bad Sec Mode"},
814 {0x02, "Customization Name"},
815 {0x03, "Localization Name"},
816 {0, NULL}
819 static const value_string reset_param_bad_sec_mode[] = {
820 {0x01, "Binary is full, CS is secured, but terminal running in clear mode"},
821 {0, NULL}
824 static const value_string start_rtp_str_direction[] = {
825 {0x00, "Terminal Input"},
826 {0x01, "Terminal Output"},
827 {0x02, "Terminal Input/Output (Both Directions)"},
828 {0, NULL}
831 static const value_string ip_device_routing_cmd_start_rtp_vals[] = {
832 {0x00, "Local UDP Port"},
833 {0x01, "Remote IP Address"},
834 {0x02, "Remote UDP Port"},
835 {0x03, "Type Of Service"},
836 {0x04, "Compressor"},
837 {0x05, "Payload Concatenation (ms)"},
838 {0x06, "Echo Cancellation Enabler"},
839 {0x07, "Silence Suppression Enabler"},
840 {0x08, "802.1 Q User Priority"},
841 {0x09, "Reserved"},
842 {0x0a, "Post Filtering Enabler"},
843 {0x0b, "High Pass Filtering Enabler"},
844 {0x0c, "Remote SSRC"},
845 {0x0d, "Must Send QOS Tickets"},
846 {0x0e, "Local Identifier"},
847 {0x0f, "Distant Identifier"},
848 {0x10, "Destination For RTCP Sender Reports - Port Number"},
849 {0x11, "Destination For RTCP Sender Reports - IP Address"},
850 {0x12, "Destination For RTCP Receiver Reports - Port Number"},
851 {0x13, "Destination For RTCP Receiver Reports - IP Address"},
852 {0x14, "Channel Number"},
853 {0x15, "DTMF Sending"},
854 {0x16, "Payload Type Of Redundancy"},
855 {0x17, "Payload Type Of DTMF Events"},
856 {0x18, "Enable / Disable RFC 2198"},
857 {0x31, "SRTP Encryption Enable For This Communication"},
858 {0x32, "Master Key For SRTP Session"},
859 {0x33, "Master Salt Key For SRTP Session"},
860 {0x34, "Master key for output stream of SRTP session"},
861 {0x35, "Master salt key for output stream of SRTP session"},
862 {0x36, "Integrity checking enabled for this communication"},
863 {0x37, "MKI value for SRTP packets in input stream"},
864 {0x38, "MKI value for SRTP packets in output stream"},
865 {0x50, "MD5 Authentication"},
866 {0, NULL}
868 static value_string_ext ip_device_routing_cmd_start_rtp_vals_ext = VALUE_STRING_EXT_INIT(ip_device_routing_cmd_start_rtp_vals);
870 static const val64_string str_start_rtp_compressor[] = {
871 {0x00, "G.711 A-law"},
872 {0x01, "G.711 mu-law"},
873 {0x0F, "G.723.1 5.3kbps"},
874 {0x10, "G.723.1 6.3kbps"},
875 {0x11, "G.729A 8 kbps"},
876 {0, NULL}
879 static const value_string str_set_param_req_compressor[] = {
880 {0x00, "G.711 A-law"},
881 {0x01, "G.711 mu-law"},
882 {0x0F, "G.723.1 5.3kbps"},
883 {0x10, "G.723.1 6.3kbps"},
884 {0x11, "G.729A 8 kbps"},
885 {0, NULL}
888 static const value_string ip_device_routing_cmd_stop_rtp_vals[] = {
889 {0x0E, "Local Identifier"},
890 {0x0F, "Distant Identifier"},
891 {0x14, "Canal Identifier"},
892 {0, NULL}
895 static const value_string ip_device_routing_cmd_redirect_vals[] = {
896 {0x00, "Remote MainCPU Server IP Address"},
897 {0x01, "Remote MainCPU Server Port"},
898 {0, NULL}
901 static const value_string ip_device_routing_cmd_listen_rtp_vals[] = {
902 {0x00, "Remote IP Address "},
903 {0x01, "Remote UDP Port In "},
904 {0x02, "Remote UDP Port Out "},
905 {0x03, "Remote IP Address Out"},
906 {0x04, "Canal Number"},
907 {0, NULL}
910 static const value_string ip_device_routing_cmd_set_param_req_vals[] = {
911 {0x00 , "QOS IP TOS"},
912 {0x01 , "QOS 8021 VLID"},
913 {0x02 , "QOS 8021 PRI"},
914 {0x03 , "SNMP MIB2 SysContact"},
915 {0x04 , "SNMP MIB2 SysName"},
916 {0x05 , "SNMP MIB2 SysLocation"},
917 {0x06 , "Default Compressor"},
918 {0x07 , "Error String Net Down"},
919 {0x08 , "Error String Cable PB"},
920 {0x09 , "Error String Try Connect"},
921 {0x0A , "Error String Connected"},
922 {0x0B , "Error String Reset"},
923 {0x0C , "Error String Duplicate IP Address"},
924 {0x0D , "SNMP MIB Community"},
925 {0x0E , "TFTP Backup Sec Mode"},
926 {0x0F , "TFTP Backup IP Address"},
927 {0x10 , "Set MMI Password"},
928 {0x11 , "Set PC Port Status"},
929 {0x12 , "Record RTP Authorization"},
930 {0x13 , "Security Flags"},
931 {0x14 , "ARP Spoofing"},
932 {0x15 , "Session Param"},
933 {0x30 , "MD5 Authentication"},
934 {0, NULL}
936 static value_string_ext ip_device_routing_cmd_set_param_req_vals_ext = VALUE_STRING_EXT_INIT(ip_device_routing_cmd_set_param_req_vals);
938 static const value_string ip_device_routing_cmd_pause_restart_vals[] = {
939 {0x14, "Canal Identifier"},
940 {0, NULL}
943 static const value_string ip_device_routing_cmd_record_rtp_vals[] = {
944 {0x00 , "Recorder Index"},
945 {0x01 , "Remote IP Address"},
946 {0x02 , "Remote UDP Port In"},
947 {0x03 , "Remote UDP Port Out"},
948 {0x04 , "Remote IP Address Out"},
949 {0x05 , "Local UDP Port In"},
950 {0x06 , "Local UDP Port Out"},
951 {0x07 , "Type Of Service"},
952 {0x08 , "Master Key For SRTP Session"},
953 {0x09 , "Master Salt Key For SRTP Session"},
954 {0x30 , "MD5 Authentication"},
955 {0, NULL}
958 static const value_string ip_device_routing_tone_direction_vals[] = {
959 {0x00, "On The Phone"},
960 {0x40, "To The Network"},
961 {0x80, "On The Phone and To The Network"},
962 {0, NULL}
965 static const value_string ip_device_routing_cmd_get_param_req_vals[] = {
966 {0x00 , "Firmware Version"},
967 {0x01 , "Firmware Version"},
968 {0x02 , "DHCP IP Address"},
969 {0x03 , "Local IP Address"},
970 {0x04 , "Subnetwork Mask"},
971 {0x05 , "Router IP Address"},
972 {0x06 , "TFTP IP Address"},
973 {0x07 , "MainCPU IP Address"},
974 {0x08 , "Default Codec"},
975 {0x09 , "Ethernet Drivers Config"},
976 {0x0A , "MAC Address"},
977 {0, NULL}
980 static const value_string str_set_pc_port_status[] = {
981 {0x00, "No PC Port Security"},
982 {0x01, "Block PC Port"},
983 {0x02, "Filter VLAN"},
984 {0, NULL}
987 static const value_string str_enable_feature[] = {
988 {0x00, "Disable Feature"},
989 {0x01, "Enable Feature"},
990 {0, NULL}
993 static void
994 decode_ip_device_routing(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo,
995 guint offset, guint length)
997 guint8 command;
998 proto_tree *ua3g_body_tree = tree, *ua3g_param_tree, *ua3g_param_subtree;
999 proto_item *ua3g_param_item;
1000 int parameter_length, parameter_id;
1002 command = tvb_get_guint8(tvb, offset);
1004 /* add text to the frame "INFO" column */
1005 col_append_fstr(pinfo->cinfo, COL_INFO, ": %s", val_to_str_const(command, str_command_ip_device_routing, "Unknown"));
1007 if (!ua3g_body_tree)
1008 return;
1010 proto_tree_add_item(ua3g_body_tree, hf_ua3g_ip, tvb, offset, 1, ENC_NA);
1011 offset++;
1012 length--;
1014 switch (command) {
1015 case 0x00: /* RESET */
1017 if (length > 0) {
1018 parameter_id = tvb_get_guint8(tvb, offset);
1019 parameter_length = tvb_get_guint8(tvb, offset + 1);
1021 ua3g_param_item = proto_tree_add_uint_format(ua3g_body_tree, hf_ua3g_ip_device_routing_stop_rtp_parameter, tvb, offset,
1022 parameter_length + 2, parameter_id, "%s",
1023 val_to_str_const(parameter_id, ip_device_routing_cmd_reset_vals, "Unknown"));
1024 ua3g_param_tree = proto_item_add_subtree(ua3g_param_item, ett_ua3g_param);
1026 proto_tree_add_item(ua3g_param_tree, hf_ua3g_ip_device_routing_reset_parameter, tvb, offset, 1, ENC_NA);
1027 offset++;
1028 length--;
1030 proto_tree_add_item(ua3g_param_tree, hf_ua3g_ip_device_routing_reset_parameter_length, tvb, offset, 1, ENC_NA);
1031 offset++;
1032 length--;
1034 if (parameter_length > 0) {
1035 guint8 param;
1036 switch (parameter_id) {
1037 case 0x00: /* Update Mode */
1039 param = tvb_get_guint8(tvb, offset);
1040 if ((param & 0x80) == 0x00) {
1041 proto_tree_add_item(ua3g_param_tree, hf_ua3g_ip_device_routing_reset_parameter_noe_update, tvb, offset, 1, ENC_NA);
1042 ua3g_param_subtree = proto_item_add_subtree(ua3g_param_item, ett_ua3g_param_sub);
1044 proto_tree_add_item(ua3g_param_subtree, hf_ua3g_ip_device_routing_reset_parameter_noe_update_bootloader, tvb, offset, 1, ENC_NA);
1045 proto_tree_add_item(ua3g_param_subtree, hf_ua3g_ip_device_routing_reset_parameter_noe_update_data, tvb, offset, 1, ENC_NA);
1046 proto_tree_add_item(ua3g_param_subtree, hf_ua3g_ip_device_routing_reset_parameter_noe_update_customization, tvb, offset, 1, ENC_NA);
1047 proto_tree_add_item(ua3g_param_subtree, hf_ua3g_ip_device_routing_reset_parameter_noe_update_localization, tvb, offset, 1, ENC_NA);
1048 proto_tree_add_item(ua3g_param_subtree, hf_ua3g_ip_device_routing_reset_parameter_noe_update_code, tvb, offset, 1, ENC_NA);
1049 proto_tree_add_item(ua3g_param_subtree, hf_ua3g_ip_device_routing_reset_parameter_noe_update_sip, tvb, offset, 1, ENC_NA);
1051 } else {
1052 proto_tree_add_item(ua3g_param_tree, hf_ua3g_ip_device_routing_reset_parameter_value, tvb, offset, parameter_length, ENC_NA);
1055 break;
1056 case 0x01: /* Bad_Sec_Mode */
1057 proto_tree_add_item(ua3g_param_tree, hf_ua3g_ip_device_routing_reset_parameter_bad_sec_mode, tvb, offset, 1, ENC_NA);
1058 break;
1059 case 0x02: /* Cust_Name */
1060 proto_tree_add_item(ua3g_param_tree, hf_ua3g_ip_device_routing_reset_parameter_cust_name, tvb, offset, parameter_length, ENC_NA|ENC_ASCII);
1061 break;
1062 case 0x03: /* L10N_Name */
1063 proto_tree_add_item(ua3g_param_tree, hf_ua3g_ip_device_routing_reset_parameter_l10n_name, tvb, offset, parameter_length, ENC_NA|ENC_ASCII);
1064 break;
1065 default:
1066 proto_tree_add_item(ua3g_param_tree, hf_ua3g_ip_device_routing_reset_parameter_value, tvb, offset, parameter_length, ENC_NA);
1067 break;
1070 /*offset += parameter_length;
1071 length -= parameter_length;*/
1074 break;
1076 case 0x01: /* START RTP */
1078 proto_tree_add_item(ua3g_body_tree, hf_ua3g_ip_device_routing_start_rtp_direction, tvb, offset, 1, ENC_NA);
1079 offset++;
1080 length--;
1082 while (length > 0) {
1083 parameter_id = tvb_get_guint8(tvb, offset);
1084 parameter_length = tvb_get_guint8(tvb, offset + 1);
1086 ua3g_param_item = proto_tree_add_uint_format(ua3g_body_tree, hf_ua3g_ip_device_routing_start_rtp_parameter, tvb, offset,
1087 parameter_length + 2, parameter_id, "%s",
1088 val_to_str_ext_const(parameter_id, &ip_device_routing_cmd_start_rtp_vals_ext, "Unknown"));
1090 ua3g_param_tree = proto_item_add_subtree(ua3g_param_item, ett_ua3g_param);
1091 proto_tree_add_item(ua3g_param_tree, hf_ua3g_ip_device_routing_start_rtp_parameter, tvb, offset, 1, ENC_NA);
1092 offset++;
1093 length--;
1095 proto_tree_add_item(ua3g_param_tree, hf_ua3g_ip_device_routing_start_rtp_parameter_length, tvb, offset, 1, ENC_NA);
1096 offset++;
1097 length--;
1099 if (parameter_length > 0) {
1100 switch (parameter_id) {
1101 case 0x01: /* Remote IP Address */
1102 case 0x11: /* Destination For RTCP Sender Reports - IP Address */
1103 case 0x13: /* Destination For RTCP Receiver Reports - IP Address */
1104 proto_tree_add_item(ua3g_param_tree, hf_ua3g_ip_device_routing_start_rtp_parameter_ip, tvb, offset, 4, ENC_BIG_ENDIAN);
1105 break;
1106 case 0x04: /* Compressor */
1107 if (parameter_length <= 8) {
1108 proto_tree_add_item(ua3g_param_tree, hf_ua3g_ip_device_routing_start_rtp_parameter_compressor, tvb, offset, parameter_length, ENC_BIG_ENDIAN);
1109 } else {
1110 proto_tree_add_item(ua3g_param_tree, hf_ua3g_ip_device_routing_start_rtp_parameter_value, tvb, offset, parameter_length, ENC_NA);
1112 break;
1113 case 0x06: /* Echo Cancelation Enabler */
1114 case 0x07: /* Silence Suppression Enabler */
1115 case 0x0A: /* Post Filtering Enabler */
1116 case 0x0B: /* High Pass Filtering Enabler */
1117 if (parameter_length <= 8) {
1118 proto_tree_add_item(ua3g_param_tree, hf_ua3g_ip_device_routing_start_rtp_parameter_enabler, tvb, offset, parameter_length, ENC_BIG_ENDIAN);
1119 } else {
1120 proto_tree_add_item(ua3g_param_tree, hf_ua3g_ip_device_routing_start_rtp_parameter_value, tvb, offset, parameter_length, ENC_NA);
1122 break;
1123 case 0x0D: /* Must Send QOS Tickets */
1124 if (parameter_length <= 8) {
1125 proto_tree_add_item(ua3g_param_tree, hf_ua3g_ip_device_routing_start_rtp_parameter_send_qos, tvb, offset, parameter_length, ENC_BIG_ENDIAN);
1126 } else {
1127 proto_tree_add_item(ua3g_param_tree, hf_ua3g_ip_device_routing_start_rtp_parameter_value, tvb, offset, parameter_length, ENC_NA);
1129 break;
1130 case 0x0E: /* Local Identifier */
1131 case 0x0F: /* Distant Identifier */
1132 break;
1133 case 0x15: /* DTMF Sending */
1134 if (parameter_length <= 8) {
1135 proto_tree_add_item(ua3g_param_tree, hf_ua3g_ip_device_routing_start_rtp_parameter_dtmf_sending, tvb, offset, parameter_length, ENC_BIG_ENDIAN);
1136 } else {
1137 proto_tree_add_item(ua3g_param_tree, hf_ua3g_ip_device_routing_start_rtp_parameter_value, tvb, offset, parameter_length, ENC_NA);
1139 break;
1140 case 0x18: /* Enable / Disable RFC 2198 */
1141 if (parameter_length <= 8) {
1142 proto_tree_add_item(ua3g_param_tree, hf_ua3g_ip_device_routing_start_rtp_parameter_rfc2198, tvb, offset, parameter_length, ENC_BIG_ENDIAN);
1143 } else {
1144 proto_tree_add_item(ua3g_param_tree, hf_ua3g_ip_device_routing_start_rtp_parameter_value, tvb, offset, parameter_length, ENC_NA);
1146 break;
1147 case 0x31: /* SRTP Encryption Enable For This Communication */
1148 if (parameter_length <= 8) {
1149 proto_tree_add_item(ua3g_param_tree, hf_ua3g_ip_device_routing_start_rtp_parameter_srtp_encryption, tvb, offset, parameter_length, ENC_BIG_ENDIAN);
1150 } else {
1151 proto_tree_add_item(ua3g_param_tree, hf_ua3g_ip_device_routing_start_rtp_parameter_value, tvb, offset, parameter_length, ENC_NA);
1153 break;
1154 case 0x00: /* Local UDP Port */
1155 case 0x02: /* Remote UDP Port */
1156 case 0x03: /* Type Of Service */
1157 case 0x05: /* Payload Concatenation */
1158 case 0x08: /* 802.1 Q User Priority */
1159 case 0x09: /* Reserved */
1160 case 0x0C: /* Remote SSRC */
1161 case 0x10: /* Destination For RTCP Sender Reports - Port Number */
1162 case 0x12: /* Destination For RTCP Receiver Reports - Port Number */
1163 case 0x14: /* Channel Number */
1164 case 0x16: /* Payload Type For Redundancy */
1165 case 0x17: /* Payload Type For DTMF Events */
1166 case 0x32: /* Master Key For SRTP Session */
1167 case 0x33: /* Master Salt Key For SRTP Session */
1168 case 0x34: /* Master key for output stream of SRTP session */
1169 case 0x35: /* Master salt key for output stream of SRTP session */
1170 case 0x36: /* Integrity checking enabled for this communication */
1171 case 0x37: /* MKI value for SRTP packets in input stream */
1172 case 0x38: /* MKI value for SRTP packets in output stream */
1173 case 0x50: /* MD5 Authentication */
1174 default:
1175 if (parameter_length <= 8) {
1176 proto_tree_add_item(ua3g_param_tree, hf_ua3g_ip_device_routing_start_rtp_parameter_uint, tvb, offset, parameter_length, ENC_BIG_ENDIAN);
1177 } else {
1178 proto_tree_add_item(ua3g_param_tree, hf_ua3g_ip_device_routing_start_rtp_parameter_value, tvb, offset, parameter_length, ENC_NA);
1180 break;
1183 offset += parameter_length;
1184 length -= parameter_length;
1187 break;
1189 case 0x02: /* STOP_RTP */
1190 while (length > 0) {
1191 parameter_id = tvb_get_guint8(tvb, offset);
1192 parameter_length = tvb_get_guint8(tvb, offset + 1);
1194 ua3g_param_item = proto_tree_add_uint_format(ua3g_body_tree, hf_ua3g_ip_device_routing_stop_rtp_parameter, tvb, offset,
1195 parameter_length + 2, parameter_id, "%s",
1196 val_to_str_const(parameter_id, ip_device_routing_cmd_stop_rtp_vals, "Unknown"));
1197 ua3g_param_tree = proto_item_add_subtree(ua3g_param_item, ett_ua3g_param);
1199 proto_tree_add_item(ua3g_param_tree, hf_ua3g_ip_device_routing_stop_rtp_parameter, tvb, offset, 1, ENC_NA);
1200 offset++;
1201 length--;
1203 proto_tree_add_item(ua3g_param_tree, hf_ua3g_ip_device_routing_stop_rtp_parameter_length, tvb, offset, 1, ENC_NA);
1204 offset++;
1205 length--;
1207 if (parameter_length > 0) {
1208 if (parameter_length <= 8) {
1209 proto_tree_add_item(ua3g_param_tree, hf_ua3g_ip_device_routing_stop_rtp_parameter_value_num, tvb, offset, parameter_length, ENC_BIG_ENDIAN);
1210 } else {
1211 proto_tree_add_item(ua3g_param_tree, hf_ua3g_ip_device_routing_stop_rtp_parameter_value_bytes, tvb, offset, parameter_length, ENC_NA);
1214 offset += parameter_length;
1215 length -= parameter_length;
1218 break;
1219 case 0x03: /* REDIRECT */
1220 while (length > 0) {
1221 parameter_id = tvb_get_guint8(tvb, offset);
1222 parameter_length = tvb_get_guint8(tvb, offset + 1);
1224 ua3g_param_item = proto_tree_add_uint_format(ua3g_body_tree, hf_ua3g_ip_device_routing_redirect_parameter,
1225 tvb, offset, parameter_length + 2, parameter_id,
1226 "%s", val_to_str_const(parameter_id, ip_device_routing_cmd_redirect_vals, "Unknown"));
1227 ua3g_param_tree = proto_item_add_subtree(ua3g_param_item, ett_ua3g_param);
1229 proto_tree_add_item(ua3g_param_tree, hf_ua3g_ip_device_routing_redirect_parameter, tvb, offset, 1, ENC_NA);
1230 offset++;
1231 length--;
1233 proto_tree_add_item(ua3g_param_tree, hf_ua3g_ip_device_routing_redirect_parameter_length, tvb, offset, 1, ENC_NA);
1234 offset++;
1235 length--;
1238 if (parameter_length > 0) {
1239 switch (parameter_id) {
1240 case 0x00: /* Remote MainCPU Server IP Address */
1241 proto_tree_add_item(ua3g_param_tree, hf_ua3g_ip_device_routing_redirect_parameter_ip, tvb, offset, 4, ENC_BIG_ENDIAN);
1242 break;
1243 case 0x01: /* Remote MainCPU Server Port */
1244 default:
1245 if (parameter_length <= 8) {
1246 proto_tree_add_item(ua3g_param_tree, hf_ua3g_ip_device_routing_redirect_parameter_uint, tvb, offset, parameter_length, ENC_BIG_ENDIAN);
1247 } else {
1248 proto_tree_add_item(ua3g_param_tree, hf_ua3g_ip_device_routing_redirect_parameter_value, tvb, offset, parameter_length, ENC_NA);
1250 break;
1253 offset += parameter_length;
1254 length -= parameter_length;
1257 break;
1258 case 0x04: /* DEF_TONES */
1260 int i, tone_nb_entries;
1261 guint16 frequency_1, frequency_2;
1262 signed char level_1, level_2;
1264 tone_nb_entries = tvb_get_guint8(tvb, offset);
1266 proto_tree_add_item(ua3g_body_tree, hf_ua3g_ip_device_routing_def_tones_num_entries, tvb, offset, 1, ENC_NA);
1267 offset++;
1268 length--;
1270 while (length > 0 && tone_nb_entries) {
1271 for (i = 1; i <= tone_nb_entries; i++) {
1272 frequency_1 = tvb_get_ntohs(tvb, offset);
1273 level_1 = (signed char)(tvb_get_guint8(tvb, offset + 2)) / 2;
1274 frequency_2 = tvb_get_ntohs(tvb, offset + 3);
1275 level_2 = (signed char)(tvb_get_guint8(tvb, offset + 5)) / 2;
1277 ua3g_param_item = proto_tree_add_text(ua3g_body_tree, tvb, offset, 6,
1278 "Tone Pair %d: %d Hz at %d dB / %d Hz at %d dB",
1279 i, frequency_1, level_1, frequency_2, level_2);
1280 ua3g_param_tree = proto_item_add_subtree(ua3g_param_item, ett_ua3g_param);
1282 proto_tree_add_item(ua3g_param_tree, hf_ua3g_ip_device_routing_def_tones_frequency_1, tvb, offset, 2, ENC_BIG_ENDIAN);
1283 offset += 2;
1284 length -= 2;
1286 proto_tree_add_int(ua3g_param_tree, hf_ua3g_ip_device_routing_def_tones_level_1, tvb, offset, 1, level_1);
1287 offset++;
1288 length--;
1290 proto_tree_add_item(ua3g_param_tree, hf_ua3g_ip_device_routing_def_tones_frequency_2, tvb, offset, 2, ENC_BIG_ENDIAN);
1291 offset += 2;
1292 length -= 2;
1294 proto_tree_add_int(ua3g_param_tree, hf_ua3g_ip_device_routing_def_tones_level_2, tvb, offset, 1, level_2);
1295 offset++;
1296 length--;
1299 break;
1301 case 0x05: /* START TONE */
1303 guint8 ii, tone_nb_entries, tone_id;
1304 #if 0
1305 guint8 tone_direction, tone_id, tone_duration tone_silence;
1306 #endif
1307 int tone_duration;
1309 tone_nb_entries = tvb_get_guint8(tvb, offset);
1311 proto_tree_add_item(ua3g_body_tree, hf_ua3g_ip_device_routing_start_tone_direction, tvb, offset, 1, ENC_NA);
1312 proto_tree_add_item(ua3g_body_tree, hf_ua3g_ip_device_routing_start_tone_num_entries, tvb, offset, 1, ENC_NA);
1313 offset++;
1314 length--;
1316 while (length > 0 && tone_nb_entries) {
1317 for (ii = 0; ii < tone_nb_entries; ii++) {
1318 tone_id = tvb_get_guint8(tvb, offset);
1319 tone_duration = tvb_get_ntohs(tvb, offset + 1);
1320 #if 0
1321 tone_duration = tvb_get_guint8(tvb, offset + 1);
1322 tone_silence = tvb_get_guint8(tvb, offset + 2);
1323 #endif
1325 ua3g_param_item = proto_tree_add_text(ua3g_body_tree, tvb, offset, 6,
1326 #if 0
1327 "Tone Pair %d: Id: %d, Duration: %d ms, Silence: %d ms",
1328 ii+1, tone_id, tone_duration, tone_silence);
1329 #endif
1330 "Tone Pair %d: Id: %d, Duration: %d ms",
1331 ii+1, tone_id, tone_duration);
1332 ua3g_param_tree = proto_item_add_subtree(ua3g_param_item, ett_ua3g_param);
1334 proto_tree_add_item(ua3g_param_tree, hf_ua3g_ip_device_routing_start_tone_identification, tvb, offset, 1, ENC_NA);
1335 offset++;
1336 length--;
1338 proto_tree_add_item(ua3g_param_tree, hf_ua3g_ip_device_routing_start_tone_duration, tvb, offset, 2, ENC_BIG_ENDIAN);
1339 offset += 2;
1340 length -= 2;
1342 #if 0
1343 proto_tree_add_text(ua3g_param_tree, tvb, offset, 1,
1344 "Duration: %d ms", tone_duration);
1345 offset++;
1346 length--;
1348 proto_tree_add_text(ua3g_param_tree, tvb, offset, 1,
1349 "Silence: %d ms", tone_silence);
1350 offset++;
1351 length--;
1352 #endif
1355 break;
1357 case 0x07: /* START LISTEN RTP */
1358 case 0x08: /* STOP LISTEN RTP */
1359 while (length > 0) {
1360 parameter_id = tvb_get_guint8(tvb, offset);
1361 parameter_length = tvb_get_guint8(tvb, offset + 1);
1363 ua3g_param_item = proto_tree_add_uint_format(ua3g_body_tree, hf_ua3g_ip_device_routing_listen_rtp_parameter, tvb, offset,
1364 parameter_length + 2, parameter_id, "%s",
1365 val_to_str_const(parameter_id, ip_device_routing_cmd_listen_rtp_vals, "Unknown"));
1366 ua3g_param_tree = proto_item_add_subtree(ua3g_param_item, ett_ua3g_param);
1368 proto_tree_add_item(ua3g_param_tree, hf_ua3g_ip_device_routing_listen_rtp_parameter, tvb, offset, 1, ENC_NA);
1369 offset++;
1370 length--;
1372 proto_tree_add_item(ua3g_param_tree, hf_ua3g_ip_device_routing_listen_rtp_parameter_length, tvb, offset, 1, ENC_NA);
1373 offset++;
1374 length--;
1376 if (parameter_length > 0) {
1377 switch (parameter_id) {
1378 case 0x00: /* Remote IP Address - Not for start listening rtp */
1379 case 0x03: /* Remote IP Address Out - Not for start listening rtp */
1380 proto_tree_add_item(ua3g_param_tree, hf_ua3g_ip_device_routing_listen_rtp_parameter_ip, tvb, offset, 1, ENC_NA);
1381 break;
1382 case 0x01: /* Remote UDP Port In - Not for start listening rtp */
1383 case 0x02: /* Remote UDP Port Out - Not for start listening rtp */
1384 case 0x04: /* Canal Number */
1385 default:
1386 if (parameter_length <= 8) {
1387 proto_tree_add_item(ua3g_param_tree, hf_ua3g_ip_device_routing_listen_rtp_parameter_port, tvb, offset, parameter_length, ENC_BIG_ENDIAN);
1388 } else {
1389 proto_tree_add_item(ua3g_param_tree, hf_ua3g_ip_device_routing_listen_rtp_parameter_value, tvb, offset, parameter_length, ENC_NA);
1391 break;
1394 offset += parameter_length;
1395 length -= parameter_length;
1398 break;
1399 case 0x09: /* GET_PARAM_REQ */
1400 while (length > 0) {
1401 proto_tree_add_item(ua3g_body_tree, hf_ua3g_ip_device_routing_get_param_req_parameter, tvb, offset, 1, ENC_NA);
1402 offset++;
1403 length--;
1405 break;
1407 case 0x0A: /* SET_PARAM_REQ */
1409 while (length > 0) {
1410 parameter_id = tvb_get_guint8(tvb, offset);
1411 parameter_length = tvb_get_guint8(tvb, offset + 1);
1413 ua3g_param_item = proto_tree_add_uint_format(ua3g_body_tree, hf_ua3g_ip_device_routing_set_param_req_parameter, tvb, offset,
1414 parameter_length + 2, parameter_id, "%s",
1415 val_to_str_ext_const(parameter_id, &ip_device_routing_cmd_set_param_req_vals_ext, "Unknown"));
1416 ua3g_param_tree = proto_item_add_subtree(ua3g_param_item, ett_ua3g_param);
1418 proto_tree_add_item(ua3g_param_tree, hf_ua3g_ip_device_routing_set_param_req_parameter, tvb, offset, 1, ENC_NA);
1419 offset++;
1420 length--;
1422 proto_tree_add_item(ua3g_param_tree, hf_ua3g_ip_device_routing_set_param_req_parameter_length, tvb, offset, 1, ENC_NA);
1423 offset++;
1424 length--;
1426 if (parameter_length > 0) {
1427 switch (parameter_id) {
1428 case 0x06: /* Compressor */
1429 proto_tree_add_item(ua3g_param_tree, hf_ua3g_ip_device_routing_set_param_req_parameter_compressor, tvb, offset, 1, ENC_NA);
1430 break;
1431 case 0x07: /* ERR STRING NET DOWN */
1432 case 0x08: /* ERR STRING CABLE PB */
1433 case 0x09: /* ERR STRING TRY CONNECT */
1434 case 0x0A: /* ERR STRING CONNECTED */
1435 case 0x0B: /* ERR STRING RESET */
1436 case 0x0C: /* ERR STRING DUPLICATE IP ADDRESS */
1437 proto_tree_add_item(ua3g_param_tree, hf_ua3g_ip_device_routing_set_param_req_parameter_err_string, tvb, offset, parameter_length, ENC_NA|ENC_ASCII);
1438 break;
1439 case 0x0F: /* TFTP BACKUP IP ADDR */
1440 proto_tree_add_item(ua3g_param_tree, hf_ua3g_ip_device_routing_set_param_req_parameter_tftp_backup_ip, tvb, offset, 4, ENC_BIG_ENDIAN);
1441 break;
1442 case 0x11: /* Set PC Port status */
1443 proto_tree_add_item(ua3g_param_tree, hf_ua3g_ip_device_routing_set_param_req_parameter_set_pc_port_status, tvb, offset, 1, ENC_NA);
1444 break;
1445 case 0x12: /* Record RTP Authorization */
1446 proto_tree_add_item(ua3g_param_tree, hf_ua3g_ip_device_routing_set_param_req_parameter_record_rtp_auth, tvb, offset, 1, ENC_NA);
1447 break;
1448 case 0x13: /* Security Flags */
1449 proto_tree_add_item(ua3g_param_tree, hf_ua3g_ip_device_routing_set_param_req_parameter_security_flag_filter, tvb, offset, 1, ENC_NA);
1450 break;
1451 case 0x00: /* QOS IP TOS */
1452 case 0x01: /* QOS 8021 VLID */
1453 case 0x02: /* QOS 8021 PRI */
1454 case 0x03: /* SNMP MIB2 SYSCONTACT */
1455 case 0x04: /* SNMP MIB2 SYSNAME */
1456 case 0x05: /* SNMP MIB2 SYSLOCATION */
1457 case 0x0D: /* SNMP MIB COMMUNITY */
1458 case 0x0E: /* TFTP BACKUP SEC MODE */
1459 case 0x10: /* SET MMI PASSWORD */
1460 case 0x14: /* ARP Spoofing */
1461 case 0x15: /* Session Param */
1462 case 0x30: /* MD5 Authentication */
1463 default:
1464 if ((parameter_length > 0) && (parameter_length <= 8)) {
1465 proto_tree_add_item(ua3g_param_tree, hf_ua3g_ip_device_routing_set_param_req_parameter_uint, tvb, offset, parameter_length, ENC_BIG_ENDIAN);
1466 } else if (parameter_length > 8) {
1467 proto_tree_add_item(ua3g_param_tree, hf_ua3g_ip_device_routing_set_param_req_parameter_value, tvb, offset, parameter_length, ENC_NA);
1469 break;
1472 offset += parameter_length;
1473 length -= parameter_length;
1476 break;
1478 case 0x0B: /* SEND_DIGIT */
1479 proto_tree_add_item(ua3g_body_tree, hf_ua3g_ip_device_routing_digit_value, tvb, offset, 1, ENC_NA);
1480 break;
1482 case 0x0C: /* PAUSE_RTP */
1483 case 0x0D: /* RESTART_RTP */
1484 while (length > 0) {
1485 parameter_id = tvb_get_guint8(tvb, offset);
1486 parameter_length = tvb_get_guint8(tvb, offset + 1);
1488 ua3g_param_item = proto_tree_add_uint_format(ua3g_body_tree, hf_ua3g_ip_device_routing_pause_restart_rtp_parameter, tvb, offset,
1489 parameter_length + 2, parameter_id, "%s",
1490 val_to_str_const(parameter_id, ip_device_routing_cmd_pause_restart_vals, "Unknown"));
1491 ua3g_param_tree = proto_item_add_subtree(ua3g_param_item, ett_ua3g_param);
1493 proto_tree_add_item(ua3g_param_tree, hf_ua3g_ip_device_routing_pause_restart_rtp_parameter, tvb, offset, 1, ENC_NA);
1494 offset++;
1495 length--;
1497 proto_tree_add_item(ua3g_param_tree, hf_ua3g_ip_device_routing_pause_restart_rtp_parameter_length, tvb, offset, 1, ENC_NA);
1498 offset++;
1499 length--;
1501 if (parameter_length > 0) {
1502 if (parameter_length <= 8) {
1503 proto_tree_add_item(ua3g_param_tree, hf_ua3g_ip_device_routing_pause_restart_rtp_parameter_uint, tvb, offset, parameter_length, ENC_BIG_ENDIAN);
1504 } else {
1505 proto_tree_add_item(ua3g_param_tree, hf_ua3g_ip_device_routing_pause_restart_rtp_parameter_value, tvb, offset, parameter_length, ENC_NA);
1508 offset += parameter_length;
1509 length -= parameter_length;
1512 break;
1513 case 0x0E: /* START_RECORD_RTP */
1514 case 0x0F: /* STOP RECORD RTP */
1515 while (length > 0) {
1517 parameter_id = tvb_get_guint8(tvb, offset);
1518 parameter_length = tvb_get_guint8(tvb, offset + 1);
1520 ua3g_param_item = proto_tree_add_uint_format(ua3g_body_tree, hf_ua3g_ip_device_routing_start_stop_record_rtp_parameter, tvb, offset,
1521 parameter_length + 2, parameter_id, "%s",
1522 val_to_str_const(parameter_id, ip_device_routing_cmd_record_rtp_vals, "Unknown"));
1523 ua3g_param_tree = proto_item_add_subtree(ua3g_param_item, ett_ua3g_param);
1525 proto_tree_add_item(ua3g_param_tree, hf_ua3g_ip_device_routing_start_stop_record_rtp_parameter, tvb, offset, 1, ENC_NA);
1526 offset++;
1527 length--;
1529 proto_tree_add_item(ua3g_param_tree, hf_ua3g_ip_device_routing_start_stop_record_rtp_parameter_length, tvb, offset, 1, ENC_NA);
1530 offset++;
1531 length--;
1533 if (parameter_length > 0) {
1534 switch (parameter_id) {
1535 case 0x01: /* Remote IP Address */
1536 case 0x04: /* Remote IP Address Out */
1537 proto_tree_add_item(ua3g_param_tree, hf_ua3g_ip_device_routing_start_stop_record_rtp_parameter_remote_ip, tvb, offset, 4, ENC_BIG_ENDIAN);
1538 break;
1539 case 0x00: /* Recorder Index */
1540 case 0x02: /* Remote UDP Port In */
1541 case 0x03: /* Remote UDP Port Out */
1542 case 0x05: /* Local UDP Port In */
1543 case 0x06: /* Local UDP Port Out */
1544 case 0x07: /* Type Of Service */
1545 case 0x08: /* Master Key For SRTP Session */
1546 case 0x09: /* Master Salt Key For SRTP Session */
1547 case 0x30: /* MD5 Authentication */
1548 default:
1549 if (parameter_length <= 8) {
1550 proto_tree_add_item(ua3g_param_tree, hf_ua3g_ip_device_routing_start_stop_record_rtp_parameter_uint, tvb, offset, parameter_length, ENC_BIG_ENDIAN);
1551 } else {
1552 proto_tree_add_item(ua3g_param_tree, hf_ua3g_ip_device_routing_start_stop_record_rtp_parameter_value, tvb, offset, parameter_length, ENC_NA);
1554 break;
1557 offset += parameter_length;
1558 length -= parameter_length;
1561 break;
1562 case 0x06: /* STOP TONE */
1563 default:
1565 break;
1571 /*-----------------------------------------------------------------------------
1572 DEBUG IN LINE - 18h (MESSAGE FROM THE TERMINAL AND FROM THE SYSTEM)
1573 ---------------------------------------------------------------------------*/
1574 static void
1575 decode_debug_in_line(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_,
1576 guint offset, guint length)
1578 proto_tree_add_item(tree, hf_ua3g_debug_in_line, tvb, offset, length, ENC_NA|ENC_ASCII);
1582 /*-----------------------------------------------------------------------------
1583 LED COMMAND - 21h (MESSAGE FROM THE SYSTEM)
1584 ---------------------------------------------------------------------------*/
1585 static const value_string str_command_led[] = {
1586 {0x00, "Led Off"},
1587 {0x01, "Led On"},
1588 {0x02, "Red Led Fast Flash"},
1589 {0x03, "Red Led Slow Flash"},
1590 {0x04, "Green Led On"},
1591 {0x05, "Green Led Fast Flash"},
1592 {0x06, "Green Led Slow Flash"},
1593 {0x07, "All Led Off"},
1594 {0, NULL}
1597 static void
1598 decode_led_command(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo,
1599 guint offset)
1601 int command;
1603 command = tvb_get_guint8(tvb, offset);
1605 /* add text to the frame "INFO" column */
1606 col_append_fstr(pinfo->cinfo, COL_INFO, ": %s", val_to_str_const(command, str_command_led, "Unknown"));
1608 if (!tree)
1609 return;
1611 proto_tree_add_item(tree, hf_ua3g_command_led, tvb, offset, 1, ENC_NA);
1613 if ((command >= 0) && (command < 7)) {
1614 proto_tree_add_item(tree, hf_ua3g_command_led_number, tvb, offset+1, 1, ENC_NA);
1619 /*-----------------------------------------------------------------------------
1620 LCD LINE 1 COMMANDS - 27h (MESSAGE FROM THE SYSTEM)
1621 LCD LINE 2 COMMANDS - 28h (MESSAGE FROM THE SYSTEM)
1622 ---------------------------------------------------------------------------*/
1623 static const value_string str_command_lcd_line[] = {
1624 {0, "Clear Line & Write From Column"},
1625 {1, "Write From Column"},
1626 {2, "Append To Current Line"},
1627 {0, NULL}
1630 static const value_string str_call_timer_ctrl[] = {
1631 {0x00, "Call Timer Status Not Changed"},
1632 {0x01, "Stop Call Timer"},
1633 {0x02, "Start Call Timer From Current Value"},
1634 {0x03, "Initialize And Call Timer"},
1635 {0, NULL}
1638 static void
1639 decode_lcd_line_cmd(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo,
1640 guint offset, guint length)
1642 guint8 command, column_n;
1643 const gchar* command_str;
1644 proto_tree *ua3g_body_tree = tree, *ua3g_param_tree, *ua3g_option_tree;
1645 proto_item *ua3g_param_item, *ua3g_option_item;
1646 wmem_strbuf_t *strbuf;
1648 command = tvb_get_guint8(tvb, offset) & 0x03;
1649 column_n = tvb_get_guint8(tvb, offset + 1);
1650 command_str = val_to_str_const(command, str_command_lcd_line, "Unknown");
1652 /* add text to the frame "INFO" column */
1653 col_append_fstr(pinfo->cinfo, COL_INFO, ": %s %d", command_str, column_n);
1655 if (!ua3g_body_tree)
1656 return;
1658 strbuf = wmem_strbuf_new_label(wmem_packet_scope());
1660 wmem_strbuf_append_printf(strbuf, "\"%s\"", tvb_format_text(tvb, offset + 2, length - 2));
1662 ua3g_param_item = proto_tree_add_text(ua3g_body_tree, tvb, offset,
1663 length, "%s %d: %s",
1664 command_str, column_n, wmem_strbuf_get_str(strbuf));
1665 ua3g_param_tree = proto_item_add_subtree(ua3g_param_item, ett_ua3g_param);
1667 proto_tree_add_item(ua3g_body_tree, hf_ua3g_command_lcd_line, tvb, offset, 1, ENC_NA);
1668 ua3g_option_item = proto_tree_add_item(ua3g_param_tree, hf_ua3g_lcd_line_cmd_lcd_options, tvb, offset, 1, ENC_NA);
1669 ua3g_option_tree = proto_item_add_subtree(ua3g_option_item, ett_ua3g_option);
1671 proto_tree_add_item(ua3g_option_tree, hf_ua3g_lcd_line_cmd_lcd_options_call_timer, tvb, offset, 1, ENC_NA);
1672 proto_tree_add_item(ua3g_option_tree, hf_ua3g_lcd_line_cmd_lcd_options_blink, tvb, offset, 1, ENC_NA);
1673 proto_tree_add_item(ua3g_option_tree, hf_ua3g_lcd_line_cmd_lcd_options_call_timer_control, tvb, offset, 1, ENC_NA);
1674 proto_tree_add_item(ua3g_option_tree, hf_ua3g_lcd_line_cmd_lcd_options_call_timer_display, tvb, offset, 1, ENC_NA);
1675 proto_tree_add_item(ua3g_option_tree, hf_ua3g_lcd_line_cmd_lcd_options_time_of_day_display, tvb, offset, 1, ENC_NA);
1676 proto_tree_add_item(ua3g_option_tree, hf_ua3g_lcd_line_cmd_lcd_options_suspend_display_refresh, tvb, offset, 1, ENC_NA);
1678 offset++;
1679 length--;
1681 if (command != 3)
1682 proto_tree_add_item(ua3g_param_tree, hf_ua3g_lcd_line_cmd_starting_column, tvb, offset, 1, ENC_NA);
1683 else
1684 proto_tree_add_text(ua3g_param_tree, tvb, offset, 1, "Unused");
1686 offset++;
1687 length--;
1688 proto_tree_add_text(ua3g_param_tree, tvb, offset, length, "ASCII Char: %s", wmem_strbuf_get_str(strbuf));
1692 /*-----------------------------------------------------------------------------
1693 MAIN VOICE MODE - 29h (MESSAGE FROM THE SYSTEM)
1694 ---------------------------------------------------------------------------*/
1695 static const value_string str_main_voice_mode[] = {
1696 {0x00, "Idle"},
1697 {0x01, "Handset"},
1698 {0x02, "Group Listening"},
1699 {0x03, "On Hook Dial"},
1700 {0x04, "Handsfree"},
1701 {0x05, "Announce Loudspeaker"},
1702 {0x06, "Ringing"},
1703 {0x10, "Idle"},
1704 {0x11, "Handset"},
1705 {0x12, "Headset"},
1706 {0x13, "Handsfree"},
1707 {0, NULL}
1710 static const value_string str_cadence[] = {
1711 {0x00, "Standard Ringing"},
1712 {0x01, "Double Burst"},
1713 {0x02, "Triple Burst"},
1714 {0x03, "Continuous Ringing"},
1715 {0x04, "Priority Attendant Ringing"},
1716 {0x05, "Regular Attendant Ringing"},
1717 {0x06, "Programmable Cadence"},
1718 {0x07, "Programmable Cadence"},
1719 {0, NULL}
1722 static void
1723 decode_main_voice_mode(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo,
1724 guint offset, guint length)
1726 guint8 mode;
1727 proto_tree *ua3g_body_tree = tree;
1729 mode = tvb_get_guint8(tvb, offset);
1731 /* add text to the frame "INFO" column */
1732 col_append_fstr(pinfo->cinfo, COL_INFO, ": %s", val_to_str_const(mode, str_main_voice_mode, "Unknown"));
1734 if (!ua3g_body_tree)
1735 return;
1737 proto_tree_add_item(ua3g_body_tree, hf_ua3g_main_voice_mode, tvb, offset, 1, ENC_NA);
1738 offset++;
1739 length--;
1741 switch (mode) {
1742 case 0x06: /* Ringing */
1744 proto_tree_add_item(ua3g_body_tree, hf_ua3g_main_voice_mode_tune, tvb, offset, 1, ENC_NA);
1745 offset++;
1746 length--;
1748 proto_tree_add_item(ua3g_body_tree, hf_ua3g_main_voice_mode_cadence, tvb, offset, 1, ENC_NA);
1749 offset++;
1750 length--;
1752 /* FALLTHROUGH */
1753 case 0x02: /* Group Listening */
1754 case 0x03: /* On Hook Dial */
1755 case 0x04: /* Handsfree */
1756 case 0x05: /* Announce Loudspeaker */
1758 proto_tree_add_item(ua3g_body_tree, hf_ua3g_main_voice_mode_speaker_volume, tvb, offset, 1, ENC_NA);
1759 offset++;
1760 length--;
1762 if (length > 0) {
1763 proto_tree_add_item(ua3g_body_tree, hf_ua3g_main_voice_mode_microphone_volume, tvb, offset, 1, ENC_NA);
1765 break;
1767 case 0x11: /* Handset */
1769 signed char level;
1771 level = (signed char)(tvb_get_guint8(tvb, offset)) / 2;
1772 proto_tree_add_int(ua3g_body_tree, hf_ua3g_main_voice_mode_handset_level, tvb, offset, 1, level);
1774 level = (signed char)(tvb_get_guint8(tvb, offset+1)) / 2;
1775 proto_tree_add_int(ua3g_body_tree, hf_ua3g_main_voice_mode_sending_level, tvb, offset+1, 1, level);
1776 break;
1778 case 0x12: /* Headset */
1780 signed char level;
1782 level = (signed char)(tvb_get_guint8(tvb, offset)) / 2;
1783 proto_tree_add_int(ua3g_body_tree, hf_ua3g_main_voice_mode_headset_level, tvb, offset, 1, level);
1785 level = (signed char)(tvb_get_guint8(tvb, offset+1)) / 2;
1786 proto_tree_add_int(ua3g_body_tree, hf_ua3g_main_voice_mode_sending_level, tvb, offset+1, 1, level);
1787 break;
1789 case 0x13: /* Handsfree */
1791 signed char level;
1793 level = (signed char)(tvb_get_guint8(tvb, offset)) / 2;
1794 proto_tree_add_int(ua3g_body_tree, hf_ua3g_main_voice_mode_handsfree_level, tvb, offset, 1, level);
1796 level = (signed char)(tvb_get_guint8(tvb, offset+1)) / 2;
1797 proto_tree_add_int(ua3g_body_tree, hf_ua3g_main_voice_mode_sending_level, tvb, offset+1, 1, level);
1798 break;
1800 case 0x00: /* Idle */
1801 case 0x01: /* Handset */
1802 case 0x10: /* Idle */
1803 default:
1805 break;
1811 /*-----------------------------------------------------------------------------
1812 SUBDEVICE METASTATE - 2Ch (MESSAGE FROM THE SYSTEM)
1813 ---------------------------------------------------------------------------*/
1814 static const value_string str_new_metastate[] = {
1815 {0x00, "Disable"},
1816 {0x01, "Active"},
1817 {0x02, "Wake Up"},
1818 {0, NULL}
1821 static void
1822 decode_subdevice_metastate(proto_tree *tree, tvbuff_t *tvb,
1823 packet_info *pinfo _U_, guint offset)
1825 proto_tree_add_item(tree, hf_ua3g_subdevice_metastate_subchannel_address, tvb, offset, 1, ENC_NA);
1826 proto_tree_add_item(tree, hf_ua3g_subdevice_metastate_new_metastate, tvb, offset+1, 1, ENC_NA);
1830 /*-----------------------------------------------------------------------------
1831 Download DTMF & CLOCK FORMAT - 30h (MESSAGE FROM THE SYSTEM)
1832 ---------------------------------------------------------------------------*/
1833 static const value_string str_clock_format[] = {
1834 {0, "Europe"},
1835 {1, "US"},
1836 {0, NULL}
1839 static void
1840 decode_dwl_dtmf_clck_format(proto_tree *tree, tvbuff_t *tvb,
1841 packet_info *pinfo _U_, guint offset, guint length)
1843 proto_tree_add_item(tree, hf_ua3g_dwl_dtmf_clck_format_minimum_on_time, tvb, offset, 1, ENC_NA);
1844 proto_tree_add_item(tree, hf_ua3g_dwl_dtmf_clck_format_inter_digit_pause_time, tvb, offset+1, 1, ENC_NA);
1845 proto_tree_add_item(tree, hf_ua3g_dwl_dtmf_clck_format_clock_time_format, tvb, offset+2, 1, ENC_NA);
1847 if (length > 2)
1848 proto_tree_add_item(tree, hf_ua3g_dwl_dtmf_clck_format_dtmf_country_adaptation, tvb, offset+3, 1, ENC_NA);
1852 /*-----------------------------------------------------------------------------
1853 SET CLOCK - 31h (MESSAGE FROM THE SYSTEM)
1854 ---------------------------------------------------------------------------*/
1855 static const value_string str_command_set_clck[] = {
1856 {0x00, "Set Current Time/Call Timer"},
1857 {0x01, "Set Current Time"},
1858 {0x02, "Set Call Timer"},
1859 {0, NULL}
1862 static const value_string str_call_timer[] = {
1863 {1, "Call Timer "},
1864 {0, NULL}
1867 static void
1868 decode_set_clck(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo,
1869 guint offset, guint length)
1871 guint8 command;
1872 int hour, minute, second, call_timer;
1874 command = tvb_get_guint8(tvb, offset);
1876 /* add text to the frame "INFO" column */
1877 col_append_fstr(pinfo->cinfo, COL_INFO, ": %s", val_to_str_const(command, str_command_set_clck, "Unknown"));
1879 proto_tree_add_item(tree, hf_ua3g_command_set_clck, tvb, offset, 1, ENC_NA);
1880 offset++;
1881 length--;
1882 call_timer = 0;
1884 switch (command) {
1885 case 0x02: /* Timer Form */
1887 call_timer = 1;
1889 /* FALLTHROUGH */
1890 case 0x00: /* Set Current Time/Call Timer */
1891 case 0x01: /* Set Current Time */
1893 while (length > 0) {
1894 hour = tvb_get_guint8(tvb, offset);
1895 minute = tvb_get_guint8(tvb, offset + 1);
1896 second = tvb_get_guint8(tvb, offset + 2);
1898 proto_tree_add_text(tree, tvb, offset, 3,
1899 "%s: %d:%d:%d",
1900 val_to_str_const(call_timer, str_call_timer, "Current Time"), hour, minute, second);
1901 offset += 3;
1902 length -= 3;
1904 call_timer = 1;
1907 default:
1909 break;
1916 /*-----------------------------------------------------------------------------
1917 VOICE CHANNEL - 32h - (MESSAGE FROM THE SYSTEM)
1918 ---------------------------------------------------------------------------*/
1919 static const value_string str_voice_channel[] = {
1920 {0x00, "No"},
1921 {0x01, "B1"},
1922 {0x02, "B2"},
1923 {0x03, "B3"},
1924 {0, NULL}
1927 static const true_false_string tfs_voice_channel_channel_mode = { "Write 00 to Voice Channel", "Normal Voice Channel Mode" };
1928 static const true_false_string tfs_voice_channel_codec = { "Write Quiet To Codec", "Normal Codec Operation" };
1929 static const true_false_string tfs_voice_channel_voice_channel = { "Use B3 As Voice Channel", "Use B1 As Voice Channel" };
1931 static void
1932 decode_voice_channel(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_,
1933 guint offset, guint length)
1935 if (length == 1) {
1936 proto_tree_add_item(tree, hf_ua3g_voice_channel_channel_mode, tvb, offset, 1, ENC_NA);
1937 proto_tree_add_item(tree, hf_ua3g_voice_channel_codec, tvb, offset, 1, ENC_NA);
1938 proto_tree_add_item(tree, hf_ua3g_voice_channel_voice_channel, tvb, offset, 1, ENC_NA);
1939 } else if (length == 2) {
1940 proto_tree_add_item(tree, hf_ua3g_voice_channel_main_voice, tvb, offset, 1, ENC_NA);
1941 proto_tree_add_item(tree, hf_ua3g_voice_channel_announce, tvb, offset+1, 1, ENC_NA);
1942 } else if (length == 4) {
1943 proto_tree_add_item(tree, hf_ua3g_voice_channel_b_general, tvb, offset, 1, ENC_NA);
1944 proto_tree_add_item(tree, hf_ua3g_voice_channel_b_loud_speaker, tvb, offset+1, 1, ENC_NA);
1945 proto_tree_add_item(tree, hf_ua3g_voice_channel_b_ear_piece, tvb, offset+2, 1, ENC_NA);
1946 proto_tree_add_item(tree, hf_ua3g_voice_channel_b_microphones, tvb, offset+3, 1, ENC_NA);
1951 /*-----------------------------------------------------------------------------
1952 EXTERNAL RINGING - 33h (MESSAGE FROM THE SYSTEM)
1953 ---------------------------------------------------------------------------*/
1954 static const value_string str_ext_ring_cmd[] = {
1955 {0x00, "Turn Off"},
1956 {0x01, "Turn On"},
1957 {0x02, "Follow The Normal Ringing"},
1958 {0, NULL}
1961 static void
1962 decode_external_ringing(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo,
1963 guint offset)
1965 guint8 command;
1967 command = tvb_get_guint8(tvb, offset);
1969 /* add text to the frame "INFO" column */
1970 col_append_fstr(pinfo->cinfo, COL_INFO, ": %s", val_to_str_const(command, str_ext_ring_cmd, "Unknown"));
1972 proto_tree_add_item(tree, hf_ua3g_external_ringing_command, tvb, offset, 1, ENC_NA);
1976 /*-----------------------------------------------------------------------------
1977 LCD CURSOR - 35h - (MESSAGE FROM THE SYSTEM)
1978 ---------------------------------------------------------------------------*/
1979 static void
1980 decode_lcd_cursor(proto_tree *tree _U_, tvbuff_t *tvb, packet_info *pinfo, guint offset)
1982 const gchar* str_on_off_val = STR_ON_OFF(tvb_get_guint8(tvb, offset + 1) & 0x02);
1984 /* add text to the frame "INFO" column */
1985 col_append_fstr(pinfo->cinfo, COL_INFO, ": %s", str_on_off_val);
1987 proto_tree_add_item(tree, hf_ua3g_lcd_cursor_line_number, tvb, offset, 1, ENC_NA);
1988 proto_tree_add_item(tree, hf_ua3g_lcd_cursor, tvb, offset+1, 1, ENC_NA);
1992 /*-----------------------------------------------------------------------------
1993 DOWNLOAD SPECIAL CHARACTER - 36h - (MESSAGE FROM THE SYSTEM)
1994 ---------------------------------------------------------------------------*/
1995 static void
1996 decode_dwl_special_char(proto_tree *tree, tvbuff_t *tvb,
1997 packet_info *pinfo _U_, guint offset, guint length)
1999 int i;
2001 while (length > 0) {
2002 proto_tree_add_item(tree, hf_ua3g_dwl_special_char_character_number, tvb, offset, 1, ENC_NA);
2003 offset++;
2004 length--;
2005 for (i = 1; i <= 8; i++) {
2006 proto_tree_add_item(tree, hf_ua3g_dwl_special_char_byte, tvb, offset, 1, ENC_NA);
2007 offset++;
2008 length--;
2014 /*-----------------------------------------------------------------------------
2015 SET CLOCK/TIMER POSITION - 38h - (MESSAGE FROM THE SYSTEM)
2016 ---------------------------------------------------------------------------*/
2017 static void
2018 decode_set_clck_timer_pos(proto_tree *tree, tvbuff_t *tvb,
2019 packet_info *pinfo _U_, guint offset)
2021 if (!tree)
2022 return;
2024 proto_tree_add_item(tree, hf_ua3g_set_clck_timer_pos_clock_line_number, tvb, offset, 1, ENC_NA);
2025 proto_tree_add_item(tree, hf_ua3g_set_clck_timer_pos_clock_column_number, tvb, offset+1, 1, ENC_NA);
2026 proto_tree_add_item(tree, hf_ua3g_set_clck_timer_pos_call_timer_line_number, tvb, offset+2, 1, ENC_NA);
2027 proto_tree_add_item(tree, hf_ua3g_set_clck_timer_pos_call_timer_column_number, tvb, offset+3, 1, ENC_NA);
2031 /*-----------------------------------------------------------------------------
2032 SET LCD CONTRAST - 39h - (MESSAGE FROM THE SYSTEM)
2033 ---------------------------------------------------------------------------*/
2034 static const value_string str_driver_number[] = {
2035 {0x00, "Display"},
2036 {0x01, "Icon"},
2037 {0, NULL}
2040 static void
2041 decode_set_lcd_contrast(proto_tree *tree, tvbuff_t *tvb,
2042 packet_info *pinfo _U_, guint offset)
2044 proto_tree_add_item(tree, hf_ua3g_set_lcd_contrast_driver_number, tvb, offset, 1, ENC_NA);
2045 proto_tree_add_item(tree, hf_ua3g_set_lcd_contrast_contrast_value, tvb, offset+1, 1, ENC_NA);
2049 /*-----------------------------------------------------------------------------
2050 BEEP - 3Ch (MESSAGE FROM THE SYSTEM)
2051 ---------------------------------------------------------------------------*/
2052 static const value_string str_command_beep[] = {
2053 {0x01, "Beep Once"},
2054 {0x02, "Beep Start"},
2055 {0x03, "Stop Beep"},
2056 {0x04, "Start Beep"},
2057 {0x05, "Define Beep"},
2058 {0, NULL}
2061 static const value_string str_beep_start_destination[] = {
2062 {0x01, "Ear-Piece"},
2063 {0x02, "Loudspeaker"},
2064 {0x03, "Ear-Piece and Loudspeaker"},
2065 {0, NULL}
2068 static const value_string str_start_beep_destination[] = {
2069 {0x01, "Handset"},
2070 {0x02, "Headset"},
2071 {0x04, "Loudspeaker"},
2072 {0x08, "Announce Loudspeaker"},
2073 {0x10, "Handsfree"},
2074 {0, NULL}
2077 static const value_string str_beep_freq_sample_nb[] = {
2078 {0x00, "Frequency"},
2079 {0xFF, "Audio Sample Number"},
2080 {0, NULL}
2082 static const value_string str_beep_duration[] = {
2083 {0x00, "Duration "},
2084 {0xFF, "Duration (Ignored)"},
2085 {0, NULL}
2087 static const value_string str_beep_terminator[] = {
2088 {0xFD, "Stop"},
2089 {0xFE, "Loop"},
2090 {0xFF, "Infinite"},
2091 {0, NULL}
2094 static void
2095 decode_beep(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo,
2096 guint offset, guint length)
2098 if (length > 0) { /* All cases except classical beep */
2099 guint8 command;
2100 proto_tree *ua3g_body_tree = tree;
2102 command = tvb_get_guint8(tvb, offset);
2104 /* add text to the frame "INFO" column */
2105 col_append_fstr(pinfo->cinfo, COL_INFO, ": %s", val_to_str_const(command, str_command_beep, "Unknown"));
2107 proto_tree_add_item(ua3g_body_tree, hf_ua3g_command_beep, tvb, offset, 1, ENC_NA);
2108 offset++;
2109 length--;
2111 switch (command) {
2112 case 0x01: /* Beep Once */
2113 case 0x02: /* Beep Start */
2115 int i = 0;
2117 proto_tree_add_item(ua3g_body_tree, hf_ua3g_beep_destination, tvb, offset, 1, ENC_NA);
2118 offset++;
2119 length--;
2121 while (length > 0) {
2122 guint8 val;
2124 i++;
2125 val = (tvb_get_guint8(tvb, offset) & 0x7F) * 10;
2126 proto_tree_add_item(ua3g_body_tree, hf_ua3g_beep_on_off, tvb, offset, 1, ENC_NA);
2127 proto_tree_add_uint_format(ua3g_body_tree, hf_ua3g_beep_cadence, tvb, offset, 1, val,
2128 "Cadence T%d: %d ms", i, val);
2129 offset++;
2130 length--;
2132 break;
2134 case 0x04: /* Start Beep */
2136 guint8 beep_dest;
2137 wmem_strbuf_t *strbuf;
2138 int i;
2140 beep_dest = tvb_get_guint8(tvb, offset);
2142 strbuf = wmem_strbuf_new_label(wmem_packet_scope());
2144 for (i = 0; i < 5; i++) {
2145 wmem_strbuf_append(strbuf,
2146 val_to_str_const(beep_dest & (0x01 << i), str_start_beep_destination, ""));
2149 proto_tree_add_text(ua3g_body_tree, tvb, offset, 1,
2150 "Destination: %s", wmem_strbuf_get_str(strbuf));
2151 offset++;
2153 proto_tree_add_item(ua3g_body_tree, hf_ua3g_beep_beep_number, tvb, offset, 1, ENC_NA);
2154 break;
2156 case 0x05:
2158 int i, nb_of_notes, beep_number;
2160 beep_number = tvb_get_guint8(tvb, offset);
2161 proto_tree_add_item(ua3g_body_tree, hf_ua3g_beep_beep_number, tvb, offset, 1, ENC_NA);
2162 offset++;
2163 length--;
2165 if (beep_number <= 0x44)
2166 beep_number = 0x00;
2167 else
2168 beep_number = 0xFF;
2170 nb_of_notes = tvb_get_guint8(tvb, offset);
2171 proto_tree_add_item(ua3g_body_tree, hf_ua3g_beep_number_of_notes, tvb, offset, 1, ENC_NA);
2172 offset++;
2173 length--;
2175 while (length > 0) {
2176 for (i = 1; i <= nb_of_notes; i++) {
2177 proto_tree_add_text(ua3g_body_tree, tvb, offset, 1, "%s %d: %d",
2178 val_to_str_const(beep_number, str_beep_freq_sample_nb, "Unknown"),
2179 i, tvb_get_guint8(tvb, offset));
2180 offset++;
2181 length--;
2182 proto_tree_add_text(ua3g_body_tree, tvb, offset, 1, "Level %d: %d",
2183 i, tvb_get_guint8(tvb, offset));
2184 offset++;
2185 length--;
2186 proto_tree_add_text(ua3g_body_tree, tvb, offset, 1, "%s %d: %x",
2187 val_to_str_const(beep_number, str_beep_duration, "Unknown"),
2188 i, tvb_get_guint8(tvb, offset));
2189 offset++;
2190 length--;
2192 proto_tree_add_item(ua3g_body_tree, hf_ua3g_beep_terminator, tvb, offset, 1, ENC_NA);
2193 offset++;
2194 length--;
2196 break;
2198 case 0x03: /* Stop Beep */
2199 default:
2201 break;
2204 } else { /* Classical Beep */
2205 /* add text to the frame "INFO" column */
2206 col_append_str(pinfo->cinfo, COL_INFO, ": Classical Beep");
2211 /*-----------------------------------------------------------------------------
2212 SIDETONE ON / OFF - 3Dh (MESSAGE FROM THE SYSTEM)
2213 ---------------------------------------------------------------------------*/
2214 static void
2215 decode_sidetone(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, guint offset)
2217 guint8 command;
2218 const gchar* command_str;
2220 command = tvb_get_guint8(tvb, offset);
2221 command_str = STR_ON_OFF(command);
2223 /* add text to the frame "INFO" column */
2224 col_append_fstr(pinfo->cinfo, COL_INFO, ": %s", command_str);
2226 proto_tree_add_item(tree, hf_ua3g_command_sidetone, tvb, offset, 1, ENC_NA);
2228 if (command == 0x01) {
2229 proto_tree_add_int(tree, hf_ua3g_sidetone_level, tvb, offset+1, 1,
2230 (signed char)(tvb_get_guint8(tvb, offset+1) / 2));
2235 /*-----------------------------------------------------------------------------
2236 SET PROGRAMMABLE RINGING CADENCE - 3Eh (MESSAGE FROM THE SYSTEM)
2237 ---------------------------------------------------------------------------*/
2238 static void
2239 decode_ringing_cadence(proto_tree *tree, tvbuff_t *tvb,
2240 packet_info *pinfo _U_, guint offset, guint length)
2242 int i = 0;
2243 guint16 cadence_length;
2245 if (!tree)
2246 return;
2248 proto_tree_add_item(tree, hf_ua3g_ringing_cadence_cadence, tvb, offset, 1, ENC_NA);
2249 offset++;
2250 length--;
2252 while (length > 0) {
2253 i++;
2254 proto_tree_add_item(tree, hf_ua3g_ringing_cadence_on_off, tvb, offset, 1, ENC_NA);
2255 cadence_length = ((tvb_get_guint8(tvb, offset) & 0x7F) * 10);
2256 proto_tree_add_uint_format(tree, hf_ua3g_ringing_cadence_length, tvb, offset, 1, cadence_length,
2257 "Length %d : %d ms", i, cadence_length);
2258 offset++;
2259 length--;
2264 /*-----------------------------------------------------------------------------
2265 MUTE ON / OFF - 3Fh (MESSAGE FROM THE SYSTEM)
2266 ---------------------------------------------------------------------------*/
2267 static const value_string str_mute[] = {
2268 {0x00, "Microphone Disable"},
2269 {0x01, "Microphone Enable"},
2270 {0, NULL}
2273 static void
2274 decode_mute(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, guint offset)
2276 guint8 command;
2278 command = tvb_get_guint8(tvb, offset);
2280 /* add text to the frame "INFO" column */
2281 col_append_fstr(pinfo->cinfo, COL_INFO, ": %s", val_to_str_const(command, str_mute, "Unknown"));
2283 proto_tree_add_item(tree, hf_ua3g_command_mute, tvb, offset, 1, ENC_NA);
2287 /*-----------------------------------------------------------------------------
2288 FEEDBACK ON / OFF - 40h (MESSAGE FROM THE SYSTEM)
2289 ---------------------------------------------------------------------------*/
2290 static void
2291 decode_feedback(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo,
2292 guint offset, guint length)
2294 guint8 command;
2295 const gchar* command_str;
2297 command = tvb_get_guint8(tvb, offset);
2298 command_str = STR_ON_OFF(command);
2300 /* add text to the frame "INFO" column */
2301 col_append_fstr(pinfo->cinfo, COL_INFO, ": %s", command_str);
2303 if (!tree)
2304 return;
2306 proto_tree_add_item(tree, hf_ua3g_command_feedback, tvb, offset, 1, ENC_NA);
2307 offset++;
2308 length--;
2310 if (command == 0x01) {
2311 proto_tree_add_int(tree, hf_ua3g_feedback_level, tvb, offset, 1,
2312 (signed char)(tvb_get_guint8(tvb, offset) / 2));
2313 offset++;
2314 length--;
2316 if (length > 0) {
2317 proto_tree_add_uint_format_value(tree, hf_ua3g_feedback_duration, tvb, offset, 1,
2318 tvb_get_guint8(tvb, offset) * 10, "%d ms", tvb_get_guint8(tvb, offset) * 10);
2324 /*-----------------------------------------------------------------------------
2325 READ PERIPHERAL - 44h (MESSAGE FROM THE SYSTEM)
2326 WRITE PERIPHERAL - 45h (MESSAGE FROM THE SYSTEM)
2327 PERIPHERAL CONTENT - 2Bh (MESSAGE FROM THE TERMINAL)
2328 ---------------------------------------------------------------------------*/
2329 static void
2330 decode_r_w_peripheral(proto_tree *tree, tvbuff_t *tvb,
2331 packet_info *pinfo _U_, guint offset, guint length)
2333 proto_tree_add_item(tree, hf_ua3g_r_w_peripheral_address, tvb, offset, 2, ENC_BIG_ENDIAN);
2335 if (length > 2) {
2336 proto_tree_add_item(tree, hf_ua3g_r_w_peripheral_content, tvb, offset+2, 1, ENC_NA);
2341 /*-----------------------------------------------------------------------------
2342 ICON COMMAND - 47h (MESSAGE FROM THE SYSTEM)
2343 ---------------------------------------------------------------------------*/
2344 static const value_string str_icon_cmd_state[] = {
2345 {0x00, "Off"},
2346 {0x01, "Slow Flash"},
2347 {0x02, "Not Used"},
2348 {0x03, "Steady On"},
2349 {0, NULL}
2352 static void
2353 decode_icon_cmd(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, guint offset)
2355 guint8 byte0, byte1, bytex;
2356 int i;
2358 if (!tree)
2359 return;
2361 proto_tree_add_item(tree, hf_ua3g_icon_cmd_icon_number, tvb, offset, 1, ENC_NA);
2363 byte0 = tvb_get_guint8(tvb, offset+1);
2364 byte1 = tvb_get_guint8(tvb, offset+2);
2366 for (i = 0; i < 8; i++) {
2367 bytex =
2368 ((byte0 >> i) & 0x01) * 2 +
2369 ((byte1 >> i) & 0x01);
2370 proto_tree_add_uint_format(tree, hf_ua3g_icon_cmd_segment, tvb, offset+1, 2, bytex,
2371 "Segment %d: %s (%d)", i, val_to_str_const(bytex, str_icon_cmd_state, "Unknown"), bytex);
2376 /*-----------------------------------------------------------------------------
2377 AUDIO CONFIGURATION - 49h (MESSAGE FROM THE SYSTEM)
2378 ---------------------------------------------------------------------------*/
2379 static const value_string str_command_audio_config[] = {
2380 {0x00, "Audio Coding"},
2381 {0x01, "DPI Channel Allocations"},
2382 {0x02, "Loudspeaker Volume Adjust"},
2383 {0x03, "Audio Circuit Configuration"},
2384 {0x04, "Handsfree Parameters"},
2385 {0x05, "Loudspeaker Acoustic Parameters"},
2386 {0x06, "Device Configuration"},
2387 {0, NULL}
2390 static const value_string str_audio_coding_law[] = {
2391 {0x00, "A Law"},
2392 {0x01, "m Law"},
2393 {0, NULL}
2396 static const value_string str_device_configuration[] = {
2397 { 0, "Handset Device "},
2398 { 1, "Headset Device "},
2399 { 2, "Loudspeaker Device "},
2400 { 3, "Announce Loudspeaker Device"},
2401 { 4, "Handsfree Device "},
2402 { 0, NULL }
2405 const true_false_string tfs_audio_config_handsfree_return = { "Return Loss Active", "Return Loss Normal" };
2406 const true_false_string tfs_audio_config_handsfree_handsfree = { "More Full Duplex", "Handsfree Normal" };
2408 static void
2409 decode_audio_config(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo,
2410 guint offset, guint length)
2412 guint8 command;
2413 proto_tree *ua3g_body_tree = tree;
2415 command = tvb_get_guint8(tvb, offset);
2417 /* add text to the frame "INFO" column */
2418 col_append_fstr(pinfo->cinfo, COL_INFO, ": %s", val_to_str_const(command, str_command_audio_config, "Unknown"));
2420 if (!ua3g_body_tree)
2421 return;
2423 proto_tree_add_item(ua3g_body_tree, hf_ua3g_command_audio_config, tvb, offset, 1, ENC_NA);
2424 offset++;
2425 length--;
2427 switch (command) {
2428 case 0x00: /* Audio Coding */
2429 proto_tree_add_item(ua3g_body_tree, hf_ua3g_audio_config_ignored, tvb, offset, 1, ENC_NA);
2430 proto_tree_add_item(ua3g_body_tree, hf_ua3g_audio_config_law, tvb, offset+1, 1, ENC_NA);
2431 break;
2432 case 0x01: /* DPI Channel Allocations */
2434 proto_tree_add_item(ua3g_body_tree, hf_ua3g_audio_config_dpi_chan_ua_tx1, tvb, offset, 1, ENC_NA);
2435 proto_tree_add_item(ua3g_body_tree, hf_ua3g_audio_config_dpi_chan_ua_tx2, tvb, offset+1, 1, ENC_NA);
2436 proto_tree_add_item(ua3g_body_tree, hf_ua3g_audio_config_dpi_chan_gci_tx1, tvb, offset+2, 1, ENC_NA);
2437 proto_tree_add_item(ua3g_body_tree, hf_ua3g_audio_config_dpi_chan_gci_tx2, tvb, offset+3, 1, ENC_NA);
2438 proto_tree_add_item(ua3g_body_tree, hf_ua3g_audio_config_dpi_chan_cod_tx, tvb, offset+4, 1, ENC_NA);
2439 break;
2440 case 0x02: /* Loudspeaker Volume Adjust */
2442 int i;
2443 for (i = 1; i < 8; i++) {
2444 proto_tree_add_uint_format(ua3g_body_tree, hf_ua3g_audio_config_volume_level, tvb, offset,
2445 1, tvb_get_guint8(tvb, offset), "Volume Level %d: %d",
2446 i, tvb_get_guint8(tvb, offset));
2447 offset++;
2448 length--;
2450 break;
2452 case 0x03: /* Audio Circuit Configuration */
2454 proto_tree_add_item(ua3g_body_tree, hf_ua3g_audio_config_audio_circuit_dth, tvb, offset, 1, ENC_NA);
2455 proto_tree_add_item(ua3g_body_tree, hf_ua3g_audio_config_audio_circuit_dtr, tvb, offset+1, 1, ENC_NA);
2456 proto_tree_add_item(ua3g_body_tree, hf_ua3g_audio_config_audio_circuit_dtf, tvb, offset+2, 1, ENC_NA);
2457 proto_tree_add_item(ua3g_body_tree, hf_ua3g_audio_config_audio_circuit_str, tvb, offset+3, 1, ENC_NA);
2458 proto_tree_add_item(ua3g_body_tree, hf_ua3g_audio_config_audio_circuit_ahp1, tvb, offset+4, 1, ENC_NA);
2459 proto_tree_add_item(ua3g_body_tree, hf_ua3g_audio_config_audio_circuit_ahp2, tvb, offset+5, 1, ENC_NA);
2460 proto_tree_add_item(ua3g_body_tree, hf_ua3g_audio_config_audio_circuit_ath, tvb, offset+6, 1, ENC_NA);
2461 proto_tree_add_item(ua3g_body_tree, hf_ua3g_audio_config_audio_circuit_atr, tvb, offset+7, 1, ENC_NA);
2462 proto_tree_add_item(ua3g_body_tree, hf_ua3g_audio_config_audio_circuit_atf, tvb, offset+8, 1, ENC_NA);
2463 proto_tree_add_item(ua3g_body_tree, hf_ua3g_audio_config_audio_circuit_alm, tvb, offset+9, 1, ENC_NA);
2464 break;
2465 case 0x04: /* Handsfree Parameters */
2466 proto_tree_add_item(ua3g_body_tree, hf_ua3g_audio_config_handsfree_return, tvb, offset, 1, ENC_NA);
2467 proto_tree_add_item(ua3g_body_tree, hf_ua3g_audio_config_handsfree_handsfree, tvb, offset, 1, ENC_NA);
2468 break;
2469 case 0x05: /* Loudspeaker Acoustic Parameters */
2470 proto_tree_add_item(ua3g_body_tree, hf_ua3g_audio_config_loudspeaker_aco_param_group_listen, tvb, offset, 1, ENC_NA);
2471 proto_tree_add_item(ua3g_body_tree, hf_ua3g_audio_config_loudspeaker_aco_param_handsfree_attenuation, tvb, offset+1, 1, ENC_NA);
2472 proto_tree_add_item(ua3g_body_tree, hf_ua3g_audio_config_loudspeaker_aco_param_handsfree_stay_in_send, tvb, offset+2, 1, ENC_NA);
2473 proto_tree_add_item(ua3g_body_tree, hf_ua3g_audio_config_loudspeaker_aco_param_handsfree_shift_right_mtx, tvb, offset+3, 1, ENC_NA);
2474 proto_tree_add_item(ua3g_body_tree, hf_ua3g_audio_config_loudspeaker_aco_param_handsfree_shift_right_mrc, tvb, offset+4, 1, ENC_NA);
2475 proto_tree_add_item(ua3g_body_tree, hf_ua3g_audio_config_loudspeaker_aco_param_handsfree_idle_trans_threshold, tvb, offset+5, 1, ENC_NA);
2476 proto_tree_add_item(ua3g_body_tree, hf_ua3g_audio_config_loudspeaker_aco_param_handsfree_low_trans_threshold, tvb, offset+6, 1, ENC_NA);
2477 proto_tree_add_item(ua3g_body_tree, hf_ua3g_audio_config_loudspeaker_aco_param_handsfree_idle_recv_threshold, tvb, offset+7, 1, ENC_NA);
2478 proto_tree_add_item(ua3g_body_tree, hf_ua3g_audio_config_loudspeaker_aco_param_handsfree_low_recv_threshold, tvb, offset+8, 1, ENC_NA);
2479 proto_tree_add_item(ua3g_body_tree, hf_ua3g_audio_config_loudspeaker_aco_param_handsfree_med_recv_threshold, tvb, offset+9, 1, ENC_NA);
2480 proto_tree_add_item(ua3g_body_tree, hf_ua3g_audio_config_loudspeaker_aco_param_handsfree_high_recv_threshold, tvb, offset+10, 1, ENC_NA);
2481 break;
2482 case 0x06: /* Device Configuration */
2484 static const gchar *str_device_values[] = {
2485 " Internal",
2486 " Rj9 Plug",
2487 " Jack Plug",
2488 " Bluetooth Link",
2489 " USB Link"
2491 wmem_strbuf_t *strbuf;
2492 guint8 device_values;
2493 int j;
2494 int device_index = 0;
2496 strbuf = wmem_strbuf_new_label(wmem_packet_scope());
2498 while (length > 0) {
2500 device_values = tvb_get_guint8(tvb, offset);
2502 wmem_strbuf_truncate(strbuf, 0);
2504 if (device_values != 0) {
2505 for (j = 0; j < 5; j++) {
2506 if (device_values & (0x01 << j)) {
2507 wmem_strbuf_append(strbuf, str_device_values[j]);
2510 } else {
2511 wmem_strbuf_append(strbuf, " None");
2514 proto_tree_add_text(ua3g_body_tree, tvb, offset, 1,
2515 "%s:%s",
2516 val_to_str_const(device_index, str_device_configuration, "Unknown"),
2517 wmem_strbuf_get_str(strbuf));
2518 offset++;
2519 length--;
2520 device_index++;
2522 break;
2524 default:
2526 break;
2532 /*-----------------------------------------------------------------------------
2533 AUDIO PADDED PATH - 4Ah (MESSAGE FROM THE SYSTEM)
2534 ---------------------------------------------------------------------------*/
2535 static void
2536 decode_audio_padded_path(proto_tree *tree, tvbuff_t *tvb,
2537 packet_info *pinfo _U_, guint offset)
2539 proto_tree_add_item(tree, hf_ua3g_audio_padded_path_emission_padded_level, tvb, offset, 1, ENC_NA);
2540 proto_tree_add_item(tree, hf_ua3g_audio_padded_path_reception_padded_level, tvb, offset+1, 1, ENC_NA);
2544 /*-----------------------------------------------------------------------------
2545 KEY RELEASE ON / OFF - 41h (MESSAGE FROM THE SYSTEM)
2546 AMPLIFIED HANDSET (BOOST) - 48h (MESSAGE FROM THE SYSTEM)
2547 LOUDSPEAKER ON / OFF - 4Dh (MESSAGE FROM THE SYSTEM)
2548 ANNOUNCE ON / OFF - 4Eh (MESSAGE FROM THE SYSTEM)
2549 ---------------------------------------------------------------------------*/
2550 static void
2551 decode_on_off_level(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo,
2552 guint offset, guint length, int hf_opcode)
2554 guint8 command;
2555 const gchar* command_str;
2557 command = tvb_get_guint8(tvb, offset);
2558 command_str = STR_ON_OFF(command);
2560 /* add text to the frame "INFO" column */
2561 col_append_fstr(pinfo->cinfo, COL_INFO, ": %s", command_str);
2563 proto_tree_add_item(tree, hf_opcode, tvb, offset, 1, ENC_NA);
2565 if (length > 1) {
2566 if (command == 0x01) {
2567 proto_tree_add_item(tree, hf_ua3g_on_off_level_level_on_loudspeaker, tvb, offset+1, 1, ENC_NA);
2573 /*-----------------------------------------------------------------------------
2574 RING ON / OFF - 4Fh (MESSAGE FROM THE SYSTEM)
2575 ---------------------------------------------------------------------------*/
2576 static void
2577 decode_ring(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, guint offset)
2579 guint8 command;
2580 const gchar* command_str;
2582 command = tvb_get_guint8(tvb, offset);
2583 command_str = STR_ON_OFF(command);
2585 /* add text to the frame "INFO" column */
2586 col_append_fstr(pinfo->cinfo, COL_INFO, ": %s", command_str);
2588 if (!tree)
2589 return;
2591 proto_tree_add_item(tree, hf_ua3g_command_ring, tvb, offset, 1, ENC_NA);
2593 if (command == 0x01) {
2594 proto_tree_add_item(tree, hf_ua3g_ring_melody, tvb, offset+1, 1, ENC_NA);
2595 proto_tree_add_item(tree, hf_ua3g_ring_cadence, tvb, offset+2, 1, ENC_NA);
2596 proto_tree_add_item(tree, hf_ua3g_ring_speaker_level, tvb, offset+3, 1, ENC_NA);
2597 proto_tree_add_item(tree, hf_ua3g_ring_beep_number, tvb, offset+4, 1, ENC_NA);
2598 proto_tree_add_item(tree, hf_ua3g_ring_silent, tvb, offset+5, 1, ENC_NA);
2599 proto_tree_add_item(tree, hf_ua3g_ring_progressive, tvb, offset+5, 1, ENC_NA);
2604 /*-----------------------------------------------------------------------------
2605 UA DOWNLOAD PROTOCOL - 50h - Only for UA NOE (MESSAGE FROM THE TERMINAL AND FROM THE SYSTEM)
2606 ---------------------------------------------------------------------------*/
2607 static const value_string str_command_ua_dwl_protocol[] = {
2608 {0x00, "Downloading Suggest"},
2609 {0x01, "Downloading Request"},
2610 {0x02, "Downloading Acknowledge"},
2611 {0x03, "Downloading Data"},
2612 {0x04, "Downloading End"},
2613 {0x05, "Downloading End Acknowledge"},
2614 {0x06, "Downloading ISO Checksum"},
2615 {0x07, "Downloading ISO Checksum Acknowledge"},
2616 {0, NULL}
2619 static const value_string str_download_req_force_mode[] = {
2620 {0x00, "System Accept All Refusals"},
2621 {0x01, "Force Software Lock"},
2622 {0, NULL}
2624 #if 0
2625 static const value_string str_download_req_item_id[] = {
2626 {0x00, "Patches File"},
2627 {0x01, "Application Binary"},
2628 {0x02, "Datas Binary"},
2629 {0, NULL}
2631 #endif
2632 static const value_string str_download_req_mode_selection_country[] = {
2633 {0x00, "No Check"},
2634 {0x01, "For All Countries Except Chinese"},
2635 {0x02, "For Chinese"},
2636 {0, NULL}
2639 static const value_string str_download_ack_status[] = {
2640 {0x00, "Ok (Binary Item Downloading In \"Normal\" Progress)"},
2641 {0x01, "Hardware Failure: Flash Failure"},
2642 {0x02, "Not Enough Place To Store The Downloaded Binary"},
2643 {0x03, "Wrong Seq Number On Latest Received Download_Data Message"},
2644 {0x04, "Wrong Packet Number On Latest Received Download_Data Message"},
2645 {0x05, "Download Refusal Terminal (Validation Purpose)"},
2646 {0x06, "Download Refusal Terminal (Development Purpose)"},
2647 {0x10, "Download Refusal: Hardware Cause (Unknown Flash Device, Incompatible Hardware)"},
2648 {0x11, "Download Refusal: No Loader Available Into The Terminal"},
2649 {0x12, "Download Refusal: Software Lock"},
2650 {0x13, "Download Refusal: Wrong Parameter Into Download Request"},
2651 {0x20, "Wrong Packet Number On Latest Received Downloading_Data Message"},
2652 {0x21, "Compress Header Invalid"},
2653 {0x22, "Decompress Error"},
2654 {0x23, "Binary Header Invalid"},
2655 {0x24, "Binary Check Error: Flash Write Error Or Binary Is Invalid"},
2656 {0x25, "Error Already Signaled - No More Data Accepted"},
2657 {0x26, "No Downloading In Progress"},
2658 {0x27, "Too Many Bytes Received (More Than Size Given Into The Download_Req Message)"},
2659 {0xFF, "Undefined Error"},
2660 {0, NULL}
2662 static value_string_ext str_download_ack_status_ext = VALUE_STRING_EXT_INIT(str_download_ack_status);
2664 static const value_string str_download_end_ack_ok[] = {
2665 {0x00, "Ok"},
2666 {0x01, "Hardware Failure: Flash Problems"},
2667 {0x02, "Not Enough Place To Store The Downloaded Binary"},
2668 {0, NULL}
2671 static const value_string str_iso_checksum_ack_status[] = {
2672 {0x00, "The Checksum Matches"},
2673 {0x25, "Error Detected And Already Signaled"},
2674 {0x30, "Checksum Error (All Bytes Received)"},
2675 {0x31, "Checksum Error (Bytes Missing)"},
2676 {0, NULL}
2679 static const value_string str_mem_size[] = {
2680 {0x00, "No Check"},
2681 {0x01, "128 Kbytes"},
2682 {0x02, "256 Kbytes"},
2683 {0x03, "512 Kbytes"},
2684 {0x04, "1 Mbytes"},
2685 {0x05, "2 Mbytes"},
2686 {0x06, "4 Mbytes"},
2687 {0x07, "8 Mbytes"},
2688 {0, NULL}
2692 static void
2693 decode_ua_dwl_protocol(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo,
2694 guint offset, guint length)
2696 guint8 command;
2697 proto_tree *ua3g_body_tree = tree, *ua3g_param_tree;
2698 proto_item *ua3g_param_item;
2700 command = tvb_get_guint8(tvb, offset);
2702 /* add text to the frame "INFO" column */
2703 col_append_fstr(pinfo->cinfo, COL_INFO, ": %s", val_to_str_const(command, str_command_ua_dwl_protocol, "Unknown"));
2705 proto_tree_add_item(ua3g_body_tree, hf_ua3g_command_ua_dwl_protocol, tvb, offset, 1, ENC_NA);
2706 offset++;
2707 length--;
2709 switch (command) {
2710 case 0x00: /* Downloading Suggest (MESSAGE FROM THE TERMINAL) */
2711 proto_tree_add_item(ua3g_body_tree, hf_ua3g_ua_dwl_protocol_item_identifier, tvb, offset, 1, ENC_NA);
2712 proto_tree_add_item(ua3g_body_tree, hf_ua3g_ua_dwl_protocol_item_version_nc, tvb, offset+1, 2, ENC_BIG_ENDIAN);
2713 proto_tree_add_item(ua3g_body_tree, hf_ua3g_ua_dwl_protocol_cause, tvb, offset+3, 1, ENC_NA);
2714 break;
2715 case 0x01: /* Downloading Request (MESSAGE FROM THE SYSTEM) */
2717 static const gchar *str_bin_info[] = {
2718 "Uncompressed Binary",
2719 "LZO Compressed Binary"
2722 if (length > 7) { /* Not R1 */
2723 proto_tree_add_item(ua3g_body_tree, hf_ua3g_ua_dwl_protocol_force_mode, tvb, offset, 1, ENC_NA);
2724 offset++;
2725 length--;
2728 proto_tree_add_item(ua3g_body_tree, hf_ua3g_ua_dwl_protocol_item_identifier, tvb, offset, 1, ENC_NA);
2729 offset++;
2730 length--;
2732 proto_tree_add_item(ua3g_body_tree, hf_ua3g_ua_dwl_protocol_item_version, tvb, offset, 2, ENC_BIG_ENDIAN);
2733 offset += 2;
2734 length -= 2;
2736 if (length > 2) { /* Not R1 */
2737 ua3g_param_item = proto_tree_add_text(ua3g_body_tree, tvb, offset, 1, "Files Included");
2738 ua3g_param_tree = proto_item_add_subtree(ua3g_param_item, ett_ua3g_param);
2739 proto_tree_add_item(ua3g_param_tree, hf_ua3g_ua_dwl_protocol_files_inc_boot_binary,
2740 tvb, offset, 1, ENC_NA);
2741 proto_tree_add_item(ua3g_param_tree, hf_ua3g_ua_dwl_protocol_files_inc_loader_binary,
2742 tvb, offset, 1, ENC_NA);
2743 proto_tree_add_item(ua3g_param_tree, hf_ua3g_ua_dwl_protocol_files_inc_appli_binary,
2744 tvb, offset, 1, ENC_NA);
2745 proto_tree_add_item(ua3g_param_tree, hf_ua3g_ua_dwl_protocol_files_inc_data_binary,
2746 tvb, offset, 1, ENC_NA);
2747 offset++;
2748 length--;
2750 ua3g_param_item = proto_tree_add_text(ua3g_body_tree, tvb, offset, 1, "Model Selection");
2751 ua3g_param_tree = proto_item_add_subtree(ua3g_param_item, ett_ua3g_param);
2752 proto_tree_add_item(ua3g_param_tree, hf_ua3g_ua_dwl_protocol_model_selection_a,
2753 tvb, offset, 1, ENC_NA);
2754 proto_tree_add_item(ua3g_param_tree, hf_ua3g_ua_dwl_protocol_model_selection_b,
2755 tvb, offset, 1, ENC_NA);
2756 proto_tree_add_item(ua3g_param_tree, hf_ua3g_ua_dwl_protocol_model_selection_c,
2757 tvb, offset, 1, ENC_NA);
2758 proto_tree_add_item(ua3g_param_tree, hf_ua3g_ua_dwl_protocol_model_selection_country_ver,
2759 tvb, offset, 1, ENC_NA);
2760 offset++;
2761 length--;
2762 ua3g_param_item = proto_tree_add_text(ua3g_body_tree, tvb, offset, 1, "Hardware Selection");
2763 ua3g_param_tree = proto_item_add_subtree(ua3g_param_item, ett_ua3g_param);
2764 proto_tree_add_item(ua3g_param_tree, hf_ua3g_ua_dwl_protocol_hardware_selection_ivanoe1,
2765 tvb, offset, 1, ENC_NA);
2766 proto_tree_add_item(ua3g_param_tree, hf_ua3g_ua_dwl_protocol_hardware_selection_ivanoe2,
2767 tvb, offset, 1, ENC_NA);
2768 offset++;
2769 length--;
2771 ua3g_param_item = proto_tree_add_text(ua3g_body_tree, tvb, offset, 1, "Memory Sizes Required");
2772 ua3g_param_tree = proto_item_add_subtree(ua3g_param_item, ett_ua3g_param);
2773 proto_tree_add_item(ua3g_param_tree, hf_ua3g_ua_dwl_protocol_memory_sizes_flash,
2774 tvb, offset, 1, ENC_NA);
2775 proto_tree_add_item(ua3g_param_tree, hf_ua3g_ua_dwl_protocol_memory_sizes_ext_ram,
2776 tvb, offset, 1, ENC_NA);
2777 offset++;
2778 length--;
2779 } else { /* R1 */
2780 proto_tree_add_text(ua3g_body_tree, tvb, offset, 1,
2781 "Binary Information: %s, Country/Operator/CLient Identifier ?",
2782 str_bin_info[tvb_get_guint8(tvb, offset) & 0x01]);
2783 offset++;
2784 length--;
2787 proto_tree_add_item(ua3g_body_tree, hf_ua3g_ua_dwl_protocol_binary_length, tvb, offset, 3, ENC_BIG_ENDIAN);
2788 break;
2790 case 0x02: /* Downloading Acknowledge (MESSAGE FROM THE TERMINAL) */
2791 proto_tree_add_item(ua3g_body_tree, hf_ua3g_ua_dwl_protocol_packet_number, tvb, offset, 2, ENC_BIG_ENDIAN);
2792 proto_tree_add_item(ua3g_body_tree, hf_ua3g_ua_dwl_protocol_download_ack_status, tvb, offset+2, 1, ENC_NA);
2793 break;
2794 case 0x03: /* Downloading Data (MESSAGE FROM THE SYSTEM) */
2796 int i = 1;
2798 proto_tree_add_item(ua3g_body_tree, hf_ua3g_ua_dwl_protocol_packet_number, tvb, offset, 2, ENC_BIG_ENDIAN);
2799 offset += 2;
2800 length -= 2;
2802 while (length > 0) {
2803 proto_tree_add_text(ua3g_body_tree, tvb, offset, 1,
2804 "Packet Number %3d: %d", i, tvb_get_guint8(tvb, offset));
2805 offset++;
2806 length--;
2807 i++;
2809 break;
2811 case 0x05: /* Downloading End Acknowledge (MESSAGE FROM THE TERMINAL) */
2812 proto_tree_add_item(ua3g_body_tree, hf_ua3g_ua_dwl_protocol_packet_download_end_ack_ok_status, tvb, offset, 1, ENC_NA);
2813 break;
2814 case 0x06: /* Downloading Iso Checksum (MESSAGE FROM THE SYSTEM) */
2815 proto_tree_add_item(ua3g_body_tree, hf_ua3g_ua_dwl_protocol_checksum, tvb, offset, 4, ENC_BIG_ENDIAN);
2816 break;
2817 case 0x07: /* Downloading ISO Checksum Acknowledge (MESSAGE FROM THE TERMINAL) */
2818 proto_tree_add_item(ua3g_body_tree, hf_ua3g_ua_dwl_protocol_acknowledge, tvb, offset, 1, ENC_NA);
2819 break;
2820 case 0x04: /* Downloading End (MESSAGE FROM THE SYSTEM) */
2821 default:
2822 break;
2827 /*-----------------------------------------------------------------------------
2828 DIGIT DIALED - 03h (MESSAGE FROM THE SYSTEM)
2829 ---------------------------------------------------------------------------*/
2830 static void
2831 decode_digit_dialed(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, guint offset)
2833 proto_tree_add_item(tree, hf_ua3g_digit_dialed_digit_value, tvb, offset, 1, ENC_NA);
2837 /*-----------------------------------------------------------------------------
2838 SUBDEVICE_MSG - 04h (MESSAGE FROM THE TERMINAL)
2839 ---------------------------------------------------------------------------*/
2840 static void
2841 decode_subdevice_msg(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_,
2842 guint offset, guint length)
2844 if (!tree)
2845 return;
2847 proto_tree_add_item(tree, hf_ua3g_subdevice_msg_subdev_type, tvb, offset, 1, ENC_NA);
2848 proto_tree_add_item(tree, hf_ua3g_subdevice_msg_subdev_address, tvb, offset, 1, ENC_NA);
2850 proto_tree_add_item(tree, hf_ua3g_subdevice_msg_subdevice_opcode, tvb, offset+1, 1, ENC_NA);
2852 if (length > 2) {
2853 proto_tree_add_item(tree, hf_ua3g_subdevice_msg_parameter_bytes, tvb, offset+2, length-2, ENC_NA);
2858 /*-----------------------------------------------------------------------------
2859 IP DEVICE ROUTING - 13h (MESSAGE FROM THE TERMINAL)
2860 ---------------------------------------------------------------------------*/
2861 static const value_string str_command_cs_ip_device_routing[] = {
2862 {0x00, "Init"},
2863 {0x01, "Incident"},
2864 {0x02, "Get Parameters Value Response"},
2865 {0x03, "QOS Ticket RSP"},
2866 {0, NULL}
2869 static const value_string str_cs_ip_device_routing_vta_type[] = {
2870 {0x20, "NOE A"},
2871 {0x21, "NOE B"},
2872 {0x22, "NOE C"},
2873 {0x23, "NOE D"},
2874 {0, NULL}
2877 #if 0
2878 static const value_string str_cs_ip_device_routing_08_compressor[] = {
2879 {0x00, "G.711 A-law"},
2880 {0x01, "G.711 mu-law"},
2881 {0x0F, "G.723.1 5.3kbps"},
2882 {0x10, "G.723.1 6.3kbps"},
2883 {0x11, "G.729A 8 kbps"},
2884 {0, NULL}
2886 #endif
2888 static const val64_string str_cs_ip_device_routing_0F_compressor[] = {
2889 {0x00, "G.711 A-law"},
2890 {0x01, "G.711 mu-law"},
2891 {0x02, "G.723.1 6.3kbps"},
2892 {0x03, "G.729"},
2893 {0x04, "G.723.1 5.3kbps"},
2894 {0, NULL}
2897 static const value_string cs_ip_device_routing_03_parameter_id_vals[] = {
2898 {0x01, "Date Of End Of Communication"},
2899 {0x02, "Node Number"},
2900 {0x03, "Ticket Protocol Version"},
2901 {0x06, "Equipment Type"},
2902 {0x08, "Local IP Address"},
2903 {0x09, "Distant IP Address"},
2904 {0x0A, "Local ID"},
2905 {0x0B, "Distant ID"},
2906 {0x0C, "Call Duration (second)"},
2907 {0x0D, "Local SSRC"},
2908 {0x0E, "Distant SSRC"},
2909 {0x0F, "Codec"},
2910 {0x10, "VAD"},
2911 {0x11, "ECE"},
2912 {0x12, "Voice Mode"},
2913 {0x13, "Transmitted Framing (ms)"},
2914 {0x14, "Received Framing (ms)"},
2915 {0x15, "Framing Changes"},
2916 {0x16, "Number Of RTP Packets Received"},
2917 {0x17, "Number Of RTP Packets Sent"},
2918 {0x18, "Number Of RTP Packets Lost"},
2919 {0x19, "Total Silence Detected (second)"},
2920 {0x1A, "Number Of SID Received"},
2921 {0x1B, "Delay Distribution"},
2922 {0x1C, "Maximum Delay (ms)"},
2923 {0x1D, "Number Of DTMF Received"},
2924 {0x1E, "Consecutive BFI"},
2925 {0x1F, "BFI Distribution"},
2926 {0x20, "Jitter Depth Distribution"},
2927 {0x21, "Number Of ICMP Host Unreachable"},
2928 {0x26, "Firmware Version"},
2929 {0x29, "DSP Framing (ms)"},
2930 {0x2A, "Transmitter SID"},
2931 {0x2D, "Minimum Delay (ms)"},
2932 {0x2E, "802.1 Q Used"},
2933 {0x2F, "802.1p Priority"},
2934 {0x30, "VLAN Id"},
2935 {0x31, "DiffServ"},
2936 {0x3D, "200 ms BFI Distribution"},
2937 {0x3E, "Consecutive RTP Lost"},
2938 {0, NULL}
2940 static value_string_ext cs_ip_device_routing_03_parameter_id_vals_ext = VALUE_STRING_EXT_INIT(cs_ip_device_routing_03_parameter_id_vals);
2942 static const value_string cs_ip_device_routing_03_parameter_id_tab_vals[] = {
2943 {0x1B, "Range: Value"},
2944 {0x1F, "Range: Value"},
2945 {0x20, "Jitter: Value"},
2946 {0x3D, "Contents: Value"},
2947 {0x3E, "Contents: Value"},
2948 {0, NULL}
2951 static const value_string cs_ip_device_routing_cmd03_first_byte_vals[] = {
2952 {0x01, "IP-Phone"},
2953 {0x02, "Appli-PC"},
2954 {0x03, "Coupler OmniPCX Enterprise"},
2955 {0x04, "Coupler OmniPCX Office"},
2956 {0, NULL}
2959 static const value_string cs_ip_device_routing_cmd03_second_byte_vals[] = {
2960 {0x0101, "IP-Phone V2"},
2961 {0x0102, "NOE-IP"},
2962 {0x0200, "4980 Softphone (PCMM2)"},
2963 {0x0201, "WebSoftphoneIP"},
2964 {0x0300, "INTIP"},
2965 {0x0301, "GD"},
2966 {0x0302, "eVA"},
2967 {0, NULL}
2970 static const val64_string cs_ip_device_routing_cmd03_voice_mode_vals[] = {
2971 {0x50, "Idle"},
2972 {0x51, "Handset"},
2973 {0x52, "Group Listening"},
2974 {0x53, "On Hook Dial"},
2975 {0x54, "Handsfree"},
2976 {0x55, "Headset"},
2977 {0, NULL}
2980 static const value_string cs_ip_device_routing_delay_distribution_range_vals[] = {
2981 {0, "0-40 "},
2982 {1, "40-80 "},
2983 {2, "80-150 "},
2984 {3, "150-250 "},
2985 {4, "250 and +"},
2986 {0, NULL}
2989 static const value_string cs_ip_device_routing_consecutive_bfi_range_vals[] = {
2990 {0, "0"},
2991 {1, "1"},
2992 {2, "2"},
2993 {3, "3"},
2994 {4, "4"},
2995 {5, "5"},
2996 {6, "5"},
2997 {7, "7"},
2998 {8, "8"},
2999 {9, "9"},
3000 {0, NULL}
3003 static const value_string cs_ip_device_routing_bfi_distribution_range_vals[] = {
3004 {0, "0 "},
3005 {1, "0-1 "},
3006 {2, "1-2 "},
3007 {3, "2-3 "},
3008 {4, "3 and +"},
3009 {0, NULL}
3012 static const value_string cs_ip_device_routing_200ms_bfi_distribution_range_vals[] = {
3013 {0, "< 10 % "},
3014 {1, "< 20 % "},
3015 {2, "< 40 % "},
3016 {3, "< 60 % "},
3017 {4, ">= 60 % "},
3018 {0, NULL}
3021 static const value_string cs_ip_device_routing_consecutive_rtp_lost_range_vals[] = {
3022 {0, "1 "},
3023 {1, "2 "},
3024 {2, "3 "},
3025 {3, "4 "},
3026 {4, "5 and more"},
3027 {0, NULL}
3030 static void
3031 decode_cs_ip_device_routing(proto_tree *tree _U_, tvbuff_t *tvb,
3032 packet_info *pinfo, guint offset, guint length)
3034 guint8 command;
3035 proto_tree *ua3g_body_tree = tree, *ua3g_param_tree;
3036 proto_item *ua3g_param_item;
3037 int i, parameter_id, parameter_length;
3039 command = tvb_get_guint8(tvb, offset);
3041 /* add text to the frame "INFO" column */
3042 col_append_fstr(pinfo->cinfo, COL_INFO, ": %s", val_to_str_const(command, str_command_cs_ip_device_routing, "Unknown"));
3044 if (!ua3g_body_tree)
3045 return;
3047 proto_tree_add_item(ua3g_body_tree, hf_ua3g_ip_cs, tvb, offset, 1, ENC_NA);
3048 offset++;
3049 length--;
3051 switch (command) {
3052 case 0x00:
3053 proto_tree_add_item(ua3g_body_tree, hf_ua3g_cs_ip_device_routing_cmd00_vta_type, tvb, offset, 1, ENC_NA);
3054 proto_tree_add_item(ua3g_body_tree, hf_ua3g_cs_ip_device_routing_cmd00_characteristic_number, tvb, offset+1, 1, ENC_NA);
3055 break;
3056 case 0x01:
3058 int j = 0;
3059 if (length == 1) {
3060 proto_tree_add_item(ua3g_body_tree, hf_ua3g_cs_ip_device_routing_cmd01_incident_0, tvb, offset, 1, ENC_NA);
3061 } else {
3062 while (length >0) {
3063 j++;
3064 proto_tree_add_text(ua3g_body_tree, tvb, offset, 1,
3065 "Parameter %d Identifier: %d",
3066 j, tvb_get_guint8(tvb, offset));
3067 offset++;
3068 length--;
3071 break;
3073 case 0x02:
3074 while (length > 0) {
3075 parameter_id = tvb_get_guint8(tvb, offset);
3076 parameter_length = tvb_get_guint8(tvb, offset + 1);
3078 ua3g_param_item = proto_tree_add_uint_format(ua3g_body_tree, hf_ua3g_cs_ip_device_routing_cmd02_parameter, tvb, offset,
3079 parameter_id, parameter_length + 2,
3080 "%s", val_to_str_const(parameter_id, ip_device_routing_cmd_get_param_req_vals, "Unknown"));
3081 ua3g_param_tree = proto_item_add_subtree(ua3g_param_item, ett_ua3g_param);
3083 proto_tree_add_item(ua3g_param_tree, hf_ua3g_cs_ip_device_routing_cmd02_parameter, tvb, offset, 1, ENC_NA);
3084 offset++;
3085 length--;
3087 proto_tree_add_item(ua3g_param_tree, hf_ua3g_cs_ip_device_routing_cmd02_parameter_length, tvb, offset, 1, ENC_NA);
3088 offset++;
3089 length--;
3091 if (parameter_length > 0) {
3092 switch (parameter_id) {
3093 case 0x00: /* Firmware Version */
3094 proto_tree_add_item(ua3g_param_tree, hf_ua3g_cs_ip_device_routing_cmd02_parameter_firmware_version, tvb, offset, 2, ENC_BIG_ENDIAN);
3095 break;
3096 case 0x01: /* Firmware Version */
3097 case 0x02: /* DHCP IP Address */
3098 case 0x03: /* Local IP Address */
3099 case 0x04: /* Subnetwork Mask */
3100 case 0x05: /* Router IP Address */
3101 case 0x06: /* TFTP IP Address */
3102 case 0x07: /* Main CPU Address */
3103 proto_tree_add_item(ua3g_param_tree, hf_ua3g_cs_ip_device_routing_cmd02_parameter_ip, tvb, offset, 4, ENC_BIG_ENDIAN);
3104 break;
3105 case 0x08: /* Default Codec */
3107 if (parameter_length <= 8) {
3108 proto_tree_add_item(ua3g_param_tree, hf_ua3g_cs_ip_device_routing_cmd02_parameter_default_codec_uint, tvb, offset, parameter_length, ENC_BIG_ENDIAN);
3109 } else {
3110 proto_tree_add_item(ua3g_param_tree, hf_ua3g_cs_ip_device_routing_cmd02_parameter_default_codec_bytes, tvb, offset, parameter_length, ENC_NA);
3112 break;
3114 case 0x09: /* Ethernet Drivers Config */
3116 if (parameter_length == 2) {
3117 proto_tree_add_item(ua3g_param_tree, hf_ua3g_cs_ip_device_routing_cmd02_parameter_eth_driver_config_port_lan_speed, tvb, offset, 1, ENC_NA);
3118 proto_tree_add_item(ua3g_param_tree, hf_ua3g_cs_ip_device_routing_cmd02_parameter_eth_driver_config_port_lan_duplex, tvb, offset+1, 1, ENC_NA);
3119 } else if (parameter_length == 4) {
3120 proto_tree_add_item(ua3g_param_tree, hf_ua3g_cs_ip_device_routing_cmd02_parameter_eth_driver_config_port_lan_speed, tvb, offset, 1, ENC_NA);
3121 proto_tree_add_item(ua3g_param_tree, hf_ua3g_cs_ip_device_routing_cmd02_parameter_eth_driver_config_port_lan_duplex, tvb, offset+1, 1, ENC_NA);
3122 proto_tree_add_item(ua3g_param_tree, hf_ua3g_cs_ip_device_routing_cmd02_parameter_eth_driver_config_port_pc_speed, tvb, offset+2, 1, ENC_NA);
3123 proto_tree_add_item(ua3g_param_tree, hf_ua3g_cs_ip_device_routing_cmd02_parameter_eth_driver_config_port_pc_duplex, tvb, offset+3, 1, ENC_NA);
3124 } else {
3125 proto_tree_add_item(ua3g_param_tree, hf_ua3g_cs_ip_device_routing_cmd02_parameter_value, tvb, offset, parameter_length, ENC_NA);
3127 break;
3129 case 0x0A: /* MAC Address */
3130 proto_tree_add_item(ua3g_param_tree, hf_ua3g_cs_ip_device_routing_cmd02_parameter_mac_address, tvb, offset, 6, ENC_NA);
3131 break;
3132 default:
3133 if (parameter_length <= 8) {
3134 proto_tree_add_item(ua3g_param_tree, hf_ua3g_cs_ip_device_routing_cmd02_parameter_uint, tvb, offset, parameter_length, ENC_BIG_ENDIAN);
3135 } else {
3136 proto_tree_add_item(ua3g_param_tree, hf_ua3g_cs_ip_device_routing_cmd02_parameter_value, tvb, offset, parameter_length, ENC_NA);
3138 break;
3141 offset += parameter_length;
3142 length -= parameter_length;
3145 break;
3146 case 0x03:
3148 int framing_rtp = 0;
3150 while (length > 0) {
3151 parameter_id = tvb_get_guint8(tvb, offset);
3152 parameter_length = tvb_get_ntohs(tvb, offset + 1);
3154 ua3g_param_item = proto_tree_add_uint_format(ua3g_body_tree, hf_ua3g_cs_ip_device_routing_cmd03_parameter, tvb, offset,
3155 parameter_length+3, parameter_id, "%s",
3156 val_to_str_const(parameter_id, cs_ip_device_routing_03_parameter_id_tab_vals, "Unknown"));
3157 ua3g_param_tree = proto_item_add_subtree(ua3g_param_item, ett_ua3g_param);
3159 proto_tree_add_item(ua3g_param_tree, hf_ua3g_cs_ip_device_routing_cmd03_parameter, tvb, offset, 1, ENC_NA);
3160 offset++;
3161 length--;
3163 proto_tree_add_item(ua3g_param_tree, hf_ua3g_cs_ip_device_routing_cmd03_parameter_length, tvb, offset, 2, ENC_BIG_ENDIAN);
3164 offset += 2;
3165 length -= 2;
3167 if (parameter_length > 0) {
3168 switch (parameter_id) {
3169 case 0x06: /* Type Of Equipment */
3170 proto_tree_add_item(ua3g_param_tree, hf_ua3g_cs_ip_device_routing_cmd03_parameter_type_of_equip1, tvb, offset, 1, ENC_NA);
3171 proto_tree_add_item(ua3g_param_tree, hf_ua3g_cs_ip_device_routing_cmd03_parameter_type_of_equip2, tvb, offset, 2, ENC_BIG_ENDIAN);
3172 break;
3173 case 0x08: /* Local IP Address */
3174 case 0x09: /* Distant IP Address */
3175 case 0x26: /* Firmware Version */
3176 proto_tree_add_item(ua3g_param_tree, hf_ua3g_cs_ip_device_routing_cmd03_parameter_ip, tvb, offset, 4, ENC_BIG_ENDIAN);
3177 break;
3178 case 0x0A:
3179 case 0x0B:
3180 proto_tree_add_item(ua3g_param_tree, hf_ua3g_cs_ip_device_routing_cmd03_parameter_string, tvb, offset, parameter_length, ENC_NA|ENC_ASCII);
3181 break;
3182 case 0x0F: /* Default Codec */
3183 if (parameter_length <= 8) {
3184 proto_tree_add_item(ua3g_param_tree, hf_ua3g_cs_ip_device_routing_cmd03_parameter_default_codec, tvb, offset, parameter_length, ENC_BIG_ENDIAN);
3185 } else {
3186 proto_tree_add_item(ua3g_param_tree, hf_ua3g_cs_ip_device_routing_cmd03_parameter_default_codec, tvb, offset, 8, ENC_BIG_ENDIAN);
3187 /* XXX - add as expert info wmem_strbuf_append(strbuf, "Parameter Value Too Long (more than 64 bits)"); */
3189 break;
3190 case 0x10: /* VAD */
3191 proto_tree_add_item(ua3g_param_tree, hf_ua3g_cs_ip_device_routing_cmd03_parameter_vad, tvb, offset, 1, ENC_NA);
3192 break;
3193 case 0x11: /* ECE */
3194 proto_tree_add_item(ua3g_param_tree, hf_ua3g_cs_ip_device_routing_cmd03_parameter_ece, tvb, offset, 1, ENC_NA);
3195 break;
3196 case 0x12: /* Voice Mode */
3197 if (parameter_length <= 8) {
3198 proto_tree_add_item(ua3g_param_tree, hf_ua3g_cs_ip_device_routing_cmd03_parameter_voice_mode, tvb, offset, parameter_length, ENC_BIG_ENDIAN);
3199 } else {
3200 proto_tree_add_item(ua3g_param_tree, hf_ua3g_cs_ip_device_routing_cmd03_parameter_voice_mode, tvb, offset, 8, ENC_BIG_ENDIAN);
3201 /* XXX - add as expert info wmem_strbuf_append(strbuf, "Parameter Value Too Long (more than 64 bits)"); */
3203 break;
3204 case 0x1B: /* Delay Distribution */
3205 for (i = 0; i < parameter_length; i += 2) {
3206 proto_tree_add_item(ua3g_param_tree, hf_ua3g_cs_ip_device_routing_cmd03_parameter_delay_distribution, tvb, offset+i, 2, ENC_BIG_ENDIAN);
3208 break;
3209 case 0x1E: /* Consecutive BFI */
3210 for (i = 0; i < parameter_length; i += 2) {
3211 proto_tree_add_item(ua3g_param_tree, hf_ua3g_cs_ip_device_routing_cmd03_parameter_consecutive_bfi, tvb, offset+i, 2, ENC_BIG_ENDIAN);
3213 break;
3214 case 0x1F: /* BFI Distribution */
3215 for (i = 0; i < parameter_length; i += 2) {
3216 proto_tree_add_item(ua3g_param_tree, hf_ua3g_cs_ip_device_routing_cmd03_parameter_bfi_distribution, tvb, offset+i, 2, ENC_BIG_ENDIAN);
3218 break;
3219 case 0x20: /* Jitter Depth Distribution */
3220 for (i = 0; i < parameter_length / 4; i+=4) {
3221 proto_tree_add_uint_format_value(ua3g_param_tree, hf_ua3g_cs_ip_device_routing_cmd03_parameter_jitter_depth_distribution,
3222 tvb, offset+i, 4, tvb_get_ntohl(tvb, offset+i), "+/- %3d ms: %d",
3223 ((2 * i/4) + 1) * framing_rtp / 2, tvb_get_ntohl(tvb, offset+i));
3225 break;
3226 case 0x2E: /* 802.1 Q Used */
3227 proto_tree_add_item(ua3g_param_tree, hf_ua3g_cs_ip_device_routing_cmd03_parameter_8021Q_used, tvb, offset, 1, ENC_NA);
3228 break;
3229 case 0x2F: /* 802.1p Priority */
3230 proto_tree_add_item(ua3g_param_tree, hf_ua3g_cs_ip_device_routing_cmd03_parameter_8021P_priority, tvb, offset, 1, ENC_NA);
3231 break;
3232 case 0x30: /* VLAN Id */
3233 proto_tree_add_item(ua3g_param_tree, hf_ua3g_cs_ip_device_routing_cmd03_parameter_vlan_id, tvb, offset, 2, ENC_BIG_ENDIAN);
3234 break;
3235 case 0x31: /* DiffServ */
3236 proto_tree_add_item(ua3g_param_tree, hf_ua3g_cs_ip_device_routing_cmd03_parameter_diffserv, tvb, offset, 1, ENC_NA);
3237 break;
3238 case 0x3D: /* 200 ms BFI Distribution */
3239 for (i = 0; i < parameter_length; i += 2) {
3240 proto_tree_add_item(ua3g_param_tree, hf_ua3g_cs_ip_device_routing_cmd03_parameter_bfi_distribution_200ms, tvb, offset+i, 2, ENC_BIG_ENDIAN);
3242 break;
3243 case 0x3E: /* Consecutive RTP Lost */
3244 for (i = 0; i < parameter_length; i += 2) {
3245 proto_tree_add_item(ua3g_param_tree, hf_ua3g_cs_ip_device_routing_cmd03_parameter_consecutive_rtp_lost, tvb, offset+i, 2, ENC_BIG_ENDIAN);
3247 break;
3248 case 0x14: /* Received Framing (ms) */
3250 /* XXX: What is the point of this assignment? */
3251 framing_rtp = tvb_get_guint8(tvb, offset + 3);
3252 /* FALLTHROUGH */
3254 case 0x01: /* Date Of End Of Communication */
3255 case 0x02: /* Node Number */
3256 case 0x03: /* Ticket Protocol Version */
3257 case 0x0C: /* Call Duration (second) */
3258 case 0x0D: /* Local SSRC */
3259 case 0x0E: /* Distant SSRC */
3260 case 0x13: /* Transmitted Framing (ms) */
3261 case 0x15: /* Framing Changes */
3262 case 0x16: /* Number Of RTP Packets Received */
3263 case 0x17: /* Number Of RTP Packets Sent */
3264 case 0x18: /* Number Of RTP Packets Lost */
3265 case 0x19: /* Total Silence Detected (second) */
3266 case 0x1A: /* Number Of SID Received */
3267 case 0x1C: /* Maximum Delay (ms) */
3268 case 0x1D: /* Number Of DTMF Received */
3269 case 0x21: /* Number Of ICMP Host Unreachable */
3270 case 0x29: /* DSP Framing (ms) */
3271 case 0x2A: /* Transmitter SID */
3272 case 0x2D: /* Minimum Delay (ms) */
3273 default:
3274 proto_tree_add_item(ua3g_param_tree, hf_ua3g_cs_ip_device_routing_cmd03_parameter_uint, tvb, offset, parameter_length, ENC_BIG_ENDIAN);
3275 break;
3278 offset += parameter_length;
3279 length -= parameter_length;
3282 break;
3284 default:
3285 break;
3290 /*-----------------------------------------------------------------------------
3291 UNSOLICITED MESSAGE - 9Fh/1Fh (MESSAGE FROM THE TERMINAL)
3292 VERSION RESPONSE - 21h (MESSAGE FROM THE TERMINAL)
3293 ---------------------------------------------------------------------------*/
3294 static const value_string str_command_unsolicited_msg[] = {
3295 {0x00, "Hardware Reset Acknowledge"},
3296 {0x01, "Software Reset Acknowledge"},
3297 {0x02, "Illegal Command Received"},
3298 {0x05, "Subdevice Down"},
3299 {0x06, "Segment Failure"},
3300 {0x07, "UA Device Event"},
3301 {0, NULL}
3304 static const value_string str_unsolicited_msg_vta_type[] = {
3305 {0x03, "4035"},
3306 {0x04, "4020"},
3307 {0x05, "4010"},
3308 {0x20, "NOE A"},
3309 {0x21, "NOE B"},
3310 {0x22, "NOE C"},
3311 {0x23, "NOE D"},
3312 {0, NULL}
3314 static const value_string str_unsolicited_msg_other_info_1[] = {
3315 {0x00, "Link Is TDM"},
3316 {0x01, "Link Is IP"},
3317 {0, NULL}
3319 static const value_string str_unsolicited_msg_other_info_2[] = {
3320 {0x00, "Download Allowed"},
3321 {0x01, "Download Refused"},
3322 {0, NULL}
3324 static const value_string str_unsolicited_msg_hard_config_ip[] = {
3325 {0x00, "Export Binary (No Thales)"},
3326 {0x01, "Full Binary (Thales)"},
3327 {0, NULL}
3329 static const value_string str_unsolicited_msg_hard_config_chip[] = {
3330 {0x01, "Ivanoe 1"},
3331 {0x02, "Ivanoe 2"},
3332 {0x03, "Reserved"},
3333 {0, NULL}
3335 static const value_string str_unsolicited_msg_hard_config_flash[] = {
3336 {0x00, "No Flash"},
3337 {0x01, "128 Kbytes"},
3338 {0x02, "256 Kbytes"},
3339 {0x03, "512 Kbytes"},
3340 {0x04, "1 Mbytes"},
3341 {0x05, "2 Mbytes"},
3342 {0x06, "4 Mbytes"},
3343 {0x07, "8 Mbytes"},
3344 {0, NULL}
3346 static const value_string str_unsolicited_msg_hard_config_ram[] = {
3347 {0x00, "No External RAM"},
3348 {0x01, "128 Kbytes"},
3349 {0x02, "256 Kbytes"},
3350 {0x03, "512 Kbytes"},
3351 {0x04, "1 Mbytes"},
3352 {0x05, "2 Mbytes"},
3353 {0x06, "4 Mbytes"},
3354 {0x07, "8 Mbytes"},
3355 {0, NULL}
3358 static const value_string str_unsolicited_msg_subtype[] = {
3359 {0x03, "2x40"},
3360 {0x04, "1x20"},
3361 {0x05, "1x20"},
3362 {0, NULL}
3364 static const value_string str_unsolicited_msg_generation[] = {
3365 {0x02, "3"},
3366 {0, NULL}
3368 static const value_string str_unsolicited_msg_design[] = {
3369 {0x00, "Alpha"},
3370 {0, NULL}
3372 static const value_string str_unsolicited_msg_hard_vta_type[] = {
3373 {0x03, "MR2 (4035)"},
3374 {0x05, "VLE (4010)"},
3375 {0x07, "LE (4020)"},
3376 {0, NULL}
3378 static const value_string str_unsolicited_msg_hard_design[] = {
3379 {0x06, "Alpha"},
3380 {0, NULL}
3382 static const value_string str_unsolicited_msg_hard_subtype[] = {
3383 {0x06, "2x40"},
3384 {0x07, "1x20"},
3385 {0x08, "1x20"},
3386 {0, NULL}
3389 static void
3390 decode_unsolicited_msg(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo,
3391 guint offset, guint length, guint8 opcode)
3393 guint8 command;
3394 proto_tree *ua3g_body_tree = tree, *ua3g_param_tree;
3395 proto_item *ua3g_param_item;
3397 command = tvb_get_guint8(tvb, offset);
3399 if (opcode != 0x21) {
3400 /* add text to the frame "INFO" column */
3401 col_append_fstr(pinfo->cinfo, COL_INFO, ": %s", val_to_str_const(command, str_command_unsolicited_msg, "Unknown"));
3403 proto_tree_add_item(ua3g_body_tree, hf_ua3g_command_unsolicited_msg, tvb, offset, 1, ENC_NA);
3404 offset++;
3405 length--;
3406 } else {
3407 command = 0xFF; /* Opcode = 0x21 */
3410 switch (command)
3412 case 0x00: /* Hardware Reset Acknowledge */
3413 case 0x01: /* Software Reset Acknowledge */
3414 case 0xFF: /* Opcode = 0x21 : Version Response */
3416 int link, vta_type;
3418 proto_tree_add_item(ua3g_body_tree, hf_ua3g_unsolicited_msg_device_type, tvb, offset, 1, ENC_NA);
3419 offset++;
3420 length--;
3422 proto_tree_add_item(ua3g_body_tree, hf_ua3g_unsolicited_msg_firmware_version, tvb, offset, 2, ENC_BIG_ENDIAN);
3423 offset += 2;
3424 length -= 2;
3426 if (opcode != 0x21) {
3427 proto_tree_add_item(ua3g_body_tree, hf_ua3g_unsolicited_msg_self_test_result, tvb, offset, 1, ENC_NA);
3428 offset++;
3429 length--;
3432 vta_type = tvb_get_guint8(tvb, offset);
3434 proto_tree_add_item(ua3g_body_tree, hf_ua3g_unsolicited_msg_vta_type, tvb, offset, 1, ENC_NA);
3435 offset++;
3436 length--;
3438 switch (vta_type)
3440 case 0x03:
3441 case 0x04:
3442 case 0x05:
3444 ua3g_param_item = proto_tree_add_text(ua3g_body_tree, tvb, offset, 1, "Characteristic Number");
3445 ua3g_param_tree = proto_item_add_subtree(ua3g_param_item, ett_ua3g_param);
3446 proto_tree_add_item(ua3g_param_tree, hf_ua3g_unsolicited_msg_char_num_vta_subtype,
3447 tvb, offset, 1, ENC_NA);
3448 proto_tree_add_item(ua3g_param_tree, hf_ua3g_unsolicited_msg_char_num_generation,
3449 tvb, offset, 1, ENC_NA);
3450 proto_tree_add_item(ua3g_param_tree, hf_ua3g_unsolicited_msg_char_num_design,
3451 tvb, offset, 1, ENC_NA);
3452 offset++;
3453 length--;
3454 proto_tree_add_item(ua3g_body_tree, hf_ua3g_unsolicited_msg_other_information, tvb, offset, 1, ENC_NA);
3455 offset++;
3456 length--;
3458 ua3g_param_item = proto_tree_add_text(ua3g_body_tree, tvb, offset, 1, "Hardware Configuration");
3459 ua3g_param_tree = proto_item_add_subtree(ua3g_param_item, ett_ua3g_param);
3460 proto_tree_add_item(ua3g_param_tree, hf_ua3g_unsolicited_msg_hardware_config_vta_type,
3461 tvb, offset, 1, ENC_NA);
3462 proto_tree_add_item(ua3g_param_tree, hf_ua3g_unsolicited_msg_hardware_config_design,
3463 tvb, offset, 1, ENC_NA);
3464 proto_tree_add_item(ua3g_param_tree, hf_ua3g_unsolicited_msg_hardware_config_subtype,
3465 tvb, offset, 1, ENC_NA);
3466 offset++;
3467 length--;
3469 if (opcode != 0x21) {
3470 proto_tree_add_text(ua3g_body_tree, tvb, offset, 1,
3471 "Hook Status/BCM Version: %s Hook",
3472 STR_ON_OFF(tvb_get_guint8(tvb, offset)));
3473 offset++;
3474 length--;
3477 break;
3479 case 0x20:
3480 case 0x21:
3481 case 0x22:
3482 case 0x23:
3483 default:
3485 link = tvb_get_guint8(tvb, offset);
3486 proto_tree_add_item(ua3g_body_tree, hf_ua3g_unsolicited_msg_other_information_1, tvb, offset, 1, ENC_NA);
3487 offset++;
3488 length--;
3490 if (link == 0x00) {
3491 proto_tree_add_item(ua3g_body_tree, hf_ua3g_unsolicited_msg_hardware_version, tvb, offset, 1, ENC_NA);
3492 offset++;
3493 length--;
3495 ua3g_param_item = proto_tree_add_text(ua3g_body_tree, tvb, offset, 1, "Hardware Configuration");
3496 ua3g_param_tree = proto_item_add_subtree(ua3g_param_item, ett_ua3g_param);
3497 proto_tree_add_item(ua3g_param_tree, hf_ua3g_unsolicited_msg_hardware_config_hard_config_chip,
3498 tvb, offset, 1, ENC_NA);
3499 proto_tree_add_item(ua3g_param_tree, hf_ua3g_unsolicited_msg_hardware_config_hard_config_flash,
3500 tvb, offset, 1, ENC_NA);
3501 proto_tree_add_item(ua3g_param_tree, hf_ua3g_unsolicited_msg_hardware_config_config_ram,
3502 tvb, offset, 1, ENC_NA);
3503 offset++;
3504 length--;
3505 } else {
3506 proto_tree_add_item(ua3g_body_tree, hf_ua3g_unsolicited_msg_other_information_2, tvb, offset, 1, ENC_NA);
3507 offset++;
3508 length--;
3510 proto_tree_add_item(ua3g_body_tree, hf_ua3g_unsolicited_msg_hardware_config_hard_config_ip,
3511 tvb, offset, 1, ENC_NA);
3512 offset++;
3513 length--;
3516 if (opcode != 0x21) {
3517 proto_tree_add_item(ua3g_body_tree, hf_ua3g_unsolicited_msg_hook_status,
3518 tvb, offset, 1, ENC_NA);
3519 offset++;
3520 length--;
3522 if (length > 0) {
3523 if (link == 0x00) {
3524 proto_tree_add_item(ua3g_body_tree, hf_ua3g_unsolicited_msg_firmware_datas_patch_version,
3525 tvb, offset, 2, ENC_BIG_ENDIAN);
3526 if (length > 2) {
3527 proto_tree_add_item(ua3g_body_tree, hf_ua3g_unsolicited_msg_firmware_version_loader, tvb,
3528 offset+2, 2, ENC_BIG_ENDIAN);
3530 } else {
3531 proto_tree_add_item(ua3g_body_tree, hf_ua3g_unsolicited_msg_datas_version, tvb, offset, 2, ENC_BIG_ENDIAN);
3533 if (length > 2) {
3534 proto_tree_add_item(ua3g_body_tree, hf_ua3g_unsolicited_msg_firmware_version_bootloader,
3535 tvb, offset+2, 2, ENC_BIG_ENDIAN);
3540 break;
3543 break;
3545 case 0x02: /* Illegal Command Received */
3547 proto_tree_add_item(ua3g_body_tree, hf_ua3g_unsolicited_msg_opcode_of_bad_command, tvb, offset, 1, ENC_NA);
3549 if (length > 1) {
3550 proto_tree_add_item(ua3g_body_tree, hf_ua3g_unsolicited_msg_next_byte_of_bad_command, tvb, offset+1, length-1, ENC_NA);
3552 break;
3554 case 0x05: /* Subdevice Down */
3556 proto_tree_add_item(ua3g_body_tree, hf_ua3g_unsolicited_msg_subdevice_address, tvb, offset, 1, ENC_NA);
3557 break;
3559 case 0x06: /* Segment Failure */
3561 proto_tree_add_item(ua3g_body_tree, hf_ua3g_unsolicited_msg_segment_failure_t, tvb, offset, 1, ENC_NA);
3562 proto_tree_add_item(ua3g_body_tree, hf_ua3g_unsolicited_msg_segment_failure_num, tvb, offset, 1, ENC_NA);
3563 proto_tree_add_item(ua3g_body_tree, hf_ua3g_unsolicited_msg_segment_failure_s, tvb, offset, 1, ENC_NA);
3564 proto_tree_add_item(ua3g_body_tree, hf_ua3g_unsolicited_msg_segment_failure_l, tvb, offset, 1, ENC_NA);
3565 proto_tree_add_item(ua3g_body_tree, hf_ua3g_unsolicited_msg_opcode_bad_segment, tvb, offset+1, 1, ENC_NA);
3566 proto_tree_add_item(ua3g_body_tree, hf_ua3g_unsolicited_msg_next_byte_of_bad_segment, tvb, offset+2, 1, ENC_NA);
3567 break;
3569 case 0x07: /* UA Device Event */
3571 proto_tree_add_item(ua3g_body_tree, hf_ua3g_unsolicited_msg_device_event, tvb, offset, 1, ENC_NA);
3572 break;
3574 default:
3576 break;
3582 /*-----------------------------------------------------------------------------
3583 NON-DIGIT KEY PUSHED - 20h (MESSAGE FROM THE TERMINAL)
3584 DIGIT KEY RELEASED - 26h (MESSAGE FROM THE TERMINAL)
3585 KEY RELEASED - 2Ah (MESSAGE FROM THE TERMINAL)
3586 TM KEY PUSHED - 2Dh (MESSAGE FROM THE TERMINAL)
3587 ---------------------------------------------------------------------------*/
3588 static void
3589 decode_key_number(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_,
3590 guint offset, guint length)
3592 #if 0
3593 proto_tree *ua3g_body_tree;
3594 static const value_string str_first_parameter[] = {
3595 {0x01, "Production Test Command"},
3596 {0x06, "Reserved For Compatibility"},
3597 {0x3B, "Volume"},
3598 {0x42, "Subdevice Address"},
3599 {0, NULL}
3601 #endif
3603 if (!tree)
3604 return;
3606 if (length > 0) {
3607 proto_tree_add_text(tree, tvb, offset, length,
3608 "Key Number: Row %d, Column %d",
3609 (tvb_get_guint8(tvb, offset) & 0xF0), (tvb_get_guint8(tvb, offset) & 0x0F));
3614 /*-----------------------------------------------------------------------------
3615 I'M HERE - 22h - Only for UA NOE (MESSAGE FROM THE TERMINAL)
3616 ---------------------------------------------------------------------------*/
3617 static void
3618 decode_i_m_here(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, guint offset)
3620 proto_tree_add_item(tree, hf_ua3g_i_m_here_id_code, tvb, offset, 1, ENC_NA);
3624 /*-----------------------------------------------------------------------------
3625 RESPONSE STATUS INQUIRY - 23h (MESSAGE FROM THE TERMINAL)
3626 SPECIAL KEY STATUS - 29h (MESSAGE FROM THE TERMINAL)
3627 ---------------------------------------------------------------------------*/
3628 static const value_string str_special_key_parameters[] = {
3629 {0x00, "Not Received Default In Effect"},
3630 {0x02, "Downloaded Values In Effect"},
3631 {0, NULL}
3634 const true_false_string tfs_released_pressed = { "Released", "Pressed" };
3636 static void
3637 decode_special_key(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_,
3638 guint offset, guint8 opcode)
3640 if (!tree)
3641 return;
3643 if (opcode == 0x23) {
3644 proto_tree_add_text(tree, tvb, offset, 1,
3645 "Parameters Received for DTMF: %s",
3646 val_to_str_const((tvb_get_guint8(tvb, offset) & 0x02), str_special_key_parameters, "Unknown"));
3647 proto_tree_add_text(tree, tvb, offset, 1,
3648 "Hookswitch Status: %shook",
3649 STR_ON_OFF(tvb_get_guint8(tvb, offset) & 0x01));
3650 offset++;
3653 proto_tree_add_item(tree, hf_ua3g_special_key_shift, tvb, offset, 1, ENC_NA);
3654 proto_tree_add_item(tree, hf_ua3g_special_key_ctrl, tvb, offset, 1, ENC_NA);
3655 proto_tree_add_item(tree, hf_ua3g_special_key_alt, tvb, offset, 1, ENC_NA);
3656 proto_tree_add_item(tree, hf_ua3g_special_key_cmd, tvb, offset, 1, ENC_NA);
3657 proto_tree_add_item(tree, hf_ua3g_special_key_shift_prime, tvb, offset, 1, ENC_NA);
3658 proto_tree_add_item(tree, hf_ua3g_special_key_ctrl_prime, tvb, offset, 1, ENC_NA);
3659 proto_tree_add_item(tree, hf_ua3g_special_key_alt_prime, tvb, offset, 1, ENC_NA);
3660 proto_tree_add_item(tree, hf_ua3g_special_key_cmd_prime, tvb, offset, 1, ENC_NA);
3664 /*-----------------------------------------------------------------------------
3665 SUBDEVICE STATE ENQUIRY - 24h (MESSAGE FROM THE TERMINAL)
3666 ---------------------------------------------------------------------------*/
3667 static void
3668 decode_subdevice_state(proto_tree *tree, tvbuff_t *tvb,
3669 packet_info *pinfo _U_, guint offset)
3671 guint8 info;
3672 int i;
3674 for (i = 0; i <= 7; i++) {
3675 info = tvb_get_guint8(tvb, offset);
3676 proto_tree_add_text(tree, tvb, offset, 1,
3677 "Subdevice %d State: %d",
3678 i, info & 0x0F);
3679 i++;
3680 proto_tree_add_text(tree, tvb, offset, 1,
3681 "Subdevice %d State: %d",
3682 i, (info & 0xF0) >> 4);
3683 offset++;
3688 /*-----------------------------------------------------------------------------
3689 UA3G DISSECTOR
3690 ---------------------------------------------------------------------------*/
3691 static int
3692 dissect_ua3g(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
3694 gint offset = 0;
3695 proto_item *ua3g_item, *ua3g_body_item;
3696 proto_tree *ua3g_tree, *ua3g_body_tree;
3697 gint length;
3698 guint8 opcode;
3699 const gchar* opcode_str;
3700 e_ua_direction message_direction = (e_ua_direction)data;
3702 ua3g_item = proto_tree_add_item(tree, proto_ua3g, tvb, 0, -1, ENC_NA);
3703 ua3g_tree = proto_item_add_subtree(ua3g_item, ett_ua3g);
3705 /* Length of the UA Message */
3706 length = tvb_get_letohs(tvb, offset);
3708 /* add text to the frame "INFO" column */
3709 col_append_str(pinfo->cinfo, COL_INFO, " - UA3G Message:");
3711 proto_tree_add_uint(ua3g_tree, hf_ua3g_length, tvb, offset, 2, length);
3712 offset += 2;
3714 /* Opcode of the UA Message */
3715 opcode = tvb_get_guint8(tvb, offset);
3716 if (opcode != 0x9f)
3717 opcode = (opcode & 0x7f);
3719 /* Useful for a research in wireshark */
3720 if (message_direction == SYS_TO_TERM) {
3721 proto_tree_add_uint(ua3g_tree, hf_ua3g_opcode_sys, tvb, offset, 1, opcode);
3722 opcode_str = val_to_str_ext_const(opcode, &opcodes_vals_sys_ext, "Unknown");
3723 } else {
3724 proto_tree_add_uint(ua3g_tree, hf_ua3g_opcode_term, tvb, offset, 1, opcode);
3725 opcode_str = val_to_str_ext_const(opcode, &opcodes_vals_term_ext, "Unknown");
3728 offset++;
3729 length--;
3731 /* add text to the frame "INFO" column */
3732 col_append_fstr(pinfo->cinfo, COL_INFO, " %s", opcode_str);
3734 proto_item_append_text(ua3g_item, ", %s", opcode_str);
3736 ua3g_body_item = proto_tree_add_text(ua3g_tree, tvb, offset, length, "UA3G Body");
3737 ua3g_body_tree = proto_item_add_subtree(ua3g_body_item, ett_ua3g_body);
3739 if (message_direction == SYS_TO_TERM) {
3740 switch (opcode) {
3741 case SC_PRODUCTION_TEST: /* 0x01 */
3743 decode_with_one_parameter(ua3g_body_tree, tvb, pinfo, offset, length, hf_ua3g_opcode_production_test);
3744 break;
3746 case SC_SUBDEVICE_RESET: /* 0x06 */
3748 decode_with_one_parameter(ua3g_body_tree, tvb, pinfo, offset, length, hf_ua3g_opcode_subservice_reset);
3749 break;
3751 case SC_ARE_YOU_THERE: /* 0x2B */
3753 decode_with_one_parameter(ua3g_body_tree, tvb, pinfo, offset, length, hf_ua3g_opcode_are_you_there);
3754 break;
3756 case SC_SET_SPEAKER_VOL: /* 0x3B */
3758 decode_with_one_parameter(ua3g_body_tree, tvb, pinfo, offset, length, hf_ua3g_opcode_set_speaker_vol);
3759 break;
3761 case SC_TRACE_ON: /* 0x42 */
3763 decode_with_one_parameter(ua3g_body_tree, tvb, pinfo, offset, length, hf_ua3g_opcode_trace_on);
3764 break;
3766 case SC_SUBDEVICE_ESCAPE: /* 0x02 */
3768 decode_subdevice_escape(ua3g_body_tree, tvb, pinfo, offset, length);
3769 break;
3771 case SC_SOFT_RESET: /* 0x03 */
3773 decode_software_reset(ua3g_body_tree, tvb, pinfo, offset, length);
3774 break;
3776 case SC_IP_PHONE_WARMSTART: /* 0x04 */
3778 decode_ip_phone_warmstart(ua3g_body_tree, tvb, pinfo, offset, length);
3779 break;
3781 case SC_SUPER_MSG: /* 0x0B */
3782 case SC_SUPER_MSG_2: /* 0x17 */
3784 decode_super_msg(ua3g_body_tree, tvb, pinfo, offset, length, opcode);
3785 break;
3787 case SC_SEGMENT_MSG: /* 0x0C */
3789 decode_segment_msg(ua3g_body_tree, tvb, pinfo, offset, length);
3790 break;
3792 case SC_IP_DEVICE_ROUTING: /* 0x13 */
3794 decode_ip_device_routing(ua3g_body_tree, tvb, pinfo, offset, length);
3795 break;
3797 case SC_DEBUG_IN_LINE: /* 0x18 */
3799 decode_debug_in_line(ua3g_body_tree, tvb, pinfo, offset, length);
3800 break;
3802 case SC_LED_COMMAND: /* 0x21 */
3804 decode_led_command(ua3g_body_tree, tvb, pinfo, offset);
3805 break;
3807 case SC_LCD_LINE_1_CMD: /* 0x27 */
3808 case SC_LCD_LINE_2_CMD: /* 0x28 */
3810 decode_lcd_line_cmd(ua3g_body_tree, tvb, pinfo, offset, length);
3811 break;
3813 case SC_MAIN_VOICE_MODE: /* 0x29 */
3815 decode_main_voice_mode(ua3g_body_tree, tvb, pinfo, offset, length);
3816 break;
3818 case SC_SUBDEVICE_METASTATE: /* 0x2C */
3820 decode_subdevice_metastate(ua3g_body_tree, tvb, pinfo, offset);
3821 break;
3823 case SC_DWL_DTMF_CLCK_FORMAT: /* 0x30 */
3825 decode_dwl_dtmf_clck_format(ua3g_body_tree, tvb, pinfo, offset, length);
3826 break;
3828 case SC_SET_CLCK: /* 0x31 */
3830 decode_set_clck(ua3g_body_tree, tvb, pinfo, offset, length);
3831 break;
3833 case SC_VOICE_CHANNEL: /* 0x32 */
3835 decode_voice_channel(ua3g_body_tree, tvb, pinfo, offset, length);
3836 break;
3838 case SC_EXTERNAL_RINGING: /* 0x33 */
3840 decode_external_ringing(ua3g_body_tree, tvb, pinfo, offset);
3841 break;
3843 case SC_LCD_CURSOR: /* 0x35 */
3845 decode_lcd_cursor(ua3g_body_tree, tvb, pinfo, offset);
3846 break;
3848 case SC_DWL_SPECIAL_CHAR: /* 0x36 */
3850 decode_dwl_special_char(ua3g_body_tree, tvb, pinfo, offset, length);
3851 break;
3853 case SC_SET_CLCK_TIMER_POS: /* 0x38 */
3855 decode_set_clck_timer_pos(ua3g_body_tree, tvb, pinfo, offset);
3856 break;
3858 case SC_SET_LCD_CONTRAST: /* 0x39 */
3860 decode_set_lcd_contrast(ua3g_body_tree, tvb, pinfo, offset);
3861 break;
3863 case SC_BEEP: /* 0x3C */
3865 decode_beep(ua3g_body_tree, tvb, pinfo, offset, length);
3866 break;
3868 case SC_SIDETONE: /* 0x3D */
3870 decode_sidetone(ua3g_body_tree, tvb, pinfo, offset);
3871 break;
3873 case SC_RINGING_CADENCE: /* 0x3E */
3875 decode_ringing_cadence(ua3g_body_tree, tvb, pinfo, offset, length);
3876 break;
3878 case SC_MUTE: /* 0x3F */
3880 decode_mute(ua3g_body_tree, tvb, pinfo, offset);
3881 break;
3883 case SC_FEEDBACK: /* 0x40 */
3885 decode_feedback(ua3g_body_tree, tvb, pinfo, offset, length);
3886 break;
3888 case SC_READ_PERIPHERAL: /* 0x44 */
3889 case SC_WRITE_PERIPHERAL: /* 0x45 */
3891 decode_r_w_peripheral(ua3g_body_tree, tvb, pinfo, offset, length);
3892 break;
3894 case SC_ICON_CMD: /* 0x47 */
3896 decode_icon_cmd(ua3g_body_tree, tvb, pinfo, offset);
3897 break;
3899 case SC_AUDIO_CONFIG: /* 0x49 */
3901 decode_audio_config(ua3g_body_tree, tvb, pinfo, offset, length);
3902 break;
3904 case SC_AUDIO_PADDED_PATH: /* 0x4A */
3906 decode_audio_padded_path(ua3g_body_tree, tvb, pinfo, offset);
3907 break;
3909 case SC_KEY_RELEASE: /* 0x41 */
3911 decode_on_off_level(ua3g_body_tree, tvb, pinfo, offset, length, hf_ua3g_command_key_release);
3912 break;
3914 case SC_AMPLIFIED_HANDSET: /* 0x48 */
3916 decode_on_off_level(ua3g_body_tree, tvb, pinfo, offset, length, hf_ua3g_command_amplified_handset);
3917 break;
3919 case SC_LOUDSPEAKER: /* 0x4D */
3921 decode_on_off_level(ua3g_body_tree, tvb, pinfo, offset, length, hf_ua3g_command_loudspeaker);
3922 break;
3924 case SC_ANNOUNCE: /* 0x4E */
3926 decode_on_off_level(ua3g_body_tree, tvb, pinfo, offset, length, hf_ua3g_command_announce);
3927 break;
3929 case SC_RING: /* 0x4F */
3931 decode_ring(ua3g_body_tree, tvb, pinfo, offset);
3932 break;
3934 case SC_UA_DWL_PROTOCOL: /* 0x50 */
3936 decode_ua_dwl_protocol(ua3g_body_tree, tvb, pinfo, offset, length);
3937 break;
3939 /* Case for UA3G message with only opcode (No body) */
3940 case SC_NOP: /* 0x00 */
3941 case SC_HE_ROUTING: /* 0x05 NOT DECODED - No description in 3AK 29000 0556 DSZZA */
3942 case SC_LOOPBACK_ON: /* 0x07 */
3943 case SC_LOOPBACK_OFF: /* 0x08 */
3944 case SC_VIDEO_ROUTING: /* 0x09 NOT DECODED - No description in 3AK 29000 0556 DSZZA */
3945 case SC_REMOTE_UA_ROUTING: /* 0x0D NOT DECODED - No description in 3AK 29000 0556 DSZZA */
3946 case SC_VERY_REMOTE_UA_ROUTING: /* 0x0E NOT DECODED - No description in 3AK 29000 0556 DSZZA */
3947 case SC_OSI_ROUTING: /* 0x0F NOT DECODED - No description in 3AK 29000 0556 DSZZA */
3948 case SC_ABC_A_ROUTING: /* 0x11 NOT DECODED - No description in 3AK 29000 0556 DSZZA */
3949 case SC_IBS_ROUTING: /* 0x12 NOT DECODED - No description in 3AK 29000 0556 DSZZA */
3950 case SC_M_REFLEX_HUB_ROUTING: /* 0x14 NOT DECODED - No description in 3AK 29000 0556 DSZZA */
3951 case SC_START_BUZZER: /* 0x22 */
3952 case SC_STOP_BUZZER: /* 0x23 */
3953 case SC_ENABLE_DTMF: /* 0x24 */
3954 case SC_DISABLE_DTMF: /* 0x25 */
3955 case SC_CLEAR_LCD_DISP: /* 0x26 */
3956 case SC_VERSION_INQUIRY: /* 0x2A */
3957 case SC_VTA_STATUS_INQUIRY: /* 0x2D */
3958 case SC_SUBDEVICE_STATE: /* 0x2E */
3959 case SC_AUDIO_IDLE: /* 0x3A */
3960 case SC_TRACE_OFF: /* 0x43 */
3961 case SC_ALL_ICONS_OFF: /* 0x46 */
3962 case SC_RELEASE_RADIO_LINK: /* 0x4B */
3963 case SC_DECT_HANDOVER: /* 0x4C NOT DECODED - No description in 3AK 29000 0556 DSZZA */
3964 default:
3966 break;
3970 if (message_direction == TERM_TO_SYS) {
3971 switch (opcode) {
3972 case CS_DIGIT_DIALED: /* 0x03 */
3974 decode_digit_dialed(ua3g_body_tree, tvb, pinfo, offset);
3975 break;
3977 case CS_SUBDEVICE_MSG: /* 0x04 */
3979 decode_subdevice_msg(ua3g_body_tree, tvb, pinfo, offset, length);
3980 break;
3982 case CS_SUPER_MSG: /* 0x0B */
3983 case CS_SUPER_MSG_2: /* 0x17 */
3985 decode_super_msg(ua3g_body_tree, tvb, pinfo, offset, length, opcode);
3986 break;
3988 case CS_SEGMENT_MSG: /* 0x0C */
3990 decode_segment_msg(ua3g_body_tree, tvb, pinfo, offset, length);
3991 break;
3993 case CS_IP_DEVICE_ROUTING: /* 0x13 */
3995 decode_cs_ip_device_routing(ua3g_body_tree, tvb, pinfo, offset, length);
3996 break;
3998 case CS_DEBUG_IN_LINE: /* 0x18 */
4000 decode_debug_in_line(ua3g_body_tree, tvb, pinfo, offset, length);
4001 break;
4003 case CS_NON_DIGIT_KEY_PUSHED: /* 0x20 Key translation not sure */
4004 case CS_DIGIT_KEY_RELEASED: /* 0x26 Key translation not sure */
4005 case CS_KEY_RELEASED: /* 0x2A */
4006 case CS_TM_KEY_PUSHED: /* 0x2D Key translation not sure */
4008 decode_key_number(ua3g_body_tree, tvb, pinfo, offset, length);
4009 break;
4011 case CS_UNSOLICITED_MSG: /* 0x9F (0x1F) */
4012 case CS_VERSION_RESPONSE: /* 0x21 */
4014 decode_unsolicited_msg(ua3g_body_tree, tvb, pinfo, offset, length, opcode);
4015 break;
4017 case CS_I_M_HERE: /* 0x22 */
4019 decode_i_m_here(ua3g_body_tree, tvb, pinfo, offset);
4020 break;
4022 case CS_RSP_STATUS_INQUIRY: /* 0x23 */
4023 case CS_SPECIAL_KEY_STATUS: /* 0x29 */
4025 decode_special_key(ua3g_body_tree, tvb, pinfo, offset, opcode);
4026 break;
4028 case CS_SUBDEVICE_STATE: /* 0x24 */
4030 decode_subdevice_state(ua3g_body_tree, tvb, pinfo, offset);
4031 break;
4033 case CS_PERIPHERAL_CONTENT: /* 0x2B */
4035 decode_r_w_peripheral(ua3g_body_tree, tvb, pinfo, offset, length);
4036 break;
4038 case CS_UA_DWL_PROTOCOL: /* 0x50 */
4040 decode_ua_dwl_protocol(ua3g_body_tree, tvb, pinfo, offset, length);
4041 break;
4043 /* Case for UA3G message with only opcode (No body) */
4044 case CS_NOP_ACK: /* 0x00 */
4045 case CS_HANDSET_OFFHOOK: /* 0x01 */
4046 case CS_HANDSET_ONHOOK: /* 0x02 */
4047 case CS_HE_ROUTING: /* 0x05 NOT DECODED - No description in 3AK 29000 0556 DSZZA */
4048 case CS_LOOPBACK_ON: /* 0x06 */
4049 case CS_LOOPBACK_OFF: /* 0x07 */
4050 case CS_VIDEO_ROUTING: /* 0x09 NOT DECODED - No description in 3AK 29000 0556 DSZZA */
4051 case CS_WARMSTART_ACK: /* 0x0A */
4052 case CS_REMOTE_UA_ROUTING: /* 0x0D NOT DECODED - No description in 3AK 29000 0556 DSZZA */
4053 case CS_VERY_REMOTE_UA_R: /* 0x0E NOT DECODED - No description in 3AK 29000 0556 DSZZA */
4054 case CS_OSI_ROUTING: /* 0x0F NOT DECODED - No description in 3AK 29000 0556 DSZZA */
4055 case CS_ABC_A_ROUTING: /* 0x11 NOT DECODED - No description in 3AK 29000 0556 DSZZA */
4056 case CS_IBS_ROUTING: /* 0x12 NOT DECODED - No description in 3AK 29000 0556 DSZZA */
4057 case CS_TRACE_ON_ACK: /* 0x27 */
4058 case CS_TRACE_OFF_ACK: /* 0x28 */
4059 default:
4061 break;
4066 return tvb_length(tvb);
4070 /*-----------------------------------------------------------------------------
4071 DISSECTORS REGISTRATION FUNCTIONS
4072 ---------------------------------------------------------------------------*/
4073 void
4074 proto_register_ua3g(void)
4076 static hf_register_info hf[] =
4078 { &hf_ua3g_length,
4079 { "Length", "ua3g.length",
4080 FT_UINT16, BASE_DEC, NULL, 0x00,
4081 NULL, HFILL }
4083 { &hf_ua3g_opcode_sys,
4084 { "Opcode", "ua3g.opcode",
4085 FT_UINT8, BASE_HEX|BASE_EXT_STRING, &opcodes_vals_sys_ext, 0x00,
4086 NULL, HFILL }
4088 { &hf_ua3g_opcode_term,
4089 { "Opcode", "ua3g.opcode",
4090 FT_UINT8, BASE_HEX|BASE_EXT_STRING, &opcodes_vals_term_ext, 0x00,
4091 NULL, HFILL }
4093 { &hf_ua3g_opcode_production_test,
4094 { "Production Test Command", "ua3g.production_test",
4095 FT_UINT8, BASE_DEC, NULL, 0x00,
4096 NULL, HFILL }
4098 { &hf_ua3g_opcode_subservice_reset,
4099 { "Reserved For Compatibility", "ua3g.subservice_reset",
4100 FT_UINT8, BASE_DEC, NULL, 0x00,
4101 NULL, HFILL }
4103 { &hf_ua3g_opcode_are_you_there,
4104 { "Temporization", "ua3g.are_you_there",
4105 FT_UINT8, BASE_DEC, NULL, 0x00,
4106 NULL, HFILL }
4108 { &hf_ua3g_opcode_set_speaker_vol,
4109 { "Volume", "ua3g.set_speaker_vol",
4110 FT_UINT8, BASE_DEC, NULL, 0x00,
4111 NULL, HFILL }
4113 { &hf_ua3g_opcode_trace_on,
4114 { "Subdevice Address", "ua3g.trace_on",
4115 FT_UINT8, BASE_DEC, NULL, 0x00,
4116 NULL, HFILL }
4118 { &hf_ua3g_ip,
4119 { "IP Device Routing", "ua3g.ip",
4120 FT_UINT8, BASE_HEX, VALS(str_command_ip_device_routing), 0x00,
4121 NULL, HFILL }
4123 { &hf_ua3g_ip_cs,
4124 { "IP Device Routing", "ua3g.ip.cs",
4125 FT_UINT8, BASE_HEX, VALS(str_command_cs_ip_device_routing), 0x00,
4126 NULL, HFILL }
4128 { &hf_ua3g_command_led,
4129 { "Led Command", "ua3g.command.led",
4130 FT_UINT8, BASE_HEX, VALS(str_command_led), 0x00,
4131 NULL, HFILL }
4133 { &hf_ua3g_command_lcd_line,
4134 { "LCD Line Command", "ua3g.command.lcd_line",
4135 FT_UINT8, BASE_HEX, VALS(str_command_lcd_line), 0x00,
4136 NULL, HFILL }
4138 { &hf_ua3g_main_voice_mode,
4139 { "Voice Mode", "ua3g.command.main_voice_mode",
4140 FT_UINT8, BASE_HEX, VALS(str_main_voice_mode), 0x00,
4141 NULL, HFILL }
4143 { &hf_ua3g_command_set_clck,
4144 { "Set Clock", "ua3g.command.set_clck",
4145 FT_UINT8, BASE_HEX, VALS(str_command_set_clck), 0x00,
4146 NULL, HFILL }
4148 { &hf_ua3g_external_ringing_command,
4149 { "External Ringing Command", "ua3g.command.external_ringing",
4150 FT_UINT8, BASE_HEX, VALS(str_ext_ring_cmd), 0x00,
4151 NULL, HFILL }
4153 { &hf_ua3g_lcd_cursor,
4154 { "Cursor", "ua3g.lcd_cursor",
4155 FT_BOOLEAN, 8, TFS(&tfs_on_off), 0x02,
4156 NULL, HFILL }
4158 { &hf_ua3g_command_beep,
4159 { "Beep", "ua3g.command.beep",
4160 FT_UINT8, BASE_HEX, VALS(str_command_beep), 0x00,
4161 NULL, HFILL }
4163 { &hf_ua3g_command_sidetone,
4164 { "Sidetone", "ua3g.command.sidetone",
4165 FT_BOOLEAN, 8, TFS(&tfs_on_off), 0x00,
4166 NULL, HFILL }
4168 { &hf_ua3g_command_mute,
4169 { "Microphone", "ua3g.command.mute",
4170 FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x01,
4171 NULL, HFILL }
4173 { &hf_ua3g_command_feedback,
4174 { "Feedback", "ua3g.command.feedback",
4175 FT_BOOLEAN, 8, TFS(&tfs_on_off), 0x00,
4176 NULL, HFILL }
4178 { &hf_ua3g_command_audio_config,
4179 { "Audio Config", "ua3g.command.audio_config",
4180 FT_UINT8, BASE_HEX, VALS(str_command_audio_config), 0x00,
4181 NULL, HFILL }
4183 { &hf_ua3g_command_key_release,
4184 { "Key Release", "ua3g.command.key_release",
4185 FT_BOOLEAN, 8, TFS(&tfs_on_off), 0x00,
4186 NULL, HFILL }
4188 { &hf_ua3g_command_amplified_handset,
4189 { "Amplified Handset (Boost)", "ua3g.command.amplified_handset",
4190 FT_BOOLEAN, 8, TFS(&tfs_on_off), 0x00,
4191 NULL, HFILL }
4193 { &hf_ua3g_command_loudspeaker,
4194 { "Loudspeaker", "ua3g.command.loudspeaker",
4195 FT_BOOLEAN, 8, TFS(&tfs_on_off), 0x00,
4196 NULL, HFILL }
4198 { &hf_ua3g_command_announce,
4199 { "Announce", "ua3g.command.announce",
4200 FT_BOOLEAN, 8, TFS(&tfs_on_off), 0x00,
4201 NULL, HFILL }
4203 { &hf_ua3g_command_ring,
4204 { "Ring", "ua3g.command.ring",
4205 FT_BOOLEAN, 8, TFS(&tfs_on_off), 0x00,
4206 NULL, HFILL }
4208 { &hf_ua3g_command_ua_dwl_protocol,
4209 { "UA Download Protocol", "ua3g.command.ua_dwl_protocol",
4210 FT_UINT8, BASE_HEX, VALS(str_command_ua_dwl_protocol), 0x00,
4211 NULL, HFILL }
4213 { &hf_ua3g_command_unsolicited_msg,
4214 { "Unsolicited Message", "ua3g.command.unsolicited_msg",
4215 FT_UINT8, BASE_HEX, VALS(str_command_unsolicited_msg), 0x00,
4216 NULL, HFILL }
4218 { &hf_ua3g_ip_device_routing_stop_rtp_parameter,
4219 { "Parameter", "ua3g.ip.stop_rtp.parameter",
4220 FT_UINT8, BASE_HEX, VALS(ip_device_routing_cmd_stop_rtp_vals), 0x00,
4221 NULL, HFILL }
4223 { &hf_ua3g_ip_device_routing_stop_rtp_parameter_length,
4224 { "Length", "ua3g.ip.stop_rtp.parameter.length",
4225 FT_UINT8, BASE_DEC, NULL, 0x00,
4226 NULL, HFILL }
4228 { &hf_ua3g_ip_device_routing_stop_rtp_parameter_value_num,
4229 { "Value", "ua3g.ip.stop_rtp.parameter.value.num",
4230 FT_UINT64, BASE_HEX, NULL, 0x00,
4231 NULL, HFILL }
4233 { &hf_ua3g_ip_device_routing_stop_rtp_parameter_value_bytes,
4234 { "Value", "ua3g.ip.stop_rtp.parameter.value.bytes",
4235 FT_BYTES, BASE_NONE, NULL, 0x00,
4236 NULL, HFILL }
4238 /* Generated from convert_proto_tree_add_text.pl */
4239 { &hf_ua3g_subdevice_address, { "Subdevice Address", "ua3g.subdevice.address", FT_UINT8, BASE_DEC, NULL, 0x0F, NULL, HFILL }},
4240 { &hf_ua3g_subdevice_opcode, { "Subdevice Opcode", "ua3g.subdevice.opcode", FT_UINT8, BASE_HEX, NULL, 0x7F, NULL, HFILL }},
4241 { &hf_ua3g_subdevice_parameter_bytes, { "Parameter Bytes", "ua3g.subdevice.parameter_bytes", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
4242 { &hf_ua3g_software_reset, { "Software Reset", "ua3g.software_reset", FT_UINT8, BASE_DEC, VALS(software_reset_verswitch_vals), 0x0, NULL, HFILL }},
4243 { &hf_ua3g_ip_phone_warmstart, { "IP Phone Warmstart", "ua3g.ip_phone_warmstart", FT_UINT8, BASE_DEC, VALS(str_command_ip_phone_warmstart), 0x0, NULL, HFILL }},
4244 { &hf_ua3g_super_msg_length, { "Length", "ua3g.super_msg.length", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4245 { &hf_ua3g_super_msg_data, { "Data", "ua3g.super_msg.data", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
4246 { &hf_ua3g_segment_msg_num_remaining, { "Number Of Remaining Segments", "ua3g.segment_msg.num_remaining", FT_UINT8, BASE_DEC, NULL, 0x7F, NULL, HFILL }},
4247 { &hf_ua3g_segment_msg_length, { "Length", "ua3g.segment_msg.length", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4248 { &hf_ua3g_segment_message_data, { "Segment Message Data", "ua3g.segment_message.data", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
4249 { &hf_ua3g_ip_device_routing_reset_parameter, { "Parameter", "ua3g.ip.reset.parameter", FT_UINT8, BASE_DEC, VALS(ip_device_routing_cmd_reset_vals), 0x0, NULL, HFILL }},
4250 { &hf_ua3g_ip_device_routing_reset_parameter_length, { "Length", "ua3g.ip.reset.parameter.length", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4251 { &hf_ua3g_ip_device_routing_start_rtp_direction, { "Direction", "ua3g.ip.start_rtp.direction", FT_UINT8, BASE_DEC, VALS(start_rtp_str_direction), 0x0, NULL, HFILL }},
4252 { &hf_ua3g_ip_device_routing_start_rtp_parameter, { "Parameter", "ua3g.ip.start_rtp.parameter", FT_UINT8, BASE_HEX|BASE_EXT_STRING, &ip_device_routing_cmd_start_rtp_vals_ext, 0x0, NULL, HFILL }},
4253 { &hf_ua3g_ip_device_routing_start_rtp_parameter_length, { "Length", "ua3g.ip.start_rtp.parameter.length", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4254 { &hf_ua3g_ip_device_routing_redirect_parameter, { "Parameter", "ua3g.ip.redirect.parameter", FT_UINT8, BASE_HEX, VALS(ip_device_routing_cmd_redirect_vals), 0x0, NULL, HFILL }},
4255 { &hf_ua3g_ip_device_routing_redirect_parameter_length, { "Length", "ua3g.ip.redirect.parameter.length", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4256 { &hf_ua3g_ip_device_routing_def_tones_num_entries, { "Number Of Entries", "ua3g.ip.def_tones.num_entries", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4257 { &hf_ua3g_ip_device_routing_def_tones_frequency_1, { "Frequency 1 (Hz)", "ua3g.ip.def_tones.frequency_1", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4258 { &hf_ua3g_ip_device_routing_def_tones_level_1, { "Level 1 (dB)", "ua3g.ip.def_tones.level_1", FT_INT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4259 { &hf_ua3g_ip_device_routing_def_tones_frequency_2, { "Frequency 2 (Hz)", "ua3g.ip.def_tones.frequency_2", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4260 { &hf_ua3g_ip_device_routing_def_tones_level_2, { "Level 2 (dB)", "ua3g.ip.def_tones.level_2", FT_INT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4261 { &hf_ua3g_ip_device_routing_start_tone_direction, { "Direction", "ua3g.ip.start_tone.direction", FT_UINT8, BASE_DEC, VALS(ip_device_routing_tone_direction_vals), 0xC0, NULL, HFILL }},
4262 { &hf_ua3g_ip_device_routing_start_tone_num_entries, { "Number of entries", "ua3g.ip.start_tone.num_entries", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4263 { &hf_ua3g_ip_device_routing_start_tone_identification, { "Identification", "ua3g.ip.start_tone.identification", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4264 { &hf_ua3g_ip_device_routing_start_tone_duration, { "Duration (ms)", "ua3g.ip.start_tone.duration", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4265 { &hf_ua3g_ip_device_routing_listen_rtp_parameter, { "Parameter", "ua3g.ip.listen_rtp.parameter", FT_UINT8, BASE_HEX, VALS(ip_device_routing_cmd_listen_rtp_vals), 0x0, NULL, HFILL }},
4266 { &hf_ua3g_ip_device_routing_listen_rtp_parameter_length, { "Length", "ua3g.ip.listen_rtp.parameter.length", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4267 { &hf_ua3g_ip_device_routing_get_param_req_parameter, { "Parameter", "ua3g.ip.get_param_req.parameter", FT_UINT8, BASE_DEC, VALS(ip_device_routing_cmd_get_param_req_vals), 0x0, NULL, HFILL }},
4268 { &hf_ua3g_ip_device_routing_set_param_req_parameter, { "Parameter", "ua3g.ip.set_param_req.parameter", FT_UINT8, BASE_HEX|BASE_EXT_STRING, &ip_device_routing_cmd_set_param_req_vals_ext, 0x0, NULL, HFILL }},
4269 { &hf_ua3g_ip_device_routing_set_param_req_parameter_length, { "Length", "ua3g.ip.set_param_req.parameter.length", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4270 { &hf_ua3g_ip_device_routing_digit_value, { "Digit Value", "ua3g.ip.digit_value", FT_UINT8, BASE_DEC|BASE_EXT_STRING, &str_digit_ext, 0x0, NULL, HFILL }},
4271 { &hf_ua3g_ip_device_routing_pause_restart_rtp_parameter, { "Parameter", "ua3g.ip.pause_restart_rtp.parameter", FT_UINT8, BASE_HEX, VALS(ip_device_routing_cmd_pause_restart_vals), 0x0, NULL, HFILL }},
4272 { &hf_ua3g_ip_device_routing_pause_restart_rtp_parameter_length, { "Length", "ua3g.ip.pause_restart_rtp.parameter.length", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4273 { &hf_ua3g_ip_device_routing_pause_restart_rtp_parameter_value, { "Value", "ua3g.ip.pause_restart_rtp.parameter.value", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
4274 { &hf_ua3g_ip_device_routing_start_stop_record_rtp_parameter, { "Parameter", "ua3g.ip.start_stop_record_rtp.parameter", FT_UINT8, BASE_HEX, VALS(ip_device_routing_cmd_record_rtp_vals), 0x0, NULL, HFILL }},
4275 { &hf_ua3g_ip_device_routing_start_stop_record_rtp_parameter_length, { "Length", "ua3g.ip.start_stop_record_rtp.parameter.length", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4276 { &hf_ua3g_debug_in_line, { "Text String With Debug", "ua3g.debug_in_line", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
4277 { &hf_ua3g_command_led_number, { "Led Number", "ua3g.command.led.number", FT_INT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4278 { &hf_ua3g_lcd_line_cmd_lcd_options, { "LCD Options", "ua3g.command.lcd_line.lcd_options", FT_UINT8, BASE_HEX, NULL, 0xFC, NULL, HFILL }},
4279 { &hf_ua3g_lcd_line_cmd_starting_column, { "Starting Column", "ua3g.command.lcd_line.starting_column", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4280 { &hf_ua3g_main_voice_mode_tune, { "Tune", "ua3g.main_voice_mode.tune", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4281 { &hf_ua3g_main_voice_mode_cadence, { "Cadence", "ua3g.main_voice_mode.cadence", FT_UINT8, BASE_DEC, VALS(str_cadence), 0x0, NULL, HFILL }},
4282 { &hf_ua3g_main_voice_mode_speaker_volume, { "Speaker Volume", "ua3g.main_voice_mode.speaker_volume", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4283 { &hf_ua3g_main_voice_mode_microphone_volume, { "Microphone Volume", "ua3g.main_voice_mode.microphone_volume", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4284 { &hf_ua3g_main_voice_mode_sending_level, { "Sending Level (dB)", "ua3g.main_voice_mode.sending_level", FT_INT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4285 { &hf_ua3g_main_voice_mode_handset_level, { "Receiving Level (dB)", "ua3g.main_voice_mode.handset_level", FT_INT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4286 { &hf_ua3g_main_voice_mode_headset_level, { "Receiving Level (dB)", "ua3g.main_voice_mode.headset_level", FT_INT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4287 { &hf_ua3g_main_voice_mode_handsfree_level, { "Sending Level (dB)", "ua3g.main_voice_mode.handsfree_level", FT_INT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4288 { &hf_ua3g_subdevice_metastate_subchannel_address, { "Subchannel Address", "ua3g.subdevice_metastate.subchannel_address", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4289 { &hf_ua3g_subdevice_metastate_new_metastate, { "New Metastate", "ua3g.subdevice_metastate.new_metastate", FT_UINT8, BASE_DEC, VALS(str_new_metastate), 0x0, NULL, HFILL }},
4290 { &hf_ua3g_dwl_dtmf_clck_format_minimum_on_time, { "Minimum 'ON' Time (ms)", "ua3g.dwl_dtmf_clck_format.minimum_on_time", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4291 { &hf_ua3g_dwl_dtmf_clck_format_inter_digit_pause_time, { "Inter-Digit Pause Time (ms)", "ua3g.dwl_dtmf_clck_format.inter_digit_pause_time", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4292 { &hf_ua3g_dwl_dtmf_clck_format_clock_time_format, { "Clock Time Format", "ua3g.dwl_dtmf_clck_format.clock_time_format", FT_UINT8, BASE_DEC, VALS(str_clock_format), 0x0, NULL, HFILL }},
4293 { &hf_ua3g_dwl_dtmf_clck_format_dtmf_country_adaptation, { "DTMF Country Adaptation", "ua3g.dwl_dtmf_clck_format.dtmf_country_adaptation", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4294 { &hf_ua3g_voice_channel_channel_mode, { "Channel Mode", "ua3g.voice_channel.channel_mode", FT_BOOLEAN, 8, TFS(&tfs_voice_channel_channel_mode), 0x01, NULL, HFILL }},
4295 { &hf_ua3g_voice_channel_codec, { "Codec", "ua3g.voice_channel.codec", FT_BOOLEAN, 8, TFS(&tfs_voice_channel_codec), 0x02, NULL, HFILL }},
4296 { &hf_ua3g_voice_channel_voice_channel, { "Voice Channel", "ua3g.voice_channel.voice_channel", FT_BOOLEAN, 8, TFS(&tfs_voice_channel_voice_channel), 0x04, NULL, HFILL }},
4297 { &hf_ua3g_voice_channel_main_voice, { "Main Voice", "ua3g.voice_channel.main_voice", FT_UINT8, BASE_DEC, VALS(str_voice_channel), 0x0, NULL, HFILL }},
4298 { &hf_ua3g_voice_channel_announce, { "Announce", "ua3g.voice_channel.announce", FT_UINT8, BASE_DEC, VALS(str_voice_channel), 0x0, NULL, HFILL }},
4299 { &hf_ua3g_voice_channel_b_general, { "B General", "ua3g.voice_channel.b_general", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4300 { &hf_ua3g_voice_channel_b_loud_speaker, { "B Loud Speaker", "ua3g.voice_channel.b_loud_speaker", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4301 { &hf_ua3g_voice_channel_b_ear_piece, { "B Ear Piece", "ua3g.voice_channel.b_ear_piece", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4302 { &hf_ua3g_voice_channel_b_microphones, { "B Microphones", "ua3g.voice_channel.b_microphones", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4303 { &hf_ua3g_lcd_cursor_line_number, { "Line Number", "ua3g.lcd_cursor.line_number", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4304 { &hf_ua3g_dwl_special_char_character_number, { "Character Number", "ua3g.dwl_special_char.character_number", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4305 { &hf_ua3g_dwl_special_char_byte, { "Byte", "ua3g.dwl_special_char.byte", FT_UINT8, BASE_DEC, NULL, 0xFF, NULL, HFILL }},
4306 { &hf_ua3g_set_clck_timer_pos_clock_line_number, { "Clock Line Number", "ua3g.set_clck_timer_pos.clock_line_number", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4307 { &hf_ua3g_set_clck_timer_pos_clock_column_number, { "Clock Column Number", "ua3g.set_clck_timer_pos.clock_column_number", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4308 { &hf_ua3g_set_clck_timer_pos_call_timer_line_number, { "Call Timer Line Number", "ua3g.set_clck_timer_pos.call_timer_line_number", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4309 { &hf_ua3g_set_clck_timer_pos_call_timer_column_number, { "Call Timer Column Number", "ua3g.set_clck_timer_pos.call_timer_column_number", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4310 { &hf_ua3g_set_lcd_contrast_driver_number, { "Driver Number", "ua3g.set_lcd_contrast.driver_number", FT_UINT8, BASE_DEC, VALS(str_driver_number), 0x0, NULL, HFILL }},
4311 { &hf_ua3g_set_lcd_contrast_contrast_value, { "Contrast Value", "ua3g.set_lcd_contrast.contrast_value", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4312 { &hf_ua3g_beep_destination, { "Destination", "ua3g.command.beep.destination", FT_UINT8, BASE_DEC, VALS(str_beep_start_destination), 0x0, NULL, HFILL }},
4313 { &hf_ua3g_beep_on_off, { "On / Off", "ua3g.command.beep.on_off", FT_BOOLEAN, 8, TFS(&tfs_on_off), 0x80, NULL, HFILL }},
4314 { &hf_ua3g_beep_cadence, { "Cadence", "ua3g.command.beep.cadence", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4315 { &hf_ua3g_beep_beep_number, { "Beep Number", "ua3g.command.beep.beep_number", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }},
4316 { &hf_ua3g_beep_number_of_notes, { "Number Of Notes", "ua3g.command.beep.number_of_notes", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }},
4317 { &hf_ua3g_beep_terminator, { "Terminator", "ua3g.command.beep.terminator", FT_UINT8, BASE_DEC, VALS(str_beep_terminator), 0x0, NULL, HFILL }},
4318 { &hf_ua3g_sidetone_level, { "Level", "ua3g.command.sidetone.level", FT_INT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4319 { &hf_ua3g_ringing_cadence_cadence, { "Cadence", "ua3g.ringing_cadence.cadence", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4320 { &hf_ua3g_ringing_cadence_on_off, { "On / Off", "ua3g.ringing_cadence.on_off", FT_BOOLEAN, 8, TFS(&tfs_on_off), 0x80, NULL, HFILL }},
4321 { &hf_ua3g_ringing_cadence_length, { "Length (ms)", "ua3g.ringing_cadence.length", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4322 { &hf_ua3g_feedback_level, { "Level (dB)", "ua3g.command.feedback.level", FT_INT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4323 { &hf_ua3g_feedback_duration, { "Duration (ms)", "ua3g.command.feedback.duration", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4324 { &hf_ua3g_r_w_peripheral_address, { "Address", "ua3g.r_w_peripheral.address", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4325 { &hf_ua3g_r_w_peripheral_content, { "Content", "ua3g.r_w_peripheral.content", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4326 { &hf_ua3g_icon_cmd_icon_number, { "Icon Number", "ua3g.icon_cmd.icon_number", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4327 { &hf_ua3g_icon_cmd_segment, { "Segment", "ua3g.icon_cmd.segment", FT_UINT16, BASE_DEC, VALS(str_icon_cmd_state), 0x0, NULL, HFILL }},
4328 { &hf_ua3g_audio_config_ignored, { "Ignored", "ua3g.command.audio_config.ignored", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4329 { &hf_ua3g_audio_config_law, { "Law", "ua3g.command.audio_config.law", FT_UINT8, BASE_DEC, VALS(str_audio_coding_law), 0x0, NULL, HFILL }},
4330 { &hf_ua3g_audio_config_volume_level, { "Volume Level", "ua3g.command.audio_config.volume_level", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4331 { &hf_ua3g_audio_config_handsfree_return, { "Return", "ua3g.command.audio_config.handsfree_return", FT_BOOLEAN, 8, TFS(&tfs_audio_config_handsfree_return), 0x01, NULL, HFILL }},
4332 { &hf_ua3g_audio_config_handsfree_handsfree, { "Handsfree", "ua3g.command.audio_config.handsfree", FT_BOOLEAN, 8, TFS(&tfs_audio_config_handsfree_handsfree), 0x02, NULL, HFILL }},
4333 { &hf_ua3g_audio_padded_path_emission_padded_level, { "Emission Padded Level", "ua3g.audio_padded_path.emission_padded_level", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4334 { &hf_ua3g_audio_padded_path_reception_padded_level, { "Reception Padded Level", "ua3g.audio_padded_path.reception_padded_level", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4335 { &hf_ua3g_on_off_level_level_on_loudspeaker, { "Level on Loudspeaker (dB)", "ua3g.on_off_level.level_on_loudspeaker", FT_INT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4336 { &hf_ua3g_ring_melody, { "Melody", "ua3g.command.ring.melody", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4337 { &hf_ua3g_ring_cadence, { "Cadence", "ua3g.command.ring.cadence", FT_UINT8, BASE_DEC, VALS(str_cadence), 0x0, NULL, HFILL }},
4338 { &hf_ua3g_ring_speaker_level, { "Speaker level (dB)", "ua3g.command.ring.speaker_level", FT_INT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4339 { &hf_ua3g_ring_beep_number, { "Beep number", "ua3g.command.ring.beep_number", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4340 { &hf_ua3g_ring_silent, { "Silent", "ua3g.command.ring.silent", FT_BOOLEAN, 8, TFS(&tfs_on_off), 0x80, NULL, HFILL }},
4341 { &hf_ua3g_ring_progressive, { "Progressive", "ua3g.command.ring.progressive", FT_UINT8, BASE_DEC, NULL, 0x03, NULL, HFILL }},
4342 { &hf_ua3g_ua_dwl_protocol_item_identifier, { "Item Identifier", "ua3g.ua_dwl_protocol.item_identifier", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4343 { &hf_ua3g_ua_dwl_protocol_cause, { "Cause", "ua3g.ua_dwl_protocol.cause", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4344 { &hf_ua3g_ua_dwl_protocol_force_mode, { "Force Mode", "ua3g.ua_dwl_protocol.force_mode", FT_UINT8, BASE_DEC, VALS(str_download_req_force_mode), 0x0, NULL, HFILL }},
4345 { &hf_ua3g_ua_dwl_protocol_item_version, { "Item Version", "ua3g.ua_dwl_protocol.item_version", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4346 { &hf_ua3g_ua_dwl_protocol_item_version_nc, { "Item Version", "ua3g.ua_dwl_protocol.item_version", FT_UINT16, BASE_CUSTOM, version_number_computer, 0x0, NULL, HFILL }},
4347 { &hf_ua3g_ua_dwl_protocol_binary_length, { "Binary Length", "ua3g.ua_dwl_protocol.binary_length", FT_UINT24, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4348 { &hf_ua3g_ua_dwl_protocol_packet_number, { "Packet Number", "ua3g.ua_dwl_protocol.packet_number", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4349 { &hf_ua3g_ua_dwl_protocol_download_ack_status, { "Status", "ua3g.ua_dwl_protocol.download_ack_status", FT_UINT8, BASE_DEC|BASE_EXT_STRING, &str_download_ack_status_ext, 0x0, NULL, HFILL }},
4350 { &hf_ua3g_ua_dwl_protocol_packet_download_end_ack_ok_status, { "Status", "ua3g.ua_dwl_protocol_packet.download_end_ack_ok_status", FT_UINT8, BASE_DEC, VALS(str_download_end_ack_ok), 0x0, NULL, HFILL }},
4351 { &hf_ua3g_ua_dwl_protocol_checksum, { "Checksum", "ua3g.ua_dwl_protocol.checksum", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4352 { &hf_ua3g_ua_dwl_protocol_acknowledge, { "Acknowledge", "ua3g.ua_dwl_protocol.acknowledge", FT_UINT8, BASE_DEC, VALS(str_iso_checksum_ack_status), 0x0, NULL, HFILL }},
4353 { &hf_ua3g_digit_dialed_digit_value, { "Digit Value", "ua3g.digit_dialed.digit_value", FT_UINT8, BASE_DEC|BASE_EXT_STRING, &str_digit_ext, 0x0, NULL, HFILL }},
4354 { &hf_ua3g_subdevice_msg_subdev_type, { "Subdev Type", "ua3g.subdevice_msg.subdev_type", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4355 { &hf_ua3g_subdevice_msg_subdev_address, { "Subdev Address", "ua3g.subdevice_msg.subdev_address", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4356 { &hf_ua3g_subdevice_msg_subdevice_opcode, { "Subdevice Opcode", "ua3g.subdevice_msg.subdevice_opcode", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4357 { &hf_ua3g_subdevice_msg_parameter_bytes, { "Parameter Bytes", "ua3g.subdevice_msg.parameter_bytes", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
4358 { &hf_ua3g_cs_ip_device_routing_cmd00_vta_type, { "VTA Type", "ua3g.ip.cs.cmd00.vta_type", FT_UINT8, BASE_DEC, VALS(str_cs_ip_device_routing_vta_type), 0x0, NULL, HFILL }},
4359 { &hf_ua3g_cs_ip_device_routing_cmd00_characteristic_number, { "Characteristic Number", "ua3g.ip.cs.cmd00.characteristic_number", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4360 { &hf_ua3g_cs_ip_device_routing_cmd01_incident_0, { "Incident 0", "ua3g.ip.cs.cmd01.incident_0", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4361 { &hf_ua3g_cs_ip_device_routing_cmd02_parameter, { "Parameter", "ua3g.ip.cs.cmd02.parameter", FT_UINT8, BASE_HEX, VALS(ip_device_routing_cmd_get_param_req_vals), 0x0, NULL, HFILL }},
4362 { &hf_ua3g_cs_ip_device_routing_cmd02_parameter_length, { "Length", "ua3g.ip.cs.cmd02.parameter.length", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4363 { &hf_ua3g_cs_ip_device_routing_cmd03_parameter, { "Parameter", "ua3g.ip.cs.cmd03.parameter", FT_UINT8, BASE_HEX|BASE_EXT_STRING, &cs_ip_device_routing_03_parameter_id_vals_ext, 0x0, NULL, HFILL }},
4364 { &hf_ua3g_cs_ip_device_routing_cmd03_parameter_length, { "Length", "ua3g.ip.cs.cmd03.parameter.length", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4365 { &hf_ua3g_unsolicited_msg_device_type, { "Device Type", "ua3g.unsolicited_msg.device_type", FT_UINT8, BASE_DEC, VALS(str_device_type), 0x0, NULL, HFILL }},
4366 { &hf_ua3g_unsolicited_msg_self_test_result, { "Self-Test Result", "ua3g.unsolicited_msg.self_test_result", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4367 { &hf_ua3g_unsolicited_msg_vta_type, { "VTA Type", "ua3g.unsolicited_msg.vta_type", FT_UINT8, BASE_DEC, VALS(str_unsolicited_msg_vta_type), 0x0, NULL, HFILL }},
4368 { &hf_ua3g_unsolicited_msg_other_information, { "Other Information", "ua3g.unsolicited_msg.other_information", FT_UINT8, BASE_DEC, VALS(str_unsolicited_msg_other_info_2), 0x0, NULL, HFILL }},
4369 { &hf_ua3g_unsolicited_msg_other_information_1, { "Other Information 1", "ua3g.unsolicited_msg.other_information_1", FT_UINT8, BASE_DEC, VALS(str_unsolicited_msg_other_info_1), 0x0, NULL, HFILL }},
4370 { &hf_ua3g_unsolicited_msg_hardware_version, { "Hardware Version", "ua3g.unsolicited_msg.hardware_version", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4371 { &hf_ua3g_unsolicited_msg_other_information_2, { "Other Information 2", "ua3g.unsolicited_msg.other_information_2", FT_UINT8, BASE_DEC, VALS(str_unsolicited_msg_other_info_2), 0x0, NULL, HFILL }},
4372 { &hf_ua3g_unsolicited_msg_firmware_datas_patch_version, { "Firmware Datas Patch Version", "ua3g.unsolicited_msg.firmware_datas_patch_version", FT_UINT16, BASE_CUSTOM, version_number_computer, 0x0, NULL, HFILL }},
4373 { &hf_ua3g_unsolicited_msg_firmware_version_loader, { "Firmware Version (Loader)", "ua3g.unsolicited_msg.firmware_version_loader", FT_UINT16, BASE_CUSTOM, version_number_computer, 0x0, NULL, HFILL }},
4374 { &hf_ua3g_unsolicited_msg_firmware_version, { "Firmware Version", "ua3g.unsolicited_msg.firmware_version", FT_UINT16, BASE_CUSTOM, version_number_computer, 0x0, NULL, HFILL }},
4375 { &hf_ua3g_unsolicited_msg_datas_version, { "Datas Version", "ua3g.unsolicited_msg.datas_version", FT_UINT16, BASE_CUSTOM, version_number_computer, 0x0, NULL, HFILL }},
4376 { &hf_ua3g_unsolicited_msg_firmware_version_bootloader, { "Firmware Version (Bootloader)", "ua3g.unsolicited_msg.firmware_version_bootloader", FT_UINT16, BASE_CUSTOM, version_number_computer, 0x0, NULL, HFILL }},
4377 { &hf_ua3g_unsolicited_msg_opcode_of_bad_command, { "Opcode Of Bad Command", "ua3g.unsolicited_msg.opcode_of_bad_command", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4378 { &hf_ua3g_unsolicited_msg_next_byte_of_bad_command, { "Next Byte Of Bad Command", "ua3g.unsolicited_msg.next_byte_of_bad_command", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
4379 { &hf_ua3g_unsolicited_msg_subdevice_address, { "Subdevice Address", "ua3g.unsolicited_msg.subdevice_address", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4380 { &hf_ua3g_unsolicited_msg_segment_failure_t, { "T", "ua3g.unsolicited_msg.segment_failure.t", FT_BOOLEAN, 8, NULL, 0x0, NULL, HFILL }},
4381 { &hf_ua3g_unsolicited_msg_segment_failure_num, { "Num", "ua3g.unsolicited_msg.segment_failurenum", FT_BOOLEAN, 8, NULL, 0x0, NULL, HFILL }},
4382 { &hf_ua3g_unsolicited_msg_segment_failure_s, { "/S", "ua3g.unsolicited_msg.segment_failure.s", FT_BOOLEAN, 8, NULL, 0x0, NULL, HFILL }},
4383 { &hf_ua3g_unsolicited_msg_segment_failure_l, { "L", "ua3g.unsolicited_msg.segment_failure.l", FT_BOOLEAN, 8, NULL, 0x0, NULL, HFILL }},
4384 { &hf_ua3g_unsolicited_msg_opcode_bad_segment, { "Opcode Bad Segment", "ua3g.unsolicited_msg.opcode_bad_segment", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4385 { &hf_ua3g_unsolicited_msg_next_byte_of_bad_segment, { "Next Byte Of Bad Segment", "ua3g.unsolicited_msg.next_byte_of_bad_segment", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4386 { &hf_ua3g_unsolicited_msg_device_event, { "Device Event", "ua3g.unsolicited_msg.device_event", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4387 { &hf_ua3g_i_m_here_id_code, { "Id Code", "ua3g.i_m_here.id_code", FT_UINT8, BASE_DEC, VALS(str_device_type), 0x0, NULL, HFILL }},
4388 { &hf_ua3g_segment_msg_segment, { "F/S", "ua3g.segment_msg.segment", FT_BOOLEAN, 8, TFS(&tfs_segment_msg_segment), 0x80, NULL, HFILL }},
4389 { &hf_ua3g_ip_device_routing_reset_parameter_noe_update, { "NOE Update Mode", "ua3g.ip.reset.parameter.noe_update", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }},
4390 { &hf_ua3g_ip_device_routing_reset_parameter_noe_update_bootloader, { "Bootloader", "ua3g.ip.reset.parameter.noe_update.bootloader", FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x01, NULL, HFILL }},
4391 { &hf_ua3g_ip_device_routing_reset_parameter_noe_update_data, { "Data", "ua3g.ip.reset.parameter.noe_update.data", FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x02, NULL, HFILL }},
4392 { &hf_ua3g_ip_device_routing_reset_parameter_noe_update_customization, { "Customization", "ua3g.ip.reset.parameter.noe_update.customization", FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x04, NULL, HFILL }},
4393 { &hf_ua3g_ip_device_routing_reset_parameter_noe_update_localization, { "Localization", "ua3g.ip.reset.parameter.noe_update.localization", FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x08, NULL, HFILL }},
4394 { &hf_ua3g_ip_device_routing_reset_parameter_noe_update_code, { "Code", "ua3g.ip.reset.parameter.noe_update.code", FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x10, NULL, HFILL }},
4395 { &hf_ua3g_ip_device_routing_reset_parameter_noe_update_sip, { "SIP", "ua3g.ip.reset.parameter.noe_update.sip", FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x20, NULL, HFILL }},
4396 { &hf_ua3g_ip_device_routing_reset_parameter_bad_sec_mode, { "Bad Sec Mode", "ua3g.ip.reset.parameter.bad_sec_mode", FT_UINT8, BASE_DEC, VALS(reset_param_bad_sec_mode), 0x0, NULL, HFILL }},
4397 { &hf_ua3g_ip_device_routing_reset_parameter_value, { "Value", "ua3g.ip.reset.parameter.value", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
4398 { &hf_ua3g_ip_device_routing_reset_parameter_cust_name, { "Cust_Name", "ua3g.ip.reset.parameter.cust_name", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
4399 { &hf_ua3g_ip_device_routing_reset_parameter_l10n_name, { "L10N_Name", "ua3g.ip.reset.parameter.l10n_name", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
4400 { &hf_ua3g_ip_device_routing_start_rtp_parameter_value, { "Value", "ua3g.ip.start_rtp.parameter.value", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
4401 { &hf_ua3g_ip_device_routing_start_rtp_parameter_ip, { "IP", "ua3g.ip.start_rtp.parameter.ip", FT_IPv4, BASE_NONE, NULL, 0x0, NULL, HFILL }},
4402 { &hf_ua3g_ip_device_routing_start_rtp_parameter_compressor, { "Compressor", "ua3g.ip.start_rtp.parameter.compressor", FT_UINT64, BASE_DEC|BASE_VAL64_STRING, VALS(str_start_rtp_compressor), 0x0, NULL, HFILL }},
4403 { &hf_ua3g_ip_device_routing_start_rtp_parameter_enabler, { "Enabler", "ua3g.ip.start_rtp.parameter.enabler", FT_UINT64, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4404 { &hf_ua3g_ip_device_routing_start_rtp_parameter_send_qos, { "Must Send QOS Tickets", "ua3g.ip.start_rtp.parameter.enabler", FT_UINT64, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4405 { &hf_ua3g_ip_device_routing_start_rtp_parameter_uint, { "Value", "ua3g.ip.start_rtp.parameter.uint", FT_UINT64, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4406 { &hf_ua3g_ip_device_routing_start_rtp_parameter_dtmf_sending, { "Send DTMF", "ua3g.ip.start_rtp.parameter.dtmf_sending", FT_UINT64, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4407 { &hf_ua3g_ip_device_routing_start_rtp_parameter_rfc2198, { "Enable RFC 2198", "ua3g.ip.start_rtp.parameter.rfc2198", FT_UINT64, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4408 { &hf_ua3g_ip_device_routing_start_rtp_parameter_srtp_encryption, { "Enable SRTP Encryption", "ua3g.ip.start_rtp.parameter.srtp_encryption", FT_UINT64, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4409 { &hf_ua3g_ip_device_routing_redirect_parameter_value, { "Value", "ua3g.ip.redirect.parameter.value", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
4410 { &hf_ua3g_ip_device_routing_redirect_parameter_ip, { "IP", "ua3g.ip.redirect.parameter.ip", FT_IPv4, BASE_NONE, NULL, 0x0, NULL, HFILL }},
4411 { &hf_ua3g_ip_device_routing_redirect_parameter_uint, { "Value", "ua3g.ip.redirect.parameter.uint", FT_UINT64, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4412 { &hf_ua3g_ip_device_routing_listen_rtp_parameter_value, { "Value", "ua3g.ip.listen_rtp.parameter.value", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
4413 { &hf_ua3g_ip_device_routing_listen_rtp_parameter_ip, { "IP", "ua3g.ip.listen_rtp.parameter.ip", FT_IPv4, BASE_NONE, NULL, 0x0, NULL, HFILL }},
4414 { &hf_ua3g_ip_device_routing_listen_rtp_parameter_port, { "Port", "ua3g.ip.listen_rtp.parameter.port", FT_UINT64, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4415 { &hf_ua3g_ip_device_routing_set_param_req_parameter_value, { "Value", "ua3g.ip.set_param_req.parameter.value", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
4416 { &hf_ua3g_ip_device_routing_set_param_req_parameter_tftp_backup_ip, { "TFTP Backup IP", "ua3g.ip.set_param_req.parameter.tftp_backup_ip", FT_IPv4, BASE_NONE, NULL, 0x0, NULL, HFILL }},
4417 { &hf_ua3g_ip_device_routing_set_param_req_parameter_uint, { "Value", "ua3g.ip.set_param_req.parameter.uint", FT_UINT64, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4418 { &hf_ua3g_ip_device_routing_set_param_req_parameter_err_string, { "Value", "ua3g.ip.set_param_req.parameter.err_string", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
4419 { &hf_ua3g_ip_device_routing_set_param_req_parameter_compressor, { "Compressor", "ua3g.ip.set_param_req.parameter.compressor", FT_UINT8, BASE_DEC, VALS(str_set_param_req_compressor), 0x0, NULL, HFILL }},
4420 { &hf_ua3g_ip_device_routing_set_param_req_parameter_set_pc_port_status, { "Set PC Port status", "ua3g.ip.set_param_req.parameter.set_pc_port_status", FT_UINT8, BASE_DEC, VALS(str_set_pc_port_status), 0x0, NULL, HFILL }},
4421 { &hf_ua3g_ip_device_routing_set_param_req_parameter_record_rtp_auth, { "Record RTP Authorization", "ua3g.ip.set_param_req.parameter.record_rtp_auth", FT_UINT8, BASE_DEC, VALS(str_enable_feature), 0x0, NULL, HFILL }},
4422 { &hf_ua3g_ip_device_routing_set_param_req_parameter_security_flag_filter, { "Filtering", "ua3g.ip.set_param_req.parameter.security_flag.filter", FT_BOOLEAN, 8, TFS(&tfs_active_inactive), 0x01, NULL, HFILL }},
4423 { &hf_ua3g_ip_device_routing_pause_restart_rtp_parameter_uint, { "Value", "ua3g.ip.pause_restart_rtp.parameter.uint", FT_UINT64, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4424 { &hf_ua3g_ip_device_routing_start_stop_record_rtp_parameter_value, { "Value", "ua3g.ip.start_stop_record_rtp.parameter.value", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
4425 { &hf_ua3g_ip_device_routing_start_stop_record_rtp_parameter_remote_ip, { "Remote IP", "ua3g.ip.start_stop_record_rtp.parameter.remote_ip", FT_IPv4, BASE_NONE, NULL, 0x0, NULL, HFILL }},
4426 { &hf_ua3g_ip_device_routing_start_stop_record_rtp_parameter_uint, { "Value", "ua3g.ip.start_stop_record_rtp.parameter.uint", FT_UINT64, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4427 { &hf_ua3g_audio_config_dpi_chan_ua_tx1, { "UA Channel UA-TX1", "ua3g.command.audio_config.dpi_chan.ua_tx1", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4428 { &hf_ua3g_audio_config_dpi_chan_ua_tx2, { "UA Channel UA-TX2", "ua3g.command.audio_config.dpi_chan.ua_tx2", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4429 { &hf_ua3g_audio_config_dpi_chan_gci_tx1, { "GCI Channel GCI-TX1", "ua3g.command.audio_config.dpi_chan.gci_tx1", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4430 { &hf_ua3g_audio_config_dpi_chan_gci_tx2, { "GCI Channel GCI-TX2", "ua3g.command.audio_config.dpi_chan.gci_tx2", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4431 { &hf_ua3g_audio_config_dpi_chan_cod_tx, { "Codec Channel COD-TX", "ua3g.command.audio_config.dpi_chan.cod_tx", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4432 { &hf_ua3g_audio_config_audio_circuit_dth, { "Anti-Distortion Coeff 1(DTH)", "ua3g.command.audio_config.audio_circuit.dth", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4433 { &hf_ua3g_audio_config_audio_circuit_dtr, { "Anti-Distortion Coeff 2(DTR)", "ua3g.command.audio_config.audio_circuit.dtr", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4434 { &hf_ua3g_audio_config_audio_circuit_dtf, { "Anti-Distortion Coeff 3(DTF)", "ua3g.command.audio_config.audio_circuit.dtf", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4435 { &hf_ua3g_audio_config_audio_circuit_str, { "Sidetone Attenuation (STR)", "ua3g.command.audio_config.audio_circuit.str", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4436 { &hf_ua3g_audio_config_audio_circuit_ahp1, { "Anti-Larsen Coeff 1 (AHP1)", "ua3g.command.audio_config.audio_circuit.ahp1", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4437 { &hf_ua3g_audio_config_audio_circuit_ahp2, { "Anti-Larsen Coeff 2 (AHP2)", "ua3g.command.audio_config.audio_circuit.ahp2", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4438 { &hf_ua3g_audio_config_audio_circuit_ath, { "Anti-Larsen Coeff 3 (ATH)", "ua3g.command.audio_config.audio_circuit.ath", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4439 { &hf_ua3g_audio_config_audio_circuit_atr, { "Anti-Larsen Coeff 4 (ATR)", "ua3g.command.audio_config.audio_circuit.atr", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4440 { &hf_ua3g_audio_config_audio_circuit_atf, { "Anti-Larsen Coeff 5 (ATF)", "ua3g.command.audio_config.audio_circuit.atf", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4441 { &hf_ua3g_audio_config_audio_circuit_alm, { "Anti-Larsen Coeff 6 (ALM)", "ua3g.command.audio_config.audio_circuit.alm", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4442 { &hf_ua3g_audio_config_loudspeaker_aco_param_group_listen, { "Group Listening Attenuation Constant", "ua3g.command.audio_config.loudspeaker_aco_param.group_listen", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4443 { &hf_ua3g_audio_config_loudspeaker_aco_param_handsfree_attenuation, { "Handsfree Attenuation Constant", "ua3g.command.audio_config.loudspeaker_aco_param.handsfree_attenuation", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4444 { &hf_ua3g_audio_config_loudspeaker_aco_param_handsfree_stay_in_send, { "Handsfree Number Of ms To Stay In Send State Before Going To Another State", "ua3g.command.audio_config.loudspeaker_aco_param.handsfree_stay_in_send", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4445 { &hf_ua3g_audio_config_loudspeaker_aco_param_handsfree_shift_right_mtx, { "Handsfree Number Of Positions To Shift Right MTx", "ua3g.command.audio_config.loudspeaker_aco_param.handsfree_shift_right_mtx", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4446 { &hf_ua3g_audio_config_loudspeaker_aco_param_handsfree_shift_right_mrc, { "Handsfree Number Of Positions To Shift Right MRc", "ua3g.command.audio_config.loudspeaker_aco_param.handsfree_shift_right_mrc", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4447 { &hf_ua3g_audio_config_loudspeaker_aco_param_handsfree_idle_trans_threshold, { "Handsfree Idle Transmission Threshold", "ua3g.command.audio_config.loudspeaker_aco_param.handsfree_idle_trans_threshold", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4448 { &hf_ua3g_audio_config_loudspeaker_aco_param_handsfree_low_trans_threshold, { "Handsfree Low Transmission Threshold", "ua3g.command.audio_config.loudspeaker_aco_param.handsfree_low_trans_threshold", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4449 { &hf_ua3g_audio_config_loudspeaker_aco_param_handsfree_idle_recv_threshold, { "Handsfree Idle Reception Threshold", "ua3g.command.audio_config.loudspeaker_aco_param.handsfree_idle_recv_threshold", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4450 { &hf_ua3g_audio_config_loudspeaker_aco_param_handsfree_low_recv_threshold, { "Handsfree Low Reception Threshold", "ua3g.command.audio_config.loudspeaker_aco_param.handsfree_low_recv_threshold", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4451 { &hf_ua3g_audio_config_loudspeaker_aco_param_handsfree_med_recv_threshold, { "Handsfree Medium Reception Threshold", "ua3g.command.audio_config.loudspeaker_aco_param.handsfree_med_recv_threshold", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4452 { &hf_ua3g_audio_config_loudspeaker_aco_param_handsfree_high_recv_threshold, { "Handsfree High Reception Threshold", "ua3g.command.audio_config.loudspeaker_aco_param.handsfree_high_recv_threshold", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4453 { &hf_ua3g_ua_dwl_protocol_files_inc_boot_binary, { "Boot Binary Included", "ua3g.ua_dwl_protocol.files_inc.boot_binary", FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x01, NULL, HFILL }},
4454 { &hf_ua3g_ua_dwl_protocol_files_inc_loader_binary, { "Loader Binary Included", "ua3g.ua_dwl_protocol.files_inc.loader_binary", FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x02, NULL, HFILL }},
4455 { &hf_ua3g_ua_dwl_protocol_files_inc_appli_binary, { "Appli Binary Included", "ua3g.ua_dwl_protocol.files_inc.appli_binary", FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x04, NULL, HFILL }},
4456 { &hf_ua3g_ua_dwl_protocol_files_inc_data_binary, { "Datas Binary Included", "ua3g.ua_dwl_protocol.files_inc.data_binary", FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x08, NULL, HFILL }},
4457 { &hf_ua3g_ua_dwl_protocol_model_selection_a, { "For A Model", "ua3g.ua_dwl_protocol.model_selection.a", FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x01, NULL, HFILL }},
4458 { &hf_ua3g_ua_dwl_protocol_model_selection_b, { "For B Model", "ua3g.ua_dwl_protocol.model_selection.b", FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x02, NULL, HFILL }},
4459 { &hf_ua3g_ua_dwl_protocol_model_selection_c, { "For C Model", "ua3g.ua_dwl_protocol.model_selection.c", FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x04, NULL, HFILL }},
4460 { &hf_ua3g_ua_dwl_protocol_model_selection_country_ver, { "Country Version", "ua3g.ua_dwl_protocol.model_selection.country_ver", FT_UINT8, BASE_DEC, VALS(str_download_req_mode_selection_country), 0xE0, NULL, HFILL }},
4461 { &hf_ua3g_ua_dwl_protocol_hardware_selection_ivanoe1, { "For Ivanoe 1", "ua3g.ua_dwl_protocol.hardware_selection.ivanoe1", FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x01, NULL, HFILL }},
4462 { &hf_ua3g_ua_dwl_protocol_hardware_selection_ivanoe2, { "For Ivanoe 2", "ua3g.ua_dwl_protocol.hardware_selection.ivanoe2", FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x02, NULL, HFILL }},
4463 { &hf_ua3g_ua_dwl_protocol_memory_sizes_flash, { "Flash Min Size", "ua3g.ua_dwl_protocol.memory_sizes.flash", FT_UINT8, BASE_DEC, VALS(str_mem_size), 0x07, NULL, HFILL }},
4464 { &hf_ua3g_ua_dwl_protocol_memory_sizes_ext_ram, { "External Ram Min Size", "ua3g.ua_dwl_protocol.memory_sizes.ext_ram", FT_UINT8, BASE_DEC, VALS(str_mem_size), 0x38, NULL, HFILL }},
4465 { &hf_ua3g_unsolicited_msg_char_num_vta_subtype, { "VTA SubType", "ua3g.unsolicited_msg.char_num.vta_subtype", FT_UINT8, BASE_DEC, VALS(str_unsolicited_msg_subtype), 0xC0, NULL, HFILL }},
4466 { &hf_ua3g_unsolicited_msg_char_num_generation, { "Generation", "ua3g.unsolicited_msg.char_num.generation", FT_UINT8, BASE_DEC, VALS(str_unsolicited_msg_generation), 0x38, NULL, HFILL }},
4467 { &hf_ua3g_unsolicited_msg_char_num_design, { "Design", "ua3g.unsolicited_msg.char_num.design", FT_UINT8, BASE_DEC, VALS(str_unsolicited_msg_design), 0x07, NULL, HFILL }},
4468 { &hf_ua3g_unsolicited_msg_hardware_config_vta_type, { "VTA Type", "ua3g.unsolicited_msg.hardware_config.vta_type", FT_UINT8, BASE_DEC, VALS(str_unsolicited_msg_hard_vta_type), 0xE0, NULL, HFILL }},
4469 { &hf_ua3g_unsolicited_msg_hardware_config_design, { "Design", "ua3g.unsolicited_msg.hardware_config.design", FT_UINT8, BASE_DEC, VALS(str_unsolicited_msg_hard_design), 0x1C, NULL, HFILL }},
4470 { &hf_ua3g_unsolicited_msg_hardware_config_subtype, { "VTA SubType", "ua3g.unsolicited_msg.hardware_config.subtype", FT_UINT8, BASE_DEC, VALS(str_unsolicited_msg_hard_subtype), 0x03, NULL, HFILL }},
4471 { &hf_ua3g_unsolicited_msg_hardware_config_hard_config_chip, { "Chip Id", "ua3g.unsolicited_msg.hardware_config.hard_config_chip", FT_UINT8, BASE_DEC, VALS(str_unsolicited_msg_hard_config_chip), 0x03, NULL, HFILL }},
4472 { &hf_ua3g_unsolicited_msg_hardware_config_hard_config_flash, { "Flash Size", "ua3g.unsolicited_msg.hardware_config.hard_config_flash", FT_UINT8, BASE_DEC, VALS(str_unsolicited_msg_hard_config_flash), 0x1C, NULL, HFILL }},
4473 { &hf_ua3g_unsolicited_msg_hardware_config_config_ram, { "External RAM Size", "ua3g.unsolicited_msg.hardware_config.config_ram", FT_UINT8, BASE_DEC, VALS(str_unsolicited_msg_hard_config_ram), 0xE0, NULL, HFILL }},
4474 { &hf_ua3g_unsolicited_msg_hardware_config_hard_config_ip, { "Hardware Configuration", "ua3g.unsolicited_msg.hardware_config.ip", FT_UINT8, BASE_DEC, VALS(str_unsolicited_msg_hard_config_ip), 0x01, NULL, HFILL }},
4475 { &hf_ua3g_unsolicited_msg_hook_status, { "Hook Status", "ua3g.unsolicited_msg.hook_status", FT_BOOLEAN, 8, TFS(&tfs_on_off), 0x00, NULL, HFILL }},
4476 { &hf_ua3g_special_key_shift, { "Shift", "ua3g.special_key.shift", FT_BOOLEAN, 8, TFS(&tfs_released_pressed), 0x01, NULL, HFILL }},
4477 { &hf_ua3g_special_key_ctrl, { "Ctrl", "ua3g.special_key.ctrl", FT_BOOLEAN, 8, TFS(&tfs_released_pressed), 0x02, NULL, HFILL }},
4478 { &hf_ua3g_special_key_alt, { "Alt", "ua3g.special_key.alt", FT_BOOLEAN, 8, TFS(&tfs_released_pressed), 0x04, NULL, HFILL }},
4479 { &hf_ua3g_special_key_cmd, { "Cmd", "ua3g.special_key.cmd", FT_BOOLEAN, 8, TFS(&tfs_released_pressed), 0x08, NULL, HFILL }},
4480 { &hf_ua3g_special_key_shift_prime, { "Shift'", "ua3g.special_key.shift_prime", FT_BOOLEAN, 8, TFS(&tfs_released_pressed), 0x10, NULL, HFILL }},
4481 { &hf_ua3g_special_key_ctrl_prime, { "Ctrl'", "ua3g.special_key.ctrl_prime", FT_BOOLEAN, 8, TFS(&tfs_released_pressed), 0x20, NULL, HFILL }},
4482 { &hf_ua3g_special_key_alt_prime, { "Alt'", "ua3g.special_key.alt_prime", FT_BOOLEAN, 8, TFS(&tfs_released_pressed), 0x40, NULL, HFILL }},
4483 { &hf_ua3g_special_key_cmd_prime, { "Cmd'", "ua3g.special_key.cmd_prime", FT_BOOLEAN, 8, TFS(&tfs_released_pressed), 0x80, NULL, HFILL }},
4484 { &hf_ua3g_lcd_line_cmd_lcd_options_call_timer, { "Call Timer", "ua3g.lcd_line_cmd.lcd_options.call_timer", FT_UINT8, BASE_DEC, VALS(str_call_timer_ctrl), 0x03, NULL, HFILL }},
4485 { &hf_ua3g_lcd_line_cmd_lcd_options_blink, { "Blink", "ua3g.lcd_line_cmd.lcd_options.blink", FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x04, NULL, HFILL }},
4486 { &hf_ua3g_lcd_line_cmd_lcd_options_call_timer_control, { "Call Timer Control", "ua3g.lcd_line_cmd.lcd_options.call_timer_control", FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x10, NULL, HFILL }},
4487 { &hf_ua3g_lcd_line_cmd_lcd_options_call_timer_display, { "Call Timer Display", "ua3g.lcd_line_cmd.lcd_options.call_timer_display", FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x20, NULL, HFILL }},
4488 { &hf_ua3g_lcd_line_cmd_lcd_options_time_of_day_display, { "Time Of Day Display", "ua3g.lcd_line_cmd.lcd_options.time_of_day_display", FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x40, NULL, HFILL }},
4489 { &hf_ua3g_lcd_line_cmd_lcd_options_suspend_display_refresh, { "Suspend Display Refresh", "ua3g.lcd_line_cmd.lcd_options.suspend_display_refresh", FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x80, NULL, HFILL }},
4490 { &hf_ua3g_cs_ip_device_routing_cmd02_parameter_value, { "Value", "ua3g.ip.cs.cmd02.parameter.value", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
4491 { &hf_ua3g_cs_ip_device_routing_cmd02_parameter_ip, { "IP", "ua3g.ip.cs.cmd02.parameter.ip", FT_IPv4, BASE_NONE, NULL, 0x0, NULL, HFILL }},
4492 { &hf_ua3g_cs_ip_device_routing_cmd02_parameter_mac_address, { "MAC Address", "ua3g.ip.cs.cmd02.parameter.mac_address", FT_ETHER, BASE_NONE, NULL, 0x0, NULL, HFILL }},
4493 { &hf_ua3g_cs_ip_device_routing_cmd02_parameter_uint, { "Value", "ua3g.ip.cs.cmd02.parameter.uint", FT_UINT64, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4494 { &hf_ua3g_cs_ip_device_routing_cmd02_parameter_default_codec_bytes, { "Default Codec", "ua3g.ip.cs.cmd02.parameter.default_codec.bytes", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
4495 { &hf_ua3g_cs_ip_device_routing_cmd02_parameter_default_codec_uint, { "Default Codec", "ua3g.ip.cs.cmd02.parameter.default_codec.uint", FT_UINT64, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4496 { &hf_ua3g_cs_ip_device_routing_cmd02_parameter_firmware_version, { "Firmware Version", "ua3g.ip.cs.cmd02.parameter.firmware_version", FT_UINT16, BASE_CUSTOM, version_number_computer, 0x0, NULL, HFILL }},
4497 { &hf_ua3g_cs_ip_device_routing_cmd02_parameter_eth_driver_config_port_lan_speed, { "Port Lan Speed", "ua3g.ip.cs.cmd02.parameter.eth_driver_config.port_lan_speed", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4498 { &hf_ua3g_cs_ip_device_routing_cmd02_parameter_eth_driver_config_port_lan_duplex, { "Port Lan Duplex", "ua3g.ip.cs.cmd02.parameter.eth_driver_config.port_lan_duplex", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4499 { &hf_ua3g_cs_ip_device_routing_cmd02_parameter_eth_driver_config_port_pc_speed, { "Port PC Speed", "ua3g.ip.cs.cmd02.parameter.eth_driver_config.port_pc_speed", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4500 { &hf_ua3g_cs_ip_device_routing_cmd02_parameter_eth_driver_config_port_pc_duplex, { "Port PC Duplex", "ua3g.ip.cs.cmd02.parameter.eth_driver_config.port_pc_duplex", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4501 { &hf_ua3g_cs_ip_device_routing_cmd03_parameter_ip, { "IP", "ua3g.ip.cs.cmd03.parameter.ip", FT_IPv4, BASE_NONE, NULL, 0x0, NULL, HFILL }},
4502 { &hf_ua3g_cs_ip_device_routing_cmd03_parameter_string, { "IP", "ua3g.ip.cs.cmd03.parameter.string", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
4503 { &hf_ua3g_cs_ip_device_routing_cmd03_parameter_type_of_equip1, { "Type Of Equipment (first byte)", "ua3g.ip.cs.cmd03.parameter.type_of_equip1", FT_UINT8, BASE_DEC, VALS(cs_ip_device_routing_cmd03_first_byte_vals), 0x0, NULL, HFILL }},
4504 { &hf_ua3g_cs_ip_device_routing_cmd03_parameter_type_of_equip2, { "Type Of Equipment (second byte)", "ua3g.ip.cs.cmd03.parameter.type_of_equip2", FT_UINT16, BASE_DEC, VALS(cs_ip_device_routing_cmd03_second_byte_vals), 0x0, NULL, HFILL }},
4505 { &hf_ua3g_cs_ip_device_routing_cmd03_parameter_default_codec, { "Default Codec", "ua3g.ip.cs.cmd03.parameter.default_codec", FT_UINT64, BASE_DEC|BASE_VAL64_STRING, VALS(str_cs_ip_device_routing_0F_compressor), 0x0, NULL, HFILL }},
4506 { &hf_ua3g_cs_ip_device_routing_cmd03_parameter_vad, { "VAD", "ua3g.ip.cs.cmd03.parameter.vad", FT_BOOLEAN, 8, TFS(&tfs_on_off), 0x0, NULL, HFILL }},
4507 { &hf_ua3g_cs_ip_device_routing_cmd03_parameter_ece, { "ECE", "ua3g.ip.cs.cmd03.parameter.ece", FT_BOOLEAN, 8, TFS(&tfs_on_off), 0x0, NULL, HFILL }},
4508 { &hf_ua3g_cs_ip_device_routing_cmd03_parameter_voice_mode, { "Voice Mode", "ua3g.ip.cs.cmd03.parameter.voice_mode", FT_UINT64, BASE_DEC|BASE_VAL64_STRING, VALS(cs_ip_device_routing_cmd03_voice_mode_vals), 0x0, NULL, HFILL }},
4509 { &hf_ua3g_cs_ip_device_routing_cmd03_parameter_delay_distribution, { "Delay Distribution", "ua3g.ip.cs.cmd03.parameter.delay_distribution", FT_UINT16, BASE_DEC, VALS(cs_ip_device_routing_delay_distribution_range_vals), 0x0, NULL, HFILL }},
4510 { &hf_ua3g_cs_ip_device_routing_cmd03_parameter_consecutive_bfi, { "Consecutive BFI", "ua3g.ip.cs.cmd03.parameter.consecutive_bfi", FT_UINT16, BASE_DEC, VALS(cs_ip_device_routing_consecutive_bfi_range_vals), 0x0, NULL, HFILL }},
4511 { &hf_ua3g_cs_ip_device_routing_cmd03_parameter_bfi_distribution, { "BFI Distribution", "ua3g.ip.cs.cmd03.parameter.bfi_distribution", FT_UINT16, BASE_DEC, VALS(cs_ip_device_routing_bfi_distribution_range_vals), 0x0, NULL, HFILL }},
4512 { &hf_ua3g_cs_ip_device_routing_cmd03_parameter_8021Q_used, { "802.1 Q Used", "ua3g.ip.cs.cmd03.parameter.8021Q_used", FT_BOOLEAN, 8, TFS(&tfs_true_false), 0x0, NULL, HFILL }},
4513 { &hf_ua3g_cs_ip_device_routing_cmd03_parameter_8021P_priority, { "802.1p Priority", "ua3g.ip.cs.cmd03.parameter.8021P_priority", FT_UINT8, BASE_DEC, NULL, 0x07, NULL, HFILL }},
4514 { &hf_ua3g_cs_ip_device_routing_cmd03_parameter_vlan_id, { "VLAN Id", "ua3g.ip.cs.cmd03.parameter.vlan_id", FT_UINT16, BASE_DEC, NULL, 0x0FFF, NULL, HFILL }},
4515 { &hf_ua3g_cs_ip_device_routing_cmd03_parameter_diffserv, { "DiffServ", "ua3g.ip.cs.cmd03.parameter.diffserv", FT_UINT8, BASE_DEC, NULL, 0xFC, NULL, HFILL }},
4516 { &hf_ua3g_cs_ip_device_routing_cmd03_parameter_bfi_distribution_200ms, { "200 ms BFI Distribution", "ua3g.ip.cs.cmd03.parameter.bfi_distribution_200ms", FT_UINT16, BASE_DEC, VALS(cs_ip_device_routing_200ms_bfi_distribution_range_vals), 0x0, NULL, HFILL }},
4517 { &hf_ua3g_cs_ip_device_routing_cmd03_parameter_uint, { "Value", "ua3g.ip.cs.cmd03.parameter.uint", FT_UINT64, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4518 { &hf_ua3g_cs_ip_device_routing_cmd03_parameter_consecutive_rtp_lost, { "Consecutive RTP Lost", "ua3g.ip.cs.cmd03.parameter.consecutive_rtp_lost", FT_UINT16, BASE_DEC, VALS(cs_ip_device_routing_consecutive_rtp_lost_range_vals), 0x0, NULL, HFILL }},
4519 { &hf_ua3g_cs_ip_device_routing_cmd03_parameter_jitter_depth_distribution, { "Jitter Depth Distribution", "ua3g.ip.cs.cmd03.parameter.jitter_depth_distribution", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
4522 static gint *ett[] =
4524 &ett_ua3g,
4525 &ett_ua3g_body,
4526 &ett_ua3g_param,
4527 &ett_ua3g_param_sub,
4528 &ett_ua3g_option,
4531 /* UA3G dissector registration */
4532 proto_ua3g = proto_register_protocol("UA3G Message", "UA3G", "ua3g");
4534 proto_register_field_array(proto_ua3g, hf, array_length(hf));
4536 new_register_dissector("ua3g", dissect_ua3g, proto_ua3g);
4538 /* Common subtree array registration */
4539 proto_register_subtree_array(ett, array_length(ett));
4542 void proto_reg_handoff_ua3g(void)
4544 #if 0 /* Future */
4545 dissector_handle_t handle_ua3g = find_dissector("ua3g");
4547 /* hooking of UA3G on UA */
4549 dissector_add_uint("ua.opcode", 0x15, handle_ua3g);
4550 #endif