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