7 * Gateway control protocol: Facsimile, text conversation and call discrimination packages
9 * (c) 2012, Anders broman <anders.broman@ericsson.com>
11 * Wireshark - Network traffic analyzer
12 * By Gerald Combs <gerald@wireshark.org>
13 * Copyright 1998 Gerald Combs
15 * This program is free software; you can redistribute it and/or
16 * modify it under the terms of the GNU General Public License
17 * as published by the Free Software Foundation; either version 2
18 * of the License, or (at your option) any later version.
20 * This program is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 * GNU General Public License for more details.
25 * You should have received a copy of the GNU General Public License
26 * along with this program; if not, write to the Free Software
27 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
33 #include "packet-h248.h"
34 #define PNAME "H.248.2"
35 #define PSNAME "H248_2"
36 #define PFNAME "h248.2"
38 static int proto_h248_2
= -1;
40 /* static int hf_h248_2_dtone_evt = -1; */
41 static int hf_h248_2_dtone_dtt_obs_evt
= -1;
42 static int hf_h248_2_dtone_dtt_obs_evt_val
= -1;
44 static gint ett_h248_2
= -1;
45 static gint ett_h248_2_dtone_dtt_obs_evt
= -1;
48 static const value_string hf_h248_2_dtone_dtt_obs_evt_val_values
[] = {
50 { 0x0001, "CNG"}, /* A T.30 fax calling tone */
51 { 0x0002, "V21flag"}, /* V21 tone and flags for fax answering */
53 { 0x0003, "XCI"}, /* A V.18 XCI */
54 { 0x0004, "V18txp1"}, /* A V.18 txp signal in channel V.21(1) */
55 { 0x0005, "V18txp2"}, /* A V.18 txp signal in channel V.21(2) */
56 { 0x0006, "BellHi"}, /* A Bell 103 carrier on the high channel */
57 { 0x0007, "BellLo"}, /* A Bell 103 low channel */
58 { 0x0008, "Baudot45"}, /* Baudot45 initial carrier and characters */
59 { 0x0009, "Baudot50"}, /* A Baudot50 initial carrier and characters */
60 { 0x000a, "Edt"}, /* An EDT initial tone and characters */
61 { 0x000b, "DTMF"}, /* DTMF signals */
62 { 0x001c, "CTM"}, /* CTM signals */
64 { 0x000c, "Sig"}, /* Modulation signal from a mode only used for data, i.e., not V.21, V.23 nor Bell 103 */
65 /* Common to TEXT and DATA */
66 { 0x000d, "CT"}, /* A V.25 calling tone */
67 { 0x000e, "V21hi"}, /* A V.21 carrier on the higher frequency channel */
68 { 0x000f, "V21lo"}, /* A V.21 carrier on the low frequency channel */
69 { 0x0010, "V23hi"}, /* A V.23 high carrier */
70 { 0x0011, "V23lo"}, /* A V.23 low carrier */
71 { 0x0012, "CI"}, /* A V.8 CI with contents in "dtvalue" */
72 /* Common to FAX, TEXT and DATA */
73 { 0x0013, "ANS(T.30 CED)"}, /* V.25 ANS, equivalent to T.30 CED from answering terminal */
74 { 0x0014, "ANSbar"}, /* V.25 ANS with phase reversals" */
75 { 0x0015, "ANSAM"}, /* V.8 ANSam */
76 { 0x0016, "ANSAMbar"}, /* V.8 ANSam with phase reversals */
77 { 0x0017, "CM"}, /* V.8 CM with contents in "dtvalue" */
78 { 0x0018, "CJ"}, /* V.8 CJ */
79 { 0x0019, "JM"}, /* V.8 JM with contents in "dtvalue" */
80 { 0x001a, "ENDOFSIG"}, /* End of reported signal detected reported for continuous or repeated signals */
81 { 0x001b, "V8BIS"}, /* V.8 bis signal, with signal type in parameter V8bistype and value in "dtvalue" */
85 static h248_pkg_param_t h248_2_dtone_dtt_obs_evt_params
[] = {
86 { 0x0001, &hf_h248_2_dtone_dtt_obs_evt_val
, h248_param_ber_integer
, NULL
},
87 { 0, NULL
, NULL
, NULL
}
91 static const value_string h248_2_ctype_events_vals
[] = {
92 { 0x0001, "Discriminating Tone Detected(dtone)"},
93 { 0x0002, "Call Type Discrimination Result(calldisres)"},
97 static h248_pkg_evt_t h248_pkg_generic_cause_evts
[] = {
98 { 0x0001, &hf_h248_2_dtone_dtt_obs_evt
, &ett_h248_2_dtone_dtt_obs_evt
, h248_2_dtone_dtt_obs_evt_params
, h248_2_ctype_events_vals
},
99 { 0, NULL
, NULL
, NULL
, NULL
}
104 /* Call Type Discrimination Package */
105 static const h248_package_t h248_pkg_ctype
= {
107 &proto_h248_2
, /* hfid */
108 &ett_h248_2
, /* ett */
110 NULL
, /* value_string param_names */
111 NULL
, /* value_string signal_names */
112 h248_2_ctype_events_vals
, /* value_string event_names */
113 NULL
, /* value_string stats_names */
115 NULL
, /* properties */
117 h248_pkg_generic_cause_evts
, /* events */
118 NULL
/* statistics */
121 void proto_register_h248_dot2(void) {
122 static hf_register_info hf
[] = {
124 { &hf_h248_2_dtone_evt
,
125 { "Discriminating Tone Type", "h248.2.dtt",
126 FT_BYTES
, BASE_NONE
, NULL
, 0,
130 { &hf_h248_2_dtone_dtt_obs_evt
,
131 { "Discriminating Tone Type(dtt)", "h248.2.dtt",
132 FT_BYTES
, BASE_NONE
, NULL
, 0,
135 { &hf_h248_2_dtone_dtt_obs_evt_val
,
136 { "call type", "h248.2.dtt.val",
137 FT_UINT32
, BASE_DEC
, VALS(hf_h248_2_dtone_dtt_obs_evt_val_values
) , 0,
143 static gint
*ett
[] = {
145 &ett_h248_2_dtone_dtt_obs_evt
,
148 proto_h248_2
= proto_register_protocol(PNAME
, PSNAME
, PFNAME
);
150 proto_register_field_array(proto_h248_2
, hf
, array_length(hf
));
152 proto_register_subtree_array(ett
, array_length(ett
));
154 h248_register_package(&h248_pkg_ctype
,MERGE_PKG_HIGH
);