epan/dissectors/pidl/ C99 drsuapi
[wireshark-sm.git] / epan / dissectors / packet-dpnss.c
blob3c3f96288325499fc06f6ea0b284c9741397c413
1 /* packet-dpnss.c
2 * Routines for DPNSS/DASS2 dissection
3 * Copyright 2007, Anders Broman <anders.broman[at]ericsson.com>
5 * Supplementary string parameter table and testing by Tomas Muehlhoff.
7 * Wireshark - Network traffic analyzer
8 * By Gerald Combs <gerald@wireshark.org>
9 * Copyright 1998 Gerald Combs
11 * SPDX-License-Identifier: GPL-2.0-or-later
13 * References:
14 * ND1301:2001/03 http://www.nicc.org.uk/nicc-public/Public/interconnectstandards/dpnss/nd1301_2004_11.pdf
15 * http://acacia-net.com/wwwcla/protocol/dass2_l3.htm
18 #include "config.h"
20 #include <epan/packet.h>
21 #include <epan/expert.h>
22 #include <epan/tfs.h>
24 #include <wsutil/strtoi.h>
26 void proto_register_dpnss(void);
28 /* Initialize the protocol and registered fields */
29 static int proto_dpnss;
30 static int hf_dpnss_msg_grp_id;
31 static int hf_dpnss_cc_msg_type;
32 static int hf_dpnss_e2e_msg_type;
33 static int hf_dpnss_LbL_msg_type;
34 static int hf_dpnss_ext_bit;
35 static int hf_dpnss_ext_bit_notall;
36 static int hf_dpnss_sic_type;
37 static int hf_dpnss_sic_details_for_speech;
38 static int hf_dpnss_sic_details_for_data1;
39 static int hf_dpnss_sic_details_for_data2;
40 static int hf_dpnss_dest_addr;
41 static int hf_dpnss_sic_oct2_data_type;
42 static int hf_dpnss_sic_oct2_duplex;
43 static int hf_dpnss_sic_oct2_sync_data_format;
44 static int hf_dpnss_sic_oct2_sync_byte_timing;
45 static int hf_dpnss_sic_oct2_net_ind_clk;
46 static int hf_dpnss_sic_oct2_async_data;
47 static int hf_dpnss_sic_oct2_async_flow_ctrl;
48 static int hf_dpnss_clearing_cause;
49 static int hf_dpnss_rejection_cause;
50 static int hf_dpnss_man_code;
51 static int hf_dpnss_subcode;
52 static int hf_dpnss_maintenance_action;
53 /* Generated from convert_proto_tree_add_text.pl */
54 static int hf_dpnss_indication_field;
55 static int hf_dpnss_user_information;
56 static int hf_dpnss_selection_field;
57 static int hf_dpnss_sup_str;
58 static int hf_dpnss_parameter;
60 /* parameters */
61 static int hf_dpnss_a_b_party_addr;
62 static int hf_dpnss_call_idx;
64 #define DPNNS_MESSAGE_GROUP_CC 0
65 #define DPNNS_MESSAGE_GROUP_E2E 2
66 #define DPNNS_MESSAGE_GROUP_LbL 4
68 #define DPNSS_CC_MSG_ISRM_C 0
69 #define DPNSS_CC_MSG_ISRM_I 1
70 #define DPNSS_CC_MSG_RM_C 2
71 #define DPNSS_CC_MSG_RM_I 3
72 #define DPNSS_CC_MSG_CS 4
73 #define DPNSS_CC_MSG_CCM 5
74 #define DPNSS_CC_MSG_NIM 6
75 #define DPNSS_CC_MSG_CA 7
76 #define DPNSS_CC_MSG_CRM 8
77 #define DPNSS_CC_MSG_NAM 9
78 #define DPNSS_CC_MSG_RRM 10
79 #define DPNSS_CC_MSG_SSRM_I 11
80 #define DPNSS_CC_MSG_SSRM_C 12
82 /* Initialize the subtree pointers */
83 static int ett_dpnss;
84 static int ett_dpnss_sel_field;
85 static int ett_dpnss_sic_field;
86 static int ett_dpnss_ind_field;
87 static int ett_dpnss_sup_str;
89 static expert_field ei_dpnss_not_supported_yet;
90 static expert_field ei_dpnss_msg_grp_id;
93 static const value_string dpnss_msg_grp_id_vals[] = {
94 {0, "Call Control Message Group"},
95 {2, "End-to-End Message Group"},
96 {4, "Link-by-Link Message Group"},
97 {0, NULL }
100 static const value_string dpnss_cc_msg_type_vals[] = {
101 {DPNSS_CC_MSG_ISRM_C, "INITIAL SERVICE REQUEST Message (COMPLETE) - ISRM(C)"},
102 {DPNSS_CC_MSG_ISRM_I, "INITIAL SERVICE REQUEST Message (INCOMPLETE) - ISRM(I)"},
103 {DPNSS_CC_MSG_RM_C, "RECALL Message (COMPLETE) - RM(C)"},
104 {DPNSS_CC_MSG_RM_I, "RECALL Message (INCOMPLETE) - RM(I)"},
105 {DPNSS_CC_MSG_CS, "CHANNEL SEIZED - CS"},
106 {DPNSS_CC_MSG_CCM, "CALL CONNECTED Message - CCM"},
107 {DPNSS_CC_MSG_NIM, "NETWORK INDICATION Message - NIM"},
108 {DPNSS_CC_MSG_CA, "CALL ARRIVAL Message - CA"},
109 {DPNSS_CC_MSG_CRM, "CLEAR REQUEST Message - CRM/CLEAR INDICATION Message - CIM"}, /* Humm chek 2.1.7/2.1.8 - depends on dir? */
110 {DPNSS_CC_MSG_NAM, "NUMBER ACKNOWLEDGE Message - NAM"},
111 {DPNSS_CC_MSG_RRM, "RECALL REJECTION Message - RRM"},
112 {DPNSS_CC_MSG_SSRM_I, "SUBSEQUENT SERVICE REQUEST Message (INCOMPLETE) - SSRM(I)"},
113 {DPNSS_CC_MSG_SSRM_C, "SUBSEQUENT SERVICE REQUEST Message (COMPLETE) - SSRM(C)"},
114 { 0, NULL }
118 static const value_string dpnss_cc_msg_short_type_vals[] = {
119 {DPNSS_CC_MSG_ISRM_C, "ISRM(C)"},
120 {DPNSS_CC_MSG_ISRM_I, "ISRM(I)"},
121 {DPNSS_CC_MSG_RM_C, "RM(C)"},
122 {DPNSS_CC_MSG_RM_I, "RM(I)"},
123 {DPNSS_CC_MSG_CS, "CS"},
124 {DPNSS_CC_MSG_CCM, "CCM"},
125 {DPNSS_CC_MSG_CA, "CA"},
126 {DPNSS_CC_MSG_NIM, "NIM"},
127 {DPNSS_CC_MSG_CRM, "CRM/CIM"}, /* Humm chek 2.1.7/2.1.8 - depends on dir? */
128 {DPNSS_CC_MSG_NAM, "NAM"},
129 {DPNSS_CC_MSG_RRM, "RRM"},
130 {DPNSS_CC_MSG_SSRM_I, "SSRM(I)"},
131 {DPNSS_CC_MSG_SSRM_C, "SSRM(C)"},
132 {0, NULL }
135 #define DPNSS_E2E_MSG_EEM_C 2
136 #define DPNSS_E2E_MSG_EEM_I 3
137 #define DPNSS_E2E_MSG_SCRM 4
138 #define DPNSS_E2E_MSG_SCIM 5
139 #define DPNSS_E2E_MSG_ERM_C 6
140 #define DPNSS_E2E_MSG_ERM_I 7
141 #define DPNSS_E2E_MSG_NSIM 8
144 /* 2.2 END-TO-END MESSAGE GROUP */
145 static const value_string dpnss_e2e_msg_type_vals[] = {
146 {2, "END-to-END Message (COMPLETE) - EEM(C)"},
147 {3, "END-to-END Message (INCOMPLETE) - EEM(I)"},
148 {4, "SINGLE-CHANNEL CLEAR REQUEST Message - SCRM"},
149 {5, "SINGLE-CHANNEL CLEAR INDICATION Message - SCIM"},
150 {6, "END-to-END RECALL Message (COMPLETE) - ERM(C)"},
151 {7, "END-to-END RECALL Message (INCOMPLETE) - ERM(I)"},
152 {8, "NON SPECIFIED INFORMATION Message - NSIM"},
153 { 0, NULL }
156 static const value_string dpnss_e2e_msg_short_type_vals[] = {
157 {2, "EEM(C)"},
158 {3, "EEM(I)"},
159 {4, "SCRM"},
160 {5, "SCIM"},
161 {6, "ERM(C)"},
162 {7, "ERM(I)"},
163 {8, "NSIM"},
164 { 0, NULL }
167 #define DPNSS_LbL_MSG_LLM_C 0
168 #define DPNSS_LbL_MSG_LLM_I 1
169 #define DPNSS_LbL_MSG_LLRM 2
170 #define DPNSS_LbL_MSG_SM 4
171 #define DPNSS_LbL_MSG_LMM 5
172 #define DPNSS_LbL_MSG_LMRM 6
174 /* 2.3 LINK-BY-LINK MESSAGE GROUP */
175 static const value_string dpnss_LbL_msg_type_vals[] = {
176 {0, "LINK-by-LINK Message (COMPLETE) - LLM(C)"},
177 {1, "LINK-by-LINK Message (INCOMPLETE) - LLM(I)"},
178 {2, "LINK-by-LINK REJECT Message - LLRM"},
179 {4, "SWAP Message - SM"},
180 {5, "LINK MAINTENANCE Message - LMM"},
181 {6, "LINK MAINTENANCE REJECT Message - LMRM"},
182 { 0, NULL }
185 static const value_string dpnss_LbL_msg_short_type_vals[] = {
186 {0, "LLM(C)"},
187 {1, "LLM(I)"},
188 {2, "LLRM"},
189 {4, "SM"},
190 {5, "LMM"},
191 {6, "LMRM"},
192 { 0, NULL }
195 static const true_false_string dpnss_ext_bit_vals = {
196 "further octet(s) follow",
197 "no further octets"
200 static const true_false_string dpnss_ext_bit_no_ext_vals = {
201 "no further octets",
202 "Invalid"
204 /* SECTION 4 ANNEX 1 */
205 static const value_string dpnss_sic_type_type_vals[] = {
206 {0, "invalid"},
207 {1, "speech"},
208 {2, "data"},
209 {3, "data"},
210 {4, "interworking with DASS 2 - treat as data"},
211 {5, "interworking with DASS 2 - treat as data"},
212 {6, "interworking with DASS 2 - treat as data"},
213 {7, "interworking with DASS 2 - treat as data"},
214 { 0, NULL }
217 static const value_string dpnss_sic_details_for_speech_vals[] = {
218 {0, "64 kbit/s PCM G.711 A-Law or analogue"},
219 {1, "32 kbit/s ADPCM G.721"},
220 {2, "64 kbit/s PCM G.711 u-Law or analogue"},
221 {3, "Invalid"},
222 {4, "Invalid"},
223 {5, "Invalid"},
224 {6, "Invalid"},
225 {7, "Invalid"},
226 {8, "Invalid"},
227 {9, "Invalid"},
228 {10, "Invalid"},
229 {11, "Invalid"},
230 {12, "Invalid"},
231 {13, "Invalid"},
232 {14, "Invalid"},
233 {15, "Invalid"},
234 { 0, NULL }
237 static const value_string dpnss_sic_details_for_data_rates1_vals[] = {
238 {0, "64000 bit/s"},
239 {1, "56000 bit/s"},
240 {2, "48000 bit/s"},
241 {3, "32000 bit/s"},
242 {4, "19200 bit/s"},
243 {5, "16000 bit/s"},
244 {6, "14400 bit/s"},
245 {7, "12000 bit/s"},
246 {8, "9600 bit/s"},
247 {9, "8000 bit/s"},
248 {10, "7200 bit/s"},
249 {11, "4800 bit/s"},
250 {12, "3600 bit/s"},
251 {13, "2400 bit/s"},
252 {14, "1200 bit/s"},
253 {15, "600 bit/s"},
254 { 0, NULL }
257 static const value_string dpnss_sic_details_for_data_rates2_vals[] = {
258 {0, "300 bit/s"},
259 {1, "200 bit/s"},
260 {2, "150 bit/s"},
261 {3, "134.5 bit/s"},
262 {4, "110 bit/s"},
263 {5, "100 bit/s"},
264 {6, "75 bit/s"},
265 {7, "50 bit/s"},
266 {8, "75/1200 bit/s"},
267 {9, "1200/75 bit/s"},
268 {10, "invalid"},
269 {11, "invalid"},
270 {12, "invalid"},
271 {13, "invalid"},
272 {14, "invalid"},
273 {15, "invalid"},
274 { 0, NULL }
276 /* Octet 2 */
278 static const value_string dpnss_sic_oct2_data_type_vals[] = {
279 {0, "Invalid"},
280 {1, "Invalid"},
281 {2, "Invalid"},
282 {3, "Synchronous"},
283 {4, "Synchronous"},
284 {5, "Asynchronous"},
285 {6, "Asynchronous"},
286 {7, "Asynchronous"},
287 { 0, NULL }
290 static const true_false_string dpnss_duplex_vals = {
291 "Half Duplex (HDX)",
292 "Full Duplex (FDX)"
295 static const true_false_string dpnss_sic_oct2_sync_data_format_vals = {
296 "X.25 Packet Mode",
297 "Anonymous or Unformatted"
300 static const true_false_string dpnss_sic_oct2_net_ind_clk_vals = {
301 "Bits E4/E5/E6 indicate phase",
302 "Clock Locked to Transmission"
305 static const true_false_string dpnss_provided_vals = {
306 "Provided",
307 "Not Provided"
310 static const value_string dpnss_sic_oct2_async_data_type_vals[] = {
311 {0, "Unspecified"},
312 {1, "5 data bits"},
313 {2, "7 data bits"},
314 {3, "8 data bits"},
315 { 0, NULL }
317 static const true_false_string dpnss_flow_control_vals = {
318 "TA has ESRA capability",
319 "TA does not have ESRA capability"
322 /* SECTION 4 Global Issue 7
323 * ANNEX 3 CLEARING/REJECTION CAUSE CODES
325 static const value_string dpnss_clearing_cause_code_vals[] = {
326 {0x29, "Access Barred"},
327 {0x14, "Acknowledgement"},
328 {0x01, "Address Incomplete"},
329 {0x08, "Busy"},
330 {0x23, "Channel Out of Service"},
331 {0x2d, "DTE Controlled Not Ready"},
332 {0x07, "Congestion"},
333 {0x30, "Call Termination"},
334 {0x18, "Facility Not Registered"},
335 {0x0a, "Incoming Calls Barred"},
336 {0x13, "Service Incompatible"},
337 {0x1a, "Message Not Understood"},
338 {0x1e, "Network Address Extension-Error"},
339 {0x02, "Network Termination"},
340 {0x00, "Number Unobtainable"},
341 {0x24, "Priority Forced Release"},
342 {0x19, "Reject"},
343 {0x1c, "Route Out of Service"},
344 {0x04, "Subscriber Incompatible"},
345 {0x15, "Signal Not Understood"},
346 {0x16, "Signal Not Valid"},
347 {0x09, "Subscriber Out of Service"},
348 {0x1b, "Signalling System Incompatible"},
349 {0x17, "Service Temporarily Unavailable"},
350 {0x03, "Service Unavailable"},
351 {0x1d, "Transferred"},
352 {0x2e, "DTE Uncontrolled Not Ready"},
353 { 0, NULL }
355 /* ANNEX 6 : MAINTENANCE ACTIONS (p235) */
356 static const value_string dpnss_maintenance_actions_vals[] = {
357 {0x1, "BBC - Back-Busy Control"},
358 {0x2, "LBC - Loop-Back Control"},
359 {0x3, "LBA - Loop-Back Abort"},
360 {0x4, "TCS-R - Traffic Channel Status Request"},
361 {0x5, "ACK - Acknowledge"},
362 {0x6, "NTC - Non-Looped-Back Test Control"},
363 { 0, NULL }
366 /* ANNEX 7 : CODING OF USAGE IDENTIFIERS */
367 static const value_string dpnss_man_code_vals[] = {
368 {0x0, "Reserved"},
369 {0x1, "BT"},
370 {0x2, "Ericsson"},
371 {0x3, "Lucent"},
372 {0x4, "Philips"},
373 {0x5, "Siemens"},
374 {0x6, "Westell"},
375 {0x7, "Mitel"},
376 { 0, NULL }
381 #define DPNSS_NONE 0
382 #define DPNSS_SERV_MAR 1
383 #define DPNSS_STATUS 2
384 #define DPNSS_ROUTE_RES_CLASS 3
385 #define DPNSS_CBR_GRP 4
386 #define DPNSS_FAC_LST_CODE 5
387 #define DPNSS_NO_OF_FUR_TRANS 6
388 #define DPNSS_NO_OF_FUR_ALT_R 7
389 #define DPNSS_INT_CAP_LEV 8
390 #define DPNSS_NESTING_LEVEL 9
391 #define DPNSS_C_PARTY_ADDR 10
392 #define DPNSS_B_PARTY_ADDR 11
393 #define DPNSS_SIC 12
394 #define DPNSS_A_B_PARTY_ADDR 13
395 #define DPNSS_DIVERSION_TYPE 14
396 #define DPNSS_NSI_IDENTIFIER 15
397 #define DPNSS_USER_DEFINED 16
398 #define DPNSS_TEXT 17
399 #define DPNSS_CALL_INDEX 18
400 #define DPNSS_PASSWORD 19
401 #define DPNSS_CALL_DIR 20
402 #define DPNSS_DPNSS_ISDN_TYPE 21
403 #define DPNSS_HC_CLC 22
404 #define DPNSS_ENHANCED_STR_ID 23
405 #define DPNSS_STRING_ID 24
406 #define DPNSS_STRING_ID_LIST 25
407 #define DPNSS_TEXT_TYPE 26
408 #define DPNSS_CHANNEL_STATUS 27
409 #define DPNSS_CHANNEL_NUMBER 28
410 #define DPNSS_BPL 29
411 #define DPNSS_BCL 30
412 #define DPNSS_DEVICE_INDEX 31
413 #define DPNSS_CR_NO 32
414 #define DPNSS_CALL_ID_LENGTH 33
415 #define DPNSS_STATE_OF_DEST 34
416 #define DPNSS_STATE_OF_DEST_QUAL 35
417 #define DPNSS_REASON_FOR_REDIR 36
418 #define DPNSS_CLEARING_CAUSE 37
419 #define DPNSS_RECONT_ADDR 38
420 #define DPNSS_STATE_OF_OPERATOR 39
421 #define DPNSS_NIGHT_SERVICE 40
422 #define DPNSS_PBX_FLAG 41
423 #define DPNSS_NUMBER_OF_CALLS 42
424 #define DPNSS_NUMBER_OF_SERVERS 43
425 #define DPNSS_PRIORITY_LEVEL 44
426 #define DPNSS_LOCATION 45
427 #define DPNSS_SUBADDRESS 46
428 #define DPNSS_ALARM_LEVEL 47
429 #define DPNSS_STAFF_PRESENT 48
430 #define DPNSS_TIME_AND_DATE 49
431 #define DPNSS_SERVICES 50
432 #define DPNSS_PBX_REFERENCE 51
433 #define DPNSS_TRUNK_GROUP_REF_NUMBER 52
434 #define DPNSS_TRUNK_MEMBER_REF_NUMBER 53
435 #define DPNSS_CONF_PARTY_INDEX 54
436 #define DPNSS_CONF_PARTY_DET 55
437 #define DPNSS_ACCOUNT_CODE 56
438 #define DPNSS_CONF_BRIDGE_ADDR 57
439 #define DPNSS_COST_QUALIFIER 58
440 #define DPNSS_CURRENCY_INDICATION 59
441 #define DPNSS_CURRENCY_UNITS 60
442 #define DPNSS_TIME_INTERVAL 61
443 #define DPNSS_UNITS 62
444 #define DPNSS_REMOTE_ADDRESS 63
445 #define DPNSS_TEST_INDEX 64
446 #define DPNSS_TEST_RESULT 65
447 #define DPNSS_TYPE_OF_ASSISTANCE 66
448 #define DPNSS_REST_DOMAIN 67
449 #define DPNSS_GRP_PICK_UP_CODE 68
450 #define DPNSS_PICK_UP_CALL_TYPE 69
451 #define DPNSS_MALICIOUS_CALL_REF 70
452 #define DPNSS_TIMER_VALUE 71
453 #define DPNSS_BEARER_CAP 72
454 #define DPNSS_ISDN_NUM_ATTR 73
455 #define DPNSS_ISDN_DPNSS_SUBADDRESS 74
456 #define DPNSS_ISDN_NUMBER_DIGITS 75
457 #define DPNSS_HIGH_LAYER_COMP 76
458 #define DPNSS_LOW_LAYER_COMP 77
459 #define DPNSS_PROGRESS_INDICATOR 78
460 #define DPNSS_VPN_ACCESS_REF_NUM 79
461 #define DPNSS_INDEX_NUMBER 80
462 #define DPNSS_RESTRICTION_INDICATOR 81
463 #define DPNSS_CAUSE 82
466 typedef struct {
467 int id_code_no;
468 const char *compact_name;
469 const char *name;
470 int par1_num;
471 int par2_num;
472 int par3_num;
473 int par4_num;
474 } dpnns_sup_serv_set_t;
476 static const dpnns_sup_serv_set_t dpnns_sup_serv_set[] = {
477 {0, "NOT USED", "NOT USED", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
478 {1, "CLC-ORD", "CALLING/CALLED LINE CATEGORY ORDINARY", DPNSS_SERV_MAR, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
479 {2, "CLC-DEC", "CALLING/CALLED LINE CATEGORY DECADIC", DPNSS_STATUS, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
480 {3, "CLC-ISDN", "CALLING/CALLED LINE CATEGORY-PUBLIC ISDN", DPNSS_STATUS, DPNSS_DPNSS_ISDN_TYPE, DPNSS_NONE, DPNSS_NONE },
481 {4, "CLC-PSTN", "CALLING/CALLED LINE CATEGORY-PSTN", DPNSS_STATUS, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
482 {5, "CLC-MF5", "CALLING/CALLED LINE CATEGORY-SSMF5", DPNSS_STATUS, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
483 {6, "CLC-OP", "CALLING/CALLED LINE CATEGORY-OPERATOR", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
484 {7, "CLC-NET", "CALLING/CALLED LINE CATEGORY-NETWORK", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
485 {8, "undefined", "undefined", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
486 {9, "undefined", "undefined", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
487 {10, "CBWF-R", "CALL BACK WHEN FREE-REQUEST", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
488 {11, "CBWF-FN", "CALL BACK WHEN FREE-FREE NOTIFICATION", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
489 {12, "CBWF-CSUI", "CALL BACK WHEN FREE-CALL SET-UP(IMMEDIATE)", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
490 {13, "CBWF-C", "CALL BACK WHEN FREE-CANCEL", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
491 {14, "RO", "RING OUT", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
492 {15, "CBC", "CALL BACK COMPLETE", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
493 {16, "CBWF-CSUD", "CALL BACK WHEN FREE -CALL SET-UP(DELAYED)", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
494 {17, "CBWNU-R", "CALL BACK WHEN NEXT USEDREQUEST", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
495 {18, "COS", "CLASS OF SERVICE", DPNSS_ROUTE_RES_CLASS, DPNSS_CBR_GRP, DPNSS_FAC_LST_CODE, DPNSS_NONE},
496 {19, "LA", "LOOP AVOIDANCE", DPNSS_NO_OF_FUR_TRANS, DPNSS_NO_OF_FUR_ALT_R, DPNSS_NONE, DPNSS_NONE },
497 {20, "EI-PVR", "EXECUTIVE INTRUSION-PRIOR VALIDATION", DPNSS_INT_CAP_LEV, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
498 {21, "EI-R", "EXECUTIVE INTRUSION-REQUEST", DPNSS_INT_CAP_LEV, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
499 {22, "IPL-R", "INTRUSION PROTECTION LEVEL-REQUEST", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
500 {23, "IPL", "INTRUSION PROTECTION LEVEL", DPNSS_INT_CAP_LEV, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
501 {24, "EI-C", "EXECUTIVE INTRUSION-CONVERT", DPNSS_INT_CAP_LEV, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
502 {25, "EI-I", "EXECUTIVE INTRUSION-INTRUDED", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
503 {26, "CW", "CALL WAITING", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
504 {27, "CO", "CALL OFFER", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
505 {28, "SN-REQ", "SEND NEXT-REQUEST", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
506 {29, "HGF", "HUNT GROUP FORWARDED", DPNSS_NESTING_LEVEL, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
507 {30, "DIV-V", "DIVERSION-VALIDATION", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
508 {31, "DIV-FM", "DIVERSION-FOLLOW ME", DPNSS_C_PARTY_ADDR, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
509 {32, "DIV-BY", "DIVERSION-BY PASS", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
510 {33, "DIV-CI", "DIVERSION CANCEL-IMMEDIATE", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
511 {34, "DIV-CR", "DIVERSION CANCEL-ON NO REPLY", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
512 {35, "DIV-CB", "DIVERSION CANCEL-ON BUSY", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
513 {36, "DIV-CA", "DIVERSION CANCEL-ALL", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
514 {37, "DVG-I", "DIVERTING IMMEDIATE", DPNSS_B_PARTY_ADDR, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
515 {38, "DVG-B", "DIVERTING ON BUSY", DPNSS_B_PARTY_ADDR, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
516 {39, "DVG-R", "DIVERTING ON NO REPLY", DPNSS_B_PARTY_ADDR, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
517 {40, "DVT-I", "DIVERT IMMEDIATE", DPNSS_C_PARTY_ADDR, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
518 {41, "DVT-B", "DIVERT ON BUSY", DPNSS_C_PARTY_ADDR, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
519 {42, "DVD-I", "DIVERTED IMMEDIATE", DPNSS_C_PARTY_ADDR, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
520 {43, "DVD-B", "DIVERTED ON BUSY", DPNSS_C_PARTY_ADDR, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
521 {44, "DVD-R", "DIVERTED ON NO REPLY", DPNSS_C_PARTY_ADDR, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
522 {45, "DVT-R", "DIVERT ON NO REPLY", DPNSS_C_PARTY_ADDR, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
523 {46, "SIC", "SERVICE INDICATOR CODE", DPNSS_SIC, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
524 {47, "BSS-M", "BEARER SERVICE SELECTION-MANDATORY", DPNSS_SIC, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
525 {48, "BSS-P", "BEARER SERVICE SELECTION-PREFERRED", DPNSS_SIC, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
526 {49, "BSS-N", "BEARER SERVICE SELECTION-NOTIFICATION", DPNSS_SIC, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
527 {50, "OLI/CLI", "ORIGINATING LINE IDENTITY/CALLED LINE IDENTITY", DPNSS_A_B_PARTY_ADDR, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
528 {51, "RTI", "ROUTING INFORMATION, ROUTING INFORMATION", DPNSS_DPNSS_ISDN_TYPE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
529 {52, "undefined", "undefined", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
530 {53, "DVD-E", "DIVERTED-EXTERNALLY", DPNSS_DIVERSION_TYPE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
531 {54, "REJ", "REJECT", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
532 {55, "ACK", "ACKNOWLEDGE", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
533 {56, "SN", "SEND NEXT", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
534 {57, "D-SIC", "DASS 2-SERVICE INDICATOR CODE", DPNSS_SIC, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
535 {58, "NSI", "NON-SPECIFIED INFORMATION", DPNSS_NSI_IDENTIFIER, DPNSS_USER_DEFINED, DPNSS_USER_DEFINED, DPNSS_NONE },
536 {59, "OCP", "ORIGINALLY CALLED PARTY", DPNSS_B_PARTY_ADDR, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
537 {60, "HOLD-REQ", "HOLD REQUEST", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
538 {61, "RECON", "RECONNECTED", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
539 {62, "HDG", "HOLDING", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
540 {63, "CD-Q", "CALL DISTRIBUTION-QUEUE", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
541 {64, "TEXT-M", "TEXT MESSAGE", DPNSS_TEXT, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
542 {65, "SOD-B", "STATE OF DESTINATION-BUSY", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
543 {66, "SOD-F", "STATE OF DESTINATION-FREE", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
544 {67, "CD-DNQ", "CALL DISTRIBUTION-DO NOT QUEUE", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
545 {68, "undefined", "undefined", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
546 {69, "CD-LINK", "CALL DISTRIBUTION-LINKED", DPNSS_CALL_INDEX, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
547 {70, "DIV-RSI", "DIVERSION-REMOTE SET IMMEDIATE", DPNSS_C_PARTY_ADDR, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
548 {71, "DIV-RSB", "DIVERSION-REMOTE SET ON BUSY", DPNSS_C_PARTY_ADDR, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
549 {72, "DIV-RSR", "DIVERSION-REMOTE SET ON NO REPLY", DPNSS_C_PARTY_ADDR, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
550 {73, "DIV-RCI", "DIVERSION-REMOTE CANCEL IMMEDIATE", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
551 {74, "DIV-RCB", "DIVERSION-REMOTE CANCEL ON BUSY", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
552 {75, "DIV-RCR", "DIVERSION-REMOTE CANCEL ON NO REPLY", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
553 {76, "DIV-RCA", "DIVERSION-REMOTE CANCEL ALL", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
554 {77, "PASSW", "PASSWORD", DPNSS_PASSWORD, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
555 {78, "SPL", "SPLIT", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
556 {79, "TWP", "TWO PARTY", DPNSS_CALL_DIR, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
557 {80, "ENQ", "ENQUIRY CALL", DPNSS_HC_CLC, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
558 {81, "SCE", "SINGLE CHANNEL ENQUIRY", DPNSS_HC_CLC, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
559 {82, "TRFD", "TRANSFERRED", DPNSS_CALL_DIR, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
560 {83, "SHTL", "SHUTTLE", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
561 {84, "COC", "CONNECTED CALL", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
562 {85, "TRFR", "TRANSFER", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
563 {86, "CD-FN", "CALL DISTRIBUTION-FREE NOTIFY", DPNSS_CALL_INDEX, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
564 {87, "ICC", "INTERCOM CALL", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
565 {88, "AD-RQ", "ADD-ON REQUEST", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
566 {89, "AD-V", "ADD-ON VALIDATION", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
567 {90, "AD-O", "ADDED-ON", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
568 {91, "ENH", "ENHANCED SSMF5", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
569 {92, "BAS", "BASIC SSMF5", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
570 {93, "CD-UNLINK", "CALL DISTRIBUTION-UNLINKED", DPNSS_CALL_INDEX, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
571 {94, "SNU", "SIGNAL NOT UNDERSTOOD", DPNSS_ENHANCED_STR_ID, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
572 {95, "SU", "SERVICE UNAVAILABLE", DPNSS_STRING_ID, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
573 {96, "RR-SNU", "RECALL REJECTED SIGNAL NOT UNDERSTOOD", DPNSS_ENHANCED_STR_ID, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
574 {97, "CD-CSU", "CALL DISTRIBUTION-CALL SET UP", DPNSS_CALL_INDEX, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
575 {98, "IG-SNU", "IGNORED-SIGNAL NOT UNDERSTOOD", DPNSS_STRING_ID_LIST, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
576 {99, "IG-SU", "IGNORED-SERVICE UNAVAILABLE", DPNSS_STRING_ID_LIST, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
577 {100, "TEXT", "TEXTUAL DISPLAY", DPNSS_TEXT, DPNSS_TEXT_TYPE, DPNSS_NONE, DPNSS_NONE },
578 {101, "SIM-A", "SIMULATED ANSWER", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
579 {102, "ACT", "ACTIVATE", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
580 {103, "DEACT", "DEACTIVATE", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
581 {104, "TCS", "TRAFFIC-CHANNEL STATUS", DPNSS_CHANNEL_STATUS, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
582 {105, "CHID", "CHANNEL IDENTITY", DPNSS_CHANNEL_NUMBER, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
583 {106, "FR-R", "FORCED RELEASE-REQUEST", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
584 {107, "PB-P", "PRIORITY BREAKDOWN-PROTECTION", DPNSS_BPL, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
585 {108, "PB-R", "PRIORITY BREAKDOWN-REQUEST", DPNSS_BCL, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
586 {109, "DI", "DEVICE IDENTITY", DPNSS_DEVICE_INDEX, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
587 {110, "ROP-R", "ROUTE OPTIMISATION-REQUEST", DPNSS_CR_NO, DPNSS_CALL_ID_LENGTH, DPNSS_NONE, DPNSS_NONE },
588 {111, "ROP-CSU", "ROUTE OPTIMISATION-CALL SET UP", DPNSS_CALL_ID_LENGTH, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
589 {112, "ROP-CON", "ROUTE OPTIMISATION-CONNECTED", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
590 {113, "DND", "DO NOT DISTURB", DPNSS_STATE_OF_DEST, DPNSS_STATE_OF_DEST_QUAL, DPNSS_NONE, DPNSS_NONE },
591 {114, "DND-O", "DO NOT DISTURB-OVERRIDE", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
592 {115, "DND-S", "DO NOT DISTURB-SET", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
593 {116, "DND-C", "DO NOT DISTURB-CLEAR", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
594 {117, "undefined", "undefined", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
595 {118, "EST", "EXTENSION STATUS CALL", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
596 {119, "CDIV", "CONTROLLED DIVERSION", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
597 {120, "RDG", "REDIRECTING", DPNSS_REASON_FOR_REDIR, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
598 {121, "RCF", "REDIRECTING ON CALL FAILURE", DPNSS_CLEARING_CAUSE, DPNSS_B_PARTY_ADDR, DPNSS_NONE, DPNSS_NONE },
599 {122, "TOV-R", "TAKEOVER REQUEST", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
600 {123, "TOV-V", "TAKEOVER VALIDATION", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
601 {124, "SER-R", "SERIES CALL REQUEST", DPNSS_RECONT_ADDR, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
602 {125, "SER-C", "SERIES CALL-CANCEL", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
603 {126, "SER-E", "SERIES CALL-ESTABLISHMENT", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
604 {127, "NS-N, NIGHT","SERVICE-NOTIFICATION", DPNSS_STATE_OF_OPERATOR, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
605 {128, "NS-DVT", "NIGHT SERVICE-DIVERT", DPNSS_NIGHT_SERVICE, DPNSS_PBX_FLAG, DPNSS_NONE, DPNSS_NONE },
606 {129, "NS-DVG", "DPNSS_NIGHT_SERVICE-DIVERTING", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
607 {130, "NS-DVD", "DPNSS_NIGHT_SERVICE-DIVERTED", DPNSS_C_PARTY_ADDR, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
608 {131, "NS-RDVT", "DPNSS_NIGHT_SERVICE-REDIVERT", DPNSS_C_PARTY_ADDR, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
609 {132, "NS-RDVG", "DPNSS_NIGHT_SERVICE-REDIVERTING", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
610 {133, "NS-RDVD", "DPNSS_NIGHT_SERVICE-REDIVERTED", DPNSS_C_PARTY_ADDR, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
611 {134, "NS-DA", "DPNSS_NIGHT_SERVICE-DEACTIVATED", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
612 {135, "Q-INFO", "QUEUE INFORMATION", DPNSS_NUMBER_OF_CALLS, DPNSS_NUMBER_OF_SERVERS, DPNSS_NONE, DPNSS_NONE },
613 {136, "Q-PRIO", "QUEUE PRIORITY", DPNSS_PRIORITY_LEVEL, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
614 {137, "SW-V", "SWAP - VALIDATION", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
615 {138, "SW-R", "SWAP - REJECTED", DPNSS_LOCATION, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
616 {139, "undefined", "undefined", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
617 {140, "A2", "SSMF5 SIGNAL 'A-2'", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
618 {141, "undefined", "undefined", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
619 {142, "A5", "SSMF5 SIGNAL 'A-5'", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
620 {143, "undefined", "undefined", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
621 {144, "A8", "SSMF5 SIGNAL 'A-8'", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
622 {145, "A10", "SSMF5 SIGNAL 'A-10'", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
623 {146, "undefined", "undefined", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
624 {147, "A13", "SSMF5 SIGNAL 'A-13'", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
625 {148, "A14", "SSMF5 SIGNAL 'A-14'", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
626 {149, "A12", "SSMF5 SIGNAL 'A-12'", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
627 {150, "A7", "SSMF5 SIGNAL 'A-7'", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
628 {151, "CBWF-CLB", "CALL BACK WHEN FREE-CALL BACK", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
629 {152, "DVT", "DIVERT", DPNSS_C_PARTY_ADDR, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
630 {153, "SOD-I", "DPNSS_STATE_OF_DEST-INDETERMINABLE", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
631 {154, "DVG", "DIVERTING", DPNSS_B_PARTY_ADDR, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
632 {155, "SOD-REQ", "REQUEST DPNSS_STATE_OF_DEST", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
633 {156, "CBWF-CB", "CALL BACK WHEN FREE-CALL BACK REQUEST", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
634 {157, "NAE-DC", "NETWORK ADDRESS EXTENSION", DPNSS_SUBADDRESS, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
635 {158, "SFI", "SUPPLEMENTARY FACILITIES INHIBITED", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
636 {159, "NAE-DI", "NETWORK ADDRESS EXTENSION-DESTINATION INCOMPLETE", DPNSS_SUBADDRESS, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
637 {160, "DRS", "DIRECT ROUTE SELECT", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
638 {161, "AS", "ALARM STATUS", DPNSS_ALARM_LEVEL, DPNSS_STAFF_PRESENT, DPNSS_NONE, DPNSS_NONE },
639 {162, "AS-R", "ALARM STATUS-REQUEST", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
640 {163, "TAD-R", "TIME AND DATE-REQUEST", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
641 {164, "TAD", "TIME AND DATE", DPNSS_TIME_AND_DATE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
642 {165, "SATB", "SATELLITE BARRED", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
643 {166, "SERV", "SERVICE INFORMATION", DPNSS_SERVICES, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
644 {167, "TID", "TRUNK IDENTITY", DPNSS_PBX_REFERENCE, DPNSS_TRUNK_GROUP_REF_NUMBER, DPNSS_TRUNK_MEMBER_REF_NUMBER, DPNSS_NONE},
645 {168, "PARK", "PARK REQUEST", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
646 {169, "PKD", "PARKED", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
647 {170, "AC-NAO", "ADD-ON CONFERENCE-NO ADD ON CURRENTLY AVAILABLE", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
648 {171, "CBM-R", "CALL BACK MESSAGING-REQUEST", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
649 {172, "CBM-C", "CALL BACK MESSAGING-CANCEL", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
650 {173, "NAE-CC", "NETWORK ADDRESS EXTENSION-CALLING/CALLED IDENTITY COMPLETE", DPNSS_SUBADDRESS, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
651 {174, "NAE-CI", "NETWORK ADDRESS EXTENSION-CALLING/CALLED IDENTITY INCOMPLETE", DPNSS_SUBADDRESS, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
652 {175, "undefined", "undefined", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
653 {176, "AC-CDC", "ADD-ON CONFERENCE-CLEARDOWN CONFERENCE", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
654 {177, "AC-PI", "ADD-ON CONFERENCE-PARTY INDEX", DPNSS_CONF_PARTY_INDEX, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
655 {178, "undefined", "undefined", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
656 {179, "AC-DR", "ADD-ON CONFERENCE - DETAILS REQUEST", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
657 {180, "AC-PD", "ADD-ON CONFERENCE - PARTY", DPNSS_CONF_PARTY_DET, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
658 {181, "AC-CBI", "ADD-ON CONFERENCE - CONFERENCE BRIDGE IDENTITY", DPNSS_CONF_BRIDGE_ADDR, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
659 {182, "CH-AC", "CHARGE REPORTING ACCOUNT CODE", DPNSS_ACCOUNT_CODE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
660 {183, "CH-ACR", "CHARGE REPORTING ACCOUNT CODE REQUEST", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
661 {184, "CH-ACT", "CHARGE REPORTING - ACTIVE", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
662 {185, "CH-CLR", "CHARGE REPORTING - CLEAR", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
663 {186, "CH-CR", "CHARGE REPORTING - COST REQUEST", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
664 {187, "CH-CST", "CHARGE REPORTING - COST, CURRENCY UNITS", DPNSS_COST_QUALIFIER, DPNSS_CURRENCY_INDICATION, DPNSS_NONE, DPNSS_NONE },
665 {188, "CH-TR", "CHARGE REPORTING - TIME RATE", DPNSS_CURRENCY_UNITS, DPNSS_TIME_INTERVAL, DPNSS_COST_QUALIFIER, DPNSS_CURRENCY_INDICATION},
666 {189, "CH-UR", "CHARGE REPORTING - UNIT", DPNSS_CURRENCY_UNITS, DPNSS_COST_QUALIFIER, DPNSS_CURRENCY_INDICATION, DPNSS_NONE},
667 {190, "CH-UU", "CHARGE REPORTING - UNITS USED", DPNSS_UNITS, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
668 {191, "OPD", "OUTPUT DIGITS", DPNSS_REMOTE_ADDRESS, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
669 {192, "OPD-R", "OUTPUT DIGITS - REQUEST", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
670 {193, "IRD", "INTERNAL REROUTING DISABLED", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
671 {194, "ERD", "EXTERNAL REROUTING DISABLED", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
672 {195, "NLT-PT", "NON-LOOPED BACK TEST-PERFORM TEST", DPNSS_TEST_INDEX, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
673 {196, "NLT-RQ", "NON-LOOPED BACK TEST-TEST REQUEST", DPNSS_TEST_INDEX, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
674 {197, "NLT-SC", "NON-LOOPED BACK TEST-SEQUENCE COMPLETE", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
675 {198, "NLT-RES", "NON-LOOPED BACK TEST-RESULT", DPNSS_TEST_RESULT, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
676 {199, "AUTO-A", "AUTOANSWER", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
677 {200, "HF-A", "HANDS-FREE - ACTIVATED", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
678 {201, "HF-D", "HANDS-FREE - DEACTIVATED", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
679 {202, "EI-W", "EXECUTIVE INTRUSION-WITHDRAW", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
680 {203, "DVT-RD", "DIVERT-REDIRECTION", DPNSS_REASON_FOR_REDIR, DPNSS_C_PARTY_ADDR, DPNSS_NONE, DPNSS_NONE },
681 {204, "DVT-CF", "DIVERT-CALL FAILURE", DPNSS_C_PARTY_ADDR, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
682 {205, "ASST-INFO", "ASSISTANCE-INFORMATION", DPNSS_TYPE_OF_ASSISTANCE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
683 {206, "RED-BY", "REDIRECTION-BYPASS", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
684 {207, "undefined", "undefined", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
685 {208, "VIC", "VPN INITIATED CLEAR", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
686 {209, "NPR-A", "NUMBER PRESENTATION RESTRICTION-A PARTY", DPNSS_REST_DOMAIN, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
687 {210, "NPR-B", "NUMBER PRESENTATION RESTRICTION-B PARTY", DPNSS_REST_DOMAIN, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
688 {211, "ARC", "AUXILIARY DPNSS_ROUTE_RES_CLASS", DPNSS_ROUTE_RES_CLASS, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
689 {212, "WOB", "WAIT ON BUSY", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
690 {213, "GPU-R", "GROUP PICK-UP REQUEST", DPNSS_GRP_PICK_UP_CODE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
691 {214, "PU-DVT", "PICK-UP DIVERT", DPNSS_C_PARTY_ADDR, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
692 {215, "PU-DVG", "PICK-UP DIVERTING", DPNSS_TIME_INTERVAL, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
693 {216, "DPU-R", "DIRECTED PICK-UP REQUEST", DPNSS_PICK_UP_CALL_TYPE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
694 {217, "RCC-CA", "ROUTE CAPACITY CONTROL-CAPACITY AVAILABLE", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
695 {218, "undefined", "undefined", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
696 {219, "RCC-OI", "ROUTE CAPACITY CONTROL-OVERRIDE INVOKED", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
697 {220, "PU-DVD", "PICK-UP DIVERTED", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
698 {221, "NPR-O", "NUMBER PRESENTATION RESTRICTION - OTHER PARTY", DPNSS_REST_DOMAIN, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
699 {222, "MCI", "MALICIOUS CALL INDICATION", DPNSS_MALICIOUS_CALL_REF, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
700 {223, "NSL", "NETWORK SIGNALLING LIMIT", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
701 {224, "undefined", "undefined", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
702 {225, "undefined", "undefined", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
703 {226, "TCOS", "TRAVELLING CLASS OF SERVICE", DPNSS_ROUTE_RES_CLASS, DPNSS_CBR_GRP, DPNSS_FAC_LST_CODE, DPNSS_NONE},
704 {227, "TCOS-R", "TRAVELLING CLASS OF SERVICE-REQUEST", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
705 {228, "DIV-RSC", "DIVERSION-REMOTE SET COMBINED", DPNSS_C_PARTY_ADDR, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
706 {229, "DIV-RCC", "DIVERSION-REMOTE CANCEL COMBINED", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
707 {230, "RDC", "REDIRECTION CONTROL", DPNSS_TIMER_VALUE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
708 {231, "CAUSE", "DPNSS_CLEARING_CAUSE", DPNSS_CLEARING_CAUSE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
709 {232, "CP", "CALL PROCEEDING", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
710 {233, "I-BC", "ISDN-BEARER CAPABILITY", DPNSS_BEARER_CAP, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
711 {234, "I-CC", "ISDN-DPNSS_CLEARING_CAUSE", DPNSS_CAUSE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
712 {235, "I-CPN", "ISDN-CALLING PARTY/CONNECTED NUMBER", DPNSS_ISDN_NUM_ATTR, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
713 {236, "I-CSA", "ISDN-CALLING PARTY/CONNECTED DPNSS_SUBADDRESS", DPNSS_ISDN_DPNSS_SUBADDRESS, DPNSS_ISDN_NUMBER_DIGITS, DPNSS_NONE, DPNSS_NONE },
714 {237, "I-DSA", "ISDN-DESTINATION (CALLED PARTY) DPNSS_SUBADDRESS", DPNSS_ISDN_DPNSS_SUBADDRESS, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
715 {238, "I-HLC", "ISDN-HIGH LAYER COMPATIBILITY", DPNSS_HIGH_LAYER_COMP, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
716 {239, "I-LLC", "ISDN-LOW LAYER COMPATIBILITY", DPNSS_LOW_LAYER_COMP, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
717 {240, "I-PROG", "ISDN-PROGRESS", DPNSS_PROGRESS_INDICATOR, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
718 {241, "IPN", "INTERWORKING VIA A PRIVATE ISDN", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
719 {242, "SAVE", "SAVE", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
720 {243, "V-NID", "VPN-NODAL IDENTITY", DPNSS_VPN_ACCESS_REF_NUM, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
721 {244, "M-INDEX", "MESSAGE INDEX", DPNSS_INDEX_NUMBER, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
722 {245, "CBM-CSU", "CALL BACK MESSAGING CALL SET-UP", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
723 {246, "INT-A", "INTERIM ANSWER", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
724 {247, "undefined", "undefined", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
725 {248, "DVL", "DIVERSION - LAST CONTROLLING EXTENSION IDENTITY", DPNSS_B_PARTY_ADDR, DPNSS_DIVERSION_TYPE, DPNSS_RESTRICTION_INDICATOR, DPNSS_NONE},
726 {249, "ROP-INV", "ROUTE OPTIMISATION INVITE", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
727 {250, "ROP-INVA", "ROUTE OPTIMISATION INVITE WITH ACKNOWLEDGEMENT", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
728 {251, "PCLG-P", "PUBLIC CALLING PARTY NUMBER-PROVIDED", DPNSS_ISDN_NUM_ATTR, DPNSS_ISDN_NUMBER_DIGITS, DPNSS_NONE, DPNSS_NONE },
729 {252, "PCLG-D", "PUBLIC CALLING PARTY NUMBER-DEFAULT", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
730 {253, "PCON-P", "PUBLIC CONNECTED NUMBER-PROVIDED", DPNSS_ISDN_NUM_ATTR, DPNSS_ISDN_NUMBER_DIGITS, DPNSS_NONE, DPNSS_NONE },
731 {254, "PCON-D", "PUBLIC CONNECTED NUMBER-DEFAULT", DPNSS_NONE, DPNSS_NONE, DPNSS_NONE, DPNSS_NONE },
734 static int
735 dissect_dpnss_sic(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset)
737 uint8_t octet, type_of_data;
739 octet = tvb_get_uint8(tvb,offset);
740 type_of_data = (octet & 0x70)>>4;
741 proto_tree_add_item(tree, hf_dpnss_ext_bit, tvb, offset, 1, ENC_BIG_ENDIAN);
742 proto_tree_add_item(tree, hf_dpnss_sic_type, tvb, offset, 1, ENC_BIG_ENDIAN);
743 switch (type_of_data) {
744 case 1:
745 /* Type of Data (001) : Details for Speech */
746 proto_tree_add_item(tree, hf_dpnss_sic_details_for_speech, tvb, offset, 1, ENC_BIG_ENDIAN);
747 break;
748 case 2:
749 /* Type of Data (010) : Data Rates */
750 proto_tree_add_item(tree, hf_dpnss_sic_details_for_data1, tvb, offset, 1, ENC_BIG_ENDIAN);
751 break;
752 case 3:
753 /* Type of Data (011) : Data Rates */
754 proto_tree_add_item(tree, hf_dpnss_sic_details_for_data2, tvb, offset, 1, ENC_BIG_ENDIAN);
755 break;
756 default:
757 /* Illegal */
758 break;
760 offset++;
761 if ((octet&0x80)==0x80) {
762 /* Extension bit set
763 * Synch/Asynchronous Information
765 octet = tvb_get_uint8(tvb,offset);
766 type_of_data = octet&0x7;
767 proto_tree_add_item(tree, hf_dpnss_ext_bit_notall, tvb, offset, 1, ENC_BIG_ENDIAN);
768 switch (type_of_data) {
769 case 3:
770 /* Synchronous */
771 case 4:
772 /* Synchronous */
773 proto_tree_add_item(tree, hf_dpnss_sic_oct2_net_ind_clk, tvb, offset, 1, ENC_BIG_ENDIAN);
774 proto_tree_add_item(tree, hf_dpnss_sic_oct2_sync_data_format, tvb, offset, 1, ENC_BIG_ENDIAN);
775 proto_tree_add_item(tree, hf_dpnss_sic_oct2_sync_byte_timing, tvb, offset, 1, ENC_BIG_ENDIAN);
776 break;
777 case 5:
778 /* Asynchronous */
779 case 6:
780 /* Asynchronous */
781 case 7:
782 /* Asynchronous */
783 proto_tree_add_item(tree, hf_dpnss_sic_oct2_async_flow_ctrl, tvb, offset, 1, ENC_BIG_ENDIAN);
784 proto_tree_add_item(tree, hf_dpnss_sic_oct2_async_data, tvb, offset, 1, ENC_BIG_ENDIAN);
785 break;
786 default:
787 break;
789 proto_tree_add_item(tree, hf_dpnss_sic_oct2_duplex, tvb, offset, 1, ENC_BIG_ENDIAN);
790 proto_tree_add_item(tree, hf_dpnss_sic_oct2_data_type, tvb, offset, 1, ENC_BIG_ENDIAN);
791 offset++;
793 return offset;
796 static const value_string dpnss_serv_mark_vals[] = {
797 { 1, "PSTN BARRED"},
798 { 2, "EMERGENCY TELEPHONE"},
799 { 3, "HUNT GROUP"},
800 { 4, "DISTRIBUTED GROUP"},
801 { 5, "UNABLE TO INITIATE CLEARING AFTER ANSWER"},
802 { 6, "RING GROUP"},
803 { 0, NULL }
806 /* Supplementary Information parameters
807 * TODO Add decoding of parameters where needed.
810 static const value_string dpnss_sup_serv_par_str_vals[] = {
811 { DPNSS_NONE, "None"},
812 { DPNSS_SERV_MAR, "Servive Marking"},
813 { DPNSS_STATUS, "Status"},
814 { DPNSS_ROUTE_RES_CLASS, "Route Restriction Class"},
815 { DPNSS_CBR_GRP, "Call Barring Group"},
816 { DPNSS_FAC_LST_CODE, "Facility list code"},
817 { DPNSS_NO_OF_FUR_TRANS, "Number of Further Transits"},
818 { DPNSS_NO_OF_FUR_ALT_R, "Number of Further Alternative routes"},
819 { DPNSS_INT_CAP_LEV, "Intrusion Capability level"},
820 { DPNSS_NESTING_LEVEL, "Nesting level"},
821 { DPNSS_C_PARTY_ADDR, "C Party Address"},
822 { DPNSS_B_PARTY_ADDR, "B Party Address"},
823 { DPNSS_SIC, "SIC"},
824 { DPNSS_A_B_PARTY_ADDR, "A/B Party Address"},
825 { DPNSS_DIVERSION_TYPE, "Diversion Type"},
826 { DPNSS_NSI_IDENTIFIER, "NSI Identifier"},
827 { DPNSS_USER_DEFINED, "User Defined"},
828 { DPNSS_TEXT, "Text"},
829 { DPNSS_CALL_INDEX, "Call Index"},
830 { DPNSS_PASSWORD, "Password"},
831 { DPNSS_CALL_DIR, "Call Direction"},
832 { DPNSS_DPNSS_ISDN_TYPE, "DPNNS ISDN Type"},
833 { DPNSS_HC_CLC, "HC CLC"},
834 { DPNSS_ENHANCED_STR_ID, "Enhanced String Identity"},
835 { DPNSS_STRING_ID, "String Identity"},
836 { DPNSS_STRING_ID_LIST, "String Identity List"},
837 { DPNSS_TEXT_TYPE, "Text Type"},
838 { DPNSS_CHANNEL_STATUS, "Channel Status"},
839 { DPNSS_CHANNEL_NUMBER, "Channel Number"},
840 { DPNSS_BPL, "BPL"},
841 { DPNSS_BCL, "BCL"},
842 { DPNSS_DEVICE_INDEX, "Device Index"},
843 { DPNSS_CR_NO, "Call Reference Number"},
844 { DPNSS_CALL_ID_LENGTH, "Call Identity Length"},
845 { DPNSS_STATE_OF_DEST, "State of Destination"},
846 { DPNSS_STATE_OF_DEST_QUAL, "State of Destination Qualifier"},
847 { DPNSS_REASON_FOR_REDIR, "Reason For Redirection"},
848 { DPNSS_CLEARING_CAUSE, "Clearing Cause"},
849 { DPNSS_RECONT_ADDR, "Reconnect Address"},
850 { DPNSS_STATE_OF_OPERATOR, "State of Operator"},
851 { DPNSS_NIGHT_SERVICE, "Night Service"},
852 { DPNSS_PBX_FLAG, "PBX flag"},
853 { DPNSS_NUMBER_OF_CALLS, "Number of Calls"},
854 { DPNSS_NUMBER_OF_SERVERS, "Number of Servers"},
855 { DPNSS_PRIORITY_LEVEL, "Priority Level"},
856 { DPNSS_LOCATION, "Location"},
857 { DPNSS_SUBADDRESS, "Subaddress"},
858 { DPNSS_ALARM_LEVEL, "Alarm Level"},
859 { DPNSS_STAFF_PRESENT, "Staff Present"},
860 { DPNSS_TIME_AND_DATE, "Time and Date"},
861 { DPNSS_SERVICES, "Services"},
862 { DPNSS_PBX_REFERENCE, "PBX Reference"},
863 { DPNSS_TRUNK_GROUP_REF_NUMBER, "Trunk Group reference Number"},
864 { DPNSS_TRUNK_MEMBER_REF_NUMBER,"Trunk Member Reference Number"},
865 { DPNSS_CONF_PARTY_INDEX, "Conference Party Index"},
866 { DPNSS_CONF_PARTY_DET, "Conference Party Details"},
867 { DPNSS_ACCOUNT_CODE, "Account code"},
868 { DPNSS_CONF_BRIDGE_ADDR, "Conference Bridge Address"},
869 { DPNSS_COST_QUALIFIER, "Cost Qualifier"},
870 { DPNSS_CURRENCY_INDICATION, "Currency Indication"},
871 { DPNSS_CURRENCY_UNITS, "Currency Units"},
872 { DPNSS_TIME_INTERVAL, "Time Interval"},
873 { DPNSS_UNITS, "Units"},
874 { DPNSS_REMOTE_ADDRESS, "Remote Address"},
875 { DPNSS_TEST_INDEX, "Test Index"},
876 { DPNSS_TEST_RESULT, "Test Result"},
877 { DPNSS_TYPE_OF_ASSISTANCE, "Type of assistance"},
878 { DPNSS_REST_DOMAIN, "Restriction Domain"},
879 { DPNSS_GRP_PICK_UP_CODE, "Group Pick-Up Code"},
880 { DPNSS_PICK_UP_CALL_TYPE, "Pick-Up call type"},
881 { DPNSS_MALICIOUS_CALL_REF, "Malicious call reference"},
882 { DPNSS_TIMER_VALUE, "Timer Value"},
883 { DPNSS_BEARER_CAP, "Bearer capability"},
884 { DPNSS_ISDN_NUM_ATTR, "ISDM number attribute"},
885 { DPNSS_ISDN_DPNSS_SUBADDRESS, "ISDN DPNNS Subaddress"},
886 { DPNSS_ISDN_NUMBER_DIGITS, "ISDN Number Digits"},
887 { DPNSS_HIGH_LAYER_COMP, "High Layer Compatibility"},
888 { DPNSS_LOW_LAYER_COMP, "Low layer Compatibility"},
889 { DPNSS_PROGRESS_INDICATOR, "Progress Indicator"},
890 { DPNSS_VPN_ACCESS_REF_NUM, "VPN Access reference Number"},
891 { DPNSS_INDEX_NUMBER, "Index Number"},
892 { DPNSS_RESTRICTION_INDICATOR, "Restriction Indicator"},
893 { DPNSS_CAUSE, "Cause"},
894 { 0, NULL }
897 static void
898 dissect_dpnns_sup_str_par(tvbuff_t *tvb, packet_info *pinfo, proto_tree * tree, int par_type_num, int par_start_offset, int par_end_offset)
901 int par_len;
902 char * par_data;
904 par_len = par_end_offset - par_start_offset;
905 if (par_len==0) {
906 par_type_num = DPNSS_NONE;
908 switch (par_type_num) {
909 case DPNSS_NONE:
910 proto_tree_add_string(tree, hf_dpnss_parameter, tvb, par_start_offset, par_len, "None");
911 break;
913 /* TODO: Use individual dissection of parameters if hf fields needed or in the case where
914 special handling is needed for greater detail
916 case DPNSS_SERV_MAR:
917 * p 173
918 * More than one Service Marking character can be
919 * included in the Parameter, each being separated
920 * by the IA5 character space (2/0).
921 * If decoded use: dpnss_serv_mark_vals
923 case DPNSS_STATUS:
924 case DPNSS_ROUTE_RES_CLASS:
925 case DPNSS_CBR_GRP:
926 case DPNSS_FAC_LST_CODE:
927 case DPNSS_NO_OF_FUR_TRANS:
928 case DPNSS_NO_OF_FUR_ALT_R:
929 case DPNSS_INT_CAP_LEV:
930 case DPNSS_NESTING_LEVEL:
931 case DPNSS_C_PARTY_ADDR:
932 case DPNSS_B_PARTY_ADDR:
933 case DPNSS_SIC:
935 case DPNSS_A_B_PARTY_ADDR:
936 proto_tree_add_item(tree, hf_dpnss_a_b_party_addr, tvb, par_start_offset, par_len, ENC_ASCII);
937 break;
940 case DPNSS_DIVERSION_TYPE:
941 case DPNSS_NSI_IDENTIFIER:
942 case DPNSS_USER_DEFINED:
943 case DPNSS_TEXT:
945 case DPNSS_CALL_INDEX:
946 proto_tree_add_item(tree, hf_dpnss_call_idx, tvb, par_start_offset, par_len, ENC_ASCII);
947 break;
950 case DPNSS_PASSWORD:
951 case DPNSS_CALL_DIR:
952 case DPNSS_DPNSS_ISDN_TYPE:
953 case DPNSS_HC_CLC:
954 case DPNSS_ENHANCED_STR_ID:
955 case DPNSS_STRING_ID:
956 case DPNSS_STRING_ID_LIST:
957 case DPNSS_TEXT_TYPE:
958 case DPNSS_CHANNEL_STATUS:
959 case DPNSS_CHANNEL_NUMBER:
960 case DPNSS_BPL:
961 case DPNSS_BCL:
962 case DPNSS_DEVICE_INDEX:
963 case DPNSS_CR_NO:
964 case DPNSS_CALL_ID_LENGTH:
965 case DPNSS_STATE_OF_DEST:
966 case DPNSS_STATE_OF_DEST_QUAL:
967 case DPNSS_REASON_FOR_REDIR:
968 case DPNSS_CLEARING_CAUSE:
969 case DPNSS_RECONT_ADDR:
970 case DPNSS_STATE_OF_OPERATOR:
971 case DPNSS_NIGHT_SERVICE:
972 case DPNSS_PBX_FLAG:
973 case DPNSS_NUMBER_OF_CALLS:
974 case DPNSS_NUMBER_OF_SERVERS:
975 case DPNSS_PRIORITY_LEVEL:
976 case DPNSS_LOCATION:
977 case DPNSS_SUBADDRESS:
978 case DPNSS_ALARM_LEVEL:
979 case DPNSS_STAFF_PRESENT:
980 case DPNSS_TIME_AND_DATE:
981 case DPNSS_SERVICES:
982 * More than one Service Marking character can be
983 * included in the Parameter, each being separated
984 * by the IA5 character space (2/0).
985 * 1 = Call Offer not possible
986 * 2 = Executive Intrusion not possible
987 * 3 = Call Back When Free not possible
988 * 4 = Call Back Messaging not possible (see Note)
989 * 5 = Hold not possible
990 * 6 = Call Back When Next Used not possible
991 case DPNSS_PBX_REFERENCE:
992 case DPNSS_TRUNK_GROUP_REF_NUMBER:
993 case DPNSS_TRUNK_MEMBER_REF_NUMBER:
994 case DPNSS_CONF_PARTY_INDEX:
995 case DPNSS_CONF_PARTY_DET:
996 case DPNSS_ACCOUNT_CODE:
997 case DPNSS_CONF_BRIDGE_ADDR:
998 case DPNSS_COST_QUALIFIER:
999 case DPNSS_CURRENCY_INDICATION:
1000 case DPNSS_CURRENCY_UNITS:
1001 case DPNSS_TIME_INTERVAL:
1002 case DPNSS_UNITS:
1003 case DPNSS_REMOTE_ADDRESS:
1004 case DPNSS_TEST_INDEX:
1005 case DPNSS_TEST_RESULT:
1006 case DPNSS_TYPE_OF_ASSISTANCE:
1007 case DPNSS_REST_DOMAIN:
1008 case DPNSS_GRP_PICK_UP_CODE:
1009 case DPNSS_PICK_UP_CALL_TYPE:
1010 case DPNSS_MALICIOUS_CALL_REF:
1011 case DPNSS_TIMER_VALUE:
1012 case DPNSS_BEARER_CAP:
1013 case DPNSS_ISDN_NUM_ATTR:
1014 case DPNSS_ISDN_DPNSS_SUBADDRESS:
1015 case DPNSS_ISDN_NUMBER_DIGITS:
1016 case DPNSS_HIGH_LAYER_COMP:
1017 case DPNSS_LOW_LAYER_COMP:
1018 case DPNSS_PROGRESS_INDICATOR:
1019 case DPNSS_VPN_ACCESS_REF_NUM:
1020 case DPNSS_INDEX_NUMBER:
1021 case DPNSS_RESTRICTION_INDICATOR:
1022 case DPNSS_CAUSE:
1024 default:
1025 par_data = tvb_format_text(pinfo->pool, tvb,par_start_offset, par_len);
1026 /* Used to print all pars without any special handling */
1027 proto_tree_add_string_format(tree, hf_dpnss_parameter, tvb, par_start_offset, par_len, par_data, "Parameter %s: %s",
1028 val_to_str(par_type_num, dpnss_sup_serv_par_str_vals, "Unknown (%d)" ), par_data);
1029 break;
1034 /* 3.1 Supplementary Information Strings
1035 * A Supplementary Information String comprises a Supplementary
1036 * Information Identifier which may be followed by one or more
1037 * Parameters. A Supplementary Information String starts with the
1038 * IA5 character * and ends with the IA5 character #.
1040 * When the Supplementary Information String includes Parameters
1041 * these are separated from the identifier and each other by a *.
1042 * eg * Supplementary Information Identifier code #
1043 * or * Supplementary Information Identifier code * Parameter #
1044 * or * Supplementary Information Identifier code * Parameter * Parameter #
1045 * A Supplementary Information String shall be wholly contained
1046 * within one Selection or Indication Field (ie it shall not be
1047 * split between messages).
1049 * 3.2 Supplementary Information String Identifier
1050 * The identifier comprises one or more IA5 numerals 0-9 which may
1051 * be followed by a single IA5 alpha-character suffix in the range A-Z.
1052 * The numerals of the identifier indicate the main function of the
1053 * Supplementary Information String, eg "39F" indicates "Diverting
1054 * on No Reply". "F" is the suffix.
1056 * 3.5 Destination Address
1057 * The Destination Address comprises one or more IA5 numerals 0 to
1058 * 9, has no identifier code and is not prefixed by a * or
1059 * terminated by a #. The digits are always the last characters in
1060 * the Selection Block. The first Destination Address digit
1061 * immediately follows the # of the last Supplementary Information
1062 * String.
1065 static int
1066 dissect_dpnss_sup_info_str(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset)
1068 proto_tree *sup_str_tree;
1069 int start_offset, hash_offset, tvb_end_offset, sup_inf_str_end_offset, str_no;
1070 int par_start_offset, par_end_offset, number_of_found_par;
1071 int sup_inf_str_len, par_type_num;
1072 unsigned sup_str_num = 0;
1073 uint8_t octet;
1074 bool last_string = false;
1075 bool has_par;
1077 tvb_end_offset = tvb_reported_length(tvb);
1079 str_no = 1;
1080 while ((offset<tvb_end_offset)&&(last_string == false)) {
1081 octet = tvb_get_uint8(tvb,offset);
1082 if (octet == '*') {
1083 /* Supplementary Information String */
1084 start_offset = offset;
1085 has_par = true;
1086 number_of_found_par = 0;
1087 /* offset points to start of supplementary information string */
1088 offset++;
1089 hash_offset = tvb_find_uint8(tvb, offset, -1, '#');
1090 sup_str_tree = proto_tree_add_subtree_format(tree, tvb, start_offset, hash_offset-start_offset+1,
1091 ett_dpnss_sup_str, NULL, "Supplementary Information %u: %s",str_no,
1092 tvb_format_text(pinfo->pool, tvb,start_offset,hash_offset-start_offset+1));
1093 /* SUPPLEMENTARY INFORMATION STRING IDENTIFIER
1094 * Get the parameter number string and translate it to an index into the dpnns_sup_serv_set.
1095 * The number may have a trailing alpha character at the end.
1097 sup_inf_str_end_offset = tvb_find_uint8(tvb, offset, hash_offset-offset, '*');
1098 if (sup_inf_str_end_offset==-1) {
1099 /* no parameters */
1100 has_par = false;
1101 sup_inf_str_end_offset = hash_offset;
1103 sup_inf_str_len = sup_inf_str_end_offset - offset;
1104 ws_strtou32(tvb_format_text(pinfo->pool, tvb, offset, sup_inf_str_len), NULL, &sup_str_num);
1105 if ((sup_str_num != 0) && (sup_str_num < array_length(dpnns_sup_serv_set))) {
1106 proto_tree_add_string(sup_str_tree, hf_dpnss_sup_str, tvb, offset, sup_inf_str_len,
1107 dpnns_sup_serv_set[sup_str_num].compact_name);
1108 offset = sup_inf_str_end_offset+1;
1109 /* Find parameter(s) */
1110 while (has_par) {
1111 number_of_found_par++;
1112 /* 1:st Parameter */
1113 par_start_offset = offset;
1114 par_end_offset = tvb_find_uint8(tvb, offset, -1, '*');
1115 if (par_end_offset == -1) {
1116 /* last parameter */
1117 par_end_offset = hash_offset;
1118 has_par = false;
1120 switch (number_of_found_par) {
1121 case 1:
1122 par_type_num = dpnns_sup_serv_set[sup_str_num].par1_num;
1123 dissect_dpnns_sup_str_par(tvb, pinfo, sup_str_tree, par_type_num, par_start_offset, par_end_offset);
1124 break;
1125 case 2:
1126 par_type_num = dpnns_sup_serv_set[sup_str_num].par2_num;
1127 dissect_dpnns_sup_str_par(tvb, pinfo, sup_str_tree, par_type_num, par_start_offset, par_end_offset);
1128 break;
1129 case 3:
1130 par_type_num = dpnns_sup_serv_set[sup_str_num].par3_num;
1131 dissect_dpnns_sup_str_par(tvb, pinfo, sup_str_tree, par_type_num, par_start_offset, par_end_offset);
1132 break;
1133 case 4:
1134 par_type_num = dpnns_sup_serv_set[sup_str_num].par4_num;
1135 dissect_dpnns_sup_str_par(tvb, pinfo, sup_str_tree, par_type_num, par_start_offset, par_end_offset);
1136 break;
1137 default:
1138 break;
1140 /* More parameters ? */
1141 offset = par_end_offset+1;
1145 offset = hash_offset+1;
1146 str_no++;
1147 } else {
1148 last_string = true;
1149 proto_tree_add_item(tree, hf_dpnss_dest_addr, tvb, offset, -1, ENC_ASCII);
1152 return offset;
1156 static int
1157 dissect_dpnss_LbL_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
1159 proto_item *ind_field_item;
1160 proto_tree *sic_field_tree, *ind_field_tree;
1161 int offset = 0;
1162 int tvb_end_offset;
1163 uint8_t octet;
1165 tvb_end_offset = tvb_reported_length(tvb);
1167 proto_tree_add_item(tree, hf_dpnss_LbL_msg_type, tvb, offset, 1, ENC_BIG_ENDIAN);
1168 octet = tvb_get_uint8(tvb,offset)&0x0f;
1169 offset++;
1170 col_add_fstr(pinfo->cinfo, COL_INFO, "%s ",
1171 val_to_str(octet, dpnss_LbL_msg_short_type_vals, "Unknown (%d)" ));
1172 if (tree) {
1173 switch (octet) {
1174 case DPNSS_LbL_MSG_LLM_C:
1175 /* 2.3.1 LINK-by-LINK Message (COMPLETE) - LLM(C)*/
1176 case DPNSS_LbL_MSG_LLM_I:
1177 /* 2.3.2 LINK-by-LINK Message (INCOMPLETE) - LLM(I) */
1178 /* Indication Field */
1179 ind_field_item = proto_tree_add_item(tree, hf_dpnss_indication_field, tvb, offset, -1, ENC_NA|ENC_ASCII);
1180 ind_field_tree = proto_item_add_subtree(ind_field_item, ett_dpnss_ind_field);
1181 offset = dissect_dpnss_sup_info_str(tvb, pinfo, ind_field_tree, offset);
1182 break;
1183 case DPNSS_LbL_MSG_LLRM:
1184 /* 2.3.3 LINK-by-LINK REJECT Message - LLRM */
1185 /* Rejection Cause */
1186 proto_tree_add_item(tree, hf_dpnss_rejection_cause, tvb, offset, 1, ENC_BIG_ENDIAN);
1187 /* Indication Field (Optional) */
1188 if (tvb_end_offset>offset) {
1189 ind_field_item = proto_tree_add_item(tree, hf_dpnss_indication_field, tvb, offset, -1, ENC_NA|ENC_ASCII);
1190 ind_field_tree = proto_item_add_subtree(ind_field_item, ett_dpnss_ind_field);
1191 offset = dissect_dpnss_sup_info_str(tvb, pinfo, ind_field_tree, offset);
1193 break;
1194 case DPNSS_LbL_MSG_SM:
1195 /* 2.3.4 SWAP Message - SM */
1196 /* Service Indicator Code
1197 * Note: On data calls the SIC may comprise more than one octet.
1198 * The Service Indicator Code is coded in accordance with ANNEX 1.
1200 sic_field_tree = proto_tree_add_subtree(tree, tvb, offset, -1, ett_dpnss_sic_field, NULL, "Service Indicator Code");
1201 offset =dissect_dpnss_sic(tvb, pinfo, sic_field_tree, offset);
1202 /* Indication Field */
1203 ind_field_item = proto_tree_add_item(tree, hf_dpnss_indication_field, tvb, offset, -1, ENC_NA|ENC_ASCII);
1204 ind_field_tree = proto_item_add_subtree(ind_field_item, ett_dpnss_ind_field);
1205 offset = dissect_dpnss_sup_info_str(tvb, pinfo, ind_field_tree, offset);
1206 break;
1207 case DPNSS_LbL_MSG_LMM:
1208 /* 2.3.5 LINK MAINTENANCE Message - LMM */
1209 /* Maintenance Action
1210 * respond to a request for,maintenance actions to be performed.
1211 * The Maintenance Action field identifies the action required or
1212 * the response being made. The Maintenance Action field is coded
1213 * as shown in ANNEX 6.
1215 proto_tree_add_item(tree, hf_dpnss_maintenance_action, tvb, offset, 1, ENC_BIG_ENDIAN);
1216 offset++;
1217 /* Indication Field */
1218 ind_field_item = proto_tree_add_item(tree, hf_dpnss_indication_field, tvb, offset, -1, ENC_NA|ENC_ASCII);
1219 ind_field_tree = proto_item_add_subtree(ind_field_item, ett_dpnss_ind_field);
1220 offset = dissect_dpnss_sup_info_str(tvb, pinfo, ind_field_tree, offset);
1221 break;
1222 case DPNSS_LbL_MSG_LMRM:
1223 /* 2.3.6 LINK MAINTENANCE REJECT Message - LMRM */
1224 proto_tree_add_item(tree, hf_dpnss_clearing_cause, tvb, offset, 1, ENC_BIG_ENDIAN);
1225 offset++;
1226 /* Indication Field */
1227 ind_field_item = proto_tree_add_item(tree, hf_dpnss_indication_field, tvb, offset, -1, ENC_NA|ENC_ASCII);
1228 ind_field_tree = proto_item_add_subtree(ind_field_item, ett_dpnss_ind_field);
1229 offset = dissect_dpnss_sup_info_str(tvb, pinfo, ind_field_tree, offset);
1230 break;
1231 default:
1232 proto_tree_add_expert(tree, pinfo, &ei_dpnss_not_supported_yet, tvb, offset, -1);
1233 break;
1236 return offset;
1240 static int
1241 dissect_dpnss_e2e_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
1243 proto_item *sel_field_item, *ind_field_item;
1244 proto_tree *sel_field_tree, *sic_field_tree, *ind_field_tree;
1245 int offset = 0;
1246 int tvb_end_offset;
1247 uint8_t octet;
1249 tvb_end_offset = tvb_reported_length(tvb);
1251 proto_tree_add_item(tree, hf_dpnss_e2e_msg_type, tvb, offset, 1, ENC_BIG_ENDIAN);
1252 octet = tvb_get_uint8(tvb,offset)&0x0f;
1253 offset++;
1254 col_add_fstr(pinfo->cinfo, COL_INFO, "%s ",
1255 val_to_str(octet, dpnss_e2e_msg_short_type_vals, "Unknown (%d)" ));
1256 if (tree) {
1257 switch (octet) {
1258 case DPNSS_E2E_MSG_EEM_C:
1259 /* 2.2.1 END-to-END Message (COMPLETE) - EEM(C) */
1260 case DPNSS_E2E_MSG_EEM_I:
1261 /* Fall trough */
1262 /* Indication Field */
1263 ind_field_item = proto_tree_add_item(tree, hf_dpnss_indication_field, tvb, offset, -1, ENC_NA|ENC_ASCII);
1264 ind_field_tree = proto_item_add_subtree(ind_field_item, ett_dpnss_ind_field);
1265 offset = dissect_dpnss_sup_info_str(tvb, pinfo, ind_field_tree, offset);
1266 break;
1267 case DPNSS_E2E_MSG_SCRM:
1268 /* 2.2.3 SINGLE-CHANNEL CLEAR REQUEST Message - SCRM */
1269 case DPNSS_E2E_MSG_SCIM:
1270 /* 2.2.4 SINGLE-CHANNEL CLEAR INDICATION Message - SCIM */
1271 /* Clearing Cause */
1272 proto_tree_add_item(tree, hf_dpnss_clearing_cause, tvb, offset, 1, ENC_BIG_ENDIAN);
1273 offset++;
1274 /* Indication Field (Optional) */
1275 if (tvb_end_offset>offset) {
1276 ind_field_item = proto_tree_add_item(tree, hf_dpnss_indication_field, tvb, offset, -1, ENC_NA|ENC_ASCII);
1277 ind_field_tree = proto_item_add_subtree(ind_field_item, ett_dpnss_ind_field);
1278 offset = dissect_dpnss_sup_info_str(tvb, pinfo, ind_field_tree, offset);
1280 break;
1281 case DPNSS_E2E_MSG_ERM_C:
1282 /* 2.2.5 END-to-END RECALL Message (COMPLETE) - ERM(C) */
1283 case DPNSS_E2E_MSG_ERM_I:
1284 /* 2.2.6 END-to-END RECALL Message (INCOMPLETE) - ERM(I) */
1285 /* Service Indicator Code
1286 * Note: On data calls the SIC may comprise more than one octet.
1287 * The Service Indicator Code is coded in accordance with ANNEX 1.
1289 sic_field_tree = proto_tree_add_subtree(tree, tvb, offset, -1, ett_dpnss_sic_field, NULL, "Service Indicator Code");
1290 offset =dissect_dpnss_sic(tvb, pinfo, sic_field_tree, offset);
1292 * Selection Field
1293 * The Selection Field contains the selection information relating
1294 * to a call set-up or Supplementary Service Request, and is
1295 * structured as shown in Subsection 3.
1297 sel_field_item = proto_tree_add_item(tree, hf_dpnss_selection_field, tvb, offset, -1, ENC_NA|ENC_ASCII);
1298 sel_field_tree = proto_item_add_subtree(sel_field_item, ett_dpnss_sel_field);
1299 offset = dissect_dpnss_sup_info_str(tvb, pinfo, sel_field_tree, offset);
1300 break;
1301 case DPNSS_E2E_MSG_NSIM:
1302 /* 2.2.7 NON SPECIFIED INFORMATION Message - NSIM */
1303 /* Usage Identifier Oct 1 -
1304 * coding of the Usage Identifier, as described in section 49.
1305 * The use of NSIMs is described in greater detail in SECTION 49.
1306 * BIT 8 7 6 5 4 3 2 1
1307 * ext | Manufacturer code | subcode
1309 octet = tvb_get_uint8(tvb,offset);
1310 proto_tree_add_item(tree, hf_dpnss_ext_bit, tvb, offset, 1, ENC_BIG_ENDIAN);
1311 proto_tree_add_item(tree, hf_dpnss_man_code, tvb, offset, 1, ENC_BIG_ENDIAN);
1312 proto_tree_add_item(tree, hf_dpnss_subcode, tvb, offset, 1, ENC_BIG_ENDIAN);
1313 offset++;
1314 if ((octet&0x80)==0x80) {
1315 /* Extension bit set */
1316 offset++;
1318 /* User Information oct 2 + n
1320 proto_tree_add_item(tree, hf_dpnss_user_information, tvb, offset, -1, ENC_NA);
1321 break;
1322 default:
1323 proto_tree_add_expert(tree, pinfo, &ei_dpnss_not_supported_yet, tvb, offset, -1);
1324 break;
1327 return offset;
1330 static int
1331 dissect_dpnss_cc_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
1333 proto_item *sel_field_item, *ind_field_item;
1334 proto_tree *sel_field_tree, *sic_field_tree, *ind_field_tree;
1335 int offset = 0;
1336 int tvb_end_offset;
1337 uint8_t octet;
1339 tvb_end_offset = tvb_reported_length(tvb);
1340 proto_tree_add_item(tree, hf_dpnss_cc_msg_type, tvb, offset, 1, ENC_BIG_ENDIAN);
1341 octet = tvb_get_uint8(tvb,offset)&0x0f;
1342 offset++;
1343 col_add_fstr(pinfo->cinfo, COL_INFO, "%s ",
1344 val_to_str(octet, dpnss_cc_msg_short_type_vals, "Unknown (%d)" ));
1346 if (tree) {
1347 switch (octet) {
1348 case DPNSS_CC_MSG_ISRM_C:
1349 /* 2.1.1 INITIAL SERVICE REQUEST Message (COMPLETE) - ISRM (C) */
1350 /* fall trough */
1351 case DPNSS_CC_MSG_ISRM_I:
1352 /* 2.1.2 INITIAL SERVICE REQUEST Message (INCOMPLETE) - ISRM(I) */
1353 case DPNSS_CC_MSG_RM_C:
1354 /* 2.1.3 RECALL Message (COMPLETE) - RM(C) */
1355 /* fall trough */
1356 case DPNSS_CC_MSG_RM_I:
1357 /* 2.1.4 RECALL Message (INCOMPLETE) - RM(I)*/
1358 /* fall trough */
1359 /* Service Indicator Code
1360 * Note: On data calls the SIC may comprise more than one octet.
1361 * The Service Indicator Code is coded in accordance with ANNEX 1.
1363 sic_field_tree = proto_tree_add_subtree(tree, tvb, offset, -1, ett_dpnss_sic_field, NULL, "Service Indicator Code");
1364 offset =dissect_dpnss_sic(tvb, pinfo, sic_field_tree, offset);
1366 * Selection Field
1367 * The Selection Field contains the selection information relating
1368 * to a call set-up or Supplementary Service Request, and is
1369 * structured as shown in Subsection 3.
1371 sel_field_item = proto_tree_add_item(tree, hf_dpnss_selection_field, tvb, offset, -1, ENC_NA|ENC_ASCII);
1372 sel_field_tree = proto_item_add_subtree(sel_field_item, ett_dpnss_sel_field);
1373 offset = dissect_dpnss_sup_info_str(tvb, pinfo, sel_field_tree, offset);
1374 break;
1375 case DPNSS_CC_MSG_CCM:
1376 /* 2.1.5 CALL CONNECTED Message - CCM */
1377 if (tvb_end_offset>offset) {
1378 /* Indication Field (Optional) */
1379 ind_field_item = proto_tree_add_item(tree, hf_dpnss_indication_field, tvb, offset, -1, ENC_NA|ENC_ASCII);
1380 ind_field_tree = proto_item_add_subtree(ind_field_item, ett_dpnss_ind_field);
1381 offset = dissect_dpnss_sup_info_str(tvb, pinfo, ind_field_tree, offset);
1383 break;
1384 case DPNSS_CC_MSG_NIM:
1385 /* 2.1.6 NETWORK INDICATION Message - NIM */
1386 /* fall trough */
1387 case DPNSS_CC_MSG_NAM:
1388 /* 2.1.9 NUMBER ACKNOWLEDGE Message - NAM */
1389 /* Indication Field */
1390 ind_field_item = proto_tree_add_item(tree, hf_dpnss_indication_field, tvb, offset, -1, ENC_NA|ENC_ASCII);
1391 ind_field_tree = proto_item_add_subtree(ind_field_item, ett_dpnss_ind_field);
1392 offset = dissect_dpnss_sup_info_str(tvb, pinfo, ind_field_tree, offset);
1393 break;
1394 case DPNSS_CC_MSG_CRM:
1395 /* 2.1.7 CLEAR REQUEST Message - CRM */
1396 /* 2.1.8 CLEAR INDICATION Message - CIM */
1397 /* Clearing Cause */
1398 proto_tree_add_item(tree, hf_dpnss_clearing_cause, tvb, offset, 1, ENC_BIG_ENDIAN);
1399 offset++;
1400 /* Indication Field (Optional) */
1401 if (tvb_end_offset>offset) {
1402 ind_field_item = proto_tree_add_item(tree, hf_dpnss_indication_field, tvb, offset, -1, ENC_NA|ENC_ASCII);
1403 ind_field_tree = proto_item_add_subtree(ind_field_item, ett_dpnss_ind_field);
1404 offset = dissect_dpnss_sup_info_str(tvb, pinfo, ind_field_tree, offset);
1406 break;
1407 case DPNSS_CC_MSG_RRM:
1408 /* 2.1.10 RECALL REJECTION Message - RRM */
1409 /* Rejection Cause */
1410 proto_tree_add_item(tree, hf_dpnss_rejection_cause, tvb, offset, 1, ENC_BIG_ENDIAN);
1411 /* Indication Field (Optional) */
1412 if (tvb_end_offset>offset) {
1413 ind_field_item = proto_tree_add_item(tree, hf_dpnss_indication_field, tvb, offset, -1, ENC_NA|ENC_ASCII);
1414 ind_field_tree = proto_item_add_subtree(ind_field_item, ett_dpnss_ind_field);
1415 offset = dissect_dpnss_sup_info_str(tvb, pinfo, ind_field_tree, offset);
1417 break;
1418 case DPNSS_CC_MSG_SSRM_I:
1419 /* 2.1.11 SUBSEQUENT SERVICE REQUEST Message (INCOMPLETE) - SSRM(I) */
1420 /* Selection Field */
1421 sel_field_item = proto_tree_add_item(tree, hf_dpnss_selection_field, tvb, offset, -1, ENC_NA|ENC_ASCII);
1422 sel_field_tree = proto_item_add_subtree(sel_field_item, ett_dpnss_sel_field);
1423 offset = dissect_dpnss_sup_info_str(tvb, pinfo, sel_field_tree, offset);
1424 break;
1425 case DPNSS_CC_MSG_SSRM_C:
1426 /* 2.1.12 SUBSEQUENT SERVICE REQUEST Message (COMPLETE) - SSRM(C) */
1427 /* Selection Field (Optional) */
1428 if (tvb_end_offset>offset) {
1429 sel_field_item = proto_tree_add_item(tree, hf_dpnss_selection_field, tvb, offset, -1, ENC_NA|ENC_ASCII);
1430 sel_field_tree = proto_item_add_subtree(sel_field_item, ett_dpnss_sel_field);
1431 offset = dissect_dpnss_sup_info_str(tvb, pinfo, sel_field_tree, offset);
1433 break;
1434 case DPNSS_CC_MSG_CS:
1435 case DPNSS_CC_MSG_CA:
1436 /* DASS2 ?*/
1437 default:
1438 proto_tree_add_expert_format(tree, pinfo, &ei_dpnss_not_supported_yet, tvb, offset, -1, "Unknown or Dissection of this message not supported yet");
1439 break;
1442 return offset;
1444 /* Code to actually dissect the packets */
1445 static int
1446 dissect_dpnss(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
1448 int offset = 0;
1449 proto_item *item, *group_item;
1450 proto_tree *dpnss_tree;
1451 uint8_t octet;
1453 /* Make entries in Protocol column and Info column on summary display */
1454 col_set_str(pinfo->cinfo, COL_PROTOCOL, "DPNSS");
1456 item = proto_tree_add_item(tree, proto_dpnss, tvb, 0, -1, ENC_NA);
1457 dpnss_tree = proto_item_add_subtree(item, ett_dpnss);
1458 group_item = proto_tree_add_item(dpnss_tree, hf_dpnss_msg_grp_id, tvb, offset, 1, ENC_BIG_ENDIAN);
1459 octet = tvb_get_uint8(tvb,offset)>>4;
1460 switch (octet) {
1461 case DPNNS_MESSAGE_GROUP_CC:
1462 /* Call Control Message Group */
1463 dissect_dpnss_cc_msg(tvb, pinfo, dpnss_tree);
1464 break;
1465 case DPNNS_MESSAGE_GROUP_E2E:
1466 /* End-to-End Message Group */
1467 dissect_dpnss_e2e_msg(tvb, pinfo, dpnss_tree);
1468 break;
1469 case DPNNS_MESSAGE_GROUP_LbL:
1470 /* Link-by-Link Message Group */
1471 dissect_dpnss_LbL_msg(tvb, pinfo, dpnss_tree);
1472 break;
1473 default:
1474 expert_add_info(pinfo, group_item, &ei_dpnss_msg_grp_id);
1475 break;
1477 return tvb_captured_length(tvb);
1480 void
1481 proto_register_dpnss(void)
1483 /* Setup list of header fields See Section 1.6.1 for details*/
1484 static hf_register_info hf[] = {
1485 { &hf_dpnss_msg_grp_id,
1486 { "Message Group Identifier", "dpnss.msg_grp_id",
1487 FT_UINT8, BASE_DEC, VALS(dpnss_msg_grp_id_vals), 0xf0,
1488 NULL, HFILL }
1490 { &hf_dpnss_cc_msg_type,
1491 { "Call Control Message Type", "dpnss.cc_msg_type",
1492 FT_UINT8, BASE_DEC, VALS(dpnss_cc_msg_type_vals), 0x0f,
1493 NULL, HFILL }
1495 { &hf_dpnss_e2e_msg_type,
1496 { "END-TO-END Message Type", "dpnss.e2e_msg_type",
1497 FT_UINT8, BASE_DEC, VALS(dpnss_e2e_msg_type_vals), 0x0f,
1498 NULL, HFILL }
1500 { &hf_dpnss_LbL_msg_type,
1501 { "LINK-BY-LINK Message Type", "dpnss.lbl_msg_type",
1502 FT_UINT8, BASE_DEC, VALS(dpnss_LbL_msg_type_vals), 0x0f,
1503 NULL, HFILL }
1505 { &hf_dpnss_ext_bit,
1506 { "Extension bit", "dpnss.ext_bit",
1507 FT_BOOLEAN, 8, TFS(&dpnss_ext_bit_vals), 0x80,
1508 NULL, HFILL }
1510 { &hf_dpnss_ext_bit_notall,
1511 { "Extension bit", "dpnss.ext_bit_notall",
1512 FT_BOOLEAN, 8, TFS(&dpnss_ext_bit_no_ext_vals), 0x80,
1513 NULL, HFILL }
1515 { &hf_dpnss_sic_type,
1516 { "Type of data", "dpnss.sic_type",
1517 FT_UINT8, BASE_DEC, VALS(dpnss_sic_type_type_vals), 0x70,
1518 NULL, HFILL }
1520 { &hf_dpnss_sic_details_for_speech,
1521 { "Details for Speech", "dpnss.sic_details_for_speech",
1522 FT_UINT8, BASE_DEC, VALS(dpnss_sic_details_for_speech_vals), 0x0f,
1523 NULL, HFILL }
1525 { &hf_dpnss_sic_details_for_data1,
1526 { "Data Rates", "dpnss.sic_details_for_data1",
1527 FT_UINT8, BASE_DEC, VALS(dpnss_sic_details_for_data_rates1_vals), 0x0f,
1528 "Type of Data (010) : Data Rates", HFILL }
1530 { &hf_dpnss_sic_details_for_data2,
1531 { "Data Rates", "dpnss.sic_details_data2",
1532 FT_UINT8, BASE_DEC, VALS(dpnss_sic_details_for_data_rates2_vals), 0x0f,
1533 "Type of Data (011) : Data Rates", HFILL }
1535 { &hf_dpnss_dest_addr,
1536 { "Destination Address", "dpnss.dest_addr",
1537 FT_STRING, BASE_NONE, NULL, 0x0,
1538 NULL, HFILL }
1540 { &hf_dpnss_sic_oct2_data_type,
1541 { "Data Type", "dpnss.sic_oct2_data_type",
1542 FT_UINT8, BASE_DEC, VALS(dpnss_sic_oct2_data_type_vals), 0x03,
1543 NULL, HFILL }
1545 { &hf_dpnss_sic_oct2_duplex,
1546 { "Data Type", "dpnss.sic_oct2_duplex",
1547 FT_BOOLEAN, 8, TFS(&dpnss_duplex_vals), 0x08,
1548 NULL, HFILL }
1550 { &hf_dpnss_sic_oct2_net_ind_clk,
1551 { "Network Independent Clock", "dpnss.sic_oct2_net_ind_clk",
1552 FT_BOOLEAN, 8, TFS(&dpnss_sic_oct2_net_ind_clk_vals), 0x40,
1553 NULL, HFILL }
1555 { &hf_dpnss_sic_oct2_sync_data_format,
1556 { "Data Format", "dpnss.sic_oct2_sync_data_format",
1557 FT_BOOLEAN, 8, TFS(&dpnss_sic_oct2_sync_data_format_vals), 0x20,
1558 NULL, HFILL }
1560 { &hf_dpnss_sic_oct2_sync_byte_timing,
1561 { "Byte Timing", "dpnss.sic_oct2_sync_byte_timing",
1562 FT_BOOLEAN, 8, TFS(&dpnss_provided_vals), 0x10,
1563 NULL, HFILL }
1565 { &hf_dpnss_sic_oct2_async_data,
1566 { "Data Format", "dpnss.sic_oct2_async_data",
1567 FT_UINT8, BASE_DEC, VALS(dpnss_sic_oct2_async_data_type_vals), 0x30,
1568 NULL, HFILL }
1570 { &hf_dpnss_sic_oct2_async_flow_ctrl,
1571 { "Flow Control", "dpnss.sic_oct2_async_flow_ctrl",
1572 FT_BOOLEAN, 8, TFS(&dpnss_flow_control_vals), 0x40,
1573 NULL, HFILL }
1575 { &hf_dpnss_clearing_cause,
1576 { "Clearing Cause", "dpnss.clearing_cause",
1577 FT_UINT8, BASE_DEC, VALS(dpnss_clearing_cause_code_vals), 0x0,
1578 NULL, HFILL }
1580 { &hf_dpnss_rejection_cause,
1581 { "Rejection Cause", "dpnss.rejection_cause",
1582 FT_UINT8, BASE_DEC, VALS(dpnss_clearing_cause_code_vals), 0x0,
1583 NULL, HFILL }
1585 { &hf_dpnss_man_code,
1586 { "Manufacturer Code", "dpnss.man_code",
1587 FT_UINT8, BASE_DEC, VALS(dpnss_man_code_vals), 0x3c,
1588 NULL, HFILL }
1590 { &hf_dpnss_subcode,
1591 { "Subcode", "dpnss.subcode",
1592 FT_UINT8, BASE_DEC, NULL, 0x03,
1593 NULL, HFILL }
1595 { &hf_dpnss_maintenance_action,
1596 { "Maintenance action", "dpnss.maint_act",
1597 FT_UINT8, BASE_DEC, VALS(dpnss_maintenance_actions_vals), 0x0,
1598 NULL, HFILL }
1600 { &hf_dpnss_a_b_party_addr,
1601 { "A/B party Address", "dpnss.a_b_party_addr",
1602 FT_STRING, BASE_NONE, NULL, 0x0,
1603 NULL, HFILL }
1605 { &hf_dpnss_call_idx,
1606 { "Call Index", "dpnss.call_idx",
1607 FT_STRING, BASE_NONE, NULL, 0x0,
1608 NULL, HFILL }
1611 /* Generated from convert_proto_tree_add_text.pl */
1612 { &hf_dpnss_indication_field, { "Indication Field", "dpnss.indication_field", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
1613 { &hf_dpnss_selection_field, { "Selection Field", "dpnss.selection_field", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
1614 { &hf_dpnss_user_information, { "User Information", "dpnss.user_information", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
1615 { &hf_dpnss_sup_str, { "Sup str", "dpnss.sup_str", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
1616 { &hf_dpnss_parameter, { "Parameter", "dpnss.parameter", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
1620 /* Setup protocol subtree array */
1621 static int *ett[] = {
1622 &ett_dpnss,
1623 &ett_dpnss_sel_field,
1624 &ett_dpnss_sic_field,
1625 &ett_dpnss_ind_field,
1626 &ett_dpnss_sup_str,
1629 static ei_register_info ei[] = {
1630 { &ei_dpnss_not_supported_yet, { "dpnss.not_supported_yet", PI_UNDECODED, PI_WARN, "Dissection of this message not supported yet", EXPFILL }},
1631 { &ei_dpnss_msg_grp_id, { "dpnss.msg_grp_id.unknown", PI_PROTOCOL, PI_WARN, "Unknown Message Group", EXPFILL }},
1634 expert_module_t* expert_dpnss;
1636 /* Register the protocol name and description */
1637 proto_dpnss = proto_register_protocol("Digital Private Signalling System No 1","DPNSS", "dpnss");
1638 register_dissector("dpnss", dissect_dpnss, proto_dpnss);
1640 /* Required function calls to register the header fields and subtrees used */
1641 proto_register_field_array(proto_dpnss, hf, array_length(hf));
1642 proto_register_subtree_array(ett, array_length(ett));
1643 expert_dpnss = expert_register_protocol(proto_dpnss);
1644 expert_register_field_array(expert_dpnss, ei, array_length(ei));
1649 * Editor modelines - https://www.wireshark.org/tools/modelines.html
1651 * Local variables:
1652 * c-basic-offset: 4
1653 * tab-width: 8
1654 * indent-tabs-mode: nil
1655 * End:
1657 * vi: set shiftwidth=4 tabstop=8 expandtab:
1658 * :indentSize=4:tabSize=8:noTabs=true: