smb2-dissector: learn the "REPLAY_OPERATION" flag
[obnox/wireshark/wip.git] / asn1 / ansi_map / packet-ansi_map-template.c
1 /* packet-ansi_map.c
2  * Routines for ANSI 41 Mobile Application Part (IS41 MAP) dissection
3  * Specications from 3GPP2 (www.3gpp2.org)
4  * Based on the dissector by :
5  * Michael Lum <mlum [AT] telostech.com>
6  * In association with Telos Technology Inc.
7  *
8  * Copyright 2005 - 2009, Anders Broman <anders.broman@ericsson.com>
9  *
10  * $Id$
11  *
12  * Wireshark - Network traffic analyzer
13  * By Gerald Combs <gerald@wireshark.org>
14  * Copyright 1998 Gerald Combs
15  *
16  * This program is free software; you can redistribute it and/or
17  * modify it under the terms of the GNU General Public License
18  * as published by the Free Software Foundation; either version 2
19  * of the License, or (at your option) any later version.
20  *
21  * This program is distributed in the hope that it will be useful,
22  * but WITHOUT ANY WARRANTY; without even the implied warranty of
23  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
24  * GNU General Public License for more details.
25  *
26  * You should have received a copy of the GNU General Public License
27  * along with this program; if not, write to the Free Software
28  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
29  *
30  * Credit to Tomas Kukosa for developing the asn2wrs compiler.
31  *
32  * Title                3GPP2                   Other
33  *
34  *   Cellular Radiotelecommunications Intersystem Operations
35  *                      3GPP2 N.S0005-0 v 1.0           ANSI/TIA/EIA-41-D
36  *
37  *   Network Support for MDN-Based Message Centers
38  *                      3GPP2 N.S0024-0 v1.0    IS-841
39  *
40  *   Enhanced International Calling
41  *                      3GPP2 N.S0027           IS-875
42  *
43  *   ANSI-41-D Miscellaneous Enhancements Revision 0
44  *                      3GPP2 N.S0015           PN-3590 (ANSI-41-E)
45  *
46  *   Authentication Enhancements
47  *                      3GPP2 N.S0014-0 v1.0    IS-778
48  *
49  *   Features In CDMA
50  *                      3GPP2 N.S0010-0 v1.0    IS-735
51  *
52  *   OTASP and OTAPA
53  *                      3GPP2 N.S0011-0 v1.0    IS-725-A
54  *
55  *   Circuit Mode Services
56  *                      3GPP2 N.S0008-0 v1.0    IS-737
57  *      XXX SecondInterMSCCircuitID not implemented, parameter ID conflicts with ISLP Information!
58  *
59  *   IMSI
60  *                      3GPP2 N.S0009-0 v1.0    IS-751
61  *
62  *   WIN Phase 1
63  *                      3GPP2 N.S0013-0 v1.0    IS-771
64  *
65  *       DCCH (Clarification of Audit Order with Forced
66  *         Re-Registration in pre-TIA/EIA-136-A Implementation
67  *                      3GPP2 A.S0017-B                 IS-730
68  *
69  *   UIM
70  *                      3GPP2 N.S0003
71  *
72  *   WIN Phase 2
73  *                      3GPP2 N.S0004-0 v1.0    IS-848
74  *
75  *   TIA/EIA-41-D Pre-Paid Charging
76  *                      3GPP2 N.S0018-0 v1.0    IS-826
77  *
78  *   User Selective Call Forwarding
79  *                      3GPP2 N.S0021-0 v1.0    IS-838
80  *
81  *
82  *   Answer Hold
83  *                      3GPP2 N.S0022-0 v1.0    IS-837
84  *
85  */
86
87 #ifdef HAVE_CONFIG_H
88 # include "config.h"
89 #endif
90
91 #include <glib.h>
92 #include <epan/packet.h>
93 #include <epan/prefs.h>
94 #include <epan/tap.h>
95 #include <epan/asn1.h>
96
97 #include "packet-ber.h"
98 #include "packet-ansi_map.h"
99 #include "packet-ansi_a.h"
100 #include "packet-gsm_map.h"
101 #include "packet-tcap.h"
102 #include "packet-ansi_tcap.h"
103
104 #define PNAME  "ANSI Mobile Application Part"
105 #define PSNAME "ANSI MAP"
106 #define PFNAME "ansi_map"
107
108 /* Preference settings default */
109 #define MAX_SSN 254
110 static range_t *global_ssn_range;
111 gint ansi_map_response_matching_type = 1;
112
113 #define ANSI_MAP_TID_ONLY 0
114
115 static dissector_handle_t ansi_map_handle=NULL;
116
117 /* Initialize the protocol and registered fields */
118 static int ansi_map_tap = -1;
119 static int proto_ansi_map = -1;
120
121 static int hf_ansi_map_op_code_fam = -1;
122 static int hf_ansi_map_op_code = -1;
123
124 static int hf_ansi_map_reservedBitH = -1;
125 static int hf_ansi_map_reservedBitHG = -1;
126 static int hf_ansi_map_reservedBitHGFE = -1;
127 static int hf_ansi_map_reservedBitFED = -1;
128 static int hf_ansi_map_reservedBitD = -1;
129 static int hf_ansi_map_reservedBitED = -1;
130
131 static int hf_ansi_map_type_of_digits = -1;
132 static int hf_ansi_map_na = -1;
133 static int hf_ansi_map_pi = -1;
134 static int hf_ansi_map_navail = -1;
135 static int hf_ansi_map_si = -1;
136 static int hf_ansi_map_digits_enc = -1;
137 static int hf_ansi_map_np = -1;
138 static int hf_ansi_map_nr_digits = -1;
139 static int hf_ansi_map_bcd_digits = -1;
140 static int hf_ansi_map_ia5_digits = -1;
141 static int hf_ansi_map_subaddr_type = -1;
142 static int hf_ansi_map_subaddr_odd_even = -1;
143 static int hf_ansi_alertcode_cadence = -1;
144 static int hf_ansi_alertcode_pitch = -1;
145 static int hf_ansi_alertcode_alertaction = -1;
146 static int hf_ansi_map_announcementcode_tone = -1;
147 static int hf_ansi_map_announcementcode_class = -1;
148 static int hf_ansi_map_announcementcode_std_ann = -1;
149 static int hf_ansi_map_announcementcode_cust_ann = -1;
150 static int hf_ansi_map_authorizationperiod_period = -1;
151 static int hf_ansi_map_value = -1;
152 static int hf_ansi_map_msc_type = -1;
153 static int hf_ansi_map_handoffstate_pi = -1;
154 static int hf_ansi_map_tgn = -1;
155 static int hf_ansi_map_tmn = -1;
156 static int hf_ansi_map_messagewaitingnotificationcount_tom = -1;
157 static int hf_ansi_map_messagewaitingnotificationcount_no_mw = -1;
158 static int hf_ansi_map_messagewaitingnotificationtype_mwi = -1;
159 static int hf_ansi_map_messagewaitingnotificationtype_apt = -1;
160 static int hf_ansi_map_messagewaitingnotificationtype_pt = -1;
161
162 static int hf_ansi_map_trans_cap_prof = -1;
163 static int hf_ansi_map_trans_cap_busy = -1;
164 static int hf_ansi_map_trans_cap_ann = -1;
165 static int hf_ansi_map_trans_cap_rui = -1;
166 static int hf_ansi_map_trans_cap_spini = -1;
167 static int hf_ansi_map_trans_cap_uzci = -1;
168 static int hf_ansi_map_trans_cap_ndss = -1;
169 static int hf_ansi_map_trans_cap_nami = -1;
170 static int hf_ansi_trans_cap_multerm = -1;
171 static int hf_ansi_map_terminationtriggers_busy = -1;
172 static int hf_ansi_map_terminationtriggers_rf = -1;
173 static int hf_ansi_map_terminationtriggers_npr = -1;
174 static int hf_ansi_map_terminationtriggers_na = -1;
175 static int hf_ansi_map_terminationtriggers_nr = -1;
176 static int hf_ansi_trans_cap_tl = -1;
177 static int hf_ansi_map_cdmaserviceoption = -1;
178 static int hf_ansi_trans_cap_waddr = -1;
179 static int hf_ansi_map_MarketID = -1;
180 static int hf_ansi_map_swno = -1;
181 static int hf_ansi_map_idno = -1;
182 static int hf_ansi_map_segcount = -1;
183 static int hf_ansi_map_sms_originationrestrictions_fmc = -1;
184 static int hf_ansi_map_sms_originationrestrictions_direct = -1;
185 static int hf_ansi_map_sms_originationrestrictions_default = -1;
186 static int hf_ansi_map_systemcapabilities_auth = -1;
187 static int hf_ansi_map_systemcapabilities_se = -1;
188 static int hf_ansi_map_systemcapabilities_vp = -1;
189 static int hf_ansi_map_systemcapabilities_cave = -1;
190 static int hf_ansi_map_systemcapabilities_ssd = -1;
191 static int hf_ansi_map_systemcapabilities_dp = -1;
192
193 static int hf_ansi_map_mslocation_lat = -1;
194 static int hf_ansi_map_mslocation_long = -1;
195 static int hf_ansi_map_mslocation_res = -1;
196 static int hf_ansi_map_nampscallmode_namps = -1;
197 static int hf_ansi_map_nampscallmode_amps = -1;
198 static int hf_ansi_map_nampschanneldata_navca = -1;
199 static int hf_ansi_map_nampschanneldata_CCIndicator = -1;
200
201 static int hf_ansi_map_callingfeaturesindicator_cfufa = -1;
202 static int hf_ansi_map_callingfeaturesindicator_cfbfa = -1;
203 static int hf_ansi_map_callingfeaturesindicator_cfnafa = -1;
204 static int hf_ansi_map_callingfeaturesindicator_cwfa = -1;
205 static int hf_ansi_map_callingfeaturesindicator_3wcfa = -1;
206 static int hf_ansi_map_callingfeaturesindicator_pcwfa =-1;
207 static int hf_ansi_map_callingfeaturesindicator_dpfa = -1;
208 static int hf_ansi_map_callingfeaturesindicator_ahfa = -1;
209 static int hf_ansi_map_callingfeaturesindicator_uscfvmfa = -1;
210 static int hf_ansi_map_callingfeaturesindicator_uscfmsfa = -1;
211 static int hf_ansi_map_callingfeaturesindicator_uscfnrfa = -1;
212 static int hf_ansi_map_callingfeaturesindicator_cpdsfa = -1;
213 static int hf_ansi_map_callingfeaturesindicator_ccsfa = -1;
214 static int hf_ansi_map_callingfeaturesindicator_epefa = -1;
215 static int hf_ansi_map_callingfeaturesindicator_cdfa = -1;
216 static int hf_ansi_map_callingfeaturesindicator_vpfa = -1;
217 static int hf_ansi_map_callingfeaturesindicator_ctfa = -1;
218 static int hf_ansi_map_callingfeaturesindicator_cnip1fa = -1;
219 static int hf_ansi_map_callingfeaturesindicator_cnip2fa = -1;
220 static int hf_ansi_map_callingfeaturesindicator_cnirfa = -1;
221 static int hf_ansi_map_callingfeaturesindicator_cniroverfa = -1;
222 static int hf_ansi_map_cdmacallmode_cdma = -1;
223 static int hf_ansi_map_cdmacallmode_amps = -1;
224 static int hf_ansi_map_cdmacallmode_namps = -1;
225 static int hf_ansi_map_cdmacallmode_cls1 = -1;
226 static int hf_ansi_map_cdmacallmode_cls2 = -1;
227 static int hf_ansi_map_cdmacallmode_cls3 = -1;
228 static int hf_ansi_map_cdmacallmode_cls4 = -1;
229 static int hf_ansi_map_cdmacallmode_cls5 = -1;
230 static int hf_ansi_map_cdmacallmode_cls6 = -1;
231 static int hf_ansi_map_cdmacallmode_cls7 = -1;
232 static int hf_ansi_map_cdmacallmode_cls8 = -1;
233 static int hf_ansi_map_cdmacallmode_cls9 = -1;
234 static int hf_ansi_map_cdmacallmode_cls10 = -1;
235 static int hf_ansi_map_cdmachanneldata_Frame_Offset = -1;
236 static int hf_ansi_map_cdmachanneldata_CDMA_ch_no = -1;
237 static int hf_ansi_map_cdmachanneldata_band_cls = -1;
238 static int hf_ansi_map_cdmachanneldata_lc_mask_b6 = -1;
239 static int hf_ansi_map_cdmachanneldata_lc_mask_b5 = -1;
240 static int hf_ansi_map_cdmachanneldata_lc_mask_b4 = -1;
241 static int hf_ansi_map_cdmachanneldata_lc_mask_b3 = -1;
242 static int hf_ansi_map_cdmachanneldata_lc_mask_b2 = -1;
243 static int hf_ansi_map_cdmachanneldata_lc_mask_b1 = -1;
244 static int hf_ansi_map_cdmachanneldata_np_ext = -1;
245 static int hf_ansi_map_cdmachanneldata_nominal_pwr = -1;
246 static int hf_ansi_map_cdmachanneldata_nr_preamble = -1;
247
248 static int hf_ansi_map_cdmastationclassmark_pc = -1;
249 static int hf_ansi_map_cdmastationclassmark_dtx = -1;
250 static int hf_ansi_map_cdmastationclassmark_smi = -1;
251 static int hf_ansi_map_cdmastationclassmark_dmi = -1;
252 static int hf_ansi_map_channeldata_vmac = -1;
253 static int hf_ansi_map_channeldata_dtx = -1;
254 static int hf_ansi_map_channeldata_scc = -1;
255 static int hf_ansi_map_channeldata_chno = -1;
256 static int hf_ansi_map_ConfidentialityModes_vp = -1;
257 static int hf_ansi_map_controlchanneldata_dcc = -1;
258 static int hf_ansi_map_controlchanneldata_cmac = -1;
259 static int hf_ansi_map_controlchanneldata_chno = -1;
260 static int hf_ansi_map_controlchanneldata_sdcc1 = -1;
261 static int hf_ansi_map_controlchanneldata_sdcc2 = -1;
262 static int hf_ansi_map_ConfidentialityModes_se = -1;
263 static int hf_ansi_map_deniedauthorizationperiod_period = -1;
264 static int hf_ansi_map_ConfidentialityModes_dp = -1;
265
266 static int hf_ansi_map_originationtriggers_all = -1;
267 static int hf_ansi_map_originationtriggers_local = -1;
268 static int hf_ansi_map_originationtriggers_ilata = -1;
269 static int hf_ansi_map_originationtriggers_olata = -1;
270 static int hf_ansi_map_originationtriggers_int = -1;
271 static int hf_ansi_map_originationtriggers_wz = -1;
272 static int hf_ansi_map_originationtriggers_unrec = -1;
273 static int hf_ansi_map_originationtriggers_rvtc = -1;
274 static int hf_ansi_map_originationtriggers_star = -1;
275 static int hf_ansi_map_originationtriggers_ds = -1;
276 static int hf_ansi_map_originationtriggers_pound = -1;
277 static int hf_ansi_map_originationtriggers_dp = -1;
278 static int hf_ansi_map_originationtriggers_pa = -1;
279 static int hf_ansi_map_originationtriggers_nodig = -1;
280 static int hf_ansi_map_originationtriggers_onedig = -1;
281 static int hf_ansi_map_originationtriggers_twodig = -1;
282 static int hf_ansi_map_originationtriggers_threedig = -1;
283 static int hf_ansi_map_originationtriggers_fourdig = -1;
284 static int hf_ansi_map_originationtriggers_fivedig = -1;
285 static int hf_ansi_map_originationtriggers_sixdig = -1;
286 static int hf_ansi_map_originationtriggers_sevendig = -1;
287 static int hf_ansi_map_originationtriggers_eightdig = -1;
288 static int hf_ansi_map_originationtriggers_ninedig = -1;
289 static int hf_ansi_map_originationtriggers_tendig = -1;
290 static int hf_ansi_map_originationtriggers_elevendig = -1;
291 static int hf_ansi_map_originationtriggers_twelvedig = -1;
292 static int hf_ansi_map_originationtriggers_thirteendig = -1;
293 static int hf_ansi_map_originationtriggers_fourteendig = -1;
294 static int hf_ansi_map_originationtriggers_fifteendig = -1;
295 static int hf_ansi_map_triggercapability_init = -1;
296 static int hf_ansi_map_triggercapability_kdigit = -1;
297 static int hf_ansi_map_triggercapability_all = -1;
298 static int hf_ansi_map_triggercapability_rvtc = -1;
299 static int hf_ansi_map_triggercapability_oaa = -1;
300 static int hf_ansi_map_triggercapability_oans = -1;
301 static int hf_ansi_map_triggercapability_odisc = -1;
302 static int hf_ansi_map_triggercapability_ona = -1;
303 static int hf_ansi_map_triggercapability_ct = -1;
304 static int hf_ansi_map_triggercapability_unrec =-1;
305 static int hf_ansi_map_triggercapability_pa = -1;
306 static int hf_ansi_map_triggercapability_at = -1;
307 static int hf_ansi_map_triggercapability_cgraa = -1;
308 static int hf_ansi_map_triggercapability_it = -1;
309 static int hf_ansi_map_triggercapability_cdraa = -1;
310 static int hf_ansi_map_triggercapability_obsy = -1;
311 static int hf_ansi_map_triggercapability_tra = -1;
312 static int hf_ansi_map_triggercapability_tbusy = -1;
313 static int hf_ansi_map_triggercapability_tna = -1;
314 static int hf_ansi_map_triggercapability_tans = -1;
315 static int hf_ansi_map_triggercapability_tdisc = -1;
316 static int hf_ansi_map_winoperationscapability_conn = -1;
317 static int hf_ansi_map_winoperationscapability_ccdir = -1;
318 static int hf_ansi_map_winoperationscapability_pos = -1;
319 static int hf_ansi_map_PACA_Level = -1;
320 static int hf_ansi_map_pacaindicator_pa = -1;
321
322 #include "packet-ansi_map-hf.c"
323
324 /* Initialize the subtree pointers */
325 static gint ett_ansi_map = -1;
326 static gint ett_mintype = -1;
327 static gint ett_digitstype = -1;
328 static gint ett_billingid = -1;
329 static gint ett_sms_bearer_data = -1;
330 static gint ett_sms_teleserviceIdentifier = -1;
331 static gint ett_extendedmscid = -1;
332 static gint ett_extendedsystemmytypecode = -1;
333 static gint ett_handoffstate = -1;
334 static gint ett_mscid = -1;
335 static gint ett_cdmachanneldata = -1;
336 static gint ett_cdmastationclassmark = -1;
337 static gint ett_channeldata = -1;
338 static gint ett_confidentialitymodes = -1;
339 static gint ett_controlchanneldata = -1;
340 static gint ett_CDMA2000HandoffInvokeIOSData = -1;
341 static gint ett_CDMA2000HandoffResponseIOSData = -1;
342 static gint ett_originationtriggers = -1;
343 static gint ett_pacaindicator = -1;
344 static gint ett_callingpartyname = -1;
345 static gint ett_triggercapability = -1;
346 static gint ett_winoperationscapability = -1;
347 static gint ett_win_trigger_list = -1;
348 static gint ett_controlnetworkid = -1;
349 static gint ett_transactioncapability = -1;
350 static gint ett_cdmaserviceoption = -1;
351 static gint ett_systemcapabilities = -1;
352 static gint ett_sms_originationrestrictions = -1;
353
354 #include "packet-ansi_map-ett.c"
355
356 /* Global variables */
357 static dissector_table_t is637_tele_id_dissector_table; /* IS-637 Teleservice ID */
358 static dissector_table_t is683_dissector_table; /* IS-683-A (OTA) */
359 static dissector_table_t is801_dissector_table; /* IS-801 (PLD) */
360 static packet_info *g_pinfo;
361 static proto_tree *g_tree;
362 tvbuff_t *SMS_BearerData_tvb = NULL;
363 gint32    ansi_map_sms_tele_id = -1;
364 static gboolean is683_ota;
365 static gboolean is801_pld;
366 static gboolean ansi_map_is_invoke;
367 static guint32 OperationCode;
368 static guint8 ServiceIndicator;
369
370
371 struct ansi_map_invokedata_t {
372     guint32 opcode;
373     guint8 ServiceIndicator;
374 };
375
376 static void dissect_ansi_map_win_trigger_list(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree _U_, asn1_ctx_t *actx _U_);
377
378
379 /* Transaction table */
380 static GHashTable *TransactionId_table=NULL;
381
382 static void
383 TransactionId_table_cleanup(gpointer key , gpointer value, gpointer user_data _U_){
384
385     struct ansi_map_invokedata_t *ansi_map_saved_invokedata = (struct ansi_map_invokedata_t *)value;
386     gchar *TransactionId_str = (gchar *)key;
387
388     g_free(TransactionId_str);
389     g_free(ansi_map_saved_invokedata);
390
391 }
392
393 static void
394 ansi_map_init_transaction_table(void){
395
396     /* Destroy any existing memory chunks / hashes. */
397     if (TransactionId_table){
398         g_hash_table_foreach(TransactionId_table, TransactionId_table_cleanup, NULL);
399         g_hash_table_destroy(TransactionId_table);
400     }
401
402     TransactionId_table = g_hash_table_new(g_str_hash, g_str_equal);
403
404 }
405
406 static void
407 ansi_map_init_protocol(void)
408 {
409     ansi_map_init_transaction_table();
410 }
411
412 /* Store Invoke information needed for the corresponding reply */
413 static void
414 update_saved_invokedata(packet_info *pinfo, proto_tree *tree _U_, tvbuff_t *tvb _U_){
415     struct ansi_map_invokedata_t *ansi_map_saved_invokedata;
416     struct ansi_tcap_private_t *p_private_tcap;
417     address* src = &(pinfo->src);
418     address* dst = &(pinfo->dst);
419     guint8 *src_str;
420     guint8 *dst_str;
421     char *buf;
422
423     buf=ep_alloc(1024);
424
425     src_str = ep_address_to_str(src);
426     dst_str = ep_address_to_str(dst);
427
428     /* Data from the TCAP dissector */
429     if (pinfo->private_data != NULL){
430         p_private_tcap=(struct ansi_tcap_private_t *)pinfo->private_data;
431         if ((!pinfo->fd->flags.visited)&&(p_private_tcap->TransactionID_str)){
432             /* Only do this once XXX I hope its the right thing to do */
433             /* The hash string needs to contain src and dest to distiguish differnt flows */
434                         switch(ansi_map_response_matching_type){
435                                 case ANSI_MAP_TID_ONLY:
436                                         g_snprintf(buf,1024,"%s",p_private_tcap->TransactionID_str);
437                                         break;
438                                 case 1:
439                                         g_snprintf(buf,1024,"%s%s",p_private_tcap->TransactionID_str,src_str);
440                                         break;
441                                 default:
442                                         g_snprintf(buf,1024,"%s%s%s",p_private_tcap->TransactionID_str,src_str,dst_str);
443                                         break;
444                         }
445             /* If the entry allready exists don't owervrite it */
446             ansi_map_saved_invokedata = (struct ansi_map_invokedata_t *)g_hash_table_lookup(TransactionId_table,buf);
447             if(ansi_map_saved_invokedata)
448                 return;
449
450             ansi_map_saved_invokedata = g_new(struct ansi_map_invokedata_t,1);
451             ansi_map_saved_invokedata->opcode = p_private_tcap->d.OperationCode_private;
452             ansi_map_saved_invokedata->ServiceIndicator = ServiceIndicator;
453
454             g_hash_table_insert(TransactionId_table,
455                                 g_strdup(buf),
456                                 ansi_map_saved_invokedata);
457
458             /*g_warning("Invoke Hash string %s pkt: %u",buf,pinfo->fd->num);*/
459         }
460     }
461
462 }
463 /* value strings */
464 const value_string ansi_map_opr_code_strings[] = {
465     {   1, "Handoff Measurement Request" },
466     {   2, "Facilities Directive" },
467     {   3, "Mobile On Channel" },
468     {   4, "Handoff Back" },
469     {   5, "Facilities Release" },
470     {   6, "Qualification Request" },
471     {   7, "Qualification Directive" },
472     {   8, "Blocking" },
473     {   9, "Unblocking" },
474     {  10,  "Reset Circuit" },
475     {  11, "Trunk Test" },
476     {  12, "Trunk Test Disconnect" },
477     {  13, "Registration Notification" },
478     {  14, "Registration Cancellation" },
479     {  15, "Location Request" },
480     {  16, "Routing Request" },
481     {  17, "Feature Request" },
482     {  18, "Reserved 18 (Service Profile Request, IS-41-C)" },
483     {  19, "Reserved 19 (Service Profile Directive, IS-41-C)" },
484     {  20, "Unreliable Roamer Data Directive" },
485     {  21, "Reserved 21 (Call Data Request, IS-41-C)" },
486     {  22, "MS Inactive" },
487     {  23, "Transfer To Number Request" },
488     {  24, "Redirection Request" },
489     {  25, "Handoff To Third" },
490     {  26, "Flash Request" },
491     {  27, "Authentication Directive" },
492     {  28, "Authentication Request" },
493     {  29, "Base Station Challenge" },
494     {  30, "Authentication Failure Report" },
495     {  31, "Count Request" },
496     {  32, "Inter System Page" },
497     {  33, "Unsolicited Response" },
498     {  34, "Bulk Deregistration" },
499     {  35, "Handoff Measurement Request 2" },
500     {  36, "Facilities Directive 2" },
501     {  37, "Handoff Back 2" },
502     {  38, "Handoff To Third 2" },
503     {  39, "Authentication Directive Forward" },
504     {  40, "Authentication Status Report" },
505     {  41, "Reserved 41" },
506     {  42, "Information Directive" },
507     {  43, "Information Forward" },
508     {  44, "Inter System Answer" },
509     {  45, "Inter System Page 2" },
510     {  46, "Inter System Setup" },
511     {  47, "Origination Request" },
512     {  48, "Random Variable Request" },
513     {  49, "Redirection Directive" },
514     {  50, "Remote User Interaction Directive" },
515     {  51, "SMS Delivery Backward" },
516     {  52, "SMS Delivery Forward" },
517     {  53, "SMS Delivery Point to Point" },
518     {  54, "SMS Notification" },
519     {  55, "SMS Request" },
520     {  56, "OTASP Request" },
521     {  57, "Information Backward" },
522     {  58, "Change Facilities" },
523     {  59, "Change Service" },
524     {  60, "Parameter Request" },
525     {  61, "TMSI Directive" },
526     {  62, "NumberPortabilityRequest" },
527     {  63, "Service Request" },
528     {  64, "Analyzed Information Request" },
529     {  65, "Connection Failure Report" },
530     {  66, "Connect Resource" },
531     {  67, "Disconnect Resource" },
532     {  68, "Facility Selected and Available" },
533     {  69, "Instruction Request" },
534     {  70, "Modify" },
535     {  71, "Reset Timer" },
536     {  72, "Search" },
537     {  73, "Seize Resource" },
538     {  74, "SRF Directive" },
539     {  75, "T Busy" },
540     {  76, "T NoAnswer" },
541     {  77, "Release" },
542     {  78, "SMS Delivery Point to Point Ack" },
543     {  79, "Message Directive" },
544     {  80, "Bulk Disconnection" },
545     {  81, "Call Control Directive" },
546     {  82, "O Answer" },
547     {  83, "O Disconnect" },
548     {  84, "Call Recovery Report" },
549     {  85, "T Answer" },
550     {  86, "T Disconnect" },
551     {  87, "Unreliable Call Data" },
552     {  88, "O CalledPartyBusy" },
553     {  89, "O NoAnswer" },
554     {  90, "Position Request" },
555     {  91, "Position Request Forward" },
556     {  92, "Call Termination Report" },
557     {  93, "Geo Position Directive" },
558     {  94, "Geo Position Request" },
559     {  95, "Inter System Position Request" },
560     {  96, "Inter System Position Request Forward" },
561     {  97, "ACG Directive" },
562     {  98, "Roamer Database Verification Request" },
563     {  99, "Add Service" },
564     { 100, "Drop Service" },
565     { 101, "InterSystemSMSPage" },
566     { 102, "LCSParameterRequest" },
567     { 103, "Unknown ANSI-MAP PDU" },
568     { 104, "Unknown ANSI-MAP PDU" },
569     { 105, "Unknown ANSI-MAP PDU" },
570     { 106, "PositionEventNotification" },
571     { 107, "Unknown ANSI-MAP PDU" },
572     { 108, "Unknown ANSI-MAP PDU" },
573     { 109, "Unknown ANSI-MAP PDU" },
574     { 110, "Unknown ANSI-MAP PDU" },
575     { 111, "InterSystemSMSDelivery-PointToPoint" },
576     { 112, "QualificationRequest2" },
577     {   0, NULL },
578 };
579 static value_string_ext ansi_map_opr_code_strings_ext = VALUE_STRING_EXT_INIT(ansi_map_opr_code_strings);
580
581 static int dissect_invokeData(proto_tree *tree, tvbuff_t *tvb, int offset, asn1_ctx_t *actx);
582 static int dissect_returnData(proto_tree *tree, tvbuff_t *tvb, int offset,  asn1_ctx_t *actx);
583 static int dissect_ansi_map_SystemMyTypeCode(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index _U_);
584
585 #if 0
586 /* Moved to tvbuff.h
587  * XXX remove after trial period.
588  */
589 typedef struct dgt_set_t
590 {
591     unsigned char out[15];
592 }
593 dgt_set_t;
594 #endif
595 static dgt_set_t Dgt_tbcd = {
596     {
597   /*  0   1   2   3   4   5   6   7   8   9   a   b   c   d   e */
598      '0','1','2','3','4','5','6','7','8','9','?','B','C','*','#'
599     }
600 };
601 static dgt_set_t Dgt1_9_bcd = {
602     {
603   /*  0   1   2   3   4   5   6   7   8   9   a   b   c   d   e */
604      '0','1','2','3','4','5','6','7','8','9','?','?','?','?','?'
605     }
606 };
607
608
609 /* Type of Digits (octet 1, bits A-H) */
610 static const value_string ansi_map_type_of_digits_vals[] = {
611     {   0, "Not Used" },
612     {   1, "Dialed Number or Called Party Number" },
613     {   2, "Calling Party Number" },
614     {   3, "Caller Interaction" },
615     {   4, "Routing Number" },
616     {   5, "Billing Number" },
617     {   6, "Destination Number" },
618     {   7, "LATA" },
619     {   8, "Carrier" },
620     {   0, NULL }
621 };
622 /* Nature of Number (octet 2, bits A-H )*/
623 static const true_false_string ansi_map_na_bool_val  = {
624     "International",
625     "National"
626 };
627 static const true_false_string ansi_map_pi_bool_val  = {
628     "Presentation Restricted",
629     "Presentation Allowed"
630 };
631 static const true_false_string ansi_map_navail_bool_val  = {
632     "Number is not available",
633     "Number is available"
634 };
635 static const true_false_string ansi_map_si_bool_val  = {
636     "User provided, screening passed",
637     "User provided, not screened"
638 };
639 static const value_string ansi_map_si_vals[]  = {
640     {   0, "User provided, not screened"},
641     {   1, "User provided, screening passed"},
642     {   2, "User provided, screening failed"},
643     {   3, "Network provided"},
644     {   0, NULL }
645 };
646 /* Encoding (octet 3, bits A-D) */
647 static const value_string ansi_map_digits_enc_vals[]  = {
648     {   0, "Not used"},
649     {   1, "BCD"},
650     {   2, "IA5"},
651     {   3, "Octet string"},
652     {   0, NULL }
653 };
654 /* Numbering Plan (octet 3, bits E-H) */
655 static const value_string ansi_map_np_vals[]  = {
656     {   0, "Unknown or not applicable"},
657     {   1, "ISDN Numbering"},
658     {   2, "Telephony Numbering (ITU-T Rec. E.164,E.163)"},
659     {   3, "Data Numbering (ITU-T Rec. X.121)"},
660     {   4, "Telex Numbering (ITU-T Rec. F.69)"},
661     {   5, "Maritime Mobile Numbering"},
662     {   6, "Land Mobile Numbering (ITU-T Rec. E.212)"},
663     {   7, "Private Numbering Plan"},
664     {  13, "SS7 Point Code (PC) and Subsystem Number (SSN)"},
665     {  14, "Internet Protocol (IP) Address."},
666     {  15, "Reserved for extension"},
667     {   0, NULL }
668 };
669
670 static void
671 dissect_ansi_map_min_type(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree _U_, asn1_ctx_t *actx _U_){
672     const char *digit_str;
673     int   offset = 0;
674
675     proto_tree *subtree;
676
677
678     subtree = proto_item_add_subtree(actx->created_item, ett_mintype);
679
680         digit_str = tvb_bcd_dig_to_ep_str(tvb, offset, tvb_length_remaining(tvb,offset), &Dgt1_9_bcd, FALSE);
681     proto_tree_add_string(subtree, hf_ansi_map_bcd_digits, tvb, offset, -1, digit_str);
682     proto_item_append_text(actx->created_item, " - %s", digit_str);
683 }
684
685 static void
686 dissect_ansi_map_digits_type(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree _U_, asn1_ctx_t *actx _U_){
687
688     guint8 octet , octet_len;
689     guint8 b1,b2,b3,b4;
690     int    offset = 0;
691     const char *digit_str;
692
693     proto_tree *subtree;
694
695
696     subtree = proto_item_add_subtree(actx->created_item, ett_digitstype);
697
698     /* Octet 1 */
699     proto_tree_add_item(subtree, hf_ansi_map_type_of_digits, tvb, offset, 1, ENC_BIG_ENDIAN);
700     offset++;
701     /* Octet 2 */
702     proto_tree_add_item(subtree, hf_ansi_map_reservedBitHG, tvb, offset, 1, ENC_BIG_ENDIAN);
703     proto_tree_add_item(subtree, hf_ansi_map_si, tvb, offset, 1, ENC_BIG_ENDIAN);
704     proto_tree_add_item(subtree, hf_ansi_map_reservedBitD, tvb, offset, 1, ENC_BIG_ENDIAN);
705     proto_tree_add_item(subtree, hf_ansi_map_navail, tvb, offset, 1, ENC_BIG_ENDIAN);
706     proto_tree_add_item(subtree, hf_ansi_map_pi, tvb, offset, 1, ENC_BIG_ENDIAN);
707     proto_tree_add_item(subtree, hf_ansi_map_na, tvb, offset, 1, ENC_BIG_ENDIAN);
708     offset++;
709     /* Octet 3 */
710     octet = tvb_get_guint8(tvb,offset);
711     proto_tree_add_item(subtree, hf_ansi_map_np, tvb, offset, 1, ENC_BIG_ENDIAN);
712     proto_tree_add_item(subtree, hf_ansi_map_digits_enc, tvb, offset, 1, ENC_BIG_ENDIAN);
713     offset++;
714     /* Octet 4 - */
715     switch(octet>>4){
716     case 0:/* Unknown or not applicable */
717         switch ((octet&0xf)){
718         case 1:
719             /* BCD Coding */
720             octet_len = tvb_get_guint8(tvb,offset);
721             proto_tree_add_item(subtree, hf_ansi_map_nr_digits, tvb, offset, 1, ENC_BIG_ENDIAN);
722             if(octet_len == 0)
723                 return;
724             offset++;
725             digit_str = tvb_bcd_dig_to_ep_str(tvb, offset, tvb_length_remaining(tvb,offset), &Dgt_tbcd, FALSE);
726             proto_tree_add_string(subtree, hf_ansi_map_bcd_digits, tvb, offset, -1, digit_str);
727             proto_item_append_text(actx->created_item, " - %s", digit_str);
728             break;
729         case 2:
730             /* IA5 Coding */
731             octet_len = tvb_get_guint8(tvb,offset);
732             proto_tree_add_item(subtree, hf_ansi_map_nr_digits, tvb, offset, 1, ENC_BIG_ENDIAN);
733             if(octet_len == 0)
734                 return;
735             offset++;
736             proto_tree_add_item(subtree, hf_ansi_map_ia5_digits, tvb, offset, -1, ENC_ASCII|ENC_NA);
737             proto_item_append_text(actx->created_item, " - %s", tvb_get_ephemeral_string(tvb,offset,tvb_length_remaining(tvb,offset)));
738             break;
739         case 3:
740             /* Octet string */
741             break;
742         default:
743             break;
744         }
745         break;
746     case 1:/* ISDN Numbering (not used in this Standard). */
747     case 3:/* Data Numbering (ITU-T Rec. X.121) (not used in this Standard). */
748     case 4:/* Telex Numbering (ITU-T Rec. F.69) (not used in this Standard). */
749     case 5:/* Maritime Mobile Numbering (not used in this Standard). */
750         proto_tree_add_text(subtree, tvb, offset, -1, "This Number plan should not have been used");
751         break;
752     case 2:/* Telephony Numbering (ITU-T Rec. E.164,E.163). */
753     case 6:/* Land Mobile Numbering (ITU-T Rec. E.212) */
754     case 7:/* Private Numbering Plan */
755         octet_len = tvb_get_guint8(tvb,offset);
756         proto_tree_add_item(subtree, hf_ansi_map_nr_digits, tvb, offset, 1, ENC_BIG_ENDIAN);
757         if(octet_len == 0)
758             return;
759         offset++;
760         switch ((octet&0xf)){
761         case 1:
762             /* BCD Coding */
763                         digit_str = tvb_bcd_dig_to_ep_str(tvb, offset, tvb_length_remaining(tvb,offset), &Dgt_tbcd, FALSE);
764             proto_tree_add_string(subtree, hf_ansi_map_bcd_digits, tvb, offset, -1, digit_str);
765             proto_item_append_text(actx->created_item, " - %s", digit_str);
766             break;
767         case 2:
768             /* IA5 Coding */
769             proto_tree_add_item(subtree, hf_ansi_map_ia5_digits, tvb, offset, -1, ENC_ASCII|ENC_NA);
770             proto_item_append_text(actx->created_item, " - %s", tvb_get_ephemeral_string(tvb,offset,tvb_length_remaining(tvb,offset)));
771             break;
772         case 3:
773             /* Octet string */
774             break;
775         default:
776             break;
777         }
778         break;
779     case 13:/* ANSI SS7 Point Code (PC) and Subsystem Number (SSN). */
780         switch ((octet&0xf)){
781         case 3:
782             /* Octet string */
783             /* Point Code Member Number octet 2 */
784             b1 = tvb_get_guint8(tvb,offset);
785             offset++;
786             /* Point Code Cluster Number octet 3 */
787             b2 = tvb_get_guint8(tvb,offset);
788             offset++;
789             /* Point Code Network Number octet 4 */
790             b3 = tvb_get_guint8(tvb,offset);
791             offset++;
792             /* Subsystem Number (SSN) octet 5 */
793             b4 = tvb_get_guint8(tvb,offset);
794             proto_tree_add_text(subtree, tvb, offset-3, 4 , "Point Code %u-%u-%u  SSN %u",
795                                 b3, b2, b1, b4);
796             proto_item_append_text(actx->created_item, " - Point Code %u-%u-%u  SSN %u", b3, b2, b1, b4);
797             break;
798         default:
799             break;
800         }
801         break;
802     case 14:/* Internet Protocol (IP) Address. */
803         break;
804     default:
805         proto_tree_add_text(subtree, tvb, offset, -1, "This Number plan should not have been used");
806         break;
807     }
808
809 }
810 /* 6.5.3.13. Subaddress */
811
812 static const true_false_string ansi_map_Odd_Even_Ind_bool_val  = {
813   "Odd",
814   "Even"
815 };
816 /* Type of Subaddress (octet 1, bits E-G) */
817 static const value_string ansi_map_sub_addr_type_vals[]  = {
818     {   0, "NSAP (CCITT Rec. X.213 or ISO 8348 AD2)"},
819     {   1, "User specified"},
820     {   2, "Reserved"},
821     {   3, "Reserved"},
822     {   4, "Reserved"},
823     {   5, "Reserved"},
824     {   6, "Reserved"},
825     {   7, "Reserved"},
826     {   0, NULL }
827 };
828
829 static void
830 dissect_ansi_map_subaddress(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree _U_, asn1_ctx_t *actx _U_){
831     int offset = 0;
832
833     proto_tree *subtree;
834
835
836     subtree = proto_item_add_subtree(actx->created_item, ett_billingid);
837     /* Type of Subaddress (octet 1, bits E-G) */
838     proto_tree_add_item(subtree, hf_ansi_map_subaddr_type, tvb, offset, 1, ENC_BIG_ENDIAN);
839     /* Odd/Even Indicator (O/E) (octet 1, bit D) */
840     proto_tree_add_item(subtree, hf_ansi_map_subaddr_odd_even, tvb, offset, 1, ENC_BIG_ENDIAN);
841
842 }
843 /*
844  * 6.5.2.2 ActionCode
845  * Table 114 ActionCode value
846  *
847  * 6.5.2.2 ActionCode(TIA/EIA-41.5-D, page 5-129) */
848
849 static const value_string ansi_map_ActionCode_vals[]  = {
850     {   0, "Not used"},
851     {   1, "Continue processing"},
852     {   2, "Disconnect call"},
853     {   3, "Disconnect call leg"},
854     {   4, "Conference Calling Drop Last Party"},
855     {   5, "Bridge call leg(s) to conference call"},
856     {   6, "Drop call leg on busy or routing failure"},
857     {   7, "Disconnect all call legs"},
858     {   8, "Attach MSC to OTAF"},
859     {   9, "Initiate RegistrationNotification"},
860     {  10, "Generate Public Encryption values"},
861     {  11, "Generate A-key"},
862     {  12, "Perform SSD Update procedure"},
863     {  13, "Perform Re-authentication procedure"},
864     {  14, "Release TRN"},
865     {  15, "Commit A-key"},
866     {  16, "Release Resources (e.g., A-key, Traffic Channel)"},
867     {  17, "Record NEWMSID"},
868     {  18, "Allocate Resources (e.g., Multiple message traffic channel delivery)."},
869     {  19, "Generate Authentication Signature"},
870     {  20, "Release leg and redirect subscriber"},
871     {  21, "Do Not Wait For MS User Level Response"},
872     {  22, "Prepare for CDMA Handset-Based Position Determination"},
873     {  23, "CDMA Handset-Based Position Determination Complete"},
874     {   0, NULL }
875 };
876 static value_string_ext ansi_map_ActionCode_vals_ext = VALUE_STRING_EXT_INIT(ansi_map_ActionCode_vals);
877
878 /* 6.5.2.3 AlertCode */
879
880 /* Pitch (octet 1, bits G-H) */
881 static const value_string ansi_map_AlertCode_Pitch_vals[]  = {
882     {   0, "Medium pitch"},
883     {   1, "High pitch"},
884     {   2, "Low pitch"},
885     {   3, "Reserved"},
886     {   0, NULL }
887 };
888 /* Cadence (octet 1, bits A-F) */
889 static const value_string ansi_map_AlertCode_Cadence_vals[]  = {
890     {   0, "NoTone"},
891     {   1, "Long"},
892     {   2, "ShortShort"},
893     {   3, "ShortShortLong"},
894     {   4, "ShortShort2"},
895     {   5, "ShortLongShort"},
896     {   6, "ShortShortShortShort"},
897     {   7, "PBXLong"},
898     {   8, "PBXShortShort"},
899     {   9, "PBXShortShortLong"},
900
901     {  10, "PBXShortLongShort"},
902     {  11, "PBXShortShortShortShort"},
903     {  12, "PipPipPipPip"},
904     {  13, "Reserved. Treat the same as value 0, NoTone"},
905     {  14, "Reserved. Treat the same as value 0, NoTone"},
906     {  15, "Reserved. Treat the same as value 0, NoTone"},
907     {  16, "Reserved. Treat the same as value 0, NoTone"},
908     {  17, "Reserved. Treat the same as value 0, NoTone"},
909     {  18, "Reserved. Treat the same as value 0, NoTone"},
910     {  19, "Reserved. Treat the same as value 0, NoTone"},
911     {   0, NULL }
912 };
913
914 /* Alert Action (octet 2, bits A-C) */
915 static const value_string ansi_map_AlertCode_Alert_Action_vals[]  = {
916     {   0, "Alert without waiting to report"},
917     {   1, "Apply a reminder alert once"},
918     {   2, "Other values reserved. Treat the same as value 0, Alert without waiting to report"},
919     {   3, "Other values reserved. Treat the same as value 0, Alert without waiting to report"},
920     {   4, "Other values reserved. Treat the same as value 0, Alert without waiting to report"},
921     {   5, "Other values reserved. Treat the same as value 0, Alert without waiting to report"},
922     {   6, "Other values reserved. Treat the same as value 0, Alert without waiting to report"},
923     {   7, "Other values reserved. Treat the same as value 0, Alert without waiting to report"},
924     {   0, NULL }
925 };
926 static void
927 dissect_ansi_map_alertcode(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree _U_, asn1_ctx_t *actx _U_){
928
929     int offset = 0;
930
931     proto_tree *subtree;
932
933
934     subtree = proto_item_add_subtree(actx->created_item, ett_billingid);
935     /* Pitch (octet 1, bits G-H) */
936     proto_tree_add_item(subtree, hf_ansi_alertcode_pitch, tvb, offset, 1, ENC_BIG_ENDIAN);
937     /* Cadence (octet 1, bits A-F) */
938     proto_tree_add_item(subtree, hf_ansi_alertcode_cadence, tvb, offset, 1, ENC_BIG_ENDIAN);
939     offset++;
940
941     /* Alert Action (octet 2, bits A-C) */
942     proto_tree_add_item(subtree, hf_ansi_alertcode_alertaction, tvb, offset, 1, ENC_BIG_ENDIAN);
943
944 }
945 /* 6.5.2.4 AlertResult */
946 /* Result (octet 1) */
947 static const value_string ansi_map_AlertResult_result_vals[]  = {
948     {   0, "Not specified"},
949     {   1, "Success"},
950     {   2, "Failure"},
951     {   3, "Denied"},
952     {   4, "NotAttempted"},
953     {   5, "NoPageResponse"},
954     {   6, "Busy"},
955     {   0, NULL }
956 };
957
958 /* 6.5.2.5 AnnouncementCode Updatef from NS0018Re*/
959 /* Tone (octet 1) */
960 static const value_string ansi_map_AnnouncementCode_tone_vals[]  = {
961     {   0, "DialTone"},
962     {   1, "RingBack or AudibleAlerting"},
963     {   2, "InterceptTone or MobileReorder"},
964     {   3, "CongestionTone or ReorderTone"},
965     {   4, "BusyTone"},
966     {   5, "ConfirmationTone"},
967     {   6, "AnswerTone"},
968     {   7, "CallWaitingTone"},
969     {   8, "OffHookTone"},
970     {  17, "RecallDialTone"},
971     {  18, "BargeInTone"},
972     {  20, "PPCInsufficientTone"},
973     {  21, "PPCWarningTone1"},
974     {  22, "PPCWarningTone2"},
975     {  23, "PPCWarningTone3"},
976     {  24, "PPCDisconnectTone"},
977     {  25, "PPCRedirectTone"},
978     {  63, "TonesOff"},
979     { 192, "PipTone"},
980     { 193, "AbbreviatedIntercept"},
981     { 194, "AbbreviatedCongestion"},
982     { 195, "WarningTone"},
983     { 196, "DenialToneBurst"},
984     { 197, "DialToneBurst"},
985     { 250, "IncomingAdditionalCallTone"},
986     { 251, "PriorityAdditionalCallTone"},
987     {   0, NULL }
988 };
989 /* Class (octet 2, bits A-D) */
990 static const value_string ansi_map_AnnouncementCode_class_vals[]  = {
991     {   0, "Concurrent"},
992     {   1, "Sequential"},
993     {   0, NULL }
994 };
995 /* Standard Announcement (octet 3) Updated with N.S0015 */
996 static const value_string ansi_map_AnnouncementCode_std_ann_vals[]  = {
997     {   0, "None"},
998     {   1, "UnauthorizedUser"},
999     {   2, "InvalidESN"},
1000     {   3, "UnauthorizedMobile"},
1001     {   4, "SuspendedOrigination"},
1002     {   5, "OriginationDenied"},
1003     {   6, "ServiceAreaDenial"},
1004     {  16, "PartialDial"},
1005     {  17, "Require1Plus"},
1006     {  18, "Require1PlusNPA"},
1007     {  19, "Require0Plus"},
1008     {  20, "Require0PlusNPA"},
1009     {  21, "Deny1Plus"},
1010     {  22, "Unsupported10plus"},
1011     {  23, "Deny10plus"},
1012     {  24, "Unsupported10XXX"},
1013     {  25, "Deny10XXX"},
1014     {  26, "Deny10XXXLocally"},
1015     {  27, "Require10Plus"},
1016     {  28, "RequireNPA"},
1017     {  29, "DenyTollOrigination"},
1018     {  30, "DenyInternationalOrigination"},
1019     {  31, "Deny0Minus"},
1020     {  48, "DenyNumber"},
1021     {  49, "AlternateOperatorServices"},
1022     {  64, "No Circuit or AllCircuitsBusy or FacilityProblem"},
1023     {  65, "Overload"},
1024     {  66, "InternalOfficeFailure"},
1025     {  67, "NoWinkReceived"},
1026     {  68, "InterofficeLinkFailure"},
1027     {  69, "Vacant"},
1028     {  70, "InvalidPrefix or InvalidAccessCode"},
1029     {  71, "OtherDialingIrregularity"},
1030     {  80, "VacantNumber or DisconnectedNumber"},
1031     {  81, "DenyTermination"},
1032     {  82, "SuspendedTermination"},
1033     {  83, "ChangedNumber"},
1034     {  84, "InaccessibleSubscriber"},
1035     {  85, "DenyIncomingTol"},
1036     {  86, "RoamerAccessScreening"},
1037     {  87, "RefuseCall"},
1038     {  88, "RedirectCall"},
1039     {  89, "NoPageResponse"},
1040     {  90, "NoAnswer"},
1041     {  96, "RoamerIntercept"},
1042     {  97, "GeneralInformation"},
1043     { 112, "UnrecognizedFeatureCode"},
1044     { 113, "UnauthorizedFeatureCode"},
1045     { 114, "RestrictedFeatureCode"},
1046     { 115, "InvalidModifierDigits"},
1047     { 116, "SuccessfulFeatureRegistration"},
1048     { 117, "SuccessfulFeatureDeRegistration"},
1049     { 118, "SuccessfulFeatureActivation"},
1050     { 119, "SuccessfulFeatureDeActivation"},
1051     { 120, "InvalidForwardToNumber"},
1052     { 121, "CourtesyCallWarning"},
1053     { 128, "EnterPINSendPrompt"},
1054     { 129, "EnterPINPrompt"},
1055     { 130, "ReEnterPINSendPrompt"},
1056     { 131, "ReEnterPINPrompt"},
1057     { 132, "EnterOldPINSendPrompt"},
1058     { 133, "EnterOldPINPrompt"},
1059     { 134, "EnterNewPINSendPrompt"},
1060     { 135, "EnterNewPINPrompt"},
1061     { 136, "ReEnterNewPINSendPrompt"},
1062     { 137, "ReEnterNewPINPrompt"},
1063     { 138, "EnterPasswordPrompt"},
1064     { 139, "EnterDirectoryNumberPrompt"},
1065     { 140, "ReEnterDirectoryNumberPrompt"},
1066     { 141, "EnterFeatureCodePrompt"},
1067     { 142, "EnterEnterCreditCardNumberPrompt"},
1068     { 143, "EnterDestinationNumberPrompt"},
1069     { 152, "PPCInsufficientAccountBalance"},
1070     { 153, "PPCFiveMinuteWarning"},
1071     { 154, "PPCThreeMinuteWarning"},
1072     { 155, "PPCTwoMinuteWarning"},
1073     { 156, "PPCOneMinuteWarning"},
1074     { 157, "PPCDisconnect"},
1075     { 158, "PPCRedirect"},
1076     {   0, NULL }
1077 };
1078
1079
1080
1081 static void
1082 dissect_ansi_map_announcementcode(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree _U_, asn1_ctx_t *actx _U_){
1083
1084     int offset = 0;
1085
1086     proto_tree *subtree;
1087
1088
1089     subtree = proto_item_add_subtree(actx->created_item, ett_billingid);
1090
1091     /* Tone (octet 1) */
1092     proto_tree_add_item(subtree, hf_ansi_map_announcementcode_tone, tvb, offset, 1, ENC_BIG_ENDIAN);
1093     offset++;
1094     /* Class (octet 2, bits A-D) */
1095     proto_tree_add_item(subtree, hf_ansi_map_announcementcode_class, tvb, offset, 1, ENC_BIG_ENDIAN);
1096     offset++;
1097     /* Standard Announcement (octet 3) */
1098     proto_tree_add_item(subtree, hf_ansi_map_announcementcode_std_ann, tvb, offset, 1, ENC_BIG_ENDIAN);
1099     offset++;
1100     /* Custom Announcement ( octet 4 )
1101        e.       The assignment of this octet is left to bilateral agreement. When a Custom
1102        Announcement is specified it takes precedence over either the Standard
1103        Announcement or Tone
1104     */
1105     proto_tree_add_item(subtree, hf_ansi_map_announcementcode_cust_ann, tvb, offset, 1, ENC_BIG_ENDIAN);
1106
1107 }
1108 /* 6.5.2.8 AuthenticationCapability Updated N.S0003*/
1109 static const value_string ansi_map_AuthenticationCapability_vals[]  = {
1110     {   0, "Not used"},
1111     {   1, "No authentication required"},
1112     {   2, "Authentication required"},
1113     { 128, "Authentication required and UIM capable."},
1114     {   0, NULL }
1115 };
1116
1117 /* 6.5.2.14 AuthorizationPeriod*/
1118
1119 /* Period (octet 1) */
1120 static const value_string ansi_map_authorizationperiod_period_vals[]  = {
1121     {   0, "Not used"},
1122     {   1, "Per Call"},
1123     {   2, "Hours"},
1124     {   3, "Days"},
1125     {   4, "Weeks"},
1126     {   5, "Per Agreement"},
1127     {   6, "Indefinite (i.e., authorized until canceled or deregistered)"},
1128     {   7, "Number of calls. Re-authorization should be attempted after this number of (rejected) call attempts"},
1129     {   0, NULL }
1130 };
1131 /* Value (octet 2)
1132 Number of minutes hours, days, weeks, or
1133 number of calls (as per Period). If Period
1134 indicates anything else the Value is set to zero
1135 on sending and ignored on receipt.
1136 */
1137 static void
1138 dissect_ansi_map_authorizationperiod(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree _U_, asn1_ctx_t *actx _U_){
1139
1140     int offset = 0;
1141
1142     proto_tree *subtree;
1143
1144
1145     subtree = proto_item_add_subtree(actx->created_item, ett_billingid);
1146     proto_tree_add_item(subtree, hf_ansi_map_authorizationperiod_period, tvb, offset, 1, ENC_BIG_ENDIAN);
1147     offset++;
1148     proto_tree_add_item(subtree, hf_ansi_map_value, tvb, offset, 1, ENC_BIG_ENDIAN);
1149
1150 }
1151 /* 6.5.2.15 AvailabilityType */
1152 static const value_string ansi_map_AvailabilityType_vals[]  = {
1153     {   0, "Not used"},
1154     {   1, "Unspecified MS inactivity type"},
1155     {   0, NULL }
1156 };
1157
1158 /* 6.5.2.16 BillingID */
1159 static void
1160 dissect_ansi_map_billingid(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree _U_, asn1_ctx_t *actx _U_){
1161
1162     int offset = 0;
1163
1164     proto_tree *subtree;
1165
1166
1167     subtree = proto_item_add_subtree(actx->created_item, ett_billingid);
1168
1169     proto_tree_add_item(subtree, hf_ansi_map_MarketID, tvb, offset, 2, ENC_BIG_ENDIAN);
1170     offset = offset + 2;
1171     proto_tree_add_item(subtree, hf_ansi_map_swno, tvb, offset, 1, ENC_BIG_ENDIAN);
1172     offset++;
1173     /* ID Number */
1174     proto_tree_add_item(subtree, hf_ansi_map_idno, tvb, offset, 3, ENC_BIG_ENDIAN);
1175     offset = offset + 3;
1176     proto_tree_add_item(subtree, hf_ansi_map_segcount, tvb, offset, 1, ENC_BIG_ENDIAN);
1177
1178 }
1179
1180
1181 /* 6.5.2.20 CallingFeaturesIndicator */
1182 static const value_string ansi_map_FeatureActivity_vals[]  = {
1183     {   0, "Not used"},
1184     {   1, "Not authorized"},
1185     {   2, "Authorized but de-activated"},
1186     {   3, "Authorized and activated"},
1187     {   0, NULL }
1188 };
1189
1190
1191 static void
1192 dissect_ansi_map_callingfeaturesindicator(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree _U_, asn1_ctx_t *actx _U_){
1193     int offset = 0;
1194     int length;
1195
1196     proto_tree *subtree;
1197
1198     length = tvb_length_remaining(tvb,offset);
1199
1200     subtree = proto_item_add_subtree(actx->created_item, ett_mscid);
1201
1202     /* Call Waiting: FeatureActivity, CW-FA (Octet 1 bits GH )          */
1203     proto_tree_add_item(subtree, hf_ansi_map_callingfeaturesindicator_cwfa, tvb, offset, 1, ENC_BIG_ENDIAN);
1204     /* Call Forwarding No Answer FeatureActivity, CFNA-FA (Octet 1 bits EF )    */
1205     proto_tree_add_item(subtree, hf_ansi_map_callingfeaturesindicator_cfnafa, tvb, offset, 1, ENC_BIG_ENDIAN);
1206     /* Call Forwarding Busy FeatureActivity, CFB-FA (Octet 1 bits CD )  */
1207     proto_tree_add_item(subtree, hf_ansi_map_callingfeaturesindicator_cfbfa, tvb, offset, 1, ENC_BIG_ENDIAN);
1208     /* Call Forwarding Unconditional FeatureActivity, CFU-FA (Octet 1 bits AB ) */
1209     proto_tree_add_item(subtree, hf_ansi_map_callingfeaturesindicator_cfufa, tvb, offset, 1, ENC_BIG_ENDIAN);
1210     offset++;
1211     length--;
1212
1213     /* Call Transfer: FeatureActivity, CT-FA (Octet 2 bits GH )         */
1214     proto_tree_add_item(subtree, hf_ansi_map_callingfeaturesindicator_ctfa, tvb, offset, 1, ENC_BIG_ENDIAN);
1215     /* Voice Privacy FeatureActivity, VP-FA (Octet 2 bits EF )  */
1216     proto_tree_add_item(subtree, hf_ansi_map_callingfeaturesindicator_vpfa, tvb, offset, 1, ENC_BIG_ENDIAN);
1217     /* Call Delivery: FeatureActivity (not interpreted on reception by IS-41-C or later)
1218        CD-FA (Octet 2 bits CD )         */
1219     proto_tree_add_item(subtree, hf_ansi_map_callingfeaturesindicator_cdfa, tvb, offset, 1, ENC_BIG_ENDIAN);
1220     /* Three-Way Calling FeatureActivity, 3WC-FA (Octet 2 bits AB )     */
1221     proto_tree_add_item(subtree, hf_ansi_map_callingfeaturesindicator_3wcfa, tvb, offset, 1, ENC_BIG_ENDIAN);
1222     offset++;
1223     length--;
1224
1225
1226     /* Calling Number Identification Restriction Override FeatureActivity CNIROver-FA (Octet 3 bits GH )        */
1227     proto_tree_add_item(subtree, hf_ansi_map_callingfeaturesindicator_cniroverfa, tvb, offset, 1, ENC_BIG_ENDIAN);
1228     /* Calling Number Identification Restriction: FeatureActivity CNIR-FA (Octet 3 bits EF )    */
1229     proto_tree_add_item(subtree, hf_ansi_map_callingfeaturesindicator_cnirfa, tvb, offset, 1, ENC_BIG_ENDIAN);
1230     /* Calling Number Identification Presentation: FeatureActivity CNIP2-FA (Octet 3 bits CD )  */
1231     proto_tree_add_item(subtree, hf_ansi_map_callingfeaturesindicator_cnip2fa, tvb, offset, 1, ENC_BIG_ENDIAN);
1232     /* Calling Number Identification Presentation: FeatureActivity CNIP1-FA (Octet 3 bits AB )  */
1233     proto_tree_add_item(subtree, hf_ansi_map_callingfeaturesindicator_cnip1fa, tvb, offset, 1, ENC_BIG_ENDIAN);
1234     length--;
1235     if ( length == 0)
1236         return;
1237     offset++;
1238
1239     /* USCF divert to voice mail: FeatureActivity USCFvm-FA (Octet 4 bits GH )  */
1240     proto_tree_add_item(subtree, hf_ansi_map_callingfeaturesindicator_uscfvmfa, tvb, offset, 1, ENC_BIG_ENDIAN);
1241     /* Answer Hold: FeatureActivity AH-FA (Octet 4 bits EF ) N.S0029-0 v1.0     */
1242     proto_tree_add_item(subtree, hf_ansi_map_callingfeaturesindicator_ahfa, tvb, offset, 1, ENC_BIG_ENDIAN);
1243     /* Data Privacy Feature Activity DP-FA (Octet 4 bits CD ) N.S0008-0 v 1.0   */
1244     proto_tree_add_item(subtree, hf_ansi_map_callingfeaturesindicator_dpfa, tvb, offset, 1, ENC_BIG_ENDIAN);
1245     /* Priority Call Waiting FeatureActivity PCW-FA (Octet 4 bits AB )  */
1246     proto_tree_add_item(subtree, hf_ansi_map_callingfeaturesindicator_pcwfa, tvb, offset, 1, ENC_BIG_ENDIAN);
1247     length--;
1248     if ( length == 0)
1249         return;
1250     offset++;
1251
1252     /* USCF divert to mobile station provided DN:FeatureActivity.USCFms-FA (Octet 5 bits AB ) */
1253     proto_tree_add_item(subtree, hf_ansi_map_callingfeaturesindicator_uscfmsfa, tvb, offset, 1, ENC_BIG_ENDIAN);
1254     /* USCF divert to network registered DN:FeatureActivity. USCFnr-FA (Octet 5 bits CD )*/
1255     proto_tree_add_item(subtree, hf_ansi_map_callingfeaturesindicator_uscfnrfa, tvb, offset, 1, ENC_BIG_ENDIAN);
1256     /* CDMA-Packet Data Service: FeatureActivity. CPDS-FA (Octet 5 bits EF ) N.S0029-0 v1.0*/
1257     proto_tree_add_item(subtree, hf_ansi_map_callingfeaturesindicator_cpdsfa, tvb, offset, 1, ENC_BIG_ENDIAN);
1258     /* CDMA-Concurrent Service:FeatureActivity. CCS-FA (Octet 5 bits GH ) N.S0029-0 v1.0*/
1259     proto_tree_add_item(subtree, hf_ansi_map_callingfeaturesindicator_ccsfa, tvb, offset, 1, ENC_BIG_ENDIAN);
1260     length--;
1261     if ( length == 0)
1262         return;
1263     offset++;
1264
1265     /* TDMA Enhanced Privacy and Encryption:FeatureActivity.TDMA EPE-FA (Octet 6 bits AB ) N.S0029-0 v1.0*/
1266     proto_tree_add_item(subtree, hf_ansi_map_callingfeaturesindicator_epefa, tvb, offset, 1, ENC_BIG_ENDIAN);
1267 }
1268
1269
1270 /* 6.5.2.27 CancellationType */
1271 static const value_string ansi_map_CancellationType_vals[]  = {
1272     {   0, "Not used"},
1273     {   1, "ServingSystemOption"},
1274     {   2, "ReportInCall."},
1275     {   3, "Discontinue"},
1276     {   0, NULL }
1277 };
1278
1279 /* 6.5.2.29 CDMACallMode Updated with N.S0029-0 v1.0*/
1280 /* Call Mode (octet 1, bit A) */
1281 static const true_false_string ansi_map_CDMACallMode_cdma_bool_val  = {
1282   "CDMA 800 MHz channel (Band Class 0) acceptable.",
1283   "CDMA 800 MHz channel (Band Class 0) not acceptable"
1284 };
1285 /* Call Mode (octet 1, bit B) */
1286 static const true_false_string ansi_map_CallMode_amps_bool_val  = {
1287     "AAMPS 800 MHz channel acceptable",
1288     "AMPS 800 MHz channel not acceptable"
1289 };
1290 /* Call Mode (octet 1, bit C) */
1291 static const true_false_string ansi_map_CallMode_namps_bool_val  = {
1292     "NAMPS 800 MHz channel acceptable",
1293     "NAMPS 800 MHz channel not acceptable"
1294 };
1295 /* Call Mode (octet 1, bit D) */
1296 static const true_false_string ansi_map_CDMACallMode_cls1_bool_val  = {
1297     "CDMA 1900 MHz channel (Band Class 1) acceptable.",
1298     "CDMA 1900 MHz channel (Band Class 1) not acceptable"
1299 };
1300 /* Call Mode (octet 1, bit E) */
1301 static const true_false_string ansi_map_CDMACallMode_cls2_bool_val  = {
1302     "TACS channel (Band Class 2) acceptable",
1303     "TACS channel (Band Class 2) not acceptable"
1304 };
1305 /* Call Mode (octet 1, bit F) */
1306 static const true_false_string ansi_map_CDMACallMode_cls3_bool_val  = {
1307     "JTACS channel (Band Class 3) acceptable",
1308     "JTACS channel (Band Class 3) not acceptable"
1309 };
1310 /* Call Mode (octet 1, bit G) */
1311 static const true_false_string ansi_map_CDMACallMode_cls4_bool_val  = {
1312     "Korean PCS channel (Band Class 4) acceptable",
1313     "Korean PCS channel (Band Class 4) not acceptable"
1314 };
1315 /* Call Mode (octet 1, bit H) */
1316 static const true_false_string ansi_map_CDMACallMode_cls5_bool_val  = {
1317     "450 MHz channel (Band Class 5) not acceptable",
1318     "450 MHz channel (Band Class 5) not acceptable"
1319 };
1320 /* Call Mode (octet 2, bit A) */
1321 static const true_false_string ansi_map_CDMACallMode_cls6_bool_val  = {
1322     "2 GHz channel (Band Class 6) acceptable.",
1323     "2 GHz channel (Band Class 6) not acceptable."
1324 };
1325
1326 /* Call Mode (octet 2, bit B) */
1327 static const true_false_string ansi_map_CDMACallMode_cls7_bool_val  = {
1328     "700 MHz channel (Band Class 7) acceptable",
1329     "700 MHz channel (Band Class 7) not acceptable"
1330 };
1331
1332 /* Call Mode (octet 2, bit C) */
1333 static const true_false_string ansi_map_CDMACallMode_cls8_bool_val  = {
1334     "1800 MHz channel (Band Class 8) acceptable",
1335     "1800 MHz channel (Band Class 8) not acceptable"
1336 };
1337 /* Call Mode (octet 2, bit D) */
1338 static const true_false_string ansi_map_CDMACallMode_cls9_bool_val  = {
1339     "900 MHz channel (Band Class 9) acceptable",
1340     "900 MHz channel (Band Class 9) not acceptable"
1341 };
1342 /* Call Mode (octet 2, bit E) */
1343 static const true_false_string ansi_map_CDMACallMode_cls10_bool_val  = {
1344     "Secondary 800 MHz channel (Band Class 10) acceptable.",
1345     "Secondary 800 MHz channel (Band Class 10) not acceptable."
1346 };
1347
1348 static void
1349 dissect_ansi_map_cdmacallmode(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree _U_, asn1_ctx_t *actx _U_){
1350     int offset = 0;
1351     int length;
1352
1353     proto_tree *subtree;
1354
1355     length = tvb_length_remaining(tvb,offset);
1356
1357
1358     subtree = proto_item_add_subtree(actx->created_item, ett_mscid);
1359     /* Call Mode (octet 1, bit H) */
1360     proto_tree_add_item(subtree, hf_ansi_map_cdmacallmode_cls5, tvb, offset, 1, ENC_BIG_ENDIAN);
1361     /* Call Mode (octet 1, bit G) */
1362     proto_tree_add_item(subtree, hf_ansi_map_cdmacallmode_cls4, tvb, offset, 1, ENC_BIG_ENDIAN);
1363     /* Call Mode (octet 1, bit F) */
1364     proto_tree_add_item(subtree, hf_ansi_map_cdmacallmode_cls3, tvb, offset, 1, ENC_BIG_ENDIAN);
1365     /* Call Mode (octet 1, bit E) */
1366     proto_tree_add_item(subtree, hf_ansi_map_cdmacallmode_cls2, tvb, offset, 1, ENC_BIG_ENDIAN);
1367     /* Call Mode (octet 1, bit D) */
1368     proto_tree_add_item(subtree, hf_ansi_map_cdmacallmode_cls1, tvb, offset, 1, ENC_BIG_ENDIAN);
1369     /* Call Mode (octet 1, bit C) */
1370     proto_tree_add_item(subtree, hf_ansi_map_cdmacallmode_namps, tvb, offset, 1, ENC_BIG_ENDIAN);
1371     /* Call Mode (octet 1, bit B) */
1372     proto_tree_add_item(subtree, hf_ansi_map_cdmacallmode_amps, tvb, offset, 1, ENC_BIG_ENDIAN);
1373     /* Call Mode (octet 1, bit A) */
1374     proto_tree_add_item(subtree, hf_ansi_map_cdmacallmode_cdma, tvb, offset, 1, ENC_BIG_ENDIAN);
1375
1376     length--;
1377     if ( length == 0)
1378         return;
1379     offset++;
1380
1381     /* Call Mode (octet 2, bit E) */
1382     proto_tree_add_item(subtree, hf_ansi_map_cdmacallmode_cls10, tvb, offset, 1, ENC_BIG_ENDIAN);
1383     /* Call Mode (octet 2, bit D) */
1384     proto_tree_add_item(subtree, hf_ansi_map_cdmacallmode_cls9, tvb, offset, 1, ENC_BIG_ENDIAN);
1385     /* Call Mode (octet 2, bit C) */
1386     proto_tree_add_item(subtree, hf_ansi_map_cdmacallmode_cls8, tvb, offset, 1, ENC_BIG_ENDIAN);
1387     /* Call Mode (octet 2, bit B) */
1388     proto_tree_add_item(subtree, hf_ansi_map_cdmacallmode_cls7, tvb, offset, 1, ENC_BIG_ENDIAN);
1389     /* Call Mode (octet 2, bit A) */
1390     proto_tree_add_item(subtree, hf_ansi_map_cdmacallmode_cls6, tvb, offset, 1, ENC_BIG_ENDIAN);
1391
1392 }
1393 /* 6.5.2.30 CDMAChannelData */
1394 /* Updated with N.S0010-0 v 1.0 */
1395
1396 static const value_string ansi_map_cdmachanneldata_band_cls_vals[]  = {
1397     {   0, "800 MHz Cellular System"},
1398     {   0, NULL }
1399 };
1400
1401 static void
1402 dissect_ansi_map_cdmachanneldata(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree _U_, asn1_ctx_t *actx _U_){
1403
1404     int offset = 0;
1405     int length;
1406
1407     proto_tree *subtree;
1408
1409     length = tvb_length_remaining(tvb,offset);
1410
1411
1412     subtree = proto_item_add_subtree(actx->created_item, ett_cdmachanneldata);
1413
1414     proto_tree_add_item(subtree, hf_ansi_map_reservedBitH, tvb, offset, 1, ENC_BIG_ENDIAN);
1415     proto_tree_add_item(subtree, hf_ansi_map_cdmachanneldata_Frame_Offset, tvb, offset, 1, ENC_BIG_ENDIAN);
1416     /* CDMA Channel Number */
1417     proto_tree_add_item(subtree, hf_ansi_map_cdmachanneldata_CDMA_ch_no, tvb, offset, 2, ENC_BIG_ENDIAN);
1418     offset = offset + 2;
1419     length = length -2;
1420     /* Band Class */
1421     proto_tree_add_item(subtree, hf_ansi_map_reservedBitH, tvb, offset, 1, ENC_BIG_ENDIAN);
1422     proto_tree_add_item(subtree, hf_ansi_map_cdmachanneldata_band_cls, tvb, offset, 1, ENC_BIG_ENDIAN);
1423     /* Long Code Mask */
1424     proto_tree_add_item(subtree, hf_ansi_map_cdmachanneldata_lc_mask_b6, tvb, offset, 1, ENC_BIG_ENDIAN);
1425     offset++;
1426     proto_tree_add_item(subtree, hf_ansi_map_cdmachanneldata_lc_mask_b5, tvb, offset, 1, ENC_BIG_ENDIAN);
1427     offset++;
1428     proto_tree_add_item(subtree, hf_ansi_map_cdmachanneldata_lc_mask_b4, tvb, offset, 1, ENC_BIG_ENDIAN);
1429     offset++;
1430     proto_tree_add_item(subtree, hf_ansi_map_cdmachanneldata_lc_mask_b3, tvb, offset, 1, ENC_BIG_ENDIAN);
1431     offset++;
1432     proto_tree_add_item(subtree, hf_ansi_map_cdmachanneldata_lc_mask_b2, tvb, offset, 1, ENC_BIG_ENDIAN);
1433     offset++;
1434     proto_tree_add_item(subtree, hf_ansi_map_cdmachanneldata_lc_mask_b1, tvb, offset, 1, ENC_BIG_ENDIAN);
1435     length = length - 6;
1436     if (length == 0)
1437         return;
1438     offset++;
1439     /* NP_EXT */
1440     proto_tree_add_item(subtree, hf_ansi_map_cdmachanneldata_np_ext, tvb, offset, 1, ENC_BIG_ENDIAN);
1441     /* Nominal Power */
1442     proto_tree_add_item(subtree, hf_ansi_map_cdmachanneldata_nominal_pwr, tvb, offset, 1, ENC_BIG_ENDIAN);
1443     /* Number Preamble */
1444     proto_tree_add_item(subtree, hf_ansi_map_cdmachanneldata_nr_preamble, tvb, offset, 1, ENC_BIG_ENDIAN);
1445
1446 }
1447 /* 6.5.2.31 CDMACodeChannel */
1448
1449 /* 6.5.2.41 CDMAStationClassMark */
1450 /* Power Class: (PC) (octet 1, bits A and B) */
1451 static const value_string ansi_map_CDMAStationClassMark_pc_vals[]  = {
1452     {   0, "Class I"},
1453     {   1, "Class II"},
1454     {   2, "Class III"},
1455     {   3, "Reserved"},
1456     {   0, NULL }
1457 };
1458 /* Analog Transmission: (DTX) (octet 1, bit C) */
1459 static const true_false_string ansi_map_CDMAStationClassMark_dtx_bool_val  = {
1460     "Discontinuous",
1461     "Continuous"
1462 };
1463 /* Slotted Mode Indicator: (SMI) (octet 1, bit F) */
1464 static const true_false_string ansi_map_CDMAStationClassMark_smi_bool_val  = {
1465     "Slotted capable",
1466     "Slotted incapable"
1467 };
1468 /* Dual-mode Indicator(DMI) (octet 1, bit G) */
1469 static const true_false_string ansi_map_CDMAStationClassMark_dmi_bool_val  = {
1470     "Dual-mode CDMA",
1471     "CDMA only"
1472 };
1473
1474
1475 static void
1476 dissect_ansi_map_cdmastationclassmark(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree _U_, asn1_ctx_t *actx _U_){
1477     int offset = 0;
1478
1479     proto_tree *subtree;
1480
1481
1482     subtree = proto_item_add_subtree(actx->created_item, ett_cdmastationclassmark);
1483
1484     proto_tree_add_item(subtree, hf_ansi_map_reservedBitH, tvb, offset, 1, ENC_BIG_ENDIAN);
1485     /* Dual-mode Indicator(DMI) (octet 1, bit G) */
1486     proto_tree_add_item(subtree, hf_ansi_map_cdmastationclassmark_dmi, tvb, offset, 1, ENC_BIG_ENDIAN);
1487     /* Slotted Mode Indicator: (SMI) (octet 1, bit F) */
1488     proto_tree_add_item(subtree, hf_ansi_map_cdmastationclassmark_smi, tvb, offset, 1, ENC_BIG_ENDIAN);
1489     proto_tree_add_item(subtree, hf_ansi_map_reservedBitED, tvb, offset, 1, ENC_BIG_ENDIAN);
1490     /* Analog Transmission: (DTX) (octet 1, bit C) */
1491     proto_tree_add_item(subtree, hf_ansi_map_cdmastationclassmark_dtx, tvb, offset, 1, ENC_BIG_ENDIAN);
1492     /* Power Class: (PC) (octet 1, bits A and B) */
1493     proto_tree_add_item(subtree, hf_ansi_map_cdmastationclassmark_pc, tvb, offset, 1, ENC_BIG_ENDIAN);
1494 }
1495 /* 6.5.2.47 ChannelData */
1496 /* Discontinuous Transmission Mode (DTX) (octet 1, bits E and D) */
1497 static const value_string ansi_map_ChannelData_dtx_vals[]  = {
1498     {   0, "DTX disabled"},
1499     {   1, "Reserved. Treat the same as value 00, DTX disabled."},
1500     {   2, "DTX-low mode"},
1501     {   3, "DTX mode active or acceptable"},
1502     {   0, NULL }
1503 };
1504
1505
1506 static void
1507 dissect_ansi_map_channeldata(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree _U_, asn1_ctx_t *actx _U_){
1508     int offset = 0;
1509
1510     proto_tree *subtree;
1511
1512
1513     subtree = proto_item_add_subtree(actx->created_item, ett_channeldata);
1514
1515     /* SAT Color Code (SCC) (octet 1, bits H and G) */
1516     proto_tree_add_item(subtree, hf_ansi_map_channeldata_scc, tvb, offset, 1, ENC_BIG_ENDIAN);
1517     /* Discontinuous Transmission Mode (DTX) (octet 1, bits E and D) */
1518     proto_tree_add_item(subtree, hf_ansi_map_channeldata_dtx, tvb, offset, 1, ENC_BIG_ENDIAN);
1519     /* Voice Mobile Attenuation Code (VMAC) (octet 1, bits A - C)*/
1520     proto_tree_add_item(subtree, hf_ansi_map_channeldata_vmac, tvb, offset, 1, ENC_BIG_ENDIAN);
1521
1522     offset++;
1523     /* Channel Number (CHNO) ( octet 2 and 3 ) */
1524     proto_tree_add_item(subtree, hf_ansi_map_channeldata_chno, tvb, offset, 2, ENC_BIG_ENDIAN);
1525
1526 }
1527
1528 /* 6.5.2.50 ConfidentialityModes */
1529 /* Updated with N.S0008-0 v 1.0*/
1530 /* Voice Privacy (VP) Confidentiality Status (octet 1, bit A) */
1531
1532 static const true_false_string ansi_map_ConfidentialityModes_bool_val  = {
1533     "On",
1534     "Off"
1535 };
1536 static void
1537 dissect_ansi_map_confidentialitymodes(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree _U_, asn1_ctx_t *actx _U_){
1538     int offset = 0;
1539
1540     proto_tree *subtree;
1541
1542
1543     subtree = proto_item_add_subtree(actx->created_item, ett_confidentialitymodes);
1544
1545     /* DataPrivacy (DP) Confidentiality Status (octet 1, bit C) */
1546     proto_tree_add_item(subtree, hf_ansi_map_ConfidentialityModes_dp, tvb, offset, 1, ENC_BIG_ENDIAN);
1547     /* Signaling Message Encryption (SE) Confidentiality Status (octet 1, bit B) */
1548     proto_tree_add_item(subtree, hf_ansi_map_ConfidentialityModes_se, tvb, offset, 1, ENC_BIG_ENDIAN);
1549     /* Voice Privacy (VP) Confidentiality Status (octet 1, bit A) */
1550     proto_tree_add_item(subtree, hf_ansi_map_ConfidentialityModes_vp, tvb, offset, 1, ENC_BIG_ENDIAN);
1551
1552 }
1553
1554 /* 6.5.2.51 ControlChannelData */
1555
1556 /* Digital Color Code (DCC) (octet 1, bit H and G) */
1557 /* Control Mobile Attenuation Code (CMAC) (octet 1, bit A - C) */
1558 /* Channel Number (CHNO) ( octet 2 and 3 ) */
1559 /* Supplementary Digital Color Codes (SDCC1 and SDCC2) */
1560 /* SDCC1 ( octet 4, bit D and C )*/
1561 /* SDCC2 ( octet 4, bit A and B )*/
1562
1563 static void
1564 dissect_ansi_map_controlchanneldata(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree _U_, asn1_ctx_t *actx _U_){
1565     int offset = 0;
1566
1567     proto_tree *subtree;
1568
1569
1570     subtree = proto_item_add_subtree(actx->created_item, ett_controlchanneldata);
1571
1572     /* Digital Color Code (DCC) (octet 1, bit H and G) */
1573     proto_tree_add_item(subtree, hf_ansi_map_controlchanneldata_dcc, tvb, offset, 1, ENC_BIG_ENDIAN);
1574     proto_tree_add_item(subtree, hf_ansi_map_reservedBitFED, tvb, offset, 1, ENC_BIG_ENDIAN);
1575     /* Control Mobile Attenuation Code (CMAC) (octet 1, bit A - C) */
1576     proto_tree_add_item(subtree, hf_ansi_map_controlchanneldata_cmac, tvb, offset, 1, ENC_BIG_ENDIAN);
1577     offset++;
1578     /* Channel Number (CHNO) ( octet 2 and 3 ) */
1579     proto_tree_add_item(subtree, hf_ansi_map_controlchanneldata_chno, tvb, offset, 2, ENC_BIG_ENDIAN);
1580     /* Supplementary Digital Color Codes (SDCC1 and SDCC2) */
1581     offset = offset +2;
1582     /* SDCC1 ( octet 4, bit D and C )*/
1583     proto_tree_add_item(subtree, hf_ansi_map_controlchanneldata_sdcc1, tvb, offset, 1, ENC_BIG_ENDIAN);
1584     proto_tree_add_item(subtree, hf_ansi_map_reservedBitHGFE, tvb, offset, 1, ENC_BIG_ENDIAN);
1585     /* SDCC2 ( octet 4, bit A and B )*/
1586     proto_tree_add_item(subtree, hf_ansi_map_controlchanneldata_sdcc2, tvb, offset, 1, ENC_BIG_ENDIAN);
1587
1588 }
1589
1590 /* 6.5.2.52 CountUpdateReport */
1591 static const value_string ansi_map_CountUpdateReport_vals[]  = {
1592     {   0, "Class I"},
1593     {   1, "Class II"},
1594     {   2, "Class III"},
1595     {   3, "Reserved"},
1596     {   0, NULL }
1597 };
1598
1599 /* 6.5.2.53 DeniedAuthorizationPeriod */
1600 /* Period (octet 1) */
1601 static const value_string ansi_map_deniedauthorizationperiod_period_vals[]  = {
1602     {   0, "Not used"},
1603     {   1, "Per Call. Re-authorization should be attempted on the next call attempt"},
1604     {   2, "Hours"},
1605     {   3, "Days"},
1606     {   4, "Weeks"},
1607     {   5, "Per Agreement"},
1608     {   6, "Reserved"},
1609     {   7, "Number of calls. Re-authorization should be attempted after this number of (rejected) call attempts"},
1610     {   8, "Minutes"},
1611     {   0, NULL }
1612 };
1613 /* Value (octet 2)
1614 Number of minutes hours, days, weeks, or
1615 number of calls (as per Period). If Period
1616 indicates anything else the Value is set to zero
1617 on sending and ignored on receipt.
1618 */
1619
1620 static void
1621 dissect_ansi_map_deniedauthorizationperiod(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree _U_, asn1_ctx_t *actx _U_){
1622
1623     int offset = 0;
1624
1625     proto_tree *subtree;
1626
1627
1628     subtree = proto_item_add_subtree(actx->created_item, ett_billingid);
1629     proto_tree_add_item(subtree, hf_ansi_map_deniedauthorizationperiod_period, tvb, offset, 1, ENC_BIG_ENDIAN);
1630     offset++;
1631     proto_tree_add_item(subtree, hf_ansi_map_value, tvb, offset, 1, ENC_BIG_ENDIAN);
1632
1633 }
1634
1635
1636 /* 6.5.2.57 DigitCollectionControl */
1637 /* TODO Add decoding here */
1638
1639 /* 6.5.2.64 ExtendedMSCID */
1640 static const value_string ansi_map_msc_type_vals[]  = {
1641     {   0, "Not specified"},
1642     {   1, "Serving MSC"},
1643     {   2, "Home MSC"},
1644     {   3, "Gateway MSC"},
1645     {   4, "HLR"},
1646     {   5, "VLR"},
1647     {   6, "EIR (reserved)"},
1648     {   7, "AC"},
1649     {   8, "Border MSC"},
1650     {   9, "Originating MSC"},
1651     {   0, NULL }
1652 };
1653
1654 static void
1655 dissect_ansi_map_extendedmscid(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree _U_, asn1_ctx_t *actx _U_){
1656
1657     int offset = 0;
1658
1659     proto_tree *subtree;
1660
1661
1662     subtree = proto_item_add_subtree(actx->created_item, ett_extendedmscid);
1663     /* Type (octet 1) */
1664     proto_tree_add_item(subtree, hf_ansi_map_msc_type, tvb, offset, 1, ENC_BIG_ENDIAN);
1665     offset++;
1666     proto_tree_add_item(subtree, hf_ansi_map_MarketID, tvb, offset, 2, ENC_BIG_ENDIAN);
1667     offset = offset + 2;
1668     proto_tree_add_item(subtree, hf_ansi_map_swno, tvb, offset, 1, ENC_BIG_ENDIAN);
1669
1670 }
1671 /* 6.5.2.65 ExtendedSystemMyTypeCode */
1672 static void
1673 dissect_ansi_map_extendedsystemmytypecode(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree _U_, asn1_ctx_t *actx){
1674
1675     int offset = 0;
1676
1677     proto_tree *subtree;
1678
1679
1680     subtree = proto_item_add_subtree(actx->created_item, ett_extendedsystemmytypecode);
1681     /* Type (octet 1) */
1682     proto_tree_add_item(subtree, hf_ansi_map_msc_type, tvb, offset, 1, ENC_BIG_ENDIAN);
1683     offset++;
1684     dissect_ansi_map_SystemMyTypeCode(TRUE, tvb, offset, actx, subtree, hf_ansi_map_systemMyTypeCode);
1685 }
1686
1687
1688 /* 6.5.2.68 GeographicAuthorization */
1689 /* Geographic Authorization (octet 1) */
1690 static const value_string ansi_map_GeographicAuthorization_vals[]  = {
1691     {   0, "Not used"},
1692     {   1, "Authorized for all MarketIDs served by the VLR"},
1693     {   2, "Authorized for this MarketID only"},
1694     {   3, "Authorized for this MarketID and Switch Number only"},
1695     {   4, "Authorized for this LocationAreaID within a MarketID only"},
1696     {   5, "VLR"},
1697     {   6, "EIR (reserved)"},
1698     {   7, "AC"},
1699     {   8, "Border MSC"},
1700     {   9, "Originating MSC"},
1701     {   0, NULL }
1702 };
1703
1704 /* 6.5.2.71 HandoffState */
1705 /* Party Involved (PI) (octet 1, bit A) */
1706 static const true_false_string ansi_map_HandoffState_pi_bool_val  = {
1707     "Terminator is handing off",
1708     "Originator is handing off"
1709 };
1710 static void
1711 dissect_ansi_map_handoffstate(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree _U_, asn1_ctx_t *actx _U_){
1712
1713     int offset = 0;
1714
1715     proto_tree *subtree;
1716
1717
1718     subtree = proto_item_add_subtree(actx->created_item, ett_handoffstate);
1719     /* Party Involved (PI) (octet 1, bit A) */
1720     proto_tree_add_item(subtree, hf_ansi_map_handoffstate_pi, tvb, offset, 1, ENC_BIG_ENDIAN);
1721 }
1722
1723 /* 6.5.2.72 InterMSCCircuitID */
1724 /* Trunk Member Number (M) Octet2 */
1725 static void
1726 dissect_ansi_map_intermsccircuitid(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree _U_, asn1_ctx_t *actx _U_){
1727
1728     int offset = 0;
1729
1730     proto_tree *subtree;
1731     guint8 octet, octet2;
1732
1733
1734     subtree = proto_item_add_subtree(actx->created_item, ett_billingid);
1735     /* Trunk Group Number (G) Octet 1 */
1736     octet = tvb_get_guint8(tvb,offset);
1737     proto_tree_add_item(subtree, hf_ansi_map_tgn, tvb, offset, 1, ENC_BIG_ENDIAN);
1738     offset++;
1739     /* Trunk Member Number (M) Octet2 */
1740     octet2 = tvb_get_guint8(tvb,offset);
1741     proto_tree_add_item(subtree, hf_ansi_map_tmn, tvb, offset, 1, ENC_BIG_ENDIAN);
1742     proto_item_append_text(actx->created_item, " (G %u/M %u)", octet, octet2);
1743 }
1744
1745 /* 6.5.2.78 MessageWaitingNotificationCount */
1746 /* Type of messages (octet 1) */
1747 static const value_string ansi_map_MessageWaitingNotificationCount_type_vals[]  = {
1748     {   0, "Voice messages"},
1749     {   1, "Short Message Services (SMS) messages"},
1750     {   2, "Group 3 (G3) Fax messages"},
1751     {   0, NULL }
1752 };
1753
1754 static void
1755 dissect_ansi_map_messagewaitingnotificationcount(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree _U_, asn1_ctx_t *actx _U_){
1756
1757     int offset = 0;
1758
1759     proto_tree *subtree;
1760
1761
1762     subtree = proto_item_add_subtree(actx->created_item, ett_billingid);
1763     /* Type of messages (octet 1) */
1764     proto_tree_add_item(subtree, hf_ansi_map_messagewaitingnotificationcount_tom, tvb, offset, 1, ENC_BIG_ENDIAN);
1765     offset++;
1766     /* Number of Messages Waiting (octet 2) */
1767     proto_tree_add_item(subtree, hf_ansi_map_messagewaitingnotificationcount_no_mw, tvb, offset, 1, ENC_BIG_ENDIAN);
1768
1769 }
1770
1771 /* 6.5.2.79 MessageWaitingNotificationType */
1772 /* Pip Tone (PT) (octet 1, bit A) */
1773 static const true_false_string ansi_map_MessageWaitingNotificationType_pt_bool_val  = {
1774     "Pip Tone (PT) notification is required",
1775     "Pip Tone (PT) notification is not authorized or no notification is required"
1776 };
1777 /* Alert Pip Tone (APT) (octet 1, bit B) */
1778 static const true_false_string ansi_map_MessageWaitingNotificationType_apt_bool_val  = {
1779     "Alert Pip Tone (APT) notification is required",
1780     "Alert Pip Tone (APT) notification is not authorized or notification is not required"
1781 };
1782 /* Message Waiting Indication (MWI) (octet 1, bits C and D) */
1783 static const value_string ansi_map_MessageWaitingNotificationType_mwi_vals[]  = {
1784     {   0, "No MWI. Message Waiting Indication (MWI) notification is not authorized or notification is not required"},
1785     {   1, "Reserved"},
1786     {   2, "MWI On. Message Waiting Indication (MWI) notification is required. Messages waiting"},
1787     {   3, "MWI Off. Message Waiting Indication (MWI) notification is required. No messages waiting"},
1788     {   0, NULL }
1789 };
1790
1791 static void
1792 dissect_ansi_map_messagewaitingnotificationtype(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree _U_, asn1_ctx_t *actx _U_){
1793
1794     int offset = 0;
1795
1796     proto_tree *subtree;
1797
1798
1799     subtree = proto_item_add_subtree(actx->created_item, ett_billingid);
1800
1801     /* Message Waiting Indication (MWI) (octet 1, bits C and D) */
1802     proto_tree_add_item(subtree, hf_ansi_map_messagewaitingnotificationtype_mwi, tvb, offset, 1, ENC_BIG_ENDIAN);
1803     /* Alert Pip Tone (APT) (octet 1, bit B) */
1804     proto_tree_add_item(subtree, hf_ansi_map_messagewaitingnotificationtype_apt, tvb, offset, 1, ENC_BIG_ENDIAN);
1805     /* Pip Tone (PT) (octet 1, bit A) */
1806     proto_tree_add_item(subtree, hf_ansi_map_messagewaitingnotificationtype_pt, tvb, offset, 1, ENC_BIG_ENDIAN);
1807 }
1808
1809 /* 6.5.2.81 MobileIdentificationNumber */
1810
1811 /* 6.5.2.82 MSCID */
1812
1813 static void
1814 dissect_ansi_map_mscid(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree _U_, asn1_ctx_t *actx _U_){
1815     int offset = 0;
1816
1817     proto_tree *subtree;
1818
1819
1820     subtree = proto_item_add_subtree(actx->created_item, ett_mscid);
1821
1822     proto_tree_add_item(subtree, hf_ansi_map_MarketID, tvb, offset, 2, ENC_BIG_ENDIAN);
1823     offset = offset + 2;
1824     proto_tree_add_item(subtree, hf_ansi_map_swno, tvb, offset, 1, ENC_BIG_ENDIAN);
1825 }
1826
1827
1828 /* 6.5.2.84 MSLocation */
1829 static void
1830 dissect_ansi_map_mslocation(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree _U_, asn1_ctx_t *actx _U_){
1831     int offset = 0;
1832
1833     proto_tree *subtree;
1834
1835
1836     subtree = proto_item_add_subtree(actx->created_item, ett_mscid);
1837
1838     /* Latitude in tenths of a second octet 1 - 3 */
1839     proto_tree_add_item(subtree, hf_ansi_map_mslocation_lat, tvb, offset, 3, ENC_BIG_ENDIAN);
1840     offset = offset + 3;
1841     /* Longitude in tenths of a second octet 4 - 6 */
1842     proto_tree_add_item(subtree, hf_ansi_map_mslocation_long, tvb, offset, 3, ENC_BIG_ENDIAN);
1843     offset = offset + 3;
1844     /* Resolution in units of 1 foot octet 7, octet 8 optional */
1845     proto_tree_add_item(subtree, hf_ansi_map_mslocation_res, tvb, offset, -1, ENC_BIG_ENDIAN);
1846
1847 }
1848 /* 6.5.2.85 NAMPSCallMode */
1849 static void
1850 dissect_ansi_map_nampscallmode(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree _U_, asn1_ctx_t *actx _U_){
1851     int offset = 0;
1852     proto_tree *subtree;
1853
1854
1855     subtree = proto_item_add_subtree(actx->created_item, ett_mscid);
1856
1857     /* Call Mode (octet 1, bits A and B) */
1858     proto_tree_add_item(subtree, hf_ansi_map_nampscallmode_amps, tvb, offset, 1, ENC_BIG_ENDIAN);
1859     proto_tree_add_item(subtree, hf_ansi_map_nampscallmode_namps, tvb, offset, 1, ENC_BIG_ENDIAN);
1860 }
1861
1862 /* 6.5.2.86 NAMPSChannelData */
1863 /* Narrow Analog Voice Channel Assignment (NAVCA) (octet 1, bits A and B) */
1864 static const value_string ansi_map_NAMPSChannelData_navca_vals[]  = {
1865     {   0, "Wide. 30 kHz AMPS voice channel"},
1866     {   1, "Upper. 10 kHz NAMPS voice channel"},
1867     {   2, "Middle. 10 kHz NAMPS voice channel"},
1868     {   3, "Lower. 10 kHz NAMPS voice channel"},
1869     {   0, NULL }
1870 };
1871 /* Color Code Indicator (CCIndicator) (octet 1, bits C, D, and E) */
1872 static const value_string ansi_map_NAMPSChannelData_ccinidicator_vals[]  = {
1873     {   0, "ChannelData parameter SCC field applies"},
1874     {   1, "Digital SAT Color Code 1 (ignore SCC field)"},
1875     {   2, "Digital SAT Color Code 2 (ignore SCC field)"},
1876     {   3, "Digital SAT Color Code 3 (ignore SCC field)"},
1877     {   4, "Digital SAT Color Code 4 (ignore SCC field)"},
1878     {   5, "Digital SAT Color Code 5 (ignore SCC field)"},
1879     {   6, "Digital SAT Color Code 6 (ignore SCC field)"},
1880     {   7, "Digital SAT Color Code 7 (ignore SCC field)"},
1881     {   0, NULL }
1882 };
1883
1884
1885
1886 static void
1887 dissect_ansi_map_nampschanneldata(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree _U_, asn1_ctx_t *actx _U_){
1888     int offset = 0;
1889     proto_tree *subtree;
1890
1891
1892     subtree = proto_item_add_subtree(actx->created_item, ett_mscid);
1893
1894     /* Color Code Indicator (CCIndicator) (octet 1, bits C, D, and E) */
1895     proto_tree_add_item(subtree, hf_ansi_map_nampschanneldata_CCIndicator, tvb, offset, 1, ENC_BIG_ENDIAN);
1896     /* Narrow Analog Voice Channel Assignment (NAVCA) (octet 1, bits A and B) */
1897     proto_tree_add_item(subtree, hf_ansi_map_nampschanneldata_navca, tvb, offset, 1, ENC_BIG_ENDIAN);
1898
1899 }
1900
1901 /* 6.5.2.88 OneTimeFeatureIndicator */
1902 /* updated with N.S0012 */
1903 /* Call Waiting for Future Incoming Call (CWFI) (octet 1, bits A and B) */
1904 /* Call Waiting for Incoming Call (CWIC) (octet 1, bits C and D) */
1905
1906 static const value_string ansi_map_onetimefeatureindicator_cw_vals[]  = {
1907     {   0, "Ignore"},
1908     {   1, "No CW"},
1909     {   2, "Normal CW"},
1910     {   3, "Priority CW"},
1911     {   0, NULL }
1912 };
1913 /* MessageWaitingNotification (MWN) (octet 1, bits E and F) */
1914 static const value_string ansi_map_onetimefeatureindicator_mwn_vals[]  = {
1915     {   0, "Ignore"},
1916     {   1, "Pip Tone Inactive"},
1917     {   2, "Pip Tone Active"},
1918     {   3, "Reserved"},
1919     {   0, NULL }
1920 };
1921 /* Calling Number Identification Restriction (CNIR) (octet 1, bits G and H)*/
1922 static const value_string ansi_map_onetimefeatureindicator_cnir_vals[]  = {
1923     {   0, "Ignore"},
1924     {   1, "CNIR Inactive"},
1925     {   2, "CNIR Active"},
1926     {   3, "Reserved"},
1927     {   0, NULL }
1928 };
1929
1930 /* Priority Access and Channel Assignment (PACA) (octet 2, bits A and B)*/
1931 static const value_string ansi_map_onetimefeatureindicator_paca_vals[]  = {
1932     {   0, "Ignore"},
1933     {   1, "PACA Demand Inactive"},
1934     {   2, "PACA Demand Activated"},
1935     {   3, "Reserved"},
1936     {   0, NULL }
1937 };
1938
1939 /* Flash Privileges (Flash) (octet 2, bits C and D) */
1940 static const value_string ansi_map_onetimefeatureindicator_flash_vals[]  = {
1941     {   0, "Ignore"},
1942     {   1, "Flash Inactive"},
1943     {   2, "Flash Active"},
1944     {   3, "Reserved"},
1945     {   0, NULL }
1946 };
1947 /* Calling Name Restriction (CNAR) (octet 2, bits E and F) */
1948 static const value_string ansi_map_onetimefeatureindicator_cnar_vals[]  = {
1949     {   0, "Ignore"},
1950     {   1, "Presentation Allowed"},
1951     {   2, "Presentation Restricted."},
1952     {   3, "Blocking Toggle"},
1953     {   0, NULL }
1954 };
1955 static void
1956 dissect_ansi_map_onetimefeatureindicator(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, asn1_ctx_t *actx _U_){
1957     /*
1958     int offset = 0;
1959     proto_tree *subtree;
1960
1961
1962     subtree = proto_item_add_subtree(actx->created_item, ett_mscid);
1963     */
1964     /* Calling Number Identification Restriction (CNIR) (octet 1, bits G and H)*/
1965     /* MessageWaitingNotification (MWN) (octet 1, bits E and F) */
1966     /* Call Waiting for Incoming Call (CWIC) (octet 1, bits C and D) */
1967     /* Call Waiting for Future Incoming Call (CWFI) (octet 1, bits A and B) */
1968     /*offset++;*/
1969     /* Calling Name Restriction (CNAR) (octet 2, bits E and F) */
1970     /* Flash Privileges (Flash) (octet 2, bits C and D) */
1971     /* Priority Access and Channel Assignment (PACA) (octet 2, bits A and B)*/
1972
1973
1974 }
1975
1976 /* 6.5.2.90 OriginationTriggers */
1977 /* All Origination (All) (octet 1, bit A) */
1978 static const true_false_string ansi_map_originationtriggers_all_bool_val  = {
1979     "Launch an OriginationRequest for any call attempt. This overrides all other values",
1980     "Trigger is not active"
1981 };
1982
1983 /* Local (octet 1, bit B) */
1984 static const true_false_string ansi_map_originationtriggers_local_bool_val  = {
1985     "Launch an OriginationRequest for any local call attempt",
1986     "Trigger is not active"
1987 };
1988
1989 /* Intra-LATA Toll (ILATA) (octet 1, bit C) */
1990 static const true_false_string ansi_map_originationtriggers_ilata_bool_val  = {
1991     "Launch an OriginationRequest for any intra-LATA call attempt",
1992     "Trigger is not active"
1993 };
1994 /* Inter-LATA Toll (OLATA) (octet 1, bit D) */
1995 static const true_false_string ansi_map_originationtriggers_olata_bool_val  = {
1996     "Launch an OriginationRequest for any inter-LATA toll call attempt",
1997     "Trigger is not active"
1998 };
1999 /* International (Int'l ) (octet 1, bit E) */
2000 static const true_false_string ansi_map_originationtriggers_int_bool_val  = {
2001     "Launch an OriginationRequest for any international call attempt",
2002     "Trigger is not active"
2003 };
2004 /* World Zone (WZ) (octet 1, bit F) */
2005 static const true_false_string ansi_map_originationtriggers_wz_bool_val  = {
2006     "Launch an OriginationRequest for any call attempt outside of the current World Zone (as defined in ITU-T Rec. E.164)",
2007     "Trigger is not active"
2008 };
2009
2010 /* Unrecognized Number (Unrec) (octet 1, bit G) */
2011 static const true_false_string ansi_map_originationtriggers_unrec_bool_val  = {
2012     "Launch an OriginationRequest for any call attempt to an unrecognized number",
2013     "Trigger is not active"
2014 };
2015 /* Revertive Call (RvtC) (octet 1, bit H)*/
2016 static const true_false_string ansi_map_originationtriggers_rvtc_bool_val  = {
2017     "Launch an OriginationRequest for any Revertive Call attempt",
2018     "Trigger is not active"
2019 };
2020
2021 /* Star (octet 2, bit A) */
2022 static const true_false_string ansi_map_originationtriggers_star_bool_val  = {
2023     "Launch an OriginationRequest for any number beginning with a Star '*' digit",
2024     "Trigger is not active"
2025 };
2026
2027 /* Double Star (DS) (octet 2, bit B) */
2028 static const true_false_string ansi_map_originationtriggers_ds_bool_val  = {
2029     "Launch an OriginationRequest for any number beginning with two Star '**' digits",
2030     "Trigger is not active"
2031 };
2032 /* Pound (octet 2, bit C) */
2033 static const true_false_string ansi_map_originationtriggers_pound_bool_val  = {
2034     "Launch an OriginationRequest for any number beginning with a Pound '#' digit",
2035     "Trigger is not active"
2036 };
2037 /* Double Pound (DP) (octet 2, bit D) */
2038 static const true_false_string ansi_map_originationtriggers_dp_bool_val  = {
2039     "Launch an OriginationRequest for any number beginning with two Pound '##' digits",
2040     "Trigger is not active"
2041 };
2042 /* Prior Agreement (PA) (octet 2, bit E) */
2043 static const true_false_string ansi_map_originationtriggers_pa_bool_val  = {
2044     "Launch an OriginationRequest for any number matching a criteria of a prior agreement",
2045     "Trigger is not active"
2046 };
2047
2048 /* No digits (octet 3, bit A) */
2049 static const true_false_string ansi_map_originationtriggers_nodig_bool_val  = {
2050     "Launch an OriginationRequest for any call attempt with no digits",
2051     "Trigger is not active"
2052 };
2053
2054 /* 1 digit (octet 3, bit B) */
2055 static const true_false_string ansi_map_originationtriggers_onedig_bool_val  = {
2056     "Launch an OriginationRequest for any call attempt with 1 digit",
2057     "Trigger is not active"
2058 };
2059 /* 1 digit (octet 3, bit C) */
2060 static const true_false_string ansi_map_originationtriggers_twodig_bool_val  = {
2061     "Launch an OriginationRequest for any call attempt with 2 digits",
2062     "Trigger is not active"
2063 };
2064 /* 1 digit (octet 3, bit D) */
2065 static const true_false_string ansi_map_originationtriggers_threedig_bool_val  = {
2066     "Launch an OriginationRequest for any call attempt with 3 digits",
2067     "Trigger is not active"
2068 };
2069 /* 1 digit (octet 3, bit E) */
2070 static const true_false_string ansi_map_originationtriggers_fourdig_bool_val  = {
2071     "Launch an OriginationRequest for any call attempt with 4 digits",
2072     "Trigger is not active"
2073 };
2074 /* 1 digit (octet 3, bit F) */
2075 static const true_false_string ansi_map_originationtriggers_fivedig_bool_val  = {
2076     "Launch an OriginationRequest for any call attempt with 5 digits",
2077     "Trigger is not active"
2078 };
2079 /* 1 digit (octet 3, bit G) */
2080 static const true_false_string ansi_map_originationtriggers_sixdig_bool_val  = {
2081     "Launch an OriginationRequest for any call attempt with 6 digits",
2082     "Trigger is not active"
2083 };
2084 /* 1 digit (octet 3, bit H) */
2085 static const true_false_string ansi_map_originationtriggers_sevendig_bool_val  = {
2086     "Launch an OriginationRequest for any call attempt with 7 digits",
2087     "Trigger is not active"
2088 };
2089 /* 1 digit (octet 4, bit A) */
2090 static const true_false_string ansi_map_originationtriggers_eightdig_bool_val  = {
2091     "Launch an OriginationRequest for any call attempt with 8 digits",
2092     "Trigger is not active"
2093 };
2094 /* 1 digit (octet 4, bit B) */
2095 static const true_false_string ansi_map_originationtriggers_ninedig_bool_val  = {
2096     "Launch an OriginationRequest for any call attempt with 9 digits",
2097     "Trigger is not active"
2098 };
2099 /* 1 digit (octet 4, bit C) */
2100 static const true_false_string ansi_map_originationtriggers_tendig_bool_val  = {
2101     "Launch an OriginationRequest for any call attempt with 10 digits",
2102     "Trigger is not active"
2103 };
2104 /* 1 digit (octet 4, bit D) */
2105 static const true_false_string ansi_map_originationtriggers_elevendig_bool_val  = {
2106     "Launch an OriginationRequest for any call attempt with 11 digits",
2107     "Trigger is not active"
2108 };
2109 /* 1 digit (octet 4, bit E) */
2110 static const true_false_string ansi_map_originationtriggers_twelvedig_bool_val  = {
2111     "Launch an OriginationRequest for any call attempt with 12 digits",
2112     "Trigger is not active"
2113 };
2114 /* 1 digit (octet 4, bit F) */
2115 static const true_false_string ansi_map_originationtriggers_thirteendig_bool_val  = {
2116     "Launch an OriginationRequest for any call attempt with 13 digits",
2117     "Trigger is not active"
2118 };
2119 /* 1 digit (octet 4, bit G) */
2120 static const true_false_string ansi_map_originationtriggers_fourteendig_bool_val  = {
2121     "Launch an OriginationRequest for any call attempt with 14 digits",
2122     "Trigger is not active"
2123 };
2124 /* 1 digit (octet 4, bit H) */
2125 static const true_false_string ansi_map_originationtriggers_fifteendig_bool_val  = {
2126     "Launch an OriginationRequest for any call attempt with 15 digits",
2127     "Trigger is not active"
2128 };
2129
2130 static void
2131 dissect_ansi_map_originationtriggers(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree _U_, asn1_ctx_t *actx _U_){
2132
2133     int offset = 0;
2134     proto_tree *subtree;
2135
2136
2137     subtree = proto_item_add_subtree(actx->created_item, ett_originationtriggers);
2138
2139     /* Revertive Call (RvtC) (octet 1, bit H)*/
2140     proto_tree_add_item(subtree, hf_ansi_map_originationtriggers_rvtc, tvb, offset,     1, ENC_BIG_ENDIAN);
2141     /* Unrecognized Number (Unrec) (octet 1, bit G) */
2142     proto_tree_add_item(subtree, hf_ansi_map_originationtriggers_unrec, tvb, offset,    1, ENC_BIG_ENDIAN);
2143     /* World Zone (WZ) (octet 1, bit F) */
2144     proto_tree_add_item(subtree, hf_ansi_map_originationtriggers_wz, tvb, offset,       1, ENC_BIG_ENDIAN);
2145     /* International (Int'l ) (octet 1, bit E) */
2146     proto_tree_add_item(subtree, hf_ansi_map_originationtriggers_int, tvb, offset,      1, ENC_BIG_ENDIAN);
2147     /* Inter-LATA Toll (OLATA) (octet 1, bit D) */
2148     proto_tree_add_item(subtree, hf_ansi_map_originationtriggers_olata, tvb, offset,    1, ENC_BIG_ENDIAN);
2149     /* Intra-LATA Toll (ILATA) (octet 1, bit C) */
2150     proto_tree_add_item(subtree, hf_ansi_map_originationtriggers_ilata, tvb, offset,    1, ENC_BIG_ENDIAN);
2151     /* Local (octet 1, bit B) */
2152     proto_tree_add_item(subtree, hf_ansi_map_originationtriggers_local, tvb, offset,    1, ENC_BIG_ENDIAN);
2153     /* All Origination (All) (octet 1, bit A) */
2154     proto_tree_add_item(subtree, hf_ansi_map_originationtriggers_all, tvb, offset,      1, ENC_BIG_ENDIAN);
2155     offset++;
2156
2157     /*Prior Agreement (PA) (octet 2, bit E) */
2158     proto_tree_add_item(subtree, hf_ansi_map_originationtriggers_pa, tvb, offset,       1, ENC_BIG_ENDIAN);
2159     /* Double Pound (DP) (octet 2, bit D) */
2160     proto_tree_add_item(subtree, hf_ansi_map_originationtriggers_dp, tvb, offset,       1, ENC_BIG_ENDIAN);
2161     /* Pound (octet 2, bit C) */
2162     proto_tree_add_item(subtree, hf_ansi_map_originationtriggers_pound, tvb, offset,    1, ENC_BIG_ENDIAN);
2163     /* Double Star (DS) (octet 2, bit B) */
2164     proto_tree_add_item(subtree, hf_ansi_map_originationtriggers_ds, tvb, offset,       1, ENC_BIG_ENDIAN);
2165     /* Star (octet 2, bit A) */
2166     proto_tree_add_item(subtree, hf_ansi_map_originationtriggers_star, tvb, offset,     1, ENC_BIG_ENDIAN);
2167     offset++;
2168
2169     /* 7 digit (octet 3, bit H) */
2170     proto_tree_add_item(subtree, hf_ansi_map_originationtriggers_sevendig, tvb, offset, 1, ENC_BIG_ENDIAN);
2171     /* 6 digit (octet 3, bit G) */
2172     proto_tree_add_item(subtree, hf_ansi_map_originationtriggers_sixdig, tvb, offset,   1, ENC_BIG_ENDIAN);
2173     /* 5 digit (octet 3, bit F) */
2174     proto_tree_add_item(subtree, hf_ansi_map_originationtriggers_fivedig, tvb, offset,  1, ENC_BIG_ENDIAN);
2175     /* 4 digit (octet 3, bit E) */
2176     proto_tree_add_item(subtree, hf_ansi_map_originationtriggers_fourdig, tvb, offset,  1, ENC_BIG_ENDIAN);
2177     /* 3 digit (octet 3, bit D) */
2178     proto_tree_add_item(subtree, hf_ansi_map_originationtriggers_threedig, tvb, offset, 1, ENC_BIG_ENDIAN);
2179     /* 2 digit (octet 3, bit C) */
2180     proto_tree_add_item(subtree, hf_ansi_map_originationtriggers_twodig, tvb, offset,   1, ENC_BIG_ENDIAN);
2181     /* 1 digit (octet 3, bit B) */
2182     proto_tree_add_item(subtree, hf_ansi_map_originationtriggers_onedig, tvb, offset,   1, ENC_BIG_ENDIAN);
2183     /* No digits (octet 3, bit A) */
2184     proto_tree_add_item(subtree, hf_ansi_map_originationtriggers_nodig, tvb, offset,    1, ENC_BIG_ENDIAN);
2185     offset++;
2186
2187     /* 15 digit (octet 4, bit H) */
2188     proto_tree_add_item(subtree, hf_ansi_map_originationtriggers_fifteendig, tvb, offset,       1, ENC_BIG_ENDIAN);
2189     /* 14 digit (octet 4, bit G) */
2190     proto_tree_add_item(subtree, hf_ansi_map_originationtriggers_fourteendig, tvb, offset,      1, ENC_BIG_ENDIAN);
2191     /* 13 digit (octet 4, bit F) */
2192     proto_tree_add_item(subtree, hf_ansi_map_originationtriggers_thirteendig, tvb, offset,      1, ENC_BIG_ENDIAN);
2193     /* 12 digit (octet 4, bit E) */
2194     proto_tree_add_item(subtree, hf_ansi_map_originationtriggers_twelvedig, tvb, offset,        1, ENC_BIG_ENDIAN);
2195     /* 11 digit (octet 4, bit D) */
2196     proto_tree_add_item(subtree, hf_ansi_map_originationtriggers_elevendig, tvb, offset,        1, ENC_BIG_ENDIAN);
2197     /* 10 digit (octet 4, bit C) */
2198     proto_tree_add_item(subtree, hf_ansi_map_originationtriggers_tendig, tvb, offset,   1, ENC_BIG_ENDIAN);
2199     /* 9 digit (octet 4, bit B) */
2200     proto_tree_add_item(subtree, hf_ansi_map_originationtriggers_ninedig, tvb, offset,  1, ENC_BIG_ENDIAN);
2201     /* 8 digits (octet 4, bit A) */
2202     proto_tree_add_item(subtree, hf_ansi_map_originationtriggers_eightdig, tvb, offset, 1, ENC_BIG_ENDIAN);
2203
2204 }
2205
2206 /* 6.5.2.91 PACAIndicator */
2207
2208 /* Permanent Activation (PA) (octet 1, bit A) */
2209 static const true_false_string ansi_map_pacaindicator_pa_bool_val  = {
2210     "PACA is permanently activated",
2211     "PACA is not permanently activated"
2212 };
2213
2214 static const value_string ansi_map_PACA_Level_vals[]  = {
2215     {   0, "Not used"},
2216     {   1, "Priority Level. 1 This is the highest level"},
2217     {   2, "Priority Level 2"},
2218     {   3, "Priority Level 3"},
2219     {   4, "Priority Level 4"},
2220     {   5, "Priority Level 5"},
2221     {   6, "Priority Level 6"},
2222     {   7, "Priority Level 7"},
2223     {   8, "Priority Level 8"},
2224     {   9, "Priority Level 9"},
2225     {   10, "Priority Level 10"},
2226     {   11, "Priority Level 11"},
2227     {   12, "Priority Level 12"},
2228     {   13, "Priority Level 13"},
2229     {   14, "Priority Level 14"},
2230     {   15, "Priority Level 15"},
2231     {   0, NULL }
2232 };
2233
2234 static void
2235 dissect_ansi_map_pacaindicator(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree _U_, asn1_ctx_t *actx _U_){
2236
2237     int offset = 0;
2238     proto_tree *subtree;
2239
2240
2241     subtree = proto_item_add_subtree(actx->created_item, ett_pacaindicator);
2242     /* PACA Level (octet 1, bits B-E) */
2243     proto_tree_add_item(subtree, hf_ansi_map_PACA_Level, tvb, offset,   1, ENC_BIG_ENDIAN);
2244     /* Permanent Activation (PA) (octet 1, bit A) */
2245     proto_tree_add_item(subtree, hf_ansi_map_pacaindicator_pa, tvb, offset,     1, ENC_BIG_ENDIAN);
2246 }
2247
2248 /* 6.5.2.92 PageIndicator */
2249 static const value_string ansi_map_PageIndicator_vals[]  = {
2250     {   0, "Not used"},
2251     {   1, "Page"},
2252     {   2, "Listen only"},
2253     {   0, NULL }
2254 };
2255
2256 /* 6.5.2.93 PC_SSN */
2257 static void
2258 dissect_ansi_map_pc_ssn(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree _U_, asn1_ctx_t *actx _U_){
2259
2260     int offset = 0;
2261     proto_tree *subtree;
2262     guint8 b1,b2,b3,b4;
2263
2264
2265     subtree = proto_item_add_subtree(actx->created_item, ett_billingid);
2266     /* Type (octet 1) */
2267     proto_tree_add_item(subtree, hf_ansi_map_msc_type, tvb, offset, 1, ENC_BIG_ENDIAN);
2268     offset++;
2269     /* Point Code Member Number octet 2 */
2270     b1 = tvb_get_guint8(tvb,offset);
2271     offset++;
2272     /* Point Code Cluster Number octet 3 */
2273     b2 = tvb_get_guint8(tvb,offset);
2274     offset++;
2275     /* Point Code Network Number octet 4 */
2276     b3 = tvb_get_guint8(tvb,offset);
2277     offset++;
2278     /* Subsystem Number (SSN) octet 5 */
2279     b4 = tvb_get_guint8(tvb,offset);
2280     proto_tree_add_text(subtree, tvb, offset-3, 4 , "Point Code %u-%u-%u  SSN %u",
2281                         b3, b2, b1, b4);
2282
2283 }
2284 /* 6.5.2.94 PilotBillingID */
2285 static void
2286 dissect_ansi_map_pilotbillingid(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree _U_, asn1_ctx_t *actx _U_){
2287
2288     int offset = 0;
2289     proto_tree *subtree;
2290
2291
2292     subtree = proto_item_add_subtree(actx->created_item, ett_billingid);
2293     /* First Originating MarketID octet 1 and 2 */
2294     proto_tree_add_item(subtree, hf_ansi_map_MarketID, tvb, offset, 2, ENC_BIG_ENDIAN);
2295     offset = offset + 2;
2296     /* First Originating Switch Number octet 3*/
2297     proto_tree_add_item(subtree, hf_ansi_map_swno, tvb, offset, 1, ENC_BIG_ENDIAN);
2298     offset++;
2299     /* ID Number */
2300     proto_tree_add_item(subtree, hf_ansi_map_idno, tvb, offset, 3, ENC_BIG_ENDIAN);
2301     offset = offset + 3;
2302     proto_tree_add_item(subtree, hf_ansi_map_segcount, tvb, offset, 1, ENC_BIG_ENDIAN);
2303
2304 }
2305 /* 6.5.2.96 PreferredLanguageIndicator */
2306 static const value_string ansi_map_PreferredLanguageIndicator_vals[]  = {
2307     {   0, "Unspecified"},
2308     {   1, "English"},
2309     {   2, "French"},
2310     {   3, "Spanish"},
2311     {   4, "German"},
2312     {   5, "Portuguese"},
2313     {   0, NULL }
2314 };
2315
2316 /* 6.5.2.106 ReceivedSignalQuality */
2317 /* a. This octet is encoded the same as octet 1 in the SignalQuality parameter (see
2318    6.5.2.121).
2319 */
2320 /* 6.5.2.118 SetupResult */
2321 static const value_string ansi_map_SetupResult_vals[]  = {
2322     {   0, "Not used"},
2323     {   1, "Unsuccessful"},
2324     {   2, "Successful"},
2325     {   0, NULL }
2326 };
2327 /* 6.5.2.121 SignalQuality */
2328 /* TODO */
2329
2330 /*      6.5.2.122 SMS_AccessDeniedReason (TIA/EIA-41.5-D, page 5-256)
2331         N.S0011-0 v 1.0
2332 */
2333 static const value_string ansi_map_SMS_AccessDeniedReason_vals[]  = {
2334     {   0, "Not used"},
2335     {   1, "Denied"},
2336     {   2, "Postponed"},
2337     {   3, "Unavailable"},
2338     {   4, "Invalid"},
2339     {   0, NULL }
2340 };
2341
2342
2343 /* 6.5.2.125 SMS_CauseCode (TIA/EIA-41.5-D, page 5-262)
2344    N.S0011-0 v 1.0
2345 */
2346 static const value_string ansi_map_SMS_CauseCode_vals[]  = {
2347     {   0, "Address vacant"},
2348     {   1, "Address translation failure"},
2349     {   2, "Network resource shortage"},
2350     {   3, "Network failure"},
2351     {   4, "Invalid Teleservice ID"},
2352     {   5, "Other network problem"},
2353     {   6, "Unsupported network interface"},
2354     {   8, "CDMA handset-based position determination failure"},
2355     {   9, "CDMA handset-based position determination resources released - voice service request"},
2356     {   10, "CDMA handset-based position determination resources released - voice service request - message acknowledged"},
2357     {   11, "Reserved"},
2358     {   12, "Reserved"},
2359     {   13, "Reserved"},
2360     {   14, "Emergency Services Call Precedence"},
2361     {   32, "No page response"},
2362     {   33, "Destination busy"},
2363     {   34, "No acknowledgment"},
2364     {   35, "Destination resource shortage"},
2365     {   36, "SMS delivery postponed"},
2366     {   37, "Destination out of service"},
2367     {   38, "Destination no longer at this address"},
2368     {   39, "Other terminal problem"},
2369     {   64, "Radio interface resource shortage"},
2370     {   65, "Radio interface incompatibility"},
2371     {   66, "Other radio interface problem"},
2372     {   67, "Unsupported Base Station Capability"},
2373     {   96, "Encoding problem"},
2374     {   97, "Service origination denied"},
2375     {   98, "Service termination denied"},
2376     {   99, "Supplementary service not supported"},
2377     {   100, "Service not supported"},
2378     {   101, "Reserved"},
2379     {   102, "Missing expected parameter"},
2380     {   103, "Missing mandatory parameter"},
2381     {   104, "Unrecognized parameter value"},
2382     {   105, "Unexpected parameter value"},
2383     {   106, "User Data size error"},
2384     {   107, "Other general problems"},
2385     {   108, "Session not active"},
2386     {   109, "Reserved"},
2387     {   110, "MS Disconnect"},
2388     {   0, NULL }
2389 };
2390 static value_string_ext ansi_map_SMS_CauseCode_vals_ext = VALUE_STRING_EXT_INIT(ansi_map_SMS_CauseCode_vals);
2391
2392 /* 6.5.2.126 SMS_ChargeIndicator */
2393 /* SMS Charge Indicator (octet 1) */
2394 static const value_string ansi_map_SMS_ChargeIndicator_vals[]  = {
2395     {   0, "Not used"},
2396     {   1, "No charge"},
2397     {   2, "Charge original originator"},
2398     {   3, "Charge original destination"},
2399     {   0, NULL }
2400 };
2401 /*      4 through 63 Reserved. Treat the same as value 1, No charge.
2402         64 through 127 Reserved. Treat the same as value 2, Charge original originator.
2403         128 through 223 Reserved. Treat the same as value 3, Charge original destination.
2404         224 through 255 Reserved for TIA/EIA-41 protocol extension. If unknown, treat the same as value 2, Charge
2405         original originator.
2406 */
2407
2408 /* 6.5.2.130 SMS_NotificationIndicator N.S0005-0 v 1.0*/
2409 static const value_string ansi_map_SMS_NotificationIndicator_vals[]  = {
2410     {   0, "Not used"},
2411     {   1, "Notify when available"},
2412     {   2, "Do not notify when available"},
2413     {   0, NULL }
2414 };
2415
2416 /* 6.5.2.136 SMS_OriginationRestrictions */
2417 /* DEFAULT (octet 1, bits A and B) */
2418
2419 static const value_string ansi_map_SMS_OriginationRestrictions_default_vals[]  = {
2420     {   0, "Block all"},
2421     {   1, "Reserved"},
2422     {   2, "Allow specific"},
2423     {   3, "Allow all"},
2424     {   0, NULL }
2425 };
2426 /* DIRECT (octet 1, bit C) */
2427 static const true_false_string ansi_map_SMS_OriginationRestrictions_direct_bool_val  = {
2428     "Allow Direct",
2429     "Block Direct"
2430 };
2431
2432 /* Force Message Center (FMC) (octet 1, bit D) */
2433 static const true_false_string ansi_map_SMS_OriginationRestrictions_fmc_bool_val  = {
2434     "Force Indirect",
2435     "No effect"
2436 };
2437
2438 static void
2439 dissect_ansi_map_sms_originationrestrictions(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree _U_, asn1_ctx_t *actx _U_){
2440
2441     int offset = 0;
2442     proto_tree *subtree;
2443
2444
2445     subtree = proto_item_add_subtree(actx->created_item, ett_sms_originationrestrictions);
2446     proto_tree_add_item(subtree, hf_ansi_map_reservedBitHGFE, tvb, offset, 1, ENC_BIG_ENDIAN);
2447     proto_tree_add_item(subtree, hf_ansi_map_sms_originationrestrictions_fmc, tvb, offset, 1, ENC_BIG_ENDIAN);
2448     proto_tree_add_item(subtree, hf_ansi_map_sms_originationrestrictions_direct, tvb, offset, 1, ENC_BIG_ENDIAN);
2449     proto_tree_add_item(subtree, hf_ansi_map_sms_originationrestrictions_default, tvb, offset, 1, ENC_BIG_ENDIAN);
2450
2451 }
2452
2453 /* 6.5.2.137 SMS_TeleserviceIdentifier */
2454 /* Updated with N.S0011-0 v 1.0 */
2455
2456 /* SMS Teleservice Identifier (octets 1 and 2) */
2457 static const value_string ansi_map_SMS_TeleserviceIdentifier_vals[]  = {
2458     {     0, "Not used"},
2459     {     1, "Reserved for maintenance"},
2460     {     2, "SSD Update no response"},
2461     {     3, "SSD Update successful"},
2462     {     4, "SSD Update failed"},
2463     {  4096, "AMPS Extended Protocol Enhanced Services" },
2464     {  4097, "CDMA Cellular Paging Teleservice" },
2465     {  4098, "CDMA Cellular Messaging Teleservice" },
2466     {  4099, "CDMA Voice Mail Notification" },
2467     { 32513, "TDMA Cellular Messaging Teleservice" },
2468     { 32520, "TDMA System Assisted Mobile Positioning through Satellite (SAMPS)" },
2469     { 32584, "TDMA Segmented System Assisted Mobile Positioning Service" },
2470     {     0, NULL }
2471 };
2472 /* 6.5.2.140 SPINITriggers */
2473 /* All Origination (All) (octet 1, bit A) */
2474
2475 /* 6.5.2.142 SSDUpdateReport */
2476 static const value_string ansi_map_SSDUpdateReport_vals[]  = {
2477     {       0, "Not used"},
2478     {    4096, "AMPS Extended Protocol Enhanced Services"},
2479     {    4097, "CDMA Cellular Paging Teleservice"},
2480     {    4098, "CDMA Cellular Messaging Teleservice"},
2481     {   32513, "TDMA Cellular Messaging Teleservice"},
2482     {   32514, "TDMA Cellular Paging Teleservice (CPT-136)"},
2483     {   32515, "TDMA Over-the-Air Activation Teleservice (OATS)"},
2484     {   32516, "TDMA Over-the-Air Programming Teleservice (OPTS)"},
2485     {   32517, "TDMA General UDP Transport Service (GUTS)"},
2486     {   32576, "Reserved"},
2487     {   32577, "TDMA Segmented Cellular MessagingTeleservice"},
2488     {   32578, "TDMA Segmented Cellular Paging Teleservice"},
2489     {   32579, "TDMA Segmented Over-the-Air Activation Teleservice (OATS)"},
2490     {   32580, "TDMA Segmented Over-the-Air Programming Teleservice (OPTS)."},
2491     {   32581, "TDMA Segmented General UDP Transport Service (GUTS)"},
2492     {   32576, "Reserved"},
2493     {       0, NULL }
2494 };
2495
2496 /* 6.5.2.143 StationClassMark */
2497
2498 /* 6.5.2.144 SystemAccessData */
2499
2500 /* 6.5.2.146 SystemCapabilities */
2501 /* Updated in N.S0008-0 v 1.0 */
2502 static const true_false_string ansi_map_systemcapabilities_auth_bool_val  = {
2503     "Authentication parameters were requested on this system access (AUTH=1 in the OMT)",
2504     "Authentication parameters were not requested on this system access (AUTH=0 in the OMT)."
2505 };
2506
2507 static const true_false_string ansi_map_systemcapabilities_se_bool_val  = {
2508     "Signaling Message Encryption supported by the system",
2509     "Signaling Message Encryption not supported by the system"
2510 };
2511
2512 static const true_false_string ansi_map_systemcapabilities_vp_bool_val  = {
2513     "Voice Privacy supported by the system",
2514     "Voice Privacy not supported by the system"
2515 };
2516
2517 static const true_false_string ansi_map_systemcapabilities_cave_bool_val  = {
2518     "System can execute the CAVE algorithm and share SSD for the indicated MS",
2519     "System cannot execute the CAVE algorithm and cannot share SSD for the indicated MS"
2520 };
2521
2522 static const true_false_string ansi_map_systemcapabilities_ssd_bool_val  = {
2523     "SSD is shared with the system for the indicated MS",
2524     "SSD is not shared with the system for the indicated MS"
2525 };
2526
2527 static const true_false_string ansi_map_systemcapabilities_dp_bool_val  = {
2528     "DP is supported by the system",
2529     "DP is not supported by the system"
2530 };
2531
2532 static void
2533 dissect_ansi_map_systemcapabilities(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree _U_, asn1_ctx_t *actx _U_){
2534
2535     int offset = 0;
2536     proto_tree *subtree;
2537
2538
2539     subtree = proto_item_add_subtree(actx->created_item, ett_systemcapabilities);
2540     proto_tree_add_item(subtree, hf_ansi_map_reservedBitHG, tvb, offset, 1, ENC_BIG_ENDIAN);
2541     proto_tree_add_item(subtree, hf_ansi_map_systemcapabilities_dp, tvb, offset, 1, ENC_BIG_ENDIAN);
2542     proto_tree_add_item(subtree, hf_ansi_map_systemcapabilities_ssd, tvb, offset, 1, ENC_BIG_ENDIAN);
2543     proto_tree_add_item(subtree, hf_ansi_map_systemcapabilities_cave, tvb, offset, 1, ENC_BIG_ENDIAN);
2544     proto_tree_add_item(subtree, hf_ansi_map_systemcapabilities_vp, tvb, offset, 1, ENC_BIG_ENDIAN);
2545     proto_tree_add_item(subtree, hf_ansi_map_systemcapabilities_se, tvb, offset, 1, ENC_BIG_ENDIAN);
2546     proto_tree_add_item(subtree, hf_ansi_map_systemcapabilities_auth, tvb, offset, 1, ENC_BIG_ENDIAN);
2547 }
2548
2549 /* 6.5.2.151 TDMABurstIndicator */
2550 /* 6.5.2.152 TDMACallMode */
2551 /* 6.5.2.153 TDMAChannelData Updated in N.S0007-0 v 1.0*/
2552
2553 /* 6.5.2.155 TerminationAccessType */
2554 /* XXX Fix Me, Fill up the values or do special decoding? */
2555 static const value_string ansi_map_TerminationAccessType_vals[]  = {
2556     {   0, "Not used"},
2557     {   1, "Reserved for controlling system assignment (may be a trunk group identifier)."},
2558     /* 1 through  127 */
2559     { 127, "Reserved for controlling system assignment (may be a trunk group identifier)."},
2560     { 128, "Reserved for TIA/EIA-41 protocol extension. If unknown, treat the same as value 253, Land-to-Mobile Directory Number access"},
2561     /* 128 through  160 */
2562     { 160, "Reserved for TIA/EIA-41 protocol extension. If unknown, treat the same as value 253, Land-to-Mobile Directory Number access"},
2563     { 161, "Reserved for this Standard"},
2564     /* 161 through  251 */
2565     { 151, "Reserved for this Standard"},
2566     { 252, "Mobile-to-Mobile Directory Number access"},
2567     { 253, "Land-to-Mobile Directory Number access"},
2568     { 254, "Remote Feature Control port access"},
2569     { 255, "Roamer port access"},
2570     {   0, NULL }
2571 };
2572
2573 /* 6.5.2.158 TerminationTreatment */
2574 static const value_string ansi_map_TerminationTreatment_vals[]  = {
2575     {   0, "Not used"},
2576     {   1, "MS Termination"},
2577     {   2, "Voice Mail Storage"},
2578     {   3, "Voice Mail Retrieval"},
2579     {   4, "Dialogue Termination"},
2580     {   0, NULL }
2581 };
2582
2583 /* 6.5.2.159 TerminationTriggers */
2584 /* Busy (octet 1, bits A and B) */
2585 static const value_string ansi_map_terminationtriggers_busy_vals[]  = {
2586     {   0, "Busy Call"},
2587     {   1, "Busy Trigger"},
2588     {   2, "Busy Leg"},
2589     {   3, "Reserved. Treat as an unrecognized parameter value"},
2590     {   0, NULL }
2591 };
2592 /* Routing Failure (RF) (octet 1, bits C and D) */
2593 static const value_string ansi_map_terminationtriggers_rf_vals[]  = {
2594     {   0, "Failed Call"},
2595     {   1, "Routing Failure Trigger"},
2596     {   2, "Failed Leg"},
2597     {   3, "Reserved. Treat as an unrecognized parameter value"},
2598     {   0, NULL }
2599 };
2600 /* No Page Response (NPR) (octet 1, bits E and F) */
2601 static const value_string ansi_map_terminationtriggers_npr_vals[]  = {
2602     {   0, "No Page Response Call"},
2603     {   1, "No Page Response Trigger"},
2604     {   2, "No Page Response Leg"},
2605     {   3, "Reserved. Treat as an unrecognized parameter value"},
2606     {   0, NULL }
2607 };
2608 /* No Answer (NA) (octet 1, bits G and H) */
2609 static const value_string ansi_map_terminationtriggers_na_vals[]  = {
2610     {   0, "No Answer Call"},
2611     {   1, "No Answer Trigger"},
2612     {   2, "No Answer Leg"},
2613     {   3, "Reserved"},
2614     {   0, NULL }
2615 };
2616 /* None Reachable (NR) (octet 2, bit A) */
2617 static const value_string ansi_map_terminationtriggers_nr_vals[]  = {
2618     {   0, "Member Not Reachable"},
2619     {   1, "Group Not Reachable"},
2620     {   0, NULL }
2621 };
2622
2623 /* 6.5.2.159 TerminationTriggers N.S0005-0 v 1.0*/
2624 static void
2625 dissect_ansi_map_terminationtriggers(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree _U_, asn1_ctx_t *actx _U_){
2626
2627     int offset = 0;
2628     proto_tree *subtree;
2629
2630
2631     subtree = proto_item_add_subtree(actx->created_item, ett_transactioncapability);
2632
2633     proto_tree_add_item(subtree, hf_ansi_map_reservedBitH, tvb, offset, 1, ENC_BIG_ENDIAN);
2634     /* No Page Response (NPR) (octet 1, bits E and F) */
2635     proto_tree_add_item(subtree, hf_ansi_map_terminationtriggers_npr, tvb, offset, 1, ENC_BIG_ENDIAN);
2636     /* No Answer (NA) (octet 1, bits G and H) */
2637     proto_tree_add_item(subtree, hf_ansi_map_terminationtriggers_na, tvb, offset, 1, ENC_BIG_ENDIAN);
2638     /* Routing Failure (RF) (octet 1, bits C and D) */
2639     proto_tree_add_item(subtree, hf_ansi_map_terminationtriggers_rf, tvb, offset, 1, ENC_BIG_ENDIAN);
2640     /* Busy (octet 1, bits A and B) */
2641     proto_tree_add_item(subtree, hf_ansi_map_terminationtriggers_busy, tvb, offset, 1, ENC_BIG_ENDIAN);
2642     offset++;
2643
2644     /* None Reachable (NR) (octet 2, bit A) */
2645     proto_tree_add_item(subtree, hf_ansi_map_terminationtriggers_nr, tvb, offset, 1, ENC_BIG_ENDIAN);
2646 }
2647
2648 /* 6.5.2.160 TransactionCapability (TIA/EIA-41.5-D, page 5-315) */
2649 /* Updated with N.S0010-0 v 1.0, N.S0012-0 v 1.0 N.S0013-0 v 1.0 */
2650 static const true_false_string ansi_map_trans_cap_prof_bool_val  = {
2651     "The system is capable of supporting the IS-41-C profile parameters",
2652     "The system is not capable of supporting the IS-41-C profile parameters"
2653 };
2654
2655 static const true_false_string ansi_map_trans_cap_busy_bool_val  = {
2656     "The system is capable of detecting a busy condition at the current time",
2657     "The system is not capable of detecting a busy condition at the current time"
2658 };
2659
2660 static const true_false_string ansi_map_trans_cap_ann_bool_val  = {
2661     "The system is capable of honoring the AnnouncementList parameter at the current time",
2662     "The system is not capable of honoring the AnnouncementList parameter at the current time"
2663 };
2664
2665 static const true_false_string ansi_map_trans_cap_rui_bool_val  = {
2666     "The system is capable of interacting with the user",
2667     "The system is not capable of interacting with the user"
2668 };
2669
2670 static const true_false_string ansi_map_trans_cap_spini_bool_val  = {
2671     "The system is capable of supporting local SPINI operation",
2672     "The system is not capable of supporting local SPINI operation at the current time"
2673 };
2674
2675 static const true_false_string ansi_map_trans_cap_uzci_bool_val  = {
2676     "The system is User Zone capable at the current time",
2677     "The system is not User Zone capable at the current time"
2678 };
2679 static const true_false_string ansi_map_trans_cap_ndss_bool_val  = {
2680     "Serving system is NDSS capable",
2681     "Serving system is not NDSS capable"
2682 };
2683 static const true_false_string ansi_map_trans_cap_nami_bool_val  = {
2684     "The system is CNAP/CNAR capable",
2685     "The system is not CNAP/CNAR capable"
2686 };
2687
2688 static const value_string ansi_map_trans_cap_multerm_vals[]  = {
2689     {   0, "The system cannot accept a termination at this time (i.e., cannot accept routing information)"},
2690     {   1, "The system supports the number of call legs indicated"},
2691     {   2, "The system supports the number of call legs indicated"},
2692     {   3, "The system supports the number of call legs indicated"},
2693     {   4, "The system supports the number of call legs indicated"},
2694     {   5, "The system supports the number of call legs indicated"},
2695     {   6, "The system supports the number of call legs indicated"},
2696     {   7, "The system supports the number of call legs indicated"},
2697     {   8, "The system supports the number of call legs indicated"},
2698     {   9, "The system supports the number of call legs indicated"},
2699     {   10, "The system supports the number of call legs indicated"},
2700     {   11, "The system supports the number of call legs indicated"},
2701     {   12, "The system supports the number of call legs indicated"},
2702     {   13, "The system supports the number of call legs indicated"},
2703     {   14, "The system supports the number of call legs indicated"},
2704     {   15, "The system supports the number of call legs indicated"},
2705     {   0, NULL }
2706 };
2707
2708 static const true_false_string ansi_map_trans_cap_tl_bool_val  = {
2709     "The system is capable of supporting the TerminationList parameter at the current time",
2710     "The system is not capable of supporting the TerminationList parameter at the current time"
2711 };
2712
2713 static const true_false_string ansi_map_trans_cap_waddr_bool_val  = {
2714     "The system is capable of supporting the TriggerAddressList parameter",
2715     "The system is not capable of supporting the TriggerAddressList parameter"
2716 };
2717
2718
2719 static void
2720 dissect_ansi_map_transactioncapability(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree _U_, asn1_ctx_t *actx _U_){
2721
2722     int offset = 0;
2723     proto_tree *subtree;
2724
2725
2726     subtree = proto_item_add_subtree(actx->created_item, ett_transactioncapability);
2727
2728     /*NAME Capability Indicator (NAMI) (octet 1, bit H) */
2729     proto_tree_add_item(subtree, hf_ansi_map_trans_cap_nami, tvb, offset, 1, ENC_BIG_ENDIAN);
2730     /* NDSS Capability (NDSS) (octet 1, bit G) */
2731     proto_tree_add_item(subtree, hf_ansi_map_trans_cap_ndss, tvb, offset, 1, ENC_BIG_ENDIAN);
2732     /* UZ Capability Indicator (UZCI) (octet 1, bit F) */
2733     proto_tree_add_item(subtree, hf_ansi_map_trans_cap_uzci, tvb, offset, 1, ENC_BIG_ENDIAN);
2734     /* Subscriber PIN Intercept (SPINI) (octet 1, bit E) */
2735     proto_tree_add_item(subtree, hf_ansi_map_trans_cap_spini, tvb, offset, 1, ENC_BIG_ENDIAN);
2736     /* Remote User Interaction (RUI) (octet 1, bit D) */
2737     proto_tree_add_item(subtree, hf_ansi_map_trans_cap_rui, tvb, offset, 1, ENC_BIG_ENDIAN);
2738     /* Announcements (ANN) (octet 1, bit C) */
2739     proto_tree_add_item(subtree, hf_ansi_map_trans_cap_ann, tvb, offset, 1, ENC_BIG_ENDIAN);
2740     /* Busy Detection (BUSY) (octet 1, bit B) */
2741     proto_tree_add_item(subtree, hf_ansi_map_trans_cap_busy, tvb, offset, 1, ENC_BIG_ENDIAN);
2742     /* Profile (PROF) (octet 1, bit A) */
2743     proto_tree_add_item(subtree, hf_ansi_map_trans_cap_prof, tvb, offset, 1, ENC_BIG_ENDIAN);
2744     offset++;
2745
2746     /* WIN Addressing (WADDR) (octet 2, bit F) */
2747     proto_tree_add_item(subtree, hf_ansi_trans_cap_waddr, tvb, offset, 1, ENC_BIG_ENDIAN);
2748     /* TerminationList (TL) (octet 2, bit E) */
2749     proto_tree_add_item(subtree, hf_ansi_trans_cap_tl, tvb, offset, 1, ENC_BIG_ENDIAN);
2750     /* Multiple Terminations (octet 2, bits A-D) */
2751     proto_tree_add_item(subtree, hf_ansi_trans_cap_multerm, tvb, offset, 1, ENC_BIG_ENDIAN);
2752 }
2753
2754 /* 6.5.2.162 UniqueChallengeReport */
2755 /* Unique Challenge Report (octet 1) */
2756 static const value_string ansi_map_UniqueChallengeReport_vals[]  = {
2757     {   0, "Not used"},
2758     {   1, "Unique Challenge not attempted"},
2759     {   2, "Unique Challenge no response"},
2760     {   3, "Unique Challenge successful"},
2761     {   4, "Unique Challenge failed"},
2762     {   0, NULL }
2763 };
2764
2765 /* 6.5.2.166 VoicePrivacyMask */
2766
2767
2768 /* 6.5.2.e (TSB76) CDMAServiceConfigurationRecord N.S0008-0 v 1.0 */
2769 /* a. This field carries the CDMA Service Configuration Record. The bit-layout is the
2770    same as that of Service Configuration Record in TSB74, and J-STD-008.
2771 */
2772
2773 /* 6.5.2.f CDMAServiceOption N.S0010-0 v 1.0 */
2774
2775 /* values copied from old ANSI map dissector */
2776 static const range_string cdmaserviceoption_vals[] = {
2777     { 1, 1, "Basic Variable Rate Voice Service (8 kbps)" },
2778     { 2, 2, "Mobile Station Loopback (8 kbps)" },
2779     { 3, 3, "Enhanced Variable Rate Voice Service (8 kbps)" },
2780     { 4, 4, "Asynchronous Data Service (9.6 kbps)" },
2781     { 5, 5, "Group 3 Facsimile (9.6 kbps)" },
2782     { 6, 6, "Short Message Services (Rate Set 1)" },
2783     { 7, 7, "Packet Data Service: Internet or ISO Protocol Stack (9.6 kbps)" },
2784     { 8, 8, "Packet Data Service: CDPD Protocol Stack (9.6 kbps)" },
2785     { 9, 9, "Mobile Station Loopback (13 kbps)" },
2786     { 10, 10, "STU-III Transparent Service" },
2787     { 11, 11, "STU-III Non-Transparent Service" },
2788     { 12, 12, "Asynchronous Data Service (14.4 or 9.6 kbps)" },
2789     { 13, 13, "Group 3 Facsimile (14.4 or 9.6 kbps)" },
2790     { 14, 14, "Short Message Services (Rate Set 2)" },
2791     { 15, 15, "Packet Data Service: Internet or ISO Protocol Stack (14.4 kbps)" },
2792     { 16, 16, "Packet Data Service: CDPD Protocol Stack (14.4 kbps)" },
2793     { 17, 17, "High Rate Voice Service (13 kbps)" },
2794     { 18, 18, "Over-the-Air Parameter Administration (Rate Set 1)" },
2795     { 19, 19, "Over-the-Air Parameter Administration (Rate Set 2)" },
2796     { 20, 20, "Group 3 Analog Facsimile (Rate Set 1)" },
2797     { 21, 21, "Group 3 Analog Facsimile (Rate Set 2)" },
2798     { 22, 22, "High Speed Packet Data Service: Internet or ISO Protocol Stack (RS1 forward, RS1 reverse)" },
2799     { 23, 23, "High Speed Packet Data Service: Internet or ISO Protocol Stack (RS1 forward, RS2 reverse)" },
2800     { 24, 24, "High Speed Packet Data Service: Internet or ISO Protocol Stack (RS2 forward, RS1 reverse)" },
2801     { 25, 25, "High Speed Packet Data Service: Internet or ISO Protocol Stack (RS2 forward, RS2 reverse)" },
2802     { 26, 26, "High Speed Packet Data Service: CDPD Protocol Stack (RS1 forward, RS1 reverse)" },
2803     { 27, 27, "High Speed Packet Data Service: CDPD Protocol Stack (RS1 forward, RS2 reverse)" },
2804     { 28, 28, "High Speed Packet Data Service: CDPD Protocol Stack (RS2 forward, RS1 reverse)" },
2805     { 29, 29, "High Speed Packet Data Service: CDPD Protocol Stack (RS2 forward, RS2 reverse)" },
2806     { 30, 30, "Supplemental Channel Loopback Test for Rate Set 1" },
2807     { 31, 31, "Supplemental Channel Loopback Test for Rate Set 2" },
2808     { 32, 32, "Test Data Service Option (TDSO)" },
2809     { 33, 33, "cdma2000 High Speed Packet Data Service, Internet or ISO Protocol Stack" },
2810     { 34, 34, "cdma2000 High Speed Packet Data Service, CDPD Protocol Stack" },
2811     { 35, 35, "Location Services, Rate Set 1 (9.6 kbps)" },
2812     { 36, 36, "Location Services, Rate Set 2 (14.4 kbps)" },
2813     { 37, 37, "ISDN Interworking Service (64 kbps)" },
2814     { 38, 38, "GSM Voice" },
2815     { 39, 39, "GSM Circuit Data" },
2816     { 40, 40, "GSM Packet Data" },
2817     { 41, 41, "GSM Short Message Service" },
2818     { 42, 42, "None Reserved for MC-MAP standard service options" },
2819     { 54, 54, "Markov Service Option (MSO)" },
2820     { 55, 55, "Loopback Service Option (LSO)" },
2821     { 56, 56, "Selectable Mode Vocoder" },
2822     { 57, 57, "32 kbps Circuit Video Conferencing" },
2823     { 58, 58, "64 kbps Circuit Video Conferencing" },
2824     { 59, 59, "HRPD Accounting Records Identifier" },
2825     { 60, 60, "Link Layer Assisted Robust Header Compression (LLA ROHC) - Header Removal" },
2826     { 61, 61, "Link Layer Assisted Robust Header Compression (LLA ROHC) - Header Compression" },
2827     { 62, 62, "Source-Controlled Variable-Rate Multimode Wideband Speech Codec (VMR-WB) Rate Set 2" },
2828     { 63, 63, "Source-Controlled Variable-Rate Multimode Wideband Speech Codec (VMR-WB) Rate Set 1" },
2829     { 64, 64, "HRPD auxiliary Packet Data Service instance" },
2830     { 65, 65, "cdma2000/GPRS Inter-working" },
2831     { 66, 66, "cdma2000 High Speed Packet Data Service, Internet or ISO Protocol Stack" },
2832     { 67, 67, "HRPD Packet Data IP Service where Higher Layer Protocol is IP or ROHC" },
2833     { 68, 68, "Enhanced Variable Rate Voice Service (EVRC-B)" },
2834     { 69, 69, "HRPD Packet Data Service, which when used in paging over the 1x air interface, a page response is required" },
2835     { 70, 70, "Enhanced Variable Rate Voice Service (EVRC-WB)" },
2836     { 71, 4099, "None Reserved for standard service options" },
2837     { 4100, 4100, "Asynchronous Data Service, Revision 1 (9.6 or 14.4 kbps)" },
2838     { 4101, 4101, "Group 3 Facsimile, Revision 1 (9.6 or 14.4 kbps)" },
2839     { 4102, 4102, "Reserved for standard service option" },
2840     { 4103, 4103, "Packet Data Service: Internet or ISO Protocol Stack, Revision 1 (9.6 or 14.4 kbps)" },
2841     { 4104, 4104, "Packet Data Service: CDPD Protocol Stack, Revision 1 (9.6 or 14.4 kbps)" },
2842     { 4105, 32767, "Reserved for standard service options" },
2843     { 32768, 32768, "QCELP (13 kbps)" },
2844     { 32769, 32771, "Proprietary QUALCOMM Incorporated" },
2845     { 32772, 32775, "Proprietary OKI Telecom" },
2846     { 32776, 32779, "Proprietary Lucent Technologies" },
2847     { 32780, 32783, "Nokia" },
2848     { 32784, 32787, "NORTEL NETWORKS" },
2849     { 32788, 32791, "Sony Electronics Inc" },
2850     { 32792, 32795, "Motorola" },
2851     { 32796, 32799, "QUALCOMM Incorporated" },
2852     { 32800, 32803, "QUALCOMM Incorporated" },
2853     { 32804, 32807, "QUALCOMM Incorporated" },
2854     { 32808, 32811, "QUALCOMM Incorporated" },
2855     { 32812, 32815, "Lucent Technologies" },
2856     { 32816, 32819, "Denso International" },
2857     { 32820, 32823, "Motorola" },
2858     { 32824, 32827, "Denso International" },
2859     { 32828, 32831, "Denso International" },
2860     { 32832, 32835, "Denso International" },
2861     { 32836, 32839, "NEC America" },
2862     { 32840, 32843, "Samsung Electronics" },
2863     { 32844, 32847, "Texas Instruments Incorporated" },
2864     { 32848, 32851, "Toshiba Corporation" },
2865     { 32852, 32855, "LG Electronics Inc." },
2866     { 32856, 32859, "VIA Telecom Inc." },
2867     { 0,           0,          NULL                   }
2868 };
2869
2870 static void
2871 dissect_ansi_map_cdmaserviceoption(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree _U_, asn1_ctx_t *actx _U_){
2872     int offset = 0;
2873     proto_tree *subtree;
2874
2875
2876     subtree = proto_item_add_subtree(actx->created_item, ett_cdmaserviceoption);
2877
2878     proto_tree_add_item(subtree, hf_ansi_map_cdmaserviceoption, tvb, offset, 2, ENC_BIG_ENDIAN);
2879
2880
2881 }
2882 /* 6.5.2.f (TSB76) CDMAServiceOption N.S0008-0 v 1.0*/
2883 /* This field carries the CDMA Service Option. The bit-layout is the same as that of
2884    Service Option in TSB74 and J-STD-008.*/
2885
2886 /* 6.5.2.i (IS-730) TDMAServiceCode N.S0008-0 v 1.0 */
2887 static const value_string ansi_map_TDMAServiceCode_vals[]  = {
2888     {   0, "Analog Speech Only"},
2889     {   1, "Digital Speech Only"},
2890     {   2, "Analog or Digital Speech, Analog Preferred"},
2891     {   3, "Analog or Digital Speech, Digital Preferred"},
2892     {   4, "Asynchronous Data"},
2893     {   5, "G3 Fax"},
2894     {   6, "Not Used (Service Rejected)"},
2895     {   7, "STU-III"},
2896     {   0, NULL }
2897 };
2898 /* 6.5.2.j (IS-730) TDMATerminalCapability N.S0008-0 v 1.0 Updted with N.S0015-0 */
2899 /* Supported Frequency Band (octet 1) */
2900 /* Voice Coder (octet 2) */
2901 /* Protocol Version (octet 3) N.S0015-0 */
2902 static const value_string ansi_map_TDMATerminalCapability_prot_ver_vals[]  = {
2903     {   0, "EIA-553 or IS-54-A"},
2904     {   1, "TIA/EIA-627.(IS-54-B)"},
2905     {   2, "IS-136"},
2906     {   3, "Permanently Reserved (ANSI J-STD-011).Treat the same as value 4, IS-136-A."},
2907     {   4, "PV 0 as published in TIA/EIA-136-0 and IS-136-A."},
2908     {   5, "PV 1 as published in TIA/EIA-136-A."},
2909     {   6, "PV 2 as published in TIA/EIA-136-A."},
2910     {   7, "PV 3 as published in TIA/EIA-136-A."},
2911     {   0, NULL }
2912 };
2913 /* Asynchronous Data (ADS) (octet 4, bit A) N.S0007-0*/
2914 /* Group 3 Fax (G3FAX) (octet 4, bit B) */
2915 /* Secure Telephone Unit III (STU3) (octet 4, bit C) */
2916 /* Analog Voice (AVOX) (octet 4, bit D) */
2917 /* Half Rate (HRATE) (octet 4, bit E) */
2918 /* Full Rate (FRATE) (octet 4, bit F) */
2919 /* Double Rate (2RATE) (octet 4, bit G) */
2920 /* Triple Rate (3RATE) (octet 4, bit H) */
2921
2922
2923 /* 6.5.2.k (IS-730)) TDMAVoiceCoder N.S0008-0 v 1.0, N.S0007-0 */
2924 /* VoiceCoder (octet 1) */
2925
2926 /* 6.5.2.p UserZoneData N.S0015-0 */
2927
2928 /* 6.5.2.aa BaseStationManufacturerCode N.S0007-0 v 1.0 */
2929 /* The BaseStationManufacturerCode (BSMC) parameter specifies the manufacturer of the
2930    base station that is currently serving the MS (see IS-136 for enumeration of values).*/
2931
2932 /* 6.5.2.ab BSMCStatus */
2933
2934 /* BSMC Status (octet 1) */
2935 static const value_string ansi_map_BSMCStatus_vals[]  = {
2936     {   0, "Same BSMC Value shall not be supported"},
2937     {   1, "Same BSMC Value shall be supported"},
2938     {   0, NULL }
2939 };
2940
2941 /*- 6.5.2.ac ControlChannelMode (N.S0007-0 v 1.0)*/
2942 static const value_string ansi_map_ControlChannelMode_vals[]  = {
2943     {   0, "Unknown"},
2944     {   1, "MS is in Analog CC Mode"},
2945     {   2, "MS is in Digital CC Mode"},
2946     {   3, "MS is in NAMPS CC Mode"},
2947     {   0, NULL }
2948 };
2949
2950 /* 6.5.2.ad NonPublicData N.S0007-0 v 1.0*/
2951 /* NP Only Service (NPOS) (octet 1, bits A and B) */
2952 /* Charging Area Tone Service (CATS) (octet 1, bits C - F) */
2953 /* PSID/RSID Download Order (PRDO) (octet 1, bits G and H) */
2954
2955 /* 6.5.2.ae PagingFrameClass N.S0007-0 v 1.0*/
2956 /* Paging Frame Class (octet 1) */
2957
2958 static const value_string ansi_map_PagingFrameClass_vals[]  = {
2959     {   0, "PagingFrameClass 1 (1.28 seconds)"},
2960     {   1, "PagingFrameClass 2 (2.56 seconds)"},
2961     {   2, "PagingFrameClass 3 (3.84 seconds)"},
2962     {   3, "PagingFrameClass 4 (7.68 seconds)"},
2963     {   4, "PagingFrameClass 5 (15.36 seconds)"},
2964     {   5, "PagingFrameClass 6 (30.72 seconds)"},
2965     {   6, "PagingFrameClass 7 (61.44 seconds)"},
2966     {   7, "PagingFrameClass 8 (122.88 seconds)"},
2967     {   8, "Reserved. Treat the same as value 0, PagingFrameClass 1"},
2968     {   0, NULL }
2969 };
2970
2971 /* 6.5.2.af PSID_RSIDInformation N.S0007-0 v 1.0*/
2972 /* PSID/RSID Indicator (octet 1, bit A) */
2973 /* PSID/RSID Type (octet 1, bits B-D) */
2974
2975 /* 6.5.2.ah ServicesResult N.S0007-0 v 1.0*/
2976 /* PSID/RSID Download Result (PRDR) (octet 1, bits A and B) */
2977 static const value_string ansi_map_ServicesResult_ppr_vals[]  = {
2978     {   0, "No Indication"},
2979     {   1, "Unsuccessful PSID/RSID download"},
2980     {   2, "Successful PSID/RSID download"},
2981     {   3, "Reserved. Treat the same as value 0, No Indication"},
2982     {   0, NULL }
2983 };
2984
2985 /* 6.5.2.ai SOCStatus N.S0007-0 v 1.0*/
2986
2987 /* SOC Status (octet 1) */
2988 static const value_string ansi_map_SOCStatus_vals[]  = {
2989     {   0, "Same SOC Value shall not be supported"},
2990     {   1, "Same SOC Value shall be supported"},
2991     {   0, NULL }
2992 };
2993
2994 /* 6.5.2.aj SystemOperatorCode N.S0007-0 v 1.0*/
2995 /* The SystemOperatorCode (SOC) parameter specifies the system operator that is currently
2996    providing service to a MS (see IS-136 for enumeration of values) */
2997
2998 /* 6.5.2.al UserGroup N.S0007-0 v 1.0*/
2999
3000 /* 6.5.2.am UserZoneData N.S0007-0 v 1.0*/
3001
3002
3003 /*Table 6.5.2.ay TDMABandwidth value N.S0008-0 v 1.0 */
3004 static const value_string ansi_map_TDMABandwidth_vals[]  = {
3005     {   0, "Half-Rate Digital Traffic Channel Only"},
3006     {   1, "Full-Rate Digital Traffic Channel Only"},
3007     {   2, "Half-Rate or Full-rate Digital Traffic Channel - Full-Rate Preferred"},
3008     {   3, "Half-rate or Full-rate Digital Traffic Channel - Half-rate Preferred"},
3009     {   4, "Double Full-Rate Digital Traffic Channel Only"},
3010     {   5, "Triple Full-Rate Digital Traffic Channel Only"},
3011     {   6, "Reserved. Treat reserved values the same as value 1 - Full-Rate Digital Traffic Channel Only"},
3012     {   7, "Reserved. Treat reserved values the same as value 1 - Full-Rate Digital Traffic Channel Only"},
3013     {   8, "Reserved. Treat reserved values the same as value 1 - Full-Rate Digital Traffic Channel Only"},
3014     {   9, "Reserved. Treat reserved values the same as value 1 - Full-Rate Digital Traffic Channel Only"},
3015     {   10, "Reserved. Treat reserved values the same as value 1 - Full-Rate Digital Traffic Channel Only"},
3016     {   11, "Reserved. Treat reserved values the same as value 1 - Full-Rate Digital Traffic Channel Only"},
3017     {   12, "Reserved. Treat reserved values the same as value 1 - Full-Rate Digital Traffic Channel Only"},
3018     {   13, "Reserved. Treat reserved values the same as value 1 - Full-Rate Digital Traffic Channel Only"},
3019     {   14, "Reserved. Treat reserved values the same as value 1 - Full-Rate Digital Traffic Channel Only"},
3020     {   15, "Reserved. Treat reserved values the same as value 1 - Full-Rate Digital Traffic Channel Only"},
3021     {   0, NULL }
3022
3023 };
3024
3025 /* 6.5.2.az TDMADataFeaturesIndicator N.S0008-0 v 1.0 */
3026 /* TDMADataFeaturesIndicator
3027    ansi_map_FeatureActivity_vals
3028
3029    ADS FeatureActivity ADS-FA ( octet 1 bit A and B )
3030    G3 Fax FeatureActivity G3FAX-FA ( octet 1 bit C and D )
3031    STU-III FeatureActivity STUIII-FA ( octet 1 bit E and F )
3032    Half Rate data FeatureActivity HRATE-FA ( octet 2 bit A and B )
3033    Full Rate data FeatureActivity FRATE-FA ( octet 2 bit C and D )
3034    Double Rate data FeatureActivity 2RATE-FA ( octet 2 bit E and F )
3035    Triple Rate data FeatureActivity 3RATE-FA ( octet g bit G and H )
3036
3037    Table 6.5.2.azt TDMADataFeaturesIndicator value
3038    static const value_string ansi_map_TDMADataFeaturesIndicator_vals[]  = {
3039    {   0, "Not Used"},
3040    {   1, "Not Authorized"},
3041    {   2, "Authorized, but de-activated"},
3042    {   3, "Authorized and activated"},
3043    {   0, NULL }
3044
3045    };
3046 */
3047
3048 /* 6.5.2.ba TDMADataMode N.S0008-0 v 1.0*/
3049
3050 /* 6.5.2.bb TDMAVoiceMode */
3051
3052 /* 6.5.2.bb CDMAConnectionReference N.S0008-0 v 1.0 */
3053 /* Service Option Connection Reference Octet 1 */
3054 /*      a. This field carries the CDMA Service Option Connection Reference. The bitlayout
3055         is the same as that of Service Option Connection Reference in TSB74 and
3056         J-STD-008.
3057 */
3058
3059 /* 6.5.2.ad CDMAState N.S0008-0 v 1.0 */
3060 /* Service Option State Octet 1 */
3061 /* a. This field carries the CDMA Service Option State information. The CDMA
3062    Service Option State is defined in the current CDMA Service Options standard.
3063    If CDMA Service Option State is not explicitly defined within a section of the
3064    relevant CDMA Service Option standard, the CDMA Service Option State shall
3065    carry the value of the ORD_Q octet of all current Service Option Control Orders
3066    (see IS-95), or the contents of all current CDMA Service Option Control
3067    Messages (see TSB74) type specific field for this connection reference. */
3068
3069 /* 6.5.2.aj SecondInterMSCCircuitID */
3070 /* -- XXX Same code as ISLPinformation???
3071    dissect_ansi_map_secondintermsccircuitid(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree){
3072
3073    int offset = 0;
3074
3075    proto_tree *subtree;
3076
3077
3078    subtree = proto_item_add_subtree(actx->created_item, ett_billingid);
3079    / Trunk Group Number (G) Octet 1 /
3080    proto_tree_add_item(subtree, hf_ansi_map_tgn, tvb, offset, 1, ENC_BIG_ENDIAN);
3081    offset++;
3082    / Trunk Member Number (M) Octet2 /
3083    proto_tree_add_item(subtree, hf_ansi_map_tmn, tvb, offset, 1, ENC_BIG_ENDIAN);
3084    }
3085 */
3086 /* 6.5.2.as ChangeServiceAttributes N.S0008-0 v 1.0 */
3087 /* Change Facilities Flag (CHGFAC)(octet 1, bits A - B) */
3088 static const value_string ansi_map_ChangeServiceAttributes_chgfac_vals[]  = {
3089     {   0, "Change Facilities Operation Requested"},
3090     {   1, "Change Facilities Operation Not Requested"},
3091     {   2, "Change Facilities Operation Used"},
3092     {   3, "Change Facilities Operation Not Used"},
3093     {   0, NULL }
3094 };
3095 /* Service Negotiate Flag (SRVNEG)(octet 1, bits C - D) */
3096 static const value_string ansi_map_ChangeServiceAttributes_srvneg_vals[]  = {
3097     {   0, "Service Negotiation Used"},
3098     {   1, "Service Negotiation Not Used"},
3099     {   2, "Service Negotiation Required"},
3100     {   3, "Service Negotiation Not Required"},
3101     {   0, NULL }
3102 };
3103 /* 6.5.2.au DataPrivacyParameters N.S0008-0 v 1.0*/
3104 /* Privacy Mode (PM) (octet 1, Bits A and B) */
3105 static const value_string ansi_map_DataPrivacyParameters_pm_vals[]  = {
3106     {   0, "Privacy inactive or not supported"},
3107     {   1, "Privacy Requested or Acknowledged"},
3108     {   2, "Reserved. Treat reserved values the same as value 0, Privacy inactive or not supported."},
3109     {   3, "Reserved. Treat reserved values the same as value 0, Privacy inactive or not supported."},
3110     {   0, NULL }
3111 };
3112 /* Data Privacy Version (PM) (octet 2) */
3113 static const value_string ansi_map_DataPrivacyParameters_data_priv_ver_vals[]  = {
3114     {   0, "Not used"},
3115     {   1, "Data Privacy Version 1"},
3116     {   0, NULL }
3117 };
3118
3119 /* 6.5.2.av ISLPInformation N.S0008-0 v 1.0*/
3120 /* ISLP Type (octet 1) */
3121 static const value_string ansi_map_islp_type_vals[]  = {
3122     {   0, "No ISLP supported"},
3123     {   1, "ISLP supported"},
3124     {   0, NULL }
3125 };
3126 /* 6.5.2.bc AnalogRedirectInfo */
3127 /* Sys Ordering (octet 1, bits A-E) */
3128 /* Ignore CDMA (IC) (octet 1, bit F) */
3129
3130 /* 6.5.2.be CDMAChannelNumber N.S0010-0 v 1.0*/
3131
3132 /* 6.5.2.bg CDMAPowerCombinedIndicator N.S0010-0 v 1.0*/
3133
3134 /* 6.5.2.bi CDMASearchParameters N.S0010-0 v 1.0*/
3135
3136 /* 6.5.2.bk CDMANetworkIdentification N.S0010-0 v 1.0*/
3137 /* See CDMA [J-STD-008] for encoding of this field. */
3138
3139 /* 6.5.2.bo RequiredParametersMask N.S0010-0 v 1.0 */
3140
3141 /* 6.5.2.bp ServiceRedirectionCause */
3142 static const value_string ansi_map_ServiceRedirectionCause_type_vals[]  = {
3143     {   0, "Not used"},
3144     {   1, "NormalRegistration"},
3145     {   2, "SystemNotFound."},
3146     {   3, "ProtocolMismatch."},
3147     {   4, "RegistrationRejection."},
3148     {   5, "WrongSID."},
3149     {   6, "WrongNID.."},
3150     {   0, NULL }
3151 };
3152
3153 /* 6.5.2.bq ServiceRedirectionInfo  N.S0010-0 v 1.0 */
3154
3155 /* 6.5.2.br RoamingIndication N.S0010-0 v 1.0*/
3156 /* See CDMA [TSB58] for the definition of this field. */
3157
3158 /* 6.5.2.bw CallingPartyName N.S0012-0 v 1.0*/
3159
3160 /* Presentation Status (octet 1, bits A and B) */
3161 static const value_string ansi_map_Presentation_Status_vals[]  = {
3162     {   0, "Presentation allowed"},
3163     {   1, "Presentation restricted"},
3164     {   2, "Blocking toggle"},
3165     {   3, "No indication"},
3166     {   0, NULL }
3167 };
3168 /* Availability (octet 1, bit E) N.S0012-0 v 1.0*/
3169 static const true_false_string ansi_map_Availability_bool_val  = {
3170     "Name not available",
3171     "Name available/unknown"
3172 };
3173 static void
3174 dissect_ansi_map_callingpartyname(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, asn1_ctx_t *actx _U_){
3175
3176     /* Availability (octet 1, bit E) N.S0012-0 v 1.0*/
3177
3178     /* Presentation Status (octet 1, bits A and B) */
3179
3180
3181
3182 }
3183
3184
3185 /* 6.5.2.bx DisplayText N.S0012-0 v 1.0*/
3186 /* a. Refer to ANSI T1.610 for field encoding. */
3187
3188 /* 6.5.2.bz ServiceID
3189    Service Identifier (octets 1 to n)
3190    0 Not used.
3191    1 Calling Name Presentation - No RND.
3192    2 Calling Name Presentation with RND.
3193 */
3194
3195 /* 6.5.2.co GlobalTitle N.S0013-0 v 1.0
3196  * Refer to Section 3 of ANSI T1.112 for the encoding of this field.
3197  */
3198 /* Address Indicator octet 1 */
3199 /* Global Title Octet 2 - n */
3200
3201
3202 /* 6.5.2.dc SpecializedResource N.S0013-0 v 1.0*/
3203 /* Resource Type (octet 1) */
3204 static const value_string ansi_map_resource_type_vals[]  = {
3205     {   0, "Not used"},
3206     {   1, "DTMF tone detector"},
3207     {   2, "Automatic Speech Recognition - Speaker Independent - Digits"},
3208     {   3, "Automatic Speech Recognition - Speaker Independent - Speech User Interface Version 1"},
3209     {   0, NULL }
3210 };
3211 /* 6.5.2.df TriggerCapability */
3212 /* Updated with N.S0004 N.S0013-0 v 1.0*/
3213
3214 static const true_false_string ansi_map_triggercapability_bool_val  = {
3215     "triggers can be armed by the TriggerAddressList parameter",
3216     "triggers cannot be armed by the TriggerAddressList parameter"
3217 };
3218
3219 static void
3220 dissect_ansi_map_triggercapability(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree _U_, asn1_ctx_t *actx _U_){
3221
3222     int offset = 0;
3223     proto_tree *subtree;
3224
3225
3226     subtree = proto_item_add_subtree(actx->created_item, ett_triggercapability);
3227
3228
3229     /* O_No_Answer (ONA) (octet 1, bit H)*/
3230     proto_tree_add_item(subtree, hf_ansi_map_triggercapability_ona, tvb, offset,        1, ENC_BIG_ENDIAN);
3231     /* O_Disconnect (ODISC) (octet 1, bit G)*/
3232     proto_tree_add_item(subtree, hf_ansi_map_triggercapability_odisc, tvb, offset,      1, ENC_BIG_ENDIAN);
3233     /* O_Answer (OANS) (octet 1, bit F)*/
3234     proto_tree_add_item(subtree, hf_ansi_map_triggercapability_oans, tvb, offset,       1, ENC_BIG_ENDIAN);
3235     /* Origination_Attempt_Authorized (OAA) (octet 1, bit E)*/
3236     proto_tree_add_item(subtree, hf_ansi_map_triggercapability_oaa, tvb, offset,        1, ENC_BIG_ENDIAN);
3237     /* Revertive_Call (RvtC) (octet 1, bit D)*/
3238     proto_tree_add_item(subtree, hf_ansi_map_triggercapability_rvtc, tvb, offset,       1, ENC_BIG_ENDIAN);
3239     /* All_Calls (All) (octet 1, bit C)*/
3240     proto_tree_add_item(subtree, hf_ansi_map_triggercapability_all, tvb, offset,        1, ENC_BIG_ENDIAN);
3241     /* K-digit (K-digit) (octet 1, bit B)*/
3242     proto_tree_add_item(subtree, hf_ansi_map_triggercapability_kdigit, tvb, offset,     1, ENC_BIG_ENDIAN);
3243     /* Introducing Star/Pound (INIT) (octet 1, bit A) */
3244     proto_tree_add_item(subtree, hf_ansi_map_triggercapability_init, tvb, offset,       1, ENC_BIG_ENDIAN);
3245     offset++;
3246
3247
3248     /* O_Called_Party_Busy (OBSY) (octet 2, bit H)*/
3249     proto_tree_add_item(subtree, hf_ansi_map_triggercapability_obsy, tvb, offset,       1, ENC_BIG_ENDIAN);
3250     /* Called_Routing_Address_Available (CdRAA) (octet 2, bit G)*/
3251     proto_tree_add_item(subtree, hf_ansi_map_triggercapability_cdraa, tvb, offset,      1, ENC_BIG_ENDIAN);
3252     /* Initial_Termination (IT) (octet 2, bit F)*/
3253     proto_tree_add_item(subtree, hf_ansi_map_triggercapability_it, tvb, offset,         1, ENC_BIG_ENDIAN);
3254     /* Calling_Routing_Address_Available (CgRAA)*/
3255     proto_tree_add_item(subtree, hf_ansi_map_triggercapability_cgraa, tvb, offset,      1, ENC_BIG_ENDIAN);
3256     /* Advanced_Termination (AT) (octet 2, bit D)*/
3257     proto_tree_add_item(subtree, hf_ansi_map_triggercapability_at, tvb, offset,         1, ENC_BIG_ENDIAN);
3258     /* Prior_Agreement (PA) (octet 2, bit C)*/
3259     proto_tree_add_item(subtree, hf_ansi_map_triggercapability_pa, tvb, offset,         1, ENC_BIG_ENDIAN);
3260     /* Unrecognized_Number (Unrec) (octet 2, bit B)*/
3261     proto_tree_add_item(subtree, hf_ansi_map_triggercapability_unrec, tvb, offset,      1, ENC_BIG_ENDIAN);
3262     /* Call Types (CT) (octet 2, bit A)*/
3263     proto_tree_add_item(subtree, hf_ansi_map_triggercapability_ct, tvb, offset,         1, ENC_BIG_ENDIAN);
3264     offset++;
3265     /* */
3266     /* */
3267     /* */
3268     /* T_Disconnect (TDISC) (octet 3, bit E)*/
3269     proto_tree_add_item(subtree, hf_ansi_map_triggercapability_tdisc, tvb, offset,      1, ENC_BIG_ENDIAN);
3270     /* T_Answer (TANS) (octet 3, bit D)*/
3271     proto_tree_add_item(subtree, hf_ansi_map_triggercapability_tans, tvb, offset,       1, ENC_BIG_ENDIAN);
3272     /* T_No_Answer (TNA) (octet 3, bit C)*/
3273     proto_tree_add_item(subtree, hf_ansi_map_triggercapability_tna, tvb, offset,        1, ENC_BIG_ENDIAN);
3274     /* T_Busy (TBusy) (octet 3, bit B)*/
3275     proto_tree_add_item(subtree, hf_ansi_map_triggercapability_tbusy, tvb, offset,      1, ENC_BIG_ENDIAN);
3276     /* Terminating_Resource_Available (TRA) (octet 3, bit A) */
3277     proto_tree_add_item(subtree, hf_ansi_map_triggercapability_tra, tvb, offset,        1, ENC_BIG_ENDIAN);
3278
3279 }
3280 /* 6.5.2.ei DMH_ServiceID N.S0018 */
3281
3282 /* 6.5.2.dj WINOperationsCapability */
3283 /* Updated with N.S0004 */
3284 /* ConnectResource (CONN) (octet 1, bit A) */
3285 static const true_false_string ansi_map_winoperationscapability_conn_bool_val  = {
3286     "Sender is capable of supporting the ConnectResource, DisconnectResource, ConnectionFailureReport and ResetTimer (SSFT timer) operations",
3287     "Sender is not capable of supporting the ConnectResource, DisconnectResource,ConnectionFailureReport and ResetTimer (SSFT timer) operations"
3288 };
3289
3290 /* CallControlDirective (CCDIR) (octet 1, bit B) */
3291 static const true_false_string ansi_map_winoperationscapability_ccdir_bool_val  = {
3292     "Sender is capable of supporting the CallControlDirective operation",
3293     "Sender is not capable of supporting the CallControlDirective operation"
3294 };
3295
3296 /* PositionRequest (POS) (octet 1, bit C) */
3297 static const true_false_string ansi_map_winoperationscapability_pos_bool_val  = {
3298     "Sender is capable of supporting the PositionRequest operation",
3299     "Sender is not capable of supporting the PositionRequest operation"
3300 };
3301 static void
3302 dissect_ansi_map_winoperationscapability(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree _U_, asn1_ctx_t *actx _U_){
3303
3304     int offset = 0;
3305     proto_tree *subtree;
3306
3307     subtree = proto_item_add_subtree(actx->created_item, ett_winoperationscapability);
3308
3309     /* PositionRequest (POS) (octet 1, bit C) */
3310     proto_tree_add_item(subtree, hf_ansi_map_winoperationscapability_pos, tvb, offset,  1, ENC_BIG_ENDIAN);
3311     /* CallControlDirective (CCDIR) (octet 1, bit B) */
3312     proto_tree_add_item(subtree, hf_ansi_map_winoperationscapability_ccdir, tvb, offset,        1, ENC_BIG_ENDIAN);
3313     /* ConnectResource (CONN) (octet 1, bit A) */
3314     proto_tree_add_item(subtree, hf_ansi_map_winoperationscapability_conn, tvb, offset, 1, ENC_BIG_ENDIAN);
3315
3316 }
3317 /*
3318  * 6.5.2.dk N.S0013-0 v 1.0,X.S0004-550-E v1.0 2.301
3319  * Code to be found after include functions.
3320  */
3321
3322 /* 6.5.2.ei TIA/EIA-41.5-D Modifications N.S0018Re */
3323 /* Octet 1,2 1st MarketID */
3324 /* Octet 3 1st MarketSegmentID */
3325 /* Octet 4,5 1st DMH_ServiceID value */
3326 /* Second marcet ID etc */
3327 /* 6.5.2.ek ControlNetworkID N.S0018*/
3328 static void
3329 dissect_ansi_map_controlnetworkid(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree _U_, asn1_ctx_t *actx _U_){
3330
3331     int offset = 0;
3332     proto_tree *subtree;
3333
3334
3335     subtree = proto_item_add_subtree(actx->created_item, ett_controlnetworkid);
3336     /* MarketID octet 1 and 2 */
3337     proto_tree_add_item(subtree, hf_ansi_map_MarketID, tvb, offset, 2, ENC_BIG_ENDIAN);
3338     offset = offset + 2;
3339     /* Switch Number octet 3*/
3340     proto_tree_add_item(subtree, hf_ansi_map_swno, tvb, offset, 1, ENC_BIG_ENDIAN);
3341     offset++;
3342 }
3343
3344
3345 /* 6.5.2.dk WIN_TriggerList N.S0013-0 v 1.0 */
3346
3347 /* 6.5.2.ec DisplayText2 Updated in N.S0015-0*/
3348
3349 /* 6.5.2.eq MSStatus N.S0004 */
3350
3351 /* 6.5.2.er PositionInformationCode N.S0004 */
3352
3353 /* 6.5.2.fd InterMessageTime N.S0015-0*/
3354 /* Timer value (in 10s of seconds) octet 1 */
3355
3356 /* 6.5.2.fe MSIDUsage N.S0015-0 */
3357 /* M and I Report (octet 1, bits A and B) */
3358 static const value_string ansi_MSIDUsage_m_or_i_vals[]  = {
3359     {   0, "Not used"},
3360     {   1, "MIN last used"},
3361     {   2, "IMSI last used"},
3362     {   3, "Reserved"},
3363     {   0, NULL }
3364 };
3365
3366 /* 6.5.2.ff NewMINExtension N.S0015-0 */
3367
3368 /* 6.5.2.fv ACGEncountered N.S0023-0 v 1.0 */
3369 /* ACG Encountered (octet 1, bits A-F) */
3370 static const value_string ansi_ACGEncountered_vals[]  = {
3371     {   0, "PC_SSN"},
3372     {   1, "1-digit control"},
3373     {   2, "2-digit control"},
3374     {   3, "3-digit control"},
3375     {   4, "4-digit control"},
3376     {   5, "5-digit control"},
3377     {   6, "6-digit control"},
3378     {   7, "7-digit control"},
3379     {   8, "8-digit control"},
3380     {   9, "9-digit control"},
3381     {   10, "10-digit control"},
3382     {   11, "11-digit control"},
3383     {   12, "12-digit control"},
3384     {   13, "13-digit control"},
3385     {   14, "14-digit control"},
3386     {   15, "15-digit control"},
3387     {   0, NULL }
3388 };
3389 /* Control Type (octet 1, bits G-H) */
3390 static const value_string ansi_ACGEncountered_cntrl_type_vals[]  = {
3391     {   0, "Not used."},
3392     {   1, "Service Management System Initiated control encountered"},
3393     {   2, "SCF Overload control encountered"},
3394     {   3, "Reserved. Treat the same as value 0, Not used."},
3395     {   0, NULL }
3396 };
3397
3398 /* 6.5.2.fw ControlType N.S0023-0 v 1.0 */
3399
3400
3401
3402 /* 6.5.2.ge QoSPriority N.S0029-0 v1.0*/
3403 /* 6.5.2.xx QOSPriority */
3404 /* Non-Assured Priority (octet 1, bits A-D) */
3405 static const value_string ansi_map_Priority_vals[]  = {
3406     {   0, "Priority Level 0. This is the lowest level"},
3407     {   1, "Priority Level 1"},
3408     {   2, "Priority Level 2"},
3409     {   3, "Priority Level 3"},
3410     {   4, "Priority Level 4"},
3411     {   5, "Priority Level 5"},
3412     {   6, "Priority Level 6"},
3413     {   7, "Priority Level 7"},
3414     {   8, "Priority Level 8"},
3415     {   8, "Priority Level 9"},
3416     {   10, "Priority Level 10"},
3417     {   11, "Priority Level 11"},
3418     {   12, "Priority Level 12"},
3419     {   13, "Priority Level 13"},
3420     {   14, "Reserved"},
3421     {   15, "Reserved"},
3422     {   0, NULL }
3423 };
3424 /* Assured Priority (octet 1, bits E-H)*/
3425
3426
3427 /* 6.5.2.gf PDSNAddress N.S0029-0 v1.0*/
3428 /* a. See IOS Handoff Request message for the definition of this field. */
3429
3430 /* 6.5.2.gg PDSNProtocolType N.S0029-0 v1.0*/
3431 /* See IOS Handoff Request message for the definition of this field. */
3432
3433 /* 6.5.2.gh CDMAMSMeasuredChannelIdentity N.S0029-0 v1.0*/
3434
3435 /* 6.5.2.gl CallingPartyCategory N.S0027*/
3436 /* a. Refer to ITU-T Q.763 (Signalling System No. 7  ISDN user part formats and
3437    codes) for encoding of this parameter.
3438    b. Refer to national ISDN user part specifications for definitions and encoding of the
3439    reserved for national use values.
3440 */
3441 /* 6.5.2.gm CDMA2000HandoffInvokeIOSData N.S0029-0 v1.0*/
3442 /* IOS A1 Element Handoff Invoke Information */
3443
3444
3445 /* 6.5.2.gn CDMA2000HandoffResponseIOSData */
3446 /* IOS A1 Element Handoff Response Information N.S0029-0 v1.0*/
3447
3448 /* 6.5.2.gr CDMAServiceOptionConnectionIdentifier N.S0029-0 v1.0*/
3449
3450 /* 6.5.2.fk GeographicPosition */
3451 /* Calling Geodetic Location (CGL)
3452  * a. See T1.628 for encoding.
3453  * b. Ignore extra octets, if received. Send only defined (or significant) octets.
3454  */
3455 /* 6.5.2.fs PositionRequestType (See J-STD-036, page 8-47) X.S0002-0 v2.0
3456  */
3457
3458 /* Position Request Type (octet 1, bits A-H) */
3459 /*
3460   static const value_string ansi_map_Position_Request_Type_vals[]  = {
3461   {   0, "Not used"},
3462   {   1, "Initial Position"},
3463   {   2, "Return the updated position"},
3464   {   3, "Return the updated or last known position"},
3465   {   4, "Reserved for LSP interface"},
3466   {   5, "Initial Position Only"},
3467   {   6, "Return the last known position"},
3468   {   7, "Return the updated position based on the serving cell identity"},
3469 */
3470 /*
3471   values through 95 Reserved. Treat the same as value 1, Initial position.
3472   96 through 255 Reserved for TIA/EIA-41 protocol extension. If unknown, treat the
3473   same as value 1, Initial position.
3474   *
3475   {     0, NULL }
3476   };
3477
3478 */
3479
3480 /* LCS Client Type (CTYP) (octet 2, bit A) *
3481    0 Emergency services LCS Client.
3482    1 Non-emergency services LCS Client.
3483    Call-Related Indicator (CALL) (octet 2, bit B)
3484    Decimal Value Meaning
3485    0 Call-related LCS Client request.
3486    1 Non call-related LCS Client request.
3487
3488    Current Serving Cell Information for Coarse Position Determination (CELL) (octet 2, bit C)
3489    Decimal Value Meaning
3490    0 No specific request.
3491    1 Current serving cell information. Current serving cell information for
3492    Target MS requested. Radio contact with Target MS is required.
3493 */
3494 /* 6.5.2.ft PositionResult *
3495    static const value_string ansi_map_PositionResult_vals[]  = {
3496    {   0, "Not used"},
3497    {   1, "Initial position returned"},
3498    {   2, "Updated position returned"},
3499    {   3, "Last known position returned"},
3500    {   4, "Requested position is not available"},
3501    {   5, "Target MS disconnect"},
3502    {   6, "Target MS has handed-off"},
3503    {   7, "Identified MS is inactive or has roamed to another system"},
3504    {   8, "Unresponsive"},
3505    {   9, "Identified MS is responsive, but refused position request"},
3506    {   10, "System Failure"},
3507    {   11, "MSID is not known"},
3508    {   12, "Callback number is not known"},
3509    {   13, "Improper request"},
3510    {   14, "Mobile information returned"},
3511    {   15, "Signal not detected"},
3512    {   16, "PDE Timeout"},
3513    {   17, "Position pending"},
3514    {   18, "TDMA MAHO Information Returned"},
3515    {   19, "TDMA MAHO Information is not available"},
3516    {   20, "Access Denied"},
3517    {   21, "Requested PQOS not met"},
3518    {   22, "Resource required for CDMA handset-based position determination is currently unavailable"},
3519    {   23, "CDMA handset-based position determination failure"},
3520    {   24, "CDMA handset-based position determination failure detected by the PDE"},
3521    {   25, "CDMA handset-based position determination incomplete traffic channel requested for voice services"},
3522    {   26, "Emergency services call notification"},
3523    {   27, "Emergency services call precedence"},
3524    {   28, "Request acknowledged"},
3525    {    0, NULL }
3526    };
3527 */
3528 /* 6.5.2.bp-1 ServiceRedirectionCause value */
3529 static const value_string ansi_map_ServiceRedirectionCause_vals[]  = {
3530     {   0, "Not used"},
3531     {   1, "NormalRegistration"},
3532     {   2, "SystemNotFound"},
3533     {   3, "ProtocolMismatch"},
3534     {   4, "RegistrationRejection"},
3535     {   5, "WrongSID"},
3536     {   6, "WrongNID"},
3537     {   0, NULL }
3538 };
3539 /* 6.5.2.mT AuthenticationResponseReauthentication N.S0011-0 v 1.0*/
3540
3541 /* 6.5.2.vT ReauthenticationReport N.S0011-0 v 1.0*/
3542 static const value_string ansi_map_ReauthenticationReport_vals[]  = {
3543     {   0, "Not used"},
3544     {   1, "Reauthentication not attempted"},
3545     {   2, "Reauthentication no response"},
3546     {   3, "Reauthentication successful"},
3547     {   4, "Reauthentication failed"},
3548     {   0, NULL }
3549 };
3550
3551
3552
3553 /* 6.5.2.lB AKeyProtocolVersion
3554    N.S0011-0 v 1.0
3555 */
3556 static const value_string ansi_map_AKeyProtocolVersion_vals[]  = {
3557     {   0, "Not used"},
3558     {   1, "A-key Generation not supported"},
3559     {   2, "Diffie Hellman with 768-bit modulus, 160-bit primitive, and 160-bit exponents"},
3560     {   3, "Diffie Hellman with 512-bit modulus, 160-bit primitive, and 160-bit exponents"},
3561     {   4, "Diffie Hellman with 768-bit modulus, 32-bit primitive, and 160-bit exponents"},
3562     {   0, NULL }
3563 };
3564 /* 6.5.2.sB OTASP_ResultCode
3565    N.S0011-0 v 1.0
3566 */
3567 static const value_string ansi_map_OTASP_ResultCode_vals[]  = {
3568     {   0, "Accepted - Successful"},
3569     {   1, "Rejected - Unknown cause."},
3570     {   2, "Computation Failure - E.g., unable to compute A-key"},
3571     {   3, "CSC Rejected - CSC challenge failure"},
3572     {   4, "Unrecognized OTASPCallEntry"},
3573     {   5, "Unsupported AKeyProtocolVersion(s)"},
3574     {   6, "Unable to Commit"},
3575     {   0, NULL }
3576 };
3577
3578 /*6.5.2.wB ServiceIndicator
3579   N.S0011-0 v 1.0
3580 */
3581 static const value_string ansi_map_ServiceIndicator_vals[]  = {
3582     {   0, "Undefined Service"},
3583     {   1, "CDMA OTASP Service"},
3584     {   2, "TDMA OTASP Service"},
3585     {   3, "CDMA OTAPA Service"},
3586     {   4, "CDMA Position Determination Service (Emergency Services)"},
3587     {   5, "AMPS Position Determination Service (Emergency Services)"},
3588     {   6, "CDMA Position Determination Service (Value Added Services)"},
3589     {   0, NULL }
3590 };
3591
3592 /* 6.5.2.xB SignalingMessageEncryptionReport
3593    N.S0011-0 v 1.0
3594 */
3595 static const value_string ansi_map_SMEReport_vals[]  = {
3596     {   0, "Not used"},
3597     {   1, "Signaling Message Encryption enabling not attempted"},
3598     {   2, "Signaling Message Encryption enabling no response"},
3599     {   3, "Signaling Message Encryption is enabled"},
3600     {   4, "Signaling Message Encryption enabling failed"},
3601     {   0, NULL }
3602 };
3603
3604 /* 6.5.2.zB VoicePrivacyReport
3605    N.S0011-0 v 1.0
3606 */
3607 static const value_string ansi_map_VoicePrivacyReport_vals[]  = {
3608     {   0, "Not used"},
3609     {   1, "Voice Privacy not attempted"},
3610     {   2, "Voice Privacy no response"},
3611     {   3, "Voice Privacy is active"},
3612     {   4, "Voice Privacy failed"},
3613     {   0, NULL }
3614 };
3615
3616
3617 #include "packet-ansi_map-fn.c"
3618
3619 /*
3620  * 6.5.2.dk N.S0013-0 v 1.0,X.S0004-550-E v1.0 2.301
3621  */
3622 static void
3623 dissect_ansi_map_win_trigger_list(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree _U_, asn1_ctx_t *actx _U_){
3624
3625     int offset = 0;
3626     int end_offset = 0;
3627     int j = 0;
3628     proto_tree *subtree;
3629     guint8 octet;
3630
3631     end_offset = tvb_length_remaining(tvb,offset);
3632     subtree = proto_item_add_subtree(actx->created_item, ett_win_trigger_list);
3633
3634     while(offset< end_offset) {
3635         octet = tvb_get_guint8(tvb,offset);
3636         switch (octet){
3637         case 0xdc:
3638             proto_tree_add_text(subtree, tvb, offset, 1, "TDP-R's armed");
3639             j=0;
3640             break;
3641         case 0xdd:
3642             proto_tree_add_text(subtree, tvb, offset, 1, "TDP-N's armed");
3643             j=0;
3644             break;
3645         case 0xde:
3646             proto_tree_add_text(subtree, tvb, offset, 1, "EDP-R's armed");
3647             j=0;
3648             break;
3649         case 0xdf:
3650             proto_tree_add_text(subtree, tvb, offset, 1, "EDP-N's armed");
3651             j=0;
3652             break;
3653         default:
3654             proto_tree_add_text(subtree, tvb, offset, 1, "[%u] (%u) %s",j,octet,val_to_str_ext(octet, &ansi_map_TriggerType_vals_ext, "Unknown TriggerType (%u)"));
3655             j++;
3656             break;
3657         }
3658         offset++;
3659     }
3660 }
3661
3662
3663 static int dissect_invokeData(proto_tree *tree, tvbuff_t *tvb, int offset, asn1_ctx_t *actx) {
3664     static gboolean               opCodeKnown = TRUE;
3665     static ansi_map_tap_rec_t     tap_rec[16];
3666     static ansi_map_tap_rec_t     *tap_p;
3667     static int                    tap_current=0;
3668
3669     /*
3670      * set tap record pointer
3671      */
3672     tap_current++;
3673     if (tap_current == array_length(tap_rec))
3674     {
3675         tap_current = 0;
3676     }
3677     tap_p = &tap_rec[tap_current];
3678
3679     switch(OperationCode){
3680     case 1: /*Handoff Measurement Request*/
3681         offset = dissect_ansi_map_HandoffMeasurementRequest(TRUE, tvb, offset, actx, tree, hf_ansi_map_handoffMeasurementRequest);
3682         break;
3683     case 2: /*Facilities Directive*/
3684         offset = dissect_ansi_map_FacilitiesDirective(TRUE, tvb, offset, actx, tree, hf_ansi_map_facilitiesDirective);
3685         break;
3686     case 3: /*Mobile On Channel*/
3687         proto_tree_add_text(tree, tvb, offset, -1, "[Carries no data]");
3688         break;
3689     case 4: /*Handoff Back*/
3690         offset = dissect_ansi_map_HandoffBack(TRUE, tvb, offset, actx, tree, hf_ansi_map_handoffBack);
3691         break;
3692     case 5: /*Facilities Release*/
3693         offset = dissect_ansi_map_FacilitiesRelease(TRUE, tvb, offset, actx, tree, hf_ansi_map_facilitiesRelease);
3694         break;
3695     case 6: /*Qualification Request*/
3696         offset = dissect_ansi_map_QualificationRequest(TRUE, tvb, offset, actx, tree, hf_ansi_map_qualificationRequest);
3697         break;
3698     case 7: /*Qualification Directive*/
3699         offset = dissect_ansi_map_QualificationDirective(TRUE, tvb, offset, actx, tree, hf_ansi_map_qualificationDirective);
3700         break;
3701     case 8: /*Blocking*/
3702         offset = dissect_ansi_map_Blocking(TRUE, tvb, offset, actx, tree, hf_ansi_map_blocking);
3703         break;
3704     case 9: /*Unblocking*/
3705         offset = dissect_ansi_map_Unblocking(TRUE, tvb, offset, actx, tree, hf_ansi_map_unblocking);
3706         break;
3707     case 10: /*Reset Circuit*/
3708         offset = dissect_ansi_map_ResetCircuit(TRUE, tvb, offset, actx, tree, hf_ansi_map_resetCircuit);
3709         break;
3710     case 11: /*Trunk Test*/
3711         offset = dissect_ansi_map_TrunkTest(TRUE, tvb, offset, actx, tree, hf_ansi_map_trunkTest);
3712         break;
3713     case 12: /*Trunk Test Disconnect*/
3714         offset = dissect_ansi_map_TrunkTestDisconnect(TRUE, tvb, offset, actx, tree, hf_ansi_map_trunkTestDisconnect);
3715         break;
3716     case  13: /*Registration Notification*/
3717         offset = dissect_ansi_map_RegistrationNotification(TRUE, tvb, offset, actx, tree, hf_ansi_map_registrationNotification);
3718         break;
3719     case  14: /*Registration Cancellation*/
3720         offset = dissect_ansi_map_RegistrationCancellation(TRUE, tvb, offset, actx, tree, hf_ansi_map_registrationCancellation);
3721         break;
3722     case  15: /*Location Request*/
3723         offset = dissect_ansi_map_LocationRequest(TRUE, tvb, offset, actx, tree, hf_ansi_map_locationRequest);
3724         break;
3725     case  16: /*Routing Request*/
3726         offset = dissect_ansi_map_RoutingRequest(TRUE, tvb, offset, actx, tree, hf_ansi_map_routingRequest);
3727         break;
3728     case  17: /*Feature Request*/
3729         offset = dissect_ansi_map_FeatureRequest(TRUE, tvb, offset, actx, tree, hf_ansi_map_featureRequest);
3730         break;
3731     case  18: /*Reserved 18 (Service Profile Request, IS-41-C)*/
3732         proto_tree_add_text(tree, tvb, offset, -1, "Unknown invokeData blob(18 (Service Profile Request, IS-41-C)");
3733         break;
3734     case  19: /*Reserved 19 (Service Profile Directive, IS-41-C)*/
3735         proto_tree_add_text(tree, tvb, offset, -1, "Unknown invokeData blob(19 Service Profile Directive, IS-41-C)");
3736         break;
3737     case  20: /*Unreliable Roamer Data Directive*/
3738         offset = dissect_ansi_map_UnreliableRoamerDataDirective(TRUE, tvb, offset, actx, tree, hf_ansi_map_unreliableRoamerDataDirective);
3739         break;
3740     case  21: /*Reserved 21 (Call Data Request, IS-41-C)*/
3741         proto_tree_add_text(tree, tvb, offset, -1, "Unknown invokeData blob(Reserved 21 (Call Data Request, IS-41-C)");
3742         break;
3743     case  22: /*MS Inactive*/
3744         offset = dissect_ansi_map_MSInactive(TRUE, tvb, offset, actx, tree, hf_ansi_map_mSInactive);
3745         break;
3746     case  23: /*Transfer To Number Request*/
3747         offset = dissect_ansi_map_TransferToNumberRequest(TRUE, tvb, offset, actx, tree, hf_ansi_map_transferToNumberRequest);
3748         break;
3749     case  24: /*Redirection Request*/
3750         offset = dissect_ansi_map_RedirectionRequest(TRUE, tvb, offset, actx, tree, hf_ansi_map_redirectionRequest);
3751         break;
3752     case  25: /*Handoff To Third*/
3753         offset = dissect_ansi_map_HandoffToThird(TRUE, tvb, offset, actx, tree, hf_ansi_map_handoffToThird);
3754         break;
3755     case  26: /*Flash Request*/
3756         offset = dissect_ansi_map_FlashRequest(TRUE, tvb, offset, actx, tree, hf_ansi_map_flashRequest);
3757         break;
3758     case  27: /*Authentication Directive*/
3759         offset = dissect_ansi_map_AuthenticationDirective(TRUE, tvb, offset, actx, tree, hf_ansi_map_authenticationDirective);
3760         break;
3761     case  28: /*Authentication Request*/
3762         offset = dissect_ansi_map_AuthenticationRequest(TRUE, tvb, offset, actx, tree, hf_ansi_map_authenticationRequest);
3763         break;
3764     case  29: /*Base Station Challenge*/
3765         offset = dissect_ansi_map_BaseStationChallenge(TRUE, tvb, offset, actx, tree, hf_ansi_map_baseStationChallenge);
3766         break;
3767     case  30: /*Authentication Failure Report*/
3768         offset = dissect_ansi_map_AuthenticationFailureReport(TRUE, tvb, offset, actx, tree, hf_ansi_map_authenticationFailureReport);
3769         break;
3770     case  31: /*Count Request*/
3771         offset = dissect_ansi_map_CountRequest(TRUE, tvb, offset, actx, tree, hf_ansi_map_countRequest);
3772         break;
3773     case  32: /*Inter System Page*/
3774         offset = dissect_ansi_map_InterSystemPage(TRUE, tvb, offset, actx, tree, hf_ansi_map_interSystemPage);
3775         break;
3776     case  33: /*Unsolicited Response*/
3777         offset = dissect_ansi_map_UnsolicitedResponse(TRUE, tvb, offset, actx, tree, hf_ansi_map_unsolicitedResponse);
3778         break;
3779     case  34: /*Bulk Deregistration*/
3780         offset = dissect_ansi_map_BulkDeregistration(TRUE, tvb, offset, actx, tree, hf_ansi_map_bulkDeregistration);
3781         break;
3782     case  35: /*Handoff Measurement Request 2*/
3783         offset = dissect_ansi_map_HandoffMeasurementRequest2(TRUE, tvb, offset, actx, tree, hf_ansi_map_handoffMeasurementRequest2);
3784         break;
3785     case  36: /*Facilities Directive 2*/
3786         offset = dissect_ansi_map_FacilitiesDirective2(TRUE, tvb, offset, actx, tree, hf_ansi_map_facilitiesDirective2);
3787         break;
3788     case  37: /*Handoff Back 2*/
3789         offset = dissect_ansi_map_HandoffBack2(TRUE, tvb, offset, actx, tree, hf_ansi_map_handoffBack2);
3790         break;
3791     case  38: /*Handoff To Third 2*/
3792         offset = dissect_ansi_map_HandoffToThird2(TRUE, tvb, offset, actx, tree, hf_ansi_map_handoffToThird2);
3793         break;
3794     case  39: /*Authentication Directive Forward*/
3795         offset = dissect_ansi_map_AuthenticationDirectiveForward(TRUE, tvb, offset, actx, tree, hf_ansi_map_authenticationDirectiveForward);
3796         break;
3797     case  40: /*Authentication Status Report*/
3798         offset = dissect_ansi_map_AuthenticationStatusReport(TRUE, tvb, offset, actx, tree, hf_ansi_map_authenticationStatusReport);
3799         break;
3800     case  41: /*Reserved 41*/
3801         proto_tree_add_text(tree, tvb, offset, -1, "Reserved 41, Unknown invokeData blob");
3802         break;
3803     case  42: /*Information Directive*/
3804         offset = dissect_ansi_map_InformationDirective(TRUE, tvb, offset, actx, tree, hf_ansi_map_informationDirective);
3805         break;
3806     case  43: /*Information Forward*/
3807         offset = dissect_ansi_map_InformationForward(TRUE, tvb, offset, actx, tree, hf_ansi_map_informationForward);
3808         break;
3809     case  44: /*Inter System Answer*/
3810         offset = dissect_ansi_map_InterSystemAnswer(TRUE, tvb, offset, actx, tree, hf_ansi_map_interSystemAnswer);
3811         break;
3812     case  45: /*Inter System Page 2*/
3813         offset = dissect_ansi_map_InterSystemPage2(TRUE, tvb, offset, actx, tree, hf_ansi_map_interSystemPage2);
3814         break;
3815     case  46: /*Inter System Setup*/
3816         offset = dissect_ansi_map_InterSystemSetup(TRUE, tvb, offset, actx, tree, hf_ansi_map_interSystemSetup);
3817         break;
3818     case  47: /*OriginationRequest*/
3819         offset = dissect_ansi_map_OriginationRequest(TRUE, tvb, offset, actx, tree, hf_ansi_map_originationRequest);
3820         break;
3821     case  48: /*Random Variable Request*/
3822         offset = dissect_ansi_map_RandomVariableRequest(TRUE, tvb, offset, actx, tree, hf_ansi_map_randomVariableRequest);
3823         break;
3824     case  49: /*Redirection Directive*/
3825         offset = dissect_ansi_map_RedirectionDirective(TRUE, tvb, offset, actx, tree, hf_ansi_map_redirectionDirective);
3826         break;
3827     case  50: /*Remote User Interaction Directive*/
3828         offset = dissect_ansi_map_RemoteUserInteractionDirective(TRUE, tvb, offset, actx, tree, hf_ansi_map_remoteUserInteractionDirective);
3829         break;
3830     case  51: /*SMS Delivery Backward*/
3831         offset = dissect_ansi_map_SMSDeliveryBackward(TRUE, tvb, offset, actx, tree, hf_ansi_map_sMSDeliveryBackward);
3832         break;
3833     case  52: /*SMS Delivery Forward*/
3834         offset = dissect_ansi_map_SMSDeliveryForward(TRUE, tvb, offset, actx, tree, hf_ansi_map_sMSDeliveryForward);
3835         break;
3836     case  53: /*SMS Delivery Point to Point*/
3837         offset = dissect_ansi_map_SMSDeliveryPointToPoint(TRUE, tvb, offset, actx, tree, hf_ansi_map_sMSDeliveryPointToPoint);
3838         break;
3839     case  54: /*SMS Notification*/
3840         offset = dissect_ansi_map_SMSNotification(TRUE, tvb, offset, actx, tree, hf_ansi_map_sMSNotification);
3841         break;
3842     case  55: /*SMS Request*/
3843         offset = dissect_ansi_map_SMSRequest(TRUE, tvb, offset, actx, tree, hf_ansi_map_sMSRequest);
3844         break;
3845         /* End N.S0005*/
3846         /* N.S0010-0 v 1.0 */
3847         /* N.S0011-0 v 1.0 */
3848     case  56: /*OTASP Request 6.4.2.CC*/
3849         offset = dissect_ansi_map_OTASPRequest(TRUE, tvb, offset, actx, tree, hf_ansi_map_oTASPRequest);
3850         break;
3851         /*End N.S0011-0 v 1.0 */
3852     case  57: /*Information Backward*/
3853         offset = offset;
3854         break;
3855         /*  N.S0008-0 v 1.0 */
3856     case  58: /*Change Facilities*/
3857         offset = dissect_ansi_map_ChangeFacilities(TRUE, tvb, offset, actx, tree, hf_ansi_map_changeFacilities);
3858         break;
3859     case  59: /*Change Service*/
3860         offset = dissect_ansi_map_ChangeService(TRUE, tvb, offset, actx, tree, hf_ansi_map_changeService);
3861         break;
3862         /* End N.S0008-0 v 1.0 */
3863     case  60: /*Parameter Request*/
3864         offset = dissect_ansi_map_ParameterRequest(TRUE, tvb, offset, actx, tree, hf_ansi_map_parameterRequest);
3865         break;
3866     case  61: /*TMSI Directive*/
3867         offset = dissect_ansi_map_TMSIDirective(TRUE, tvb, offset, actx, tree, hf_ansi_map_tMSIDirective);
3868         break;
3869         /*End  N.S0010-0 v 1.0 */
3870     case  62: /*NumberPortabilityRequest 62*/
3871         offset = dissect_ansi_map_NumberPortabilityRequest(TRUE, tvb, offset, actx, tree, hf_ansi_map_numberPortabilityRequest);
3872         break;
3873     case  63: /*Service Request N.S0012-0 v 1.0*/
3874         offset = dissect_ansi_map_ServiceRequest(TRUE, tvb, offset, actx, tree, hf_ansi_map_serviceRequest);
3875         break;
3876         /* N.S0013 */
3877     case  64: /*Analyzed Information Request*/
3878         offset = dissect_ansi_map_AnalyzedInformation(TRUE, tvb, offset, actx, tree, hf_ansi_map_analyzedInformation);
3879         break;
3880     case  65: /*Connection Failure Report*/
3881         offset = dissect_ansi_map_ConnectionFailureReport(TRUE, tvb, offset, actx, tree, hf_ansi_map_connectionFailureReport);
3882         break;
3883     case  66: /*Connect Resource*/
3884         offset = dissect_ansi_map_ConnectResource(TRUE, tvb, offset, actx, tree, hf_ansi_map_connectResource);
3885         break;
3886     case  67: /*Disconnect Resource*/
3887         /* No data */
3888         break;
3889     case  68: /*Facility Selected and Available*/
3890         offset = dissect_ansi_map_FacilitySelectedAndAvailable(TRUE, tvb, offset, actx, tree, hf_ansi_map_facilitySelectedAndAvailable);
3891         break;
3892     case  69: /*Instruction Request*/
3893         /* No data */
3894         break;
3895     case  70: /*Modify*/
3896         offset = dissect_ansi_map_Modify(TRUE, tvb, offset, actx, tree, hf_ansi_map_modify);
3897         break;
3898     case  71: /*Reset Timer*/
3899         /*No Data*/
3900         break;
3901     case  72: /*Search*/
3902         offset = dissect_ansi_map_Search(TRUE, tvb, offset, actx, tree, hf_ansi_map_search);
3903         break;
3904     case  73: /*Seize Resource*/
3905         offset = dissect_ansi_map_SeizeResource(TRUE, tvb, offset, actx, tree, hf_ansi_map_seizeResource);
3906         break;
3907     case  74: /*SRF Directive*/
3908         offset = dissect_ansi_map_SRFDirective(TRUE, tvb, offset, actx, tree, hf_ansi_map_sRFDirective);
3909         break;
3910     case  75: /*T Busy*/
3911         offset = dissect_ansi_map_TBusy(TRUE, tvb, offset, actx, tree, hf_ansi_map_tBusy);
3912         break;
3913     case  76: /*T NoAnswer*/
3914         offset = dissect_ansi_map_TNoAnswer(TRUE, tvb, offset, actx, tree, hf_ansi_map_tNoAnswer);
3915         break;
3916         /*END N.S0013 */
3917     case  77: /*Release*/
3918         offset = offset;
3919         break;
3920     case  78: /*SMS Delivery Point to Point Ack*/
3921         offset = dissect_ansi_map_SMSDeliveryPointToPointAck(TRUE, tvb, offset, actx, tree, hf_ansi_map_smsDeliveryPointToPointAck);
3922         break;
3923         /* N.S0024*/
3924     case  79: /*Message Directive*/
3925         offset = dissect_ansi_map_MessageDirective(TRUE, tvb, offset, actx, tree, hf_ansi_map_messageDirective);
3926         break;
3927         /*END N.S0024*/
3928         /* N.S0018 PN-4287*/
3929     case  80: /*Bulk Disconnection*/
3930         offset = dissect_ansi_map_BulkDisconnection(TRUE, tvb, offset, actx, tree, hf_ansi_map_bulkDisconnection);
3931         break;
3932     case  81: /*Call Control Directive*/
3933         offset = dissect_ansi_map_CallControlDirective(TRUE, tvb, offset, actx, tree, hf_ansi_map_callControlDirective);
3934         break;
3935     case  82: /*O Answer*/
3936         offset = dissect_ansi_map_OAnswer(TRUE, tvb, offset, actx, tree, hf_ansi_map_oAnswer);
3937         break;
3938     case  83: /*O Disconnect*/
3939         offset = dissect_ansi_map_ODisconnect(TRUE, tvb, offset, actx, tree, hf_ansi_map_oDisconnect);
3940         break;
3941     case  84: /*Call Recovery Report*/
3942         offset = dissect_ansi_map_CallRecoveryReport(TRUE, tvb, offset, actx, tree, hf_ansi_map_callRecoveryReport);
3943         break;
3944     case  85: /*T Answer*/
3945         offset = dissect_ansi_map_TAnswer(TRUE, tvb, offset, actx, tree, hf_ansi_map_tAnswer);
3946         break;
3947     case  86: /*T Disconnect*/
3948         offset = dissect_ansi_map_TDisconnect(TRUE, tvb, offset, actx, tree, hf_ansi_map_tDisconnect);
3949         break;
3950     case  87: /*Unreliable Call Data*/
3951         offset = dissect_ansi_map_UnreliableCallData(TRUE, tvb, offset, actx, tree, hf_ansi_map_unreliableCallData);
3952         break;
3953         /* N.S0018 PN-4287*/
3954         /*N.S0004 */
3955     case  88: /*O CalledPartyBusy*/
3956         offset = dissect_ansi_map_OCalledPartyBusy(TRUE, tvb, offset, actx, tree, hf_ansi_map_oCalledPartyBusy);
3957         break;
3958     case  89: /*O NoAnswer*/
3959         offset = dissect_ansi_map_ONoAnswer(TRUE, tvb, offset, actx, tree, hf_ansi_map_oNoAnswer);
3960         break;
3961     case  90: /*Position Request*/
3962         offset = dissect_ansi_map_PositionRequest(TRUE, tvb, offset, actx, tree, hf_ansi_map_positionRequest);
3963         break;
3964     case  91: /*Position Request Forward*/
3965         offset = dissect_ansi_map_PositionRequestForward(TRUE, tvb, offset, actx, tree, hf_ansi_map_positionRequestForward);
3966         break;
3967         /*END N.S0004 */
3968     case  92: /*Call Termination Report*/
3969         offset = dissect_ansi_map_CallTerminationReport(TRUE, tvb, offset, actx, tree, hf_ansi_map_callTerminationReport);
3970         break;
3971     case  93: /*Geo Position Directive*/
3972         offset = offset;
3973         break;
3974     case  94: /*Geo Position Request*/
3975         offset = dissect_ansi_map_GeoPositionRequest(TRUE, tvb, offset, actx, tree, hf_ansi_map_interSystemPositionRequest);
3976         break;
3977     case  95: /*Inter System Position Request*/
3978         offset = dissect_ansi_map_InterSystemPositionRequest(TRUE, tvb, offset, actx, tree, hf_ansi_map_interSystemPositionRequest);
3979         break;
3980     case  96: /*Inter System Position Request Forward*/
3981         offset = dissect_ansi_map_InterSystemPositionRequestForward(TRUE, tvb, offset, actx, tree, hf_ansi_map_interSystemPositionRequestForward);
3982         break;
3983         /* 3GPP2 N.S0023-0 */
3984     case  97: /*ACG Directive*/
3985         offset = dissect_ansi_map_ACGDirective(TRUE, tvb, offset, actx, tree, hf_ansi_map_aCGDirective);
3986         break;
3987         /* END 3GPP2 N.S0023-0 */
3988     case  98: /*Roamer Database Verification Request*/
3989         offset = dissect_ansi_map_RoamerDatabaseVerificationRequest(TRUE, tvb, offset, actx, tree, hf_ansi_map_roamerDatabaseVerificationRequest);
3990         break;
3991         /* N.S0029 X.S0001-A v1.0*/
3992     case  99: /*Add Service*/
3993         offset = dissect_ansi_map_AddService(TRUE, tvb, offset, actx, tree, hf_ansi_map_addService);
3994         break;
3995     case  100: /*Drop Service*/
3996         offset = dissect_ansi_map_DropService(TRUE, tvb, offset, actx, tree, hf_ansi_map_dropService);
3997         break;
3998         /*End N.S0029 X.S0001-A v1.0*/
3999         /* X.S0002-0 v1.0 */
4000         /* LCSParameterRequest */
4001         case 101:       /* InterSystemSMSPage 101 */
4002                 offset = dissect_ansi_map_InterSystemSMSPage(TRUE, tvb, offset, actx, tree, hf_ansi_map_interSystemSMSPage);
4003                 break;
4004     case 102:
4005         offset = dissect_ansi_map_LCSParameterRequest(TRUE, tvb, offset, actx, tree, hf_ansi_map_lcsParameterRequest);
4006         break;
4007         /* CheckMEID X.S0008-0 v1.0*/
4008     case 104:
4009         offset = dissect_ansi_map_CheckMEID(TRUE, tvb, offset, actx, tree, hf_ansi_map_checkMEID);
4010         break;
4011         /* PositionEventNotification */
4012     case 106:
4013         offset = dissect_ansi_map_PositionEventNotification(TRUE, tvb, offset, actx, tree, hf_ansi_map_positionEventNotification);
4014         break;
4015     case 107:
4016         /* StatusRequest X.S0008-0 v1.0*/
4017         offset = dissect_ansi_map_StatusRequest(TRUE, tvb, offset, actx, tree, hf_ansi_map_statusRequest);
4018         break;
4019                 /* InterSystemSMSDelivery-PointToPoint 111 X.S0004-540-E v2.0*/
4020         case 111:
4021                 /* InterSystemSMSDeliveryPointToPoint X.S0004-540-E v2.0 */
4022                 offset = dissect_ansi_map_InterSystemSMSDeliveryPointToPoint(TRUE, tvb, offset, actx, tree, hf_ansi_map_interSystemSMSDeliveryPointToPoint);
4023                 break;
4024         case 112:
4025                 /* QualificationRequest2 112 X.S0004-540-E v2.0*/
4026                 offset = dissect_ansi_map_QualificationRequest2(TRUE, tvb, offset, actx, tree, hf_ansi_map_qualificationRequest2);
4027                 break;
4028     default:
4029         proto_tree_add_text(tree, tvb, offset, -1, "Unknown invokeData blob");
4030         opCodeKnown = FALSE;
4031         break;
4032     }
4033
4034     if (opCodeKnown)
4035     {
4036         tap_p->message_type = OperationCode;
4037         tap_p->size = 0;        /* should be number of octets in message */
4038
4039         tap_queue_packet(ansi_map_tap, g_pinfo, tap_p);
4040     }
4041
4042     return offset;
4043 }
4044
4045 static int dissect_returnData(proto_tree *tree, tvbuff_t *tvb, int offset, asn1_ctx_t *actx) {
4046     static gboolean               opCodeKnown = TRUE;
4047     static ansi_map_tap_rec_t     tap_rec[16];
4048     static ansi_map_tap_rec_t     *tap_p;
4049     static int                    tap_current=0;
4050
4051     /*
4052      * set tap record pointer
4053      */
4054     tap_current++;
4055     if (tap_current == array_length(tap_rec))
4056     {
4057         tap_current = 0;
4058     }
4059     tap_p = &tap_rec[tap_current];
4060
4061     switch(OperationCode){
4062     case 1: /*Handoff Measurement Request*/
4063         offset = dissect_ansi_map_HandoffMeasurementRequestRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_handoffMeasurementRequestRes);
4064         break;
4065     case 2: /*Facilities Directive*/
4066         offset = dissect_ansi_map_FacilitiesDirectiveRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_facilitiesDirectiveRes);
4067         break;
4068     case 4: /*Handoff Back*/
4069         offset = dissect_ansi_map_HandoffBackRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_handoffBackRes);
4070         break;
4071     case 5: /*Facilities Release*/
4072         offset = dissect_ansi_map_FacilitiesReleaseRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_facilitiesReleaseRes);
4073         break;
4074     case 6: /*Qualification Request*/
4075         offset = dissect_ansi_map_QualificationRequestRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_qualificationRequestRes);
4076         break;
4077     case 7: /*Qualification Directive*/
4078         offset = dissect_ansi_map_QualificationDirectiveRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_qualificationDirectiveRes);
4079         break;
4080     case 10: /*Reset Circuit*/
4081         offset = dissect_ansi_map_ResetCircuitRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_resetCircuitRes);
4082         break;
4083     case 13: /*Registration Notification*/
4084         offset = dissect_ansi_map_RegistrationNotificationRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_registrationNotificationRes);
4085         break;
4086     case  14: /*Registration Cancellation*/
4087         offset = dissect_ansi_map_RegistrationCancellationRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_registrationCancellationRes);
4088         break;
4089     case  15: /*Location Request*/
4090         offset = dissect_ansi_map_LocationRequestRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_locationRequestRes);
4091         break;
4092     case  16: /*Routing Request*/
4093         offset = dissect_ansi_map_RoutingRequestRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_routingRequestRes);
4094         break;
4095     case  17: /*Feature Request*/
4096         offset = dissect_ansi_map_FeatureRequestRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_featureRequestRes);
4097         break;
4098     case  23: /*Transfer To Number Request*/
4099         offset = dissect_ansi_map_TransferToNumberRequestRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_transferToNumberRequestRes);
4100         break;
4101     case  25: /*Handoff To Third*/
4102         offset = dissect_ansi_map_HandoffToThirdRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_handoffToThirdRes);
4103         break;
4104     case  26: /*Flash Request*/
4105         /* No data */
4106         proto_tree_add_text(tree, tvb, offset, -1, "No Data");
4107         break;
4108     case  27: /*Authentication Directive*/
4109         offset = dissect_ansi_map_AuthenticationDirectiveRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_authenticationDirectiveRes);
4110         break;
4111     case  28: /*Authentication Request*/
4112         offset = dissect_ansi_map_AuthenticationRequestRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_authenticationRequestRes);
4113         break;
4114     case  29: /*Base Station Challenge*/
4115         offset = dissect_ansi_map_BaseStationChallengeRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_baseStationChallengeRes);
4116         break;
4117     case  30: /*Authentication Failure Report*/
4118         offset = dissect_ansi_map_AuthenticationFailureReportRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_authenticationFailureReportRes);
4119         break;
4120     case  31: /*Count Request*/
4121         offset = dissect_ansi_map_CountRequestRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_countRequestRes);
4122         break;
4123     case  32: /*Inter System Page*/
4124         offset = dissect_ansi_map_InterSystemPageRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_interSystemPageRes);
4125         break;
4126     case  33: /*Unsolicited Response*/
4127         offset = dissect_ansi_map_UnsolicitedResponseRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_unsolicitedResponseRes);
4128         break;
4129     case  35: /*Handoff Measurement Request 2*/
4130         offset = dissect_ansi_map_HandoffMeasurementRequest2Res(TRUE, tvb, offset, actx, tree, hf_ansi_map_handoffMeasurementRequest2Res);
4131         break;
4132     case  36: /*Facilities Directive 2*/
4133         offset = dissect_ansi_map_FacilitiesDirective2Res(TRUE, tvb, offset, actx, tree, hf_ansi_map_facilitiesDirective2Res);
4134         break;
4135     case  37: /*Handoff Back 2*/
4136         offset = dissect_ansi_map_HandoffBack2Res(TRUE, tvb, offset, actx, tree, hf_ansi_map_handoffBack2Res);
4137         break;
4138     case  38: /*Handoff To Third 2*/
4139         offset = dissect_ansi_map_HandoffToThird2Res(TRUE, tvb, offset, actx, tree, hf_ansi_map_handoffToThird2Res);
4140         break;
4141     case  39: /*Authentication Directive Forward*/
4142         offset = dissect_ansi_map_AuthenticationDirectiveForwardRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_authenticationDirectiveForwardRes);
4143         break;
4144     case  40: /*Authentication Status Report*/
4145         offset = dissect_ansi_map_AuthenticationStatusReportRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_authenticationStatusReportRes);
4146         break;
4147         /*Reserved 41*/
4148     case  42: /*Information Directive*/
4149         offset = dissect_ansi_map_InformationDirectiveRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_informationDirectiveRes);
4150         break;
4151     case  43: /*Information Forward*/
4152         offset = dissect_ansi_map_InformationForwardRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_informationForwardRes);
4153         break;
4154     case  45: /*Inter System Page 2*/
4155         offset = dissect_ansi_map_InterSystemPage2Res(TRUE, tvb, offset, actx, tree, hf_ansi_map_interSystemPage2Res);
4156         break;
4157     case  46: /*Inter System Setup*/
4158         offset = dissect_ansi_map_InterSystemSetupRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_interSystemSetupRes);
4159         break;
4160     case  47: /*OriginationRequest*/
4161         offset = dissect_ansi_map_OriginationRequestRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_originationRequestRes);
4162         break;
4163     case  48: /*Random Variable Request*/
4164         offset = dissect_ansi_map_RandomVariableRequestRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_randomVariableRequestRes);
4165         break;
4166     case  50: /*Remote User Interaction Directive*/
4167         offset = dissect_ansi_map_RemoteUserInteractionDirectiveRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_remoteUserInteractionDirectiveRes);
4168         break;
4169     case  51: /*SMS Delivery Backward*/
4170         offset = dissect_ansi_map_SMSDeliveryBackwardRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_sMSDeliveryBackwardRes);
4171         break;
4172     case  52: /*SMS Delivery Forward*/
4173         offset = dissect_ansi_map_SMSDeliveryForwardRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_sMSDeliveryForwardRes);
4174         break;
4175     case  53: /*SMS Delivery Point to Point*/
4176         offset = dissect_ansi_map_SMSDeliveryPointToPointRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_sMSDeliveryPointToPointRes);
4177         break;
4178     case  54: /*SMS Notification*/
4179         offset = dissect_ansi_map_SMSNotificationRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_sMSNotificationRes);
4180         break;
4181     case  55: /*SMS Request*/
4182         offset = dissect_ansi_map_SMSRequestRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_sMSRequestRes);
4183         break;
4184         /*  N.S0008-0 v 1.0 */
4185     case  56: /*OTASP Request 6.4.2.CC*/
4186         offset = dissect_ansi_map_OTASPRequestRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_oTASPRequestRes);
4187         break;
4188         /* 57 Information Backward*/
4189     case  58: /*Change Facilities*/
4190         offset = dissect_ansi_map_ChangeFacilitiesRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_changeFacilitiesRes);
4191         break;
4192     case  59: /*Change Service*/
4193         offset = dissect_ansi_map_ChangeServiceRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_changeServiceRes);
4194         break;
4195     case  60: /*Parameter Request*/
4196         offset = dissect_ansi_map_ParameterRequestRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_parameterRequestRes);
4197         break;
4198     case  61: /*TMSI Directive*/
4199         offset = dissect_ansi_map_TMSIDirectiveRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_tMSIDirectiveRes);
4200         break;
4201     case  62: /*NumberPortabilityRequest */
4202         offset = dissect_ansi_map_NumberPortabilityRequestRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_numberPortabilityRequestRes);
4203                 break;
4204     case  63: /*Service Request*/
4205         offset = dissect_ansi_map_ServiceRequestRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_serviceRequestRes);
4206         break;
4207         /* N.S0013 */
4208     case  64: /*Analyzed Information Request*/
4209         offset = dissect_ansi_map_AnalyzedInformationRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_analyzedInformationRes);
4210         break;
4211     /* 65 Connection Failure Report*/
4212     /* 66 Connect Resource*/
4213     /* 67 Disconnect Resource*/
4214     case  68: /*Facility Selected and Available*/
4215         offset = dissect_ansi_map_FacilitySelectedAndAvailableRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_facilitySelectedAndAvailableRes);
4216         break;
4217         /* 69 Instruction Request*/
4218     case  70: /*Modify*/
4219         offset = dissect_ansi_map_ModifyRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_modifyRes);
4220         break;
4221     case  72: /*Search*/
4222         offset = dissect_ansi_map_SearchRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_searchRes);;
4223         break;
4224     case  73: /*Seize Resource*/
4225         offset = dissect_ansi_map_SeizeResourceRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_seizeResourceRes);
4226         break;
4227     case  74: /*SRF Directive*/
4228         offset = dissect_ansi_map_SRFDirectiveRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_sRFDirectiveRes);
4229         break;
4230     case  75: /*T Busy*/
4231         offset = dissect_ansi_map_TBusyRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_tBusyRes);
4232         break;
4233     case  76: /*T NoAnswer*/
4234         offset = dissect_ansi_map_TNoAnswerRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_tNoAnswerRes);
4235         break;
4236     case  81: /*Call Control Directive*/
4237         offset = dissect_ansi_map_CallControlDirectiveRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_callControlDirectiveRes);
4238         break;
4239     case  83: /*O Disconnect*/
4240         offset = dissect_ansi_map_ODisconnectRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_oDisconnectRes);
4241         break;
4242     case  86: /*T Disconnect*/
4243         offset = dissect_ansi_map_TDisconnectRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_tDisconnectRes);
4244         break;
4245     case  88: /*O CalledPartyBusy*/
4246         offset = dissect_ansi_map_OCalledPartyBusyRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_oCalledPartyBusyRes);
4247         break;
4248     case  89: /*O NoAnswer*/
4249         offset = dissect_ansi_map_ONoAnswerRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_oNoAnswerRes);
4250         break;
4251     case  90: /*Position Request*/
4252         offset = dissect_ansi_map_PositionRequestRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_positionRequestRes);
4253         break;
4254     case  91: /*Position Request Forward*/
4255         offset = dissect_ansi_map_PositionRequestForwardRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_positionRequestForwardRes);
4256         break;
4257     case  95: /*Inter System Position Request*/
4258         offset = dissect_ansi_map_InterSystemPositionRequestRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_interSystemPositionRequestRes);
4259         break;
4260     case  96: /*Inter System Position Request Forward*/
4261         offset = dissect_ansi_map_InterSystemPositionRequestForwardRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_interSystemPositionRequestRes);
4262         break;
4263     case  98: /*Roamer Database Verification Request*/
4264         offset = dissect_ansi_map_RoamerDatabaseVerificationRequestRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_roamerDatabaseVerificationRequestRes);
4265         break;
4266     case  99: /*Add Service*/
4267         offset = dissect_ansi_map_AddServiceRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_addServiceRes);
4268         break;
4269     case  100: /*Drop Service*/
4270         offset = dissect_ansi_map_DropServiceRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_dropServiceRes);
4271         break;
4272         /*End N.S0029 */
4273         /* X.S0002-0 v1.0 */
4274         /* LCSParameterRequest */
4275     case 102:
4276         offset = dissect_ansi_map_LCSParameterRequestRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_lcsParameterRequestRes);
4277         break;
4278         /* CheckMEID X.S0008-0 v1.0*/
4279     case 104:
4280         offset = dissect_ansi_map_CheckMEIDRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_checkMEIDRes);
4281         break;
4282         /* PositionEventNotification *
4283            case 106:
4284            offset = dissect_ansi_map_PositionEventNotification(TRUE, tvb, offset, actx, tree, hf_ansi_map_positionEventNotificationRes);
4285            break;
4286         */
4287     case 107:
4288         /* StatusRequest X.S0008-0 v1.0*/
4289         offset = dissect_ansi_map_StatusRequestRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_statusRequestRes);
4290         break;
4291         case 111:
4292                 /* InterSystemSMSDeliveryPointToPointRes X.S0004-540-E v2.0 */
4293                 offset = dissect_ansi_map_InterSystemSMSDeliveryPointToPointRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_interSystemSMSDeliveryPointToPointRes);
4294                 break;
4295         case 112:
4296                 /* QualificationRequest2Res 112 X.S0004-540-E v2.0*/
4297                 offset = dissect_ansi_map_QualificationRequest2Res(TRUE, tvb, offset, actx, tree, hf_ansi_map_qualificationRequest2Res);
4298                 break;
4299     default:
4300         proto_tree_add_text(tree, tvb, offset, -1, "Unknown invokeData blob");
4301         opCodeKnown = FALSE;
4302         break;
4303     }
4304
4305     if (opCodeKnown)
4306     {
4307         tap_p->message_type = OperationCode;
4308         tap_p->size = 0;        /* should be number of octets in message */
4309
4310         tap_queue_packet(ansi_map_tap, g_pinfo, tap_p);
4311     }
4312
4313     return offset;
4314 }
4315
4316 static int
4317 find_saved_invokedata(asn1_ctx_t *actx){
4318     struct ansi_map_invokedata_t *ansi_map_saved_invokedata;
4319     struct ansi_tcap_private_t *p_private_tcap;
4320     address* src = &(actx->pinfo->src);
4321     address* dst = &(actx->pinfo->dst);
4322     guint8 *src_str;
4323     guint8 *dst_str;
4324     char *buf;
4325
4326     buf=ep_alloc(1024);
4327
4328     /* Data from the TCAP dissector */
4329     if (actx->pinfo->private_data != NULL){
4330         p_private_tcap=(struct ansi_tcap_private_t *)actx->pinfo->private_data;
4331         /* The hash string needs to contain src and dest to distiguish differnt flows */
4332         src_str = ep_address_to_str(src);
4333         dst_str = ep_address_to_str(dst);
4334         /* Reverse order to invoke */
4335                 switch(ansi_map_response_matching_type){
4336                         case ANSI_MAP_TID_ONLY:
4337                                 g_snprintf(buf,1024,"%s",p_private_tcap->TransactionID_str);
4338                                 break;
4339                         case 1:
4340                                 g_snprintf(buf,1024,"%s%s",p_private_tcap->TransactionID_str,dst_str);
4341                                 break;
4342                         default:
4343                                 g_snprintf(buf,1024,"%s%s%s",p_private_tcap->TransactionID_str,dst_str,src_str);
4344                                 break;
4345                 }
4346
4347                 /*g_warning("Find Hash string %s pkt: %u",buf,actx->pinfo->fd->num);*/
4348         ansi_map_saved_invokedata = (struct ansi_map_invokedata_t *)g_hash_table_lookup(TransactionId_table, buf);
4349         if(ansi_map_saved_invokedata){
4350             OperationCode = ansi_map_saved_invokedata->opcode & 0xff;
4351             ServiceIndicator = ansi_map_saved_invokedata->ServiceIndicator;
4352         }else{
4353             OperationCode = OperationCode & 0x00ff;
4354         }
4355     }else{
4356                 /*g_warning("No private data pkt: %u",actx->pinfo->fd->num);*/
4357         OperationCode = OperationCode & 0x00ff;
4358     }
4359     return OperationCode;
4360 }
4361
4362 static void
4363 dissect_ansi_map(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
4364 {
4365     proto_item *ansi_map_item;
4366     proto_tree *ansi_map_tree = NULL;
4367     int        offset = 0;
4368     struct ansi_tcap_private_t *p_private_tcap;
4369     asn1_ctx_t asn1_ctx;
4370     asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
4371
4372     SMS_BearerData_tvb = NULL;
4373     ansi_map_sms_tele_id = -1;
4374     g_pinfo = pinfo;
4375     g_tree = tree;
4376     /*
4377      * Make entry in the Protocol column on summary display
4378      */
4379     col_set_str(pinfo->cinfo, COL_PROTOCOL, "ANSI MAP");
4380
4381     /* Data from the TCAP dissector */
4382     if (pinfo->private_data == NULL){
4383         proto_tree_add_text(tree, tvb, 0, -1, "Dissector ERROR this dissector relays on private data");
4384         return;
4385     }
4386
4387     /*
4388      * create the ansi_map protocol tree
4389      */
4390     ansi_map_item = proto_tree_add_item(tree, proto_ansi_map, tvb, 0, -1, ENC_NA);
4391     ansi_map_tree = proto_item_add_subtree(ansi_map_item, ett_ansi_map);
4392     ansi_map_is_invoke = FALSE;
4393     is683_ota = FALSE;
4394     is801_pld = FALSE;
4395     ServiceIndicator = 0;
4396
4397     p_private_tcap=(struct ansi_tcap_private_t *)pinfo->private_data;
4398
4399     switch(p_private_tcap->d.pdu){
4400         /*
4401            1 : invoke,
4402            2 : returnResult,
4403            3 : returnError,
4404            4 : reject
4405         */
4406     case 1:
4407         OperationCode = p_private_tcap->d.OperationCode_private & 0x00ff;
4408         ansi_map_is_invoke = TRUE;
4409         col_add_fstr(pinfo->cinfo, COL_INFO,"%s Invoke ", val_to_str_ext(OperationCode, &ansi_map_opr_code_strings_ext, "Unknown ANSI-MAP PDU (%u)"));
4410         proto_item_append_text(p_private_tcap->d.OperationCode_item," %s",val_to_str_ext(OperationCode, &ansi_map_opr_code_strings_ext, "Unknown ANSI-MAP PDU (%u)"));
4411         dissect_invokeData(ansi_map_tree, tvb, 0, &asn1_ctx);
4412         update_saved_invokedata(pinfo, ansi_map_tree, tvb);
4413         break;
4414     case 2:
4415         OperationCode = find_saved_invokedata(&asn1_ctx);
4416         col_add_fstr(pinfo->cinfo, COL_INFO,"%s ReturnResult ", val_to_str_ext(OperationCode, &ansi_map_opr_code_strings_ext, "Unknown ANSI-MAP PDU (%u)"));
4417         proto_item_append_text(p_private_tcap->d.OperationCode_item," %s",val_to_str_ext(OperationCode, &ansi_map_opr_code_strings_ext, "Unknown ANSI-MAP PDU (%u)"));
4418         dissect_returnData(ansi_map_tree, tvb, 0, &asn1_ctx);
4419         break;
4420     case 3:
4421         col_add_fstr(pinfo->cinfo, COL_INFO,"%s ReturnError ", val_to_str_ext(OperationCode, &ansi_map_opr_code_strings_ext, "Unknown ANSI-MAP PDU (%u)"));
4422         break;
4423     case 4:
4424         col_add_fstr(pinfo->cinfo, COL_INFO,"%s Reject ", val_to_str_ext(OperationCode, &ansi_map_opr_code_strings_ext, "Unknown ANSI-MAP PDU (%u)"));
4425         break;
4426     default:
4427         /* Must be Invoke ReturnResult ReturnError or Reject */
4428         DISSECTOR_ASSERT_NOT_REACHED();
4429         break;
4430     }
4431 }
4432
4433 static void range_delete_callback(guint32 ssn)
4434 {
4435     if (ssn) {
4436         delete_ansi_tcap_subdissector(ssn , ansi_map_handle);
4437     }
4438 }
4439
4440 static void range_add_callback(guint32 ssn)
4441 {
4442     if (ssn) {
4443         add_ansi_tcap_subdissector(ssn , ansi_map_handle);
4444     }
4445 }
4446
4447 void
4448 proto_reg_handoff_ansi_map(void)
4449 {
4450     static gboolean ansi_map_prefs_initialized = FALSE;
4451     static range_t *ssn_range;
4452
4453     if(!ansi_map_prefs_initialized)
4454     {
4455         ansi_map_prefs_initialized = TRUE;
4456         ansi_map_handle = find_dissector("ansi_map");
4457     }
4458     else
4459     {
4460         range_foreach(ssn_range, range_delete_callback);
4461         g_free(ssn_range);
4462     }
4463
4464     ssn_range = range_copy(global_ssn_range);
4465
4466     range_foreach(ssn_range, range_add_callback);
4467 }
4468
4469 /*--- proto_register_ansi_map -------------------------------------------*/
4470 void proto_register_ansi_map(void) {
4471
4472     module_t    *ansi_map_module;
4473
4474     /* List of fields */
4475     static hf_register_info hf[] = {
4476
4477         { &hf_ansi_map_op_code_fam,
4478           { "Operation Code Family", "ansi_map.op_code_fam",
4479             FT_UINT8, BASE_DEC, NULL, 0,
4480             NULL, HFILL }},
4481         { &hf_ansi_map_reservedBitH,
4482           { "Reserved", "ansi_map.reserved_bitH",
4483             FT_BOOLEAN, 8, NULL,0x80,
4484             NULL, HFILL }},
4485         { &hf_ansi_map_reservedBitD,
4486           { "Reserved", "ansi_map.reserved_bitD",
4487             FT_BOOLEAN, 8, NULL,0x08,
4488             NULL, HFILL }},
4489         { &hf_ansi_map_reservedBitHG,
4490           { "Reserved", "ansi_map.reserved_bitHG",
4491             FT_UINT8, BASE_DEC, NULL, 0xc0,
4492             NULL, HFILL }},
4493         { &hf_ansi_map_reservedBitHGFE,
4494           { "Reserved", "ansi_map.reserved_bitHGFE",
4495             FT_UINT8, BASE_DEC, NULL, 0xf0,
4496             NULL, HFILL }},
4497         { &hf_ansi_map_reservedBitFED,
4498           { "Reserved", "ansi_map.reserved_bitFED",
4499             FT_UINT8, BASE_DEC, NULL, 0x38,
4500             NULL, HFILL }},
4501         { &hf_ansi_map_reservedBitED,
4502           { "Reserved", "ansi_map.reserved_bitED",
4503             FT_UINT8, BASE_DEC, NULL, 0x18,
4504             NULL, HFILL }},
4505         { &hf_ansi_map_op_code,
4506           { "Operation Code", "ansi_map.op_code",
4507             FT_UINT8, BASE_DEC|BASE_EXT_STRING, &ansi_map_opr_code_strings_ext, 0x0,
4508             NULL, HFILL }},
4509         { &hf_ansi_map_type_of_digits,
4510           { "Type of Digits", "ansi_map.type_of_digits",
4511             FT_UINT8, BASE_DEC, VALS(ansi_map_type_of_digits_vals), 0x0,
4512             NULL, HFILL }},
4513         { &hf_ansi_map_na,
4514           { "Nature of Number", "ansi_map.na",
4515             FT_BOOLEAN, 8, TFS(&ansi_map_na_bool_val),0x01,
4516             NULL, HFILL }},
4517         { &hf_ansi_map_pi,
4518           { "Presentation Indication", "ansi_map.type_of_pi",
4519             FT_BOOLEAN, 8, TFS(&ansi_map_pi_bool_val),0x02,
4520             NULL, HFILL }},
4521         { &hf_ansi_map_navail,
4522           { "Number available indication", "ansi_map.navail",
4523             FT_BOOLEAN, 8, TFS(&ansi_map_navail_bool_val),0x04,
4524             NULL, HFILL }},
4525         { &hf_ansi_map_si,
4526           { "Screening indication", "ansi_map.si",
4527             FT_UINT8, BASE_DEC, VALS(ansi_map_si_vals), 0x30,
4528             NULL, HFILL }},
4529         { &hf_ansi_map_digits_enc,
4530           { "Encoding", "ansi_map.enc",
4531             FT_UINT8, BASE_DEC, VALS(ansi_map_digits_enc_vals), 0x0f,
4532             NULL, HFILL }},
4533         { &hf_ansi_map_np,
4534           { "Numbering Plan", "ansi_map.np",
4535             FT_UINT8, BASE_DEC, VALS(ansi_map_np_vals), 0xf0,
4536             NULL, HFILL }},
4537         { &hf_ansi_map_nr_digits,
4538           { "Number of Digits", "ansi_map.nr_digits",
4539             FT_UINT8, BASE_DEC, NULL, 0x0,
4540             NULL, HFILL }},
4541         { &hf_ansi_map_bcd_digits,
4542           { "BCD digits", "ansi_map.bcd_digits",
4543             FT_STRING, BASE_NONE, NULL, 0,
4544             NULL, HFILL }},
4545         { &hf_ansi_map_ia5_digits,
4546           { "IA5 digits", "ansi_map.ia5_digits",
4547             FT_STRING, BASE_NONE, NULL, 0,
4548             NULL, HFILL }},
4549         { &hf_ansi_map_subaddr_type,
4550           { "Type of Subaddress", "ansi_map.subaddr_type",
4551             FT_UINT8, BASE_DEC, VALS(ansi_map_sub_addr_type_vals), 0x70,
4552             NULL, HFILL }},
4553         { &hf_ansi_map_subaddr_odd_even,
4554           { "Odd/Even Indicator", "ansi_map.subaddr_odd_even",
4555             FT_BOOLEAN, 8, TFS(&ansi_map_navail_bool_val),0x08,
4556             NULL, HFILL }},
4557
4558         { &hf_ansi_alertcode_cadence,
4559           { "Cadence", "ansi_map.alertcode.cadence",
4560             FT_UINT8, BASE_DEC, VALS(ansi_map_AlertCode_Cadence_vals), 0x3f,
4561             NULL, HFILL }},
4562         { &hf_ansi_alertcode_pitch,
4563           { "Pitch", "ansi_map.alertcode.pitch",
4564             FT_UINT8, BASE_DEC, VALS(ansi_map_AlertCode_Pitch_vals), 0xc0,
4565             NULL, HFILL }},
4566         { &hf_ansi_alertcode_alertaction,
4567           { "Alert Action", "ansi_map.alertcode.alertaction",
4568             FT_UINT8, BASE_DEC, VALS(ansi_map_AlertCode_Alert_Action_vals), 0x07,
4569             NULL, HFILL }},
4570         { &hf_ansi_map_announcementcode_tone,
4571           { "Tone", "ansi_map.announcementcode.tone",
4572             FT_UINT8, BASE_DEC, VALS(ansi_map_AnnouncementCode_tone_vals), 0x0,
4573             NULL, HFILL }},
4574         { &hf_ansi_map_announcementcode_class,
4575           { "Tone", "ansi_map.announcementcode.class",
4576             FT_UINT8, BASE_DEC, VALS(ansi_map_AnnouncementCode_class_vals), 0xf,
4577             NULL, HFILL }},
4578         { &hf_ansi_map_announcementcode_std_ann,
4579           { "Standard Announcement", "ansi_map.announcementcode.std_ann",
4580             FT_UINT8, BASE_DEC, VALS(ansi_map_AnnouncementCode_std_ann_vals), 0x0,
4581             NULL, HFILL }},
4582         { &hf_ansi_map_announcementcode_cust_ann,
4583           { "Custom Announcement", "ansi_map.announcementcode.cust_ann",
4584             FT_UINT8, BASE_DEC, NULL, 0x0,
4585             NULL, HFILL }},
4586         { &hf_ansi_map_authorizationperiod_period,
4587           { "Period", "ansi_map.authorizationperiod.period",
4588             FT_UINT8, BASE_DEC, VALS(ansi_map_authorizationperiod_period_vals), 0x0,
4589             NULL, HFILL }},
4590         { &hf_ansi_map_value,
4591           { "Value", "ansi_map.value",
4592             FT_UINT8, BASE_DEC, NULL, 0x0,
4593             NULL, HFILL }},
4594         { &hf_ansi_map_msc_type,
4595           { "Type", "ansi_map.extendedmscid.type",
4596             FT_UINT8, BASE_DEC, VALS(ansi_map_msc_type_vals), 0x0,
4597             NULL, HFILL }},
4598         { &hf_ansi_map_handoffstate_pi,
4599           { "Party Involved (PI)", "ansi_map.handoffstate.pi",
4600             FT_BOOLEAN, 8, TFS(&ansi_map_HandoffState_pi_bool_val),0x01,
4601             NULL, HFILL }},
4602         { &hf_ansi_map_tgn,
4603           { "Trunk Group Number (G)", "ansi_map.tgn",
4604             FT_UINT8, BASE_DEC, NULL,0x0,
4605             NULL, HFILL }},
4606         { &hf_ansi_map_tmn,
4607           { "Trunk Member Number (M)", "ansi_map.tmn",
4608             FT_UINT8, BASE_DEC, NULL,0x0,
4609             NULL, HFILL }},
4610         { &hf_ansi_map_messagewaitingnotificationcount_tom,
4611           { "Type of messages", "ansi_map.messagewaitingnotificationcount.tom",
4612             FT_UINT8, BASE_DEC, VALS(ansi_map_MessageWaitingNotificationCount_type_vals), 0x0,
4613             NULL, HFILL }},
4614         { &hf_ansi_map_messagewaitingnotificationcount_no_mw,
4615           { "Number of Messages Waiting", "ansi_map.messagewaitingnotificationcount.nomw",
4616             FT_UINT8, BASE_DEC, NULL,0x0,
4617             NULL, HFILL }},
4618         { &hf_ansi_map_messagewaitingnotificationtype_mwi,
4619           { "Message Waiting Indication (MWI)", "ansi_map.messagewaitingnotificationcount.mwi",
4620             FT_UINT8, BASE_DEC, VALS(ansi_map_MessageWaitingNotificationType_mwi_vals), 0x0,
4621             NULL, HFILL }},
4622         { &hf_ansi_map_messagewaitingnotificationtype_apt,
4623           { "Alert Pip Tone (APT)", "ansi_map.messagewaitingnotificationtype.apt",
4624             FT_BOOLEAN, 8, TFS(&ansi_map_HandoffState_pi_bool_val),0x02,
4625             NULL, HFILL }},
4626         { &hf_ansi_map_messagewaitingnotificationtype_pt,
4627           { "Pip Tone (PT)", "ansi_map.messagewaitingnotificationtype.pt",
4628             FT_UINT8, BASE_DEC, VALS(ansi_map_MessageWaitingNotificationType_mwi_vals), 0xc0,
4629             NULL, HFILL }},
4630
4631         { &hf_ansi_map_trans_cap_prof,
4632           { "Profile (PROF)", "ansi_map.trans_cap_prof",
4633             FT_BOOLEAN, 8, TFS(&ansi_map_trans_cap_prof_bool_val),0x01,
4634             NULL, HFILL }},
4635         { &hf_ansi_map_trans_cap_busy,
4636           { "Busy Detection (BUSY)", "ansi_map.trans_cap_busy",
4637             FT_BOOLEAN, 8, TFS(&ansi_map_trans_cap_busy_bool_val),0x02,
4638             NULL, HFILL }},
4639         { &hf_ansi_map_trans_cap_ann,
4640           { "Announcements (ANN)", "ansi_map.trans_cap_ann",
4641             FT_BOOLEAN, 8, TFS(&ansi_map_trans_cap_ann_bool_val),0x04,
4642             NULL, HFILL }},
4643         { &hf_ansi_map_trans_cap_rui,
4644           { "Remote User Interaction (RUI)", "ansi_map.trans_cap_rui",
4645             FT_BOOLEAN, 8, TFS(&ansi_map_trans_cap_rui_bool_val),0x08,
4646             NULL, HFILL }},
4647         { &hf_ansi_map_trans_cap_spini,
4648           { "Subscriber PIN Intercept (SPINI)", "ansi_map.trans_cap_spini",
4649             FT_BOOLEAN, 8, TFS(&ansi_map_trans_cap_spini_bool_val),0x10,
4650             NULL, HFILL }},
4651         { &hf_ansi_map_trans_cap_uzci,
4652           { "UZ Capability Indicator (UZCI)", "ansi_map.trans_cap_uzci",
4653             FT_BOOLEAN, 8, TFS(&ansi_map_trans_cap_uzci_bool_val),0x20,
4654             NULL, HFILL }},
4655         { &hf_ansi_map_trans_cap_ndss,
4656           { "NDSS Capability (NDSS)", "ansi_map.trans_cap_ndss",
4657             FT_BOOLEAN, 8, TFS(&ansi_map_trans_cap_ndss_bool_val),0x40,
4658             NULL, HFILL }},
4659         { &hf_ansi_map_trans_cap_nami,
4660           { "NAME Capability Indicator (NAMI)", "ansi_map.trans_cap_nami",
4661             FT_BOOLEAN, 8, TFS(&ansi_map_trans_cap_nami_bool_val),0x80,
4662             NULL, HFILL }},
4663         { &hf_ansi_trans_cap_multerm,
4664           { "Multiple Terminations", "ansi_map.trans_cap_multerm",
4665             FT_UINT8, BASE_DEC, VALS(ansi_map_trans_cap_multerm_vals), 0x0f,
4666             NULL, HFILL }},
4667         { &hf_ansi_map_terminationtriggers_busy,
4668           { "Busy", "ansi_map.terminationtriggers.busy",
4669             FT_UINT8, BASE_DEC, VALS(ansi_map_terminationtriggers_busy_vals), 0x03,
4670             NULL, HFILL }},
4671         { &hf_ansi_map_terminationtriggers_rf,
4672           { "Routing Failure (RF)", "ansi_map.terminationtriggers.rf",
4673             FT_UINT8, BASE_DEC, VALS(ansi_map_terminationtriggers_rf_vals), 0x0c,
4674             NULL, HFILL }},
4675         { &hf_ansi_map_terminationtriggers_npr,
4676           { "No Page Response (NPR)", "ansi_map.terminationtriggers.npr",
4677             FT_UINT8, BASE_DEC, VALS(ansi_map_terminationtriggers_npr_vals), 0x30,
4678             NULL, HFILL }},
4679         { &hf_ansi_map_terminationtriggers_na,
4680           { "No Answer (NA)", "ansi_map.terminationtriggers.na",
4681             FT_UINT8, BASE_DEC, VALS(ansi_map_terminationtriggers_na_vals), 0xc0,
4682             NULL, HFILL }},
4683         { &hf_ansi_map_terminationtriggers_nr,
4684           { "None Reachable (NR)", "ansi_map.terminationtriggers.nr",
4685             FT_UINT8, BASE_DEC, VALS(ansi_map_terminationtriggers_nr_vals), 0x01,
4686             NULL, HFILL }},
4687         { &hf_ansi_trans_cap_tl,
4688           { "TerminationList (TL)", "ansi_map.trans_cap_tl",
4689             FT_BOOLEAN, 8, TFS(&ansi_map_trans_cap_tl_bool_val),0x10,
4690             NULL, HFILL }},
4691         { &hf_ansi_map_cdmaserviceoption,
4692           { "CDMAServiceOption", "ansi_map.cdmaserviceoption",
4693             FT_UINT16, BASE_RANGE_STRING | BASE_DEC, RVALS(&cdmaserviceoption_vals), 0x0,
4694             NULL, HFILL }},
4695         { &hf_ansi_trans_cap_waddr,
4696           { "WIN Addressing (WADDR)", "ansi_map.trans_cap_waddr",
4697             FT_BOOLEAN, 8, TFS(&ansi_map_trans_cap_waddr_bool_val),0x20,
4698             NULL, HFILL }},
4699
4700         { &hf_ansi_map_MarketID,
4701           { "MarketID", "ansi_map.marketid",
4702             FT_UINT16, BASE_DEC, NULL, 0,
4703             NULL, HFILL }},
4704         { &hf_ansi_map_swno,
4705           { "Switch Number (SWNO)", "ansi_map.swno",
4706             FT_UINT8, BASE_DEC, NULL, 0,
4707             NULL, HFILL }},
4708         { &hf_ansi_map_idno,
4709           { "ID Number", "ansi_map.idno",
4710             FT_UINT32, BASE_DEC, NULL, 0,
4711             NULL, HFILL }},
4712         { &hf_ansi_map_segcount,
4713           { "Segment Counter", "ansi_map.segcount",
4714             FT_UINT8, BASE_DEC, NULL, 0,
4715             NULL, HFILL }},
4716         { &hf_ansi_map_sms_originationrestrictions_direct,
4717           { "DIRECT", "ansi_map.originationrestrictions.direct",
4718             FT_BOOLEAN, 8, TFS(&ansi_map_SMS_OriginationRestrictions_direct_bool_val),0x04,
4719             NULL, HFILL }},
4720         { &hf_ansi_map_sms_originationrestrictions_default,
4721           { "DEFAULT", "ansi_map.originationrestrictions.default",
4722             FT_UINT8, BASE_DEC, VALS(ansi_map_SMS_OriginationRestrictions_default_vals), 0x03,
4723             NULL, HFILL }},
4724         { &hf_ansi_map_sms_originationrestrictions_fmc,
4725           { "Force Message Center (FMC)", "ansi_map.originationrestrictions.fmc",
4726             FT_BOOLEAN, 8, TFS(&ansi_map_SMS_OriginationRestrictions_fmc_bool_val),0x08,
4727             NULL, HFILL }},
4728
4729         { &hf_ansi_map_systemcapabilities_auth,
4730           { "Authentication Parameters Requested (AUTH)", "ansi_map.systemcapabilities.auth",
4731             FT_BOOLEAN, 8, TFS(&ansi_map_systemcapabilities_auth_bool_val),0x01,
4732             NULL, HFILL }},
4733         { &hf_ansi_map_systemcapabilities_se,
4734           { "Signaling Message Encryption Capable (SE )", "ansi_map.systemcapabilities.se",
4735             FT_BOOLEAN, 8, TFS(&ansi_map_systemcapabilities_se_bool_val),0x02,
4736             NULL, HFILL }},
4737         { &hf_ansi_map_systemcapabilities_vp,
4738           { "Voice Privacy Capable (VP )", "ansi_map.systemcapabilities.vp",
4739             FT_BOOLEAN, 8, TFS(&ansi_map_systemcapabilities_vp_bool_val),0x04,
4740             NULL, HFILL }},
4741         { &hf_ansi_map_systemcapabilities_cave,
4742           { "CAVE Algorithm Capable (CAVE)", "ansi_map.systemcapabilities.cave",
4743             FT_BOOLEAN, 8, TFS(&ansi_map_systemcapabilities_cave_bool_val),0x08,
4744             NULL, HFILL }},
4745         { &hf_ansi_map_systemcapabilities_ssd,
4746           { "Shared SSD (SSD)", "ansi_map.systemcapabilities.ssd",
4747             FT_BOOLEAN, 8, TFS(&ansi_map_systemcapabilities_ssd_bool_val),0x10,
4748             NULL, HFILL }},
4749         { &hf_ansi_map_systemcapabilities_dp,
4750           { "Data Privacy (DP)", "ansi_map.systemcapabilities.dp",
4751             FT_BOOLEAN, 8, TFS(&ansi_map_systemcapabilities_dp_bool_val),0x20,
4752             NULL, HFILL }},
4753
4754         { &hf_ansi_map_mslocation_lat,
4755           { "Latitude in tenths of a second", "ansi_map.mslocation.lat",
4756             FT_UINT8, BASE_DEC, NULL, 0,
4757             NULL, HFILL }},
4758         { &hf_ansi_map_mslocation_long,
4759           { "Longitude in tenths of a second", "ansi_map.mslocation.long",
4760             FT_UINT8, BASE_DEC, NULL, 0,
4761             "Switch Number (SWNO)", HFILL }},
4762         { &hf_ansi_map_mslocation_res,
4763           { "Resolution in units of 1 foot", "ansi_map.mslocation.res",
4764             FT_UINT8, BASE_DEC, NULL, 0,
4765             NULL, HFILL }},
4766         { &hf_ansi_map_nampscallmode_namps,
4767           { "Call Mode", "ansi_map.nampscallmode.namps",
4768             FT_BOOLEAN, 8, TFS(&ansi_map_CallMode_namps_bool_val),0x01,
4769             NULL, HFILL }},
4770         { &hf_ansi_map_nampscallmode_amps,
4771           { "Call Mode", "ansi_map.nampscallmode.amps",
4772             FT_BOOLEAN, 8, TFS(&ansi_map_CallMode_amps_bool_val),0x02,
4773             NULL, HFILL }},
4774         { &hf_ansi_map_nampschanneldata_navca,
4775           { "Narrow Analog Voice Channel Assignment (NAVCA)", "ansi_map.nampschanneldata.navca",
4776             FT_UINT8, BASE_DEC, VALS(ansi_map_NAMPSChannelData_navca_vals), 0x03,
4777             NULL, HFILL }},
4778         { &hf_ansi_map_nampschanneldata_CCIndicator,
4779           { "Color Code Indicator (CCIndicator)", "ansi_map.nampschanneldata.ccindicator",
4780             FT_UINT8, BASE_DEC, VALS(ansi_map_NAMPSChannelData_ccinidicator_vals), 0x1c,
4781             NULL, HFILL }},
4782
4783
4784         { &hf_ansi_map_callingfeaturesindicator_cfufa,
4785           { "Call Forwarding Unconditional FeatureActivity, CFU-FA", "ansi_map.callingfeaturesindicator.cfufa",
4786             FT_UINT8, BASE_DEC, VALS(ansi_map_FeatureActivity_vals), 0x03,
4787             NULL, HFILL }},
4788         { &hf_ansi_map_callingfeaturesindicator_cfbfa,
4789           { "Call Forwarding Busy FeatureActivity, CFB-FA", "ansi_map.callingfeaturesindicator.cfbafa",
4790             FT_UINT8, BASE_DEC, VALS(ansi_map_FeatureActivity_vals), 0x0c,
4791             NULL, HFILL }},
4792         { &hf_ansi_map_callingfeaturesindicator_cfnafa,
4793           { "Call Forwarding No Answer FeatureActivity, CFNA-FA", "ansi_map.callingfeaturesindicator.cfnafa",
4794             FT_UINT8, BASE_DEC, VALS(ansi_map_FeatureActivity_vals), 0x30,
4795             NULL, HFILL }},
4796         { &hf_ansi_map_callingfeaturesindicator_cwfa,
4797           { "Call Waiting: FeatureActivity, CW-FA", "ansi_map.callingfeaturesindicator.cwfa",
4798             FT_UINT8, BASE_DEC, VALS(ansi_map_FeatureActivity_vals), 0xc0,
4799             NULL, HFILL }},
4800
4801         { &hf_ansi_map_callingfeaturesindicator_3wcfa,
4802           { "Three-Way Calling FeatureActivity, 3WC-FA", "ansi_map.callingfeaturesindicator.3wcfa",
4803             FT_UINT8, BASE_DEC, VALS(ansi_map_FeatureActivity_vals), 0x03,
4804             NULL, HFILL }},
4805
4806         { &hf_ansi_map_callingfeaturesindicator_pcwfa,
4807           { "Priority Call Waiting FeatureActivity PCW-FA", "ansi_map.callingfeaturesindicator.pcwfa",
4808             FT_UINT8, BASE_DEC, VALS(ansi_map_FeatureActivity_vals), 0x03,
4809             NULL, HFILL }},
4810
4811         { &hf_ansi_map_callingfeaturesindicator_dpfa,
4812           { "Data Privacy Feature Activity DP-FA", "ansi_map.callingfeaturesindicator.dpfa",
4813             FT_UINT8, BASE_DEC, VALS(ansi_map_FeatureActivity_vals), 0x0c,
4814             NULL, HFILL }},
4815         { &hf_ansi_map_callingfeaturesindicator_ahfa,
4816           { "Answer Hold: FeatureActivity AH-FA", "ansi_map.callingfeaturesindicator.ahfa",
4817             FT_UINT8, BASE_DEC, VALS(ansi_map_FeatureActivity_vals), 0x30,
4818             NULL, HFILL }},
4819         { &hf_ansi_map_callingfeaturesindicator_uscfvmfa,
4820           { "USCF divert to voice mail: FeatureActivity USCFvm-FA", "ansi_map.callingfeaturesindicator.uscfvmfa",
4821             FT_UINT8, BASE_DEC, VALS(ansi_map_FeatureActivity_vals), 0xc0,
4822             NULL, HFILL }},
4823
4824         { &hf_ansi_map_callingfeaturesindicator_uscfmsfa,
4825           { "USCF divert to mobile station provided DN:FeatureActivity.USCFms-FA", "ansi_map.callingfeaturesindicator.uscfmsfa",
4826             FT_UINT8, BASE_DEC, VALS(ansi_map_FeatureActivity_vals), 0x03,
4827             NULL, HFILL }},
4828         { &hf_ansi_map_callingfeaturesindicator_uscfnrfa,
4829           { "USCF divert to network registered DN:FeatureActivity. USCFnr-FA", "ansi_map.callingfeaturesindicator.uscfnrfa",
4830             FT_UINT8, BASE_DEC, VALS(ansi_map_FeatureActivity_vals), 0x0c,
4831             NULL, HFILL }},
4832         { &hf_ansi_map_callingfeaturesindicator_cpdsfa,
4833           { "CDMA-Packet Data Service: FeatureActivity. CPDS-FA", "ansi_map.callingfeaturesindicator.cpdfa",
4834             FT_UINT8, BASE_DEC, VALS(ansi_map_FeatureActivity_vals), 0x30,
4835             NULL, HFILL }},
4836         { &hf_ansi_map_callingfeaturesindicator_ccsfa,
4837           { "CDMA-Concurrent Service:FeatureActivity. CCS-FA", "ansi_map.callingfeaturesindicator.ccsfa",
4838             FT_UINT8, BASE_DEC, VALS(ansi_map_FeatureActivity_vals), 0xc0,
4839             NULL, HFILL }},
4840
4841         { &hf_ansi_map_callingfeaturesindicator_epefa,
4842           { "TDMA Enhanced Privacy and Encryption:FeatureActivity.TDMA EPE-FA", "ansi_map.callingfeaturesindicator.epefa",
4843             FT_UINT8, BASE_DEC, VALS(ansi_map_FeatureActivity_vals), 0x03,
4844             NULL, HFILL }},
4845
4846
4847         { &hf_ansi_map_callingfeaturesindicator_cdfa,
4848           { "Call Delivery: FeatureActivity, CD-FA", "ansi_map.callingfeaturesindicator.cdfa",
4849             FT_UINT8, BASE_DEC, VALS(ansi_map_FeatureActivity_vals), 0x0c,
4850             NULL, HFILL }},
4851         { &hf_ansi_map_callingfeaturesindicator_vpfa,
4852           { "Voice Privacy FeatureActivity, VP-FA", "ansi_map.callingfeaturesindicator.vpfa",
4853             FT_UINT8, BASE_DEC, VALS(ansi_map_FeatureActivity_vals), 0x30,
4854             NULL, HFILL }},
4855         { &hf_ansi_map_callingfeaturesindicator_ctfa,
4856           { "Call Transfer: FeatureActivity, CT-FA", "ansi_map.callingfeaturesindicator.ctfa",
4857             FT_UINT8, BASE_DEC, VALS(ansi_map_FeatureActivity_vals), 0xc0,
4858             NULL, HFILL }},
4859
4860         { &hf_ansi_map_callingfeaturesindicator_cnip1fa,
4861           { "One number (network-provided only) Calling Number Identification Presentation: FeatureActivity CNIP1-FA", "ansi_map.callingfeaturesindicator.cnip1fa",
4862             FT_UINT8, BASE_DEC, VALS(ansi_map_FeatureActivity_vals), 0x03,
4863             NULL, HFILL }},
4864         { &hf_ansi_map_callingfeaturesindicator_cnip2fa,
4865           { "Two number (network-provided and user-provided) Calling Number Identification Presentation: FeatureActivity CNIP2-FA", "ansi_map.callingfeaturesindicator.cnip2fa",
4866             FT_UINT8, BASE_DEC, VALS(ansi_map_FeatureActivity_vals), 0x0c,
4867             NULL, HFILL }},
4868         { &hf_ansi_map_callingfeaturesindicator_cnirfa,
4869           { "Calling Number Identification Restriction: FeatureActivity CNIR-FA", "ansi_map.callingfeaturesindicator.cnirfa",
4870             FT_UINT8, BASE_DEC, VALS(ansi_map_FeatureActivity_vals), 0x30,
4871             NULL, HFILL }},
4872         { &hf_ansi_map_callingfeaturesindicator_cniroverfa,
4873           { "Calling Number Identification Restriction Override FeatureActivity CNIROver-FA", "ansi_map.callingfeaturesindicator.cniroverfa",
4874             FT_UINT8, BASE_DEC, VALS(ansi_map_FeatureActivity_vals), 0xc0,
4875             NULL, HFILL }},
4876
4877         { &hf_ansi_map_cdmacallmode_cdma,
4878           { "Call Mode", "ansi_map.cdmacallmode.cdma",
4879             FT_BOOLEAN, 8, TFS(&ansi_map_CDMACallMode_cdma_bool_val),0x01,
4880             NULL, HFILL }},
4881         { &hf_ansi_map_cdmacallmode_amps,
4882           { "Call Mode", "ansi_map.cdmacallmode.amps",
4883             FT_BOOLEAN, 8, TFS(&ansi_map_CallMode_amps_bool_val),0x02,
4884             NULL, HFILL }},
4885         { &hf_ansi_map_cdmacallmode_namps,
4886           { "Call Mode", "ansi_map.cdmacallmode.namps",
4887             FT_BOOLEAN, 8, TFS(&ansi_map_CallMode_namps_bool_val),0x04,
4888             NULL, HFILL }},
4889         { &hf_ansi_map_cdmacallmode_cls1,
4890           { "Call Mode", "ansi_map.cdmacallmode.cls1",
4891             FT_BOOLEAN, 8, TFS(&ansi_map_CDMACallMode_cls1_bool_val),0x08,
4892             NULL, HFILL }},
4893         { &hf_ansi_map_cdmacallmode_cls2,
4894           { "Call Mode", "ansi_map.cdmacallmode.cls2",
4895             FT_BOOLEAN, 8, TFS(&ansi_map_CDMACallMode_cls2_bool_val),0x10,
4896             NULL, HFILL }},
4897         { &hf_ansi_map_cdmacallmode_cls3,
4898           { "Call Mode", "ansi_map.cdmacallmode.cls3",
4899             FT_BOOLEAN, 8, TFS(&ansi_map_CDMACallMode_cls3_bool_val),0x20,
4900             NULL, HFILL }},
4901         { &hf_ansi_map_cdmacallmode_cls4,
4902           { "Call Mode", "ansi_map.cdmacallmode.cls4",
4903             FT_BOOLEAN, 8, TFS(&ansi_map_CDMACallMode_cls4_bool_val),0x40,
4904             NULL, HFILL }},
4905         { &hf_ansi_map_cdmacallmode_cls5,
4906           { "Call Mode", "ansi_map.cdmacallmode.cls5",
4907             FT_BOOLEAN, 8, TFS(&ansi_map_CDMACallMode_cls5_bool_val),0x80,
4908             NULL, HFILL }},
4909         { &hf_ansi_map_cdmacallmode_cls6,
4910           { "Call Mode", "ansi_map.cdmacallmode.cls6",
4911             FT_BOOLEAN, 8, TFS(&ansi_map_CDMACallMode_cls6_bool_val),0x01,
4912             NULL, HFILL }},
4913         { &hf_ansi_map_cdmacallmode_cls7,
4914           { "Call Mode", "ansi_map.cdmacallmode.cls7",
4915             FT_BOOLEAN, 8, TFS(&ansi_map_CDMACallMode_cls7_bool_val),0x02,
4916             NULL, HFILL }},
4917         { &hf_ansi_map_cdmacallmode_cls8,
4918           { "Call Mode", "ansi_map.cdmacallmode.cls8",
4919             FT_BOOLEAN, 8, TFS(&ansi_map_CDMACallMode_cls8_bool_val),0x04,
4920             NULL, HFILL }},
4921         { &hf_ansi_map_cdmacallmode_cls9,
4922           { "Call Mode", "ansi_map.cdmacallmode.cls9",
4923             FT_BOOLEAN, 8, TFS(&ansi_map_CDMACallMode_cls9_bool_val),0x08,
4924             NULL, HFILL }},
4925         { &hf_ansi_map_cdmacallmode_cls10,
4926           { "Call Mode", "ansi_map.cdmacallmode.cls10",
4927             FT_BOOLEAN, 8, TFS(&ansi_map_CDMACallMode_cls10_bool_val),0x10,
4928             NULL, HFILL }},
4929         {&hf_ansi_map_cdmachanneldata_Frame_Offset,
4930          { "Frame Offset", "ansi_map.cdmachanneldata.frameoffset",
4931            FT_UINT8, BASE_DEC, NULL, 0x78,
4932            NULL, HFILL }},
4933         {&hf_ansi_map_cdmachanneldata_CDMA_ch_no,
4934          { "CDMA Channel Number", "ansi_map.cdmachanneldata.cdma_ch_no",
4935            FT_UINT16, BASE_DEC, NULL, 0x07FF,
4936            NULL, HFILL }},
4937         {&hf_ansi_map_cdmachanneldata_band_cls,
4938          { "Band Class", "ansi_map.cdmachanneldata.band_cls",
4939            FT_UINT8, BASE_DEC, VALS(ansi_map_cdmachanneldata_band_cls_vals), 0x7c,
4940            NULL, HFILL }},
4941         {&hf_ansi_map_cdmachanneldata_lc_mask_b6,
4942          { "Long Code Mask (byte 6) MSB", "ansi_map.cdmachanneldata.lc_mask_b6",
4943            FT_UINT8, BASE_HEX, NULL, 0x03,
4944            "Long Code Mask MSB (byte 6)", HFILL }},
4945         {&hf_ansi_map_cdmachanneldata_lc_mask_b5,
4946          { "Long Code Mask (byte 5)", "ansi_map.cdmachanneldata.lc_mask_b5",
4947            FT_UINT8, BASE_HEX, NULL, 0xff,
4948            NULL, HFILL }},
4949         {&hf_ansi_map_cdmachanneldata_lc_mask_b4,
4950          { "Long Code Mask (byte 4)", "ansi_map.cdmachanneldata.lc_mask_b4",
4951            FT_UINT8, BASE_HEX, NULL, 0xff,
4952            NULL, HFILL }},
4953         {&hf_ansi_map_cdmachanneldata_lc_mask_b3,
4954          { "Long Code Mask (byte 3)", "ansi_map.cdmachanneldata.lc_mask_b3",
4955            FT_UINT8, BASE_HEX, NULL, 0xff,
4956            NULL, HFILL }},
4957         {&hf_ansi_map_cdmachanneldata_lc_mask_b2,
4958          { "Long Code Mask (byte 2)", "ansi_map.cdmachanneldata.lc_mask_b2",
4959            FT_UINT8, BASE_HEX, NULL, 0xff,
4960            NULL, HFILL }},
4961         {&hf_ansi_map_cdmachanneldata_lc_mask_b1,
4962          { "Long Code Mask LSB(byte 1)", "ansi_map.cdmachanneldata.lc_mask_b1",
4963            FT_UINT8, BASE_HEX, NULL, 0xff,
4964            "Long Code Mask (byte 1)LSB", HFILL }},
4965         {&hf_ansi_map_cdmachanneldata_np_ext,
4966          { "NP EXT", "ansi_map.cdmachanneldata.np_ext",
4967            FT_BOOLEAN, 8, NULL,0x80,
4968            NULL, HFILL }},
4969         {&hf_ansi_map_cdmachanneldata_nominal_pwr,
4970          { "Nominal Power", "ansi_map.cdmachanneldata.nominal_pwr",
4971            FT_UINT8, BASE_DEC, NULL, 0x71,
4972            NULL, HFILL }},
4973         {&hf_ansi_map_cdmachanneldata_nr_preamble,
4974          { "Number Preamble", "ansi_map.cdmachanneldata.nr_preamble",
4975            FT_UINT8, BASE_DEC, NULL, 0x07,
4976            NULL, HFILL }},
4977
4978         { &hf_ansi_map_cdmastationclassmark_pc,
4979           { "Power Class(PC)", "ansi_map.cdmastationclassmark.pc",
4980             FT_UINT8, BASE_DEC, VALS(ansi_map_CDMAStationClassMark_pc_vals), 0x03,
4981             NULL, HFILL }},
4982
4983         { &hf_ansi_map_cdmastationclassmark_dtx,
4984           { "Analog Transmission: (DTX)", "ansi_map.cdmastationclassmark.dtx",
4985             FT_BOOLEAN, 8, TFS(&ansi_map_CDMAStationClassMark_dtx_bool_val),0x04,
4986             NULL, HFILL }},
4987         { &hf_ansi_map_cdmastationclassmark_smi,
4988           { "Slotted Mode Indicator: (SMI)", "ansi_map.cdmastationclassmark.smi",
4989             FT_BOOLEAN, 8, TFS(&ansi_map_CDMAStationClassMark_smi_bool_val),0x20,
4990             NULL, HFILL }},
4991         { &hf_ansi_map_cdmastationclassmark_dmi,
4992           { "Dual-mode Indicator(DMI)", "ansi_map.cdmastationclassmark.dmi",
4993             FT_BOOLEAN, 8, TFS(&ansi_map_CDMAStationClassMark_dmi_bool_val),0x40,
4994             NULL, HFILL }},
4995         { &hf_ansi_map_channeldata_vmac,
4996           { "Voice Mobile Attenuation Code (VMAC)", "ansi_map.channeldata.vmac",
4997             FT_UINT8, BASE_DEC, NULL, 0x07,
4998             NULL, HFILL }},
4999         { &hf_ansi_map_channeldata_dtx,
5000           { "Discontinuous Transmission Mode (DTX)", "ansi_map.channeldata.dtx",
5001             FT_UINT8, BASE_DEC, VALS(ansi_map_ChannelData_dtx_vals), 0x18,
5002             NULL, HFILL }},
5003         { &hf_ansi_map_channeldata_scc,
5004           { "SAT Color Code (SCC)", "ansi_map.channeldata.scc",
5005             FT_UINT8, BASE_DEC, NULL, 0xc0,
5006             NULL, HFILL }},
5007         { &hf_ansi_map_channeldata_chno,
5008           { "Channel Number (CHNO)", "ansi_map.channeldata.chno",
5009             FT_UINT16, BASE_DEC, NULL, 0x0,
5010             NULL, HFILL }},
5011         { &hf_ansi_map_ConfidentialityModes_vp,
5012           { "Voice Privacy (VP) Confidentiality Status", "ansi_map.confidentialitymodes.vp",
5013             FT_BOOLEAN, 8, TFS(&ansi_map_ConfidentialityModes_bool_val),0x01,
5014             NULL, HFILL }},
5015         { &hf_ansi_map_controlchanneldata_dcc,
5016           { "Digital Color Code (DCC)", "ansi_map.controlchanneldata.dcc",
5017             FT_UINT8, BASE_DEC, NULL, 0xc0,
5018             NULL, HFILL }},
5019         { &hf_ansi_map_controlchanneldata_cmac,
5020           { "Control Mobile Attenuation Code (CMAC)", "ansi_map.controlchanneldata.cmac",
5021             FT_UINT8, BASE_DEC, NULL, 0x07,
5022             NULL, HFILL }},
5023         { &hf_ansi_map_controlchanneldata_chno,
5024           { "Channel Number (CHNO)", "ansi_map.controlchanneldata.chno",
5025             FT_UINT16, BASE_DEC, NULL, 0x0,
5026             NULL, HFILL }},
5027         { &hf_ansi_map_controlchanneldata_sdcc1,
5028           { "Supplementary Digital Color Codes (SDCC1)", "ansi_map.controlchanneldata.ssdc1",
5029             FT_UINT8, BASE_DEC, NULL, 0x0c,
5030             NULL, HFILL }},
5031         { &hf_ansi_map_controlchanneldata_sdcc2,
5032           { "Supplementary Digital Color Codes (SDCC2)", "ansi_map.controlchanneldata.ssdc2",
5033             FT_UINT8, BASE_DEC, NULL, 0x03,
5034             NULL, HFILL }},
5035         { &hf_ansi_map_ConfidentialityModes_se,
5036           { "Signaling Message Encryption (SE) Confidentiality Status", "ansi_map.confidentialitymodes.se",
5037             FT_BOOLEAN, 8, TFS(&ansi_map_ConfidentialityModes_bool_val),0x02,
5038             NULL, HFILL }},
5039         { &hf_ansi_map_ConfidentialityModes_dp,
5040           { "DataPrivacy (DP) Confidentiality Status", "ansi_map.confidentialitymodes.dp",
5041             FT_BOOLEAN, 8, TFS(&ansi_map_ConfidentialityModes_bool_val),0x04,
5042             NULL, HFILL }},
5043
5044         { &hf_ansi_map_deniedauthorizationperiod_period,
5045           { "Period", "ansi_map.deniedauthorizationperiod.period",
5046             FT_UINT8, BASE_DEC, VALS(ansi_map_deniedauthorizationperiod_period_vals), 0x0,
5047             NULL, HFILL }},
5048
5049
5050         { &hf_ansi_map_originationtriggers_all,
5051           { "All Origination (All)", "ansi_map.originationtriggers.all",
5052             FT_BOOLEAN, 8, TFS(&ansi_map_originationtriggers_all_bool_val),0x01,
5053             NULL, HFILL }},
5054         { &hf_ansi_map_originationtriggers_local,
5055           { "Local", "ansi_map.originationtriggers.local",
5056             FT_BOOLEAN, 8, TFS(&ansi_map_originationtriggers_local_bool_val),0x02,
5057             NULL, HFILL }},
5058         { &hf_ansi_map_originationtriggers_ilata,
5059           { "Intra-LATA Toll (ILATA)", "ansi_map.originationtriggers.ilata",
5060             FT_BOOLEAN, 8, TFS(&ansi_map_originationtriggers_ilata_bool_val),0x04,
5061             NULL, HFILL }},
5062         { &hf_ansi_map_originationtriggers_olata,
5063           { "Inter-LATA Toll (OLATA)", "ansi_map.originationtriggers.olata",
5064             FT_BOOLEAN, 8, TFS(&ansi_map_originationtriggers_olata_bool_val),0x08,
5065             NULL, HFILL }},
5066         { &hf_ansi_map_originationtriggers_int,
5067           { "International (Int'l )", "ansi_map.originationtriggers.int",
5068             FT_BOOLEAN, 8, TFS(&ansi_map_originationtriggers_int_bool_val),0x10,
5069             NULL, HFILL }},
5070         { &hf_ansi_map_originationtriggers_wz,
5071           { "World Zone (WZ)", "ansi_map.originationtriggers.wz",
5072             FT_BOOLEAN, 8, TFS(&ansi_map_originationtriggers_wz_bool_val),0x20,
5073             NULL, HFILL }},
5074         { &hf_ansi_map_originationtriggers_unrec,
5075           { "Unrecognized Number (Unrec)", "ansi_map.originationtriggers.unrec",
5076             FT_BOOLEAN, 8, TFS(&ansi_map_originationtriggers_unrec_bool_val),0x40,
5077             NULL, HFILL }},
5078         { &hf_ansi_map_originationtriggers_rvtc,
5079           { "Revertive Call (RvtC)", "ansi_map.originationtriggers.rvtc",
5080             FT_BOOLEAN, 8, TFS(&ansi_map_originationtriggers_rvtc_bool_val),0x80,
5081             NULL, HFILL }},
5082         { &hf_ansi_map_originationtriggers_star,
5083           { "Star", "ansi_map.originationtriggers.star",
5084             FT_BOOLEAN, 8, TFS(&ansi_map_originationtriggers_star_bool_val),0x01,
5085             NULL, HFILL }},
5086         { &hf_ansi_map_originationtriggers_ds,
5087           { "Double Star (DS)", "ansi_map.originationtriggers.ds",
5088             FT_BOOLEAN, 8, TFS(&ansi_map_originationtriggers_ds_bool_val),0x02,
5089             NULL, HFILL }},
5090         { &hf_ansi_map_originationtriggers_pound,
5091           { "Pound", "ansi_map.originationtriggers.pound",
5092             FT_BOOLEAN, 8, TFS(&ansi_map_originationtriggers_pound_bool_val),0x04,
5093             NULL, HFILL }},
5094         { &hf_ansi_map_originationtriggers_dp,
5095           { "Double Pound (DP)", "ansi_map.originationtriggers.dp",
5096             FT_BOOLEAN, 8, TFS(&ansi_map_originationtriggers_dp_bool_val),0x08,
5097             NULL, HFILL }},
5098         { &hf_ansi_map_originationtriggers_pa,
5099           { "Prior Agreement (PA)", "ansi_map.originationtriggers.pa",
5100             FT_BOOLEAN, 8, TFS(&ansi_map_originationtriggers_pa_bool_val),0x10,
5101             NULL, HFILL }},
5102         { &hf_ansi_map_originationtriggers_nodig,
5103           { "No digits", "ansi_map.originationtriggers.nodig",
5104             FT_BOOLEAN, 8, TFS(&ansi_map_originationtriggers_nodig_bool_val),0x01,
5105             NULL, HFILL }},
5106         { &hf_ansi_map_originationtriggers_onedig,
5107           { "1 digit", "ansi_map.originationtriggers.onedig",
5108             FT_BOOLEAN, 8, TFS(&ansi_map_originationtriggers_onedig_bool_val),0x02,
5109             NULL, HFILL }},
5110         { &hf_ansi_map_originationtriggers_twodig,
5111           { "2 digits", "ansi_map.originationtriggers.twodig",
5112             FT_BOOLEAN, 8, TFS(&ansi_map_originationtriggers_twodig_bool_val),0x04,
5113             NULL, HFILL }},
5114         { &hf_ansi_map_originationtriggers_threedig,
5115           { "3 digits", "ansi_map.originationtriggers.threedig",
5116             FT_BOOLEAN, 8, TFS(&ansi_map_originationtriggers_threedig_bool_val),0x08,
5117             NULL, HFILL }},
5118         { &hf_ansi_map_originationtriggers_fourdig,
5119           { "4 digits", "ansi_map.originationtriggers.fourdig",
5120             FT_BOOLEAN, 8, TFS(&ansi_map_originationtriggers_fourdig_bool_val),0x10,
5121             NULL, HFILL }},
5122         { &hf_ansi_map_originationtriggers_fivedig,
5123           { "5 digits", "ansi_map.originationtriggers.fivedig",
5124             FT_BOOLEAN, 8, TFS(&ansi_map_originationtriggers_fivedig_bool_val),0x20,
5125             NULL, HFILL }},
5126         { &hf_ansi_map_originationtriggers_sixdig,
5127           { "6 digits", "ansi_map.originationtriggers.sixdig",
5128             FT_BOOLEAN, 8, TFS(&ansi_map_originationtriggers_sixdig_bool_val),0x40,
5129             NULL, HFILL }},
5130         { &hf_ansi_map_originationtriggers_sevendig,
5131           { "7 digits", "ansi_map.originationtriggers.sevendig",
5132             FT_BOOLEAN, 8, TFS(&ansi_map_originationtriggers_sevendig_bool_val),0x80,
5133             NULL, HFILL }},
5134         { &hf_ansi_map_originationtriggers_eightdig,
5135           { "8 digits", "ansi_map.originationtriggers.eight",
5136             FT_BOOLEAN, 8, TFS(&ansi_map_originationtriggers_eightdig_bool_val),0x01,
5137             NULL, HFILL }},
5138         { &hf_ansi_map_originationtriggers_ninedig,
5139           { "9 digits", "ansi_map.originationtriggers.nine",
5140             FT_BOOLEAN, 8, TFS(&ansi_map_originationtriggers_ninedig_bool_val),0x02,
5141             NULL, HFILL }},
5142         { &hf_ansi_map_originationtriggers_tendig,
5143           { "10 digits", "ansi_map.originationtriggers.ten",
5144             FT_BOOLEAN, 8, TFS(&ansi_map_originationtriggers_tendig_bool_val),0x04,
5145             NULL, HFILL }},
5146         { &hf_ansi_map_originationtriggers_elevendig,
5147           { "11 digits", "ansi_map.originationtriggers.eleven",
5148             FT_BOOLEAN, 8, TFS(&ansi_map_originationtriggers_elevendig_bool_val),0x08,
5149             NULL, HFILL }},
5150         { &hf_ansi_map_originationtriggers_twelvedig,
5151           { "12 digits", "ansi_map.originationtriggers.twelve",
5152             FT_BOOLEAN, 8, TFS(&ansi_map_originationtriggers_twelvedig_bool_val),0x10,
5153             NULL, HFILL }},
5154         { &hf_ansi_map_originationtriggers_thirteendig,
5155           { "13 digits", "ansi_map.originationtriggers.thirteen",
5156             FT_BOOLEAN, 8, TFS(&ansi_map_originationtriggers_thirteendig_bool_val),0x20,
5157             NULL, HFILL }},
5158         { &hf_ansi_map_originationtriggers_fourteendig,
5159           { "14 digits", "ansi_map.originationtriggers.fourteen",
5160             FT_BOOLEAN, 8, TFS(&ansi_map_originationtriggers_fourteendig_bool_val),0x40,
5161             NULL, HFILL }},
5162         { &hf_ansi_map_originationtriggers_fifteendig,
5163           { "15 digits", "ansi_map.originationtriggers.fifteen",
5164             FT_BOOLEAN, 8, TFS(&ansi_map_originationtriggers_fifteendig_bool_val),0x80,
5165             NULL, HFILL }},
5166
5167         { &hf_ansi_map_triggercapability_init,
5168           { "Introducing Star/Pound (INIT)", "ansi_map.triggercapability.init",
5169             FT_BOOLEAN, 8, TFS(&ansi_map_triggercapability_bool_val),0x01,
5170             NULL, HFILL }},
5171         { &hf_ansi_map_triggercapability_kdigit,
5172           { "K-digit (K-digit)", "ansi_map.triggercapability.kdigit",
5173             FT_BOOLEAN, 8, TFS(&ansi_map_triggercapability_bool_val),0x02,
5174             NULL, HFILL }},
5175         { &hf_ansi_map_triggercapability_all,
5176           { "All_Calls (All)", "ansi_map.triggercapability.all",
5177             FT_BOOLEAN, 8, TFS(&ansi_map_triggercapability_bool_val),0x04,
5178             NULL, HFILL }},
5179         { &hf_ansi_map_triggercapability_rvtc,
5180           { "Revertive_Call (RvtC)", "ansi_map.triggercapability.rvtc",
5181             FT_BOOLEAN, 8, TFS(&ansi_map_triggercapability_bool_val),0x08,
5182             NULL, HFILL }},
5183         { &hf_ansi_map_triggercapability_oaa,
5184           { "Origination_Attempt_Authorized (OAA)", "ansi_map.triggercapability.oaa",
5185             FT_BOOLEAN, 8, TFS(&ansi_map_triggercapability_bool_val),0x10,
5186             NULL, HFILL }},
5187         { &hf_ansi_map_triggercapability_oans,
5188           { "O_Answer (OANS)", "ansi_map.triggercapability.oans",
5189             FT_BOOLEAN, 8, TFS(&ansi_map_triggercapability_bool_val),0x20,
5190             NULL, HFILL }},
5191         { &hf_ansi_map_triggercapability_odisc,
5192           { "O_Disconnect (ODISC)", "ansi_map.triggercapability.odisc",
5193             FT_BOOLEAN, 8, TFS(&ansi_map_triggercapability_bool_val),0x40,
5194             NULL, HFILL }},
5195         { &hf_ansi_map_triggercapability_ona,
5196           { "O_No_Answer (ONA)", "ansi_map.triggercapability.ona",
5197             FT_BOOLEAN, 8, TFS(&ansi_map_triggercapability_bool_val),0x80,
5198             NULL, HFILL }},
5199
5200         { &hf_ansi_map_triggercapability_ct ,
5201           { "Call Types (CT)", "ansi_map.triggercapability.ct",
5202             FT_BOOLEAN, 8, TFS(&ansi_map_triggercapability_bool_val),0x01,
5203             NULL, HFILL }},
5204         { &hf_ansi_map_triggercapability_unrec,
5205           { "Unrecognized_Number (Unrec)", "ansi_map.triggercapability.unrec",
5206             FT_BOOLEAN, 8, TFS(&ansi_map_triggercapability_bool_val),0x02,
5207             NULL, HFILL }},
5208         { &hf_ansi_map_triggercapability_pa,
5209           { "Prior_Agreement (PA)", "ansi_map.triggercapability.pa",
5210             FT_BOOLEAN, 8, TFS(&ansi_map_triggercapability_bool_val),0x04,
5211             NULL, HFILL }},
5212         { &hf_ansi_map_triggercapability_at,
5213           { "Advanced_Termination (AT)", "ansi_map.triggercapability.at",
5214             FT_BOOLEAN, 8, TFS(&ansi_map_triggercapability_bool_val),0x08,
5215             NULL, HFILL }},
5216         { &hf_ansi_map_triggercapability_cgraa,
5217           { "Calling_Routing_Address_Available (CgRAA)", "ansi_map.triggercapability.cgraa",
5218             FT_BOOLEAN, 8, TFS(&ansi_map_triggercapability_bool_val),0x10,
5219             NULL, HFILL }},
5220         { &hf_ansi_map_triggercapability_it,
5221           { "Initial_Termination (IT)", "ansi_map.triggercapability.it",
5222             FT_BOOLEAN, 8, TFS(&ansi_map_triggercapability_bool_val),0x20,
5223             NULL, HFILL }},
5224         { &hf_ansi_map_triggercapability_cdraa,
5225           { "Called_Routing_Address_Available (CdRAA)", "ansi_map.triggercapability.cdraa",
5226             FT_BOOLEAN, 8, TFS(&ansi_map_triggercapability_bool_val),0x40,
5227             NULL, HFILL }},
5228         { &hf_ansi_map_triggercapability_obsy,
5229           { "O_Called_Party_Busy (OBSY)", "ansi_map.triggercapability.obsy",
5230             FT_BOOLEAN, 8, TFS(&ansi_map_triggercapability_bool_val),0x80,
5231             NULL, HFILL }},
5232
5233         { &hf_ansi_map_triggercapability_tra ,
5234           { "Terminating_Resource_Available (TRA)", "ansi_map.triggercapability.tra",
5235             FT_BOOLEAN, 8, TFS(&ansi_map_triggercapability_bool_val),0x01,
5236             NULL, HFILL }},
5237         { &hf_ansi_map_triggercapability_tbusy,
5238           { "T_Busy (TBusy)", "ansi_map.triggercapability.tbusy",
5239             FT_BOOLEAN, 8, TFS(&ansi_map_triggercapability_bool_val),0x02,
5240             NULL, HFILL }},
5241         { &hf_ansi_map_triggercapability_tna,
5242           { "T_No_Answer (TNA)", "ansi_map.triggercapability.tna",
5243             FT_BOOLEAN, 8, TFS(&ansi_map_triggercapability_bool_val),0x04,
5244             NULL, HFILL }},
5245         { &hf_ansi_map_triggercapability_tans,
5246           { "T_Answer (TANS)", "ansi_map.triggercapability.tans",
5247             FT_BOOLEAN, 8, TFS(&ansi_map_triggercapability_bool_val),0x08,
5248             NULL, HFILL }},
5249         { &hf_ansi_map_triggercapability_tdisc,
5250           { "T_Disconnect (TDISC)", "ansi_map.triggercapability.tdisc",
5251             FT_BOOLEAN, 8, TFS(&ansi_map_triggercapability_bool_val),0x10,
5252             NULL, HFILL }},
5253         { &hf_ansi_map_winoperationscapability_conn,
5254           { "ConnectResource (CONN)", "ansi_map.winoperationscapability.conn",
5255             FT_BOOLEAN, 8, TFS(&ansi_map_winoperationscapability_conn_bool_val),0x01,
5256             NULL, HFILL }},
5257         { &hf_ansi_map_winoperationscapability_ccdir,
5258           { "CallControlDirective(CCDIR)", "ansi_map.winoperationscapability.ccdir",
5259             FT_BOOLEAN, 8, TFS(&ansi_map_winoperationscapability_ccdir_bool_val),0x02,
5260             NULL, HFILL }},
5261         { &hf_ansi_map_winoperationscapability_pos,
5262           { "PositionRequest (POS)", "ansi_map.winoperationscapability.pos",
5263             FT_BOOLEAN, 8, TFS(&ansi_map_winoperationscapability_pos_bool_val),0x04,
5264             NULL, HFILL }},
5265         { &hf_ansi_map_pacaindicator_pa,
5266           { "Permanent Activation (PA)", "ansi_map.pacaindicator_pa",
5267             FT_BOOLEAN, 8, TFS(&ansi_map_pacaindicator_pa_bool_val),0x01,
5268             NULL, HFILL }},
5269         { &hf_ansi_map_PACA_Level,
5270           { "PACA Level", "ansi_map.PACA_Level",
5271             FT_UINT8, BASE_DEC, VALS(ansi_map_PACA_Level_vals), 0x1e,
5272             NULL, HFILL }},
5273
5274 #include "packet-ansi_map-hfarr.c"
5275     };
5276
5277     /* List of subtrees */
5278     static gint *ett[] = {
5279         &ett_ansi_map,
5280         &ett_mintype,
5281         &ett_digitstype,
5282         &ett_billingid,
5283         &ett_sms_bearer_data,
5284         &ett_sms_teleserviceIdentifier,
5285         &ett_extendedmscid,
5286         &ett_extendedsystemmytypecode,
5287         &ett_handoffstate,
5288         &ett_mscid,
5289         &ett_cdmachanneldata,
5290         &ett_cdmastationclassmark,
5291         &ett_channeldata,
5292         &ett_confidentialitymodes,
5293         &ett_controlchanneldata,
5294         &ett_CDMA2000HandoffInvokeIOSData,
5295         &ett_CDMA2000HandoffResponseIOSData,
5296         &ett_originationtriggers,
5297         &ett_pacaindicator,
5298         &ett_callingpartyname,
5299         &ett_triggercapability,
5300         &ett_winoperationscapability,
5301         &ett_win_trigger_list,
5302         &ett_controlnetworkid,
5303         &ett_transactioncapability,
5304         &ett_cdmaserviceoption,
5305         &ett_sms_originationrestrictions,
5306         &ett_systemcapabilities,
5307 #include "packet-ansi_map-ettarr.c"
5308     };
5309
5310         static enum_val_t ansi_map_response_matching_type_values[] = {
5311                 {"Only Transaction ID will be used in Invoke/response matching",                                        "Transaction ID only", 0},
5312                 {"Transaction ID and Source will be used in Invoke/response matching",                          "Transaction ID and Source", 1},
5313                 {"Transaction ID Source and Destination will be used in Invoke/response matching",      "Transaction ID Source and Destination", 2},
5314                 {NULL, NULL, -1}
5315         };
5316
5317     /* Register protocol */
5318     proto_ansi_map = proto_register_protocol(PNAME, PSNAME, PFNAME);
5319     /* Register fields and subtrees */
5320     proto_register_field_array(proto_ansi_map, hf, array_length(hf));
5321     proto_register_subtree_array(ett, array_length(ett));
5322
5323     register_dissector("ansi_map", dissect_ansi_map, proto_ansi_map);
5324
5325     is637_tele_id_dissector_table =
5326         register_dissector_table("ansi_map.tele_id", "IS-637 Teleservice ID",
5327                                  FT_UINT8, BASE_DEC);
5328
5329     is683_dissector_table =
5330         register_dissector_table("ansi_map.ota", "IS-683-A (OTA)",
5331                                  FT_UINT8, BASE_DEC);
5332
5333     is801_dissector_table =
5334         register_dissector_table("ansi_map.pld", "IS-801 (PLD)",
5335                                  FT_UINT8, BASE_DEC);
5336
5337     ansi_map_tap = register_tap("ansi_map");
5338
5339
5340     range_convert_str(&global_ssn_range, "5-14", MAX_SSN);
5341
5342     ansi_map_module = prefs_register_protocol(proto_ansi_map, proto_reg_handoff_ansi_map);
5343
5344
5345     prefs_register_range_preference(ansi_map_module, "map.ssn", "ANSI MAP SSNs",
5346                                     "ANSI MAP SSNs to decode as ANSI MAP",
5347                                     &global_ssn_range, MAX_SSN);
5348
5349         prefs_register_enum_preference(ansi_map_module, "transaction.matchtype",
5350                                        "Type of matching invoke/response",
5351                                        "Type of matching invoke/response, risk of missmatch if loose matching choosen",
5352                                        &ansi_map_response_matching_type, ansi_map_response_matching_type_values, FALSE);
5353
5354     register_init_routine(&ansi_map_init_protocol);
5355 }
5356
5357
5358
5359
5360