1# camel.cnf 2# camel conformation file 3# Anders Broman 2007 4 5#.IMPORT ../gsm_map/gsm_map-exp.cnf 6#.IMPORT ../inap/inap-exp.cnf 7 8#.MODULE 9CS1-DataTypes inap 10CS2-datatypes inap 11 12#.ASSIGNED_OBJECT_IDENTIFIER classes 13#.ASSIGNED_OBJECT_IDENTIFIER ros-InformationObjects 14#.ASSIGNED_OBJECT_IDENTIFIER tc-Messages 15#.ASSIGNED_OBJECT_IDENTIFIER tc-NotationExtensions 16#.ASSIGNED_OBJECT_IDENTIFIER gprsSSF-gsmSCF-Operations 17#.ASSIGNED_OBJECT_IDENTIFIER gsmSCF-gsmSRF-Operations 18#.ASSIGNED_OBJECT_IDENTIFIER gsmSSF-gsmSCF-Operations 19#.ASSIGNED_OBJECT_IDENTIFIER sms-Operations 20#.ASSIGNED_OBJECT_IDENTIFIER gsmSSF-gsmSCF-Protocol 21#.ASSIGNED_OBJECT_IDENTIFIER gsmSCF-gsmSRF-Protocol 22#.ASSIGNED_OBJECT_IDENTIFIER operationcodes 23#.ASSIGNED_OBJECT_IDENTIFIER datatypes 24#.ASSIGNED_OBJECT_IDENTIFIER errortypes 25 26#.OMIT_ASSIGNMENT Remote-Operations-Information-Objects 27Bind 28Unbind 29#.END 30#.OMIT_ASSIGNMENT 31# Removed as they are giving 'defined but not used' warnings currently. 32RejectProblem 33TariffSwitchInterval 34Priority 35#.END 36 37#.PDU 38ERROR.&ParameterType 39OPERATION.&ArgumentType 40OPERATION.&ResultType 41#.END 42 43 44#.REGISTER 45CAP-GPRS-ReferenceNumber B "0.4.0.0.1.1.5.2" "id-CAP-GPRS-ReferenceNumber" 46CAP-U-ABORT-REASON B "0.4.0.0.1.1.2.2" "id-CAP-U-ABORT-Reason" 47 48#.NO_EMIT ONLY_VALS 49CAMEL-AChBillingChargingCharacteristicsV2 50ROS 51 52#.TYPE_RENAME 53ReturnResult/result/result ResultArgument 54 55#.FIELD_RENAME 56Invoke/linkedId/present linkedIdPresent 57Reject/problem/invoke invokeProblem 58Reject/problem/returnError returnErrorProblem 59ReturnResult/result/result resultArgument 60Reject/problem/returnResult problemReturnResult 61 62PAR-cancelFailed/problem par-cancelFailedProblem 63CAMEL-FCIBillingChargingCharacteristics/fCIBCCCAMELsequence1 fci-fCIBCCCAMELsequence1 64CAMEL-FCIGPRSBillingChargingCharacteristics/fCIBCCCAMELsequence1 fciGPRS-fCIBCCCAMELsequence1 65CAMEL-FCISMSBillingChargingCharacteristics/fCIBCCCAMELsequence1 fciSMS-fCIBCCCAMELsequence1 66EventSpecificInformationBCSM/oMidCallSpecificInfo/midCallEvents omidCallEvents 67EventSpecificInformationBCSM/tMidCallSpecificInfo/midCallEvents tmidCallEvents 68AudibleIndicator/tone audibleIndicatorTone 69GapIndicators/duration gapIndicatorsDuration 70InbandInfo/duration inbandInfoDuration 71Tone/duration toneDuration 72Burst/toneDuration burstToneDuration 73 74EventSpecificInformationSMS/o-smsFailureSpecificInfo/failureCause mo-smsfailureCause 75EventSpecificInformationBCSM/routeSelectFailureSpecificInfo/failureCause routeSelectfailureCause 76EventSpecificInformationSMS/t-smsFailureSpecificInfo/failureCause t-smsfailureCause 77 78CAMEL-FCIBillingChargingCharacteristics/fCIBCCCAMELsequence1/partyToCharge fCIBCCCAMELsequence1partyToCharge 79CAMEL-CallResult/timeDurationChargingResult/partyToCharge timeDurationChargingResultpartyToCharge 80 81AOCSubsequent/tariffSwitchInterval aocSubsequent-tariffSwitchInterval 82CAMEL-AChBillingChargingCharacteristics/timeDurationCharging/tariffSwitchInterval timeDurationCharging-tariffSwitchInterval 83ApplyChargingGPRSArg/tariffSwitchInterval applyChargingGPRS-tariffSwitchInterval 84TimeIfTariffSwitch/tariffSwitchInterval timeIfTariffSwitch-tariffSwitchInterval 85 86# This table creates the value_sting to name Camel operation codes and errors 87# in file packet-camel-table.c which is included in the template file 88# 89#.TABLE_HDR 90/* CAMEL OPERATIONS */ 91const value_string camel_opr_code_strings[] = { 92#.TABLE_BODY OPERATION 93 { %(&operationCode)s, "%(_ident)s" }, 94#.TABLE_FTR 95 { 0, NULL } 96}; 97#.END 98 99#.TABLE_HDR 100/* CAMEL ERRORS */ 101static const value_string camel_err_code_string_vals[] = { 102#.TABLE_BODY ERROR 103 { %(&errorCode)s, "%(_ident)s" }, 104#.TABLE_FTR 105 { 0, NULL } 106}; 107#.END 108 109# This table creates the switch() to branch on Camel operation codes and errors 110# in file packet-camel-table2.c which is included in the template file 111# 112#.TABLE2_HDR 113static int dissect_invokeData(proto_tree *tree, tvbuff_t *tvb, int offset, asn1_ctx_t *actx) { 114 115 switch(opcode){ 116#.TABLE2_BODY OPERATION.&ArgumentType 117 case %(&operationCode)s: /* %(_ident)s */ 118 offset= %(_argument_pdu)s(tvb, actx->pinfo , tree , NULL); 119 break; 120#.TABLE2_FTR 121 default: 122 proto_tree_add_expert_format(tree, actx->pinfo, &ei_camel_unknown_invokeData, 123 tvb, offset, -1, "Unknown invokeData %d", opcode); 124 /* todo call the asn.1 dissector */ 125 break; 126 } 127 return offset; 128} 129#.END 130#.TABLE2_HDR 131static int dissect_returnResultData(proto_tree *tree, tvbuff_t *tvb, int offset,asn1_ctx_t *actx) { 132 133 switch(opcode){ 134#.TABLE2_BODY OPERATION.&ResultType 135 case %(&operationCode)s: /* %(_ident)s */ 136 offset= %(_result_pdu)s(tvb, actx->pinfo , tree , NULL); 137 break; 138#.TABLE2_FTR 139 default: 140 proto_tree_add_expert_format(tree, actx->pinfo, &ei_camel_unknown_returnResultData, 141 tvb, offset, -1, "Unknown returnResultData %d",opcode); 142 } 143 return offset; 144} 145#.END 146#.TABLE2_HDR 147static int dissect_returnErrorData(proto_tree *tree, tvbuff_t *tvb, int offset,asn1_ctx_t *actx) { 148 149 switch(errorCode) { 150#.TABLE2_BODY ERROR.&ParameterType 151 case %(&errorCode)s: /* %(_ident)s */ 152 %(_parameter_pdu)s(tvb, actx->pinfo , tree , NULL); 153 break; 154#.TABLE2_FTR 155 default: 156 proto_tree_add_expert_format(tree, actx->pinfo, &ei_camel_unknown_returnErrorData, 157 tvb, offset, -1, "Unknown returnErrorData %d",errorCode); 158 } 159 return offset; 160} 161#.END 162# ROS stuff here XXX change when TCAP is redone. 163 164#.FN_BODY Code/local VAL_PTR = &opcode 165 166 if (is_ExtensionField){ 167 hf_index = hf_camel_extension_code_local; 168 }else if (camel_opcode_type == CAMEL_OPCODE_RETURN_ERROR){ 169 hf_index = hf_camel_error_code_local; 170 } 171 %(DEFAULT_BODY)s 172 if (is_ExtensionField == FALSE){ 173 if (camel_opcode_type == CAMEL_OPCODE_RETURN_ERROR){ 174 errorCode = opcode; 175 col_append_str(actx->pinfo->cinfo, COL_INFO, 176 val_to_str(errorCode, camel_err_code_string_vals, "Unknown CAMEL error (%%u)")); 177 col_append_str(actx->pinfo->cinfo, COL_INFO, " "); 178 col_set_fence(actx->pinfo->cinfo, COL_INFO); 179 }else{ 180 col_append_str(actx->pinfo->cinfo, COL_INFO, 181 val_to_str(opcode, camel_opr_code_strings, "Unknown CAMEL (%%u)")); 182 col_append_str(actx->pinfo->cinfo, COL_INFO, " "); 183 col_set_fence(actx->pinfo->cinfo, COL_INFO); 184 } 185 gp_camelsrt_info->opcode=opcode; 186 } 187#.FN_HDR Invoke 188 camel_opcode_type=CAMEL_OPCODE_INVOKE; 189 190#.FN_HDR ReturnResult 191 camel_opcode_type=CAMEL_OPCODE_RETURN_RESULT; 192 193#.FN_HDR ReturnError 194 camel_opcode_type=CAMEL_OPCODE_RETURN_ERROR; 195 196#.FN_HDR Reject 197 camel_opcode_type=CAMEL_OPCODE_REJECT; 198 199 200#.FN_BODY Invoke/argument 201 offset = dissect_invokeData(tree, tvb, offset, actx); 202 203#.FN_BODY ReturnResult/result/result 204 offset = dissect_returnResultData(tree, tvb, offset, actx); 205 206#.FN_BODY ReturnError/parameter 207 offset = dissect_returnErrorData(tree, tvb, offset, actx); 208 209# END ROS 210 211#.FN_BODY InitialDPArgExtension 212 213if((camel_ver == 2)||(camel_ver == 1)){ 214 return dissect_camel_InitialDPArgExtensionV2(implicit_tag, tvb, offset, actx, tree, hf_index); 215} 216 217%(DEFAULT_BODY)s 218 219#.FN_HDR ExtensionField 220 camel_obj_id = NULL; 221 is_ExtensionField =TRUE; 222 223#.FN_PARS Code/global FN_VARIANT = _str VAL_PTR = &camel_obj_id 224 225#.FN_BODY ExtensionField/value 226 /*XXX handle local form here */ 227 if(camel_obj_id){ 228 offset=call_ber_oid_callback(camel_obj_id, tvb, offset, actx->pinfo, tree, NULL); 229 } 230 is_ExtensionField = FALSE; 231 232#---------------------------------------------------------------------------------------- 233#.FN_BODY CallingPartyNumber VAL_PTR = ¶meter_tvb 234 tvbuff_t *parameter_tvb; 235 proto_tree *subtree; 236 237%(DEFAULT_BODY)s 238 239 if (!parameter_tvb) 240 return offset; 241 242subtree = proto_item_add_subtree(actx->created_item, ett_camel_callingpartynumber); 243dissect_isup_calling_party_number_parameter(parameter_tvb, actx->pinfo, subtree, NULL); 244#.END 245 246#---------------------------------------------------------------------------------------- 247#.FN_BODY CalledPartyNumber VAL_PTR = ¶meter_tvb 248 tvbuff_t *parameter_tvb; 249 proto_tree *subtree; 250 251%(DEFAULT_BODY)s 252 253 if (!parameter_tvb) 254 return offset; 255 256 subtree = proto_item_add_subtree(actx->created_item, ett_camel_calledpartybcdnumber); 257 dissect_isup_called_party_number_parameter(parameter_tvb, actx->pinfo, subtree, NULL); 258#.END 259 260#---------------------------------------------------------------------------------------- 261#.FN_BODY LocationNumber VAL_PTR = ¶meter_tvb 262 tvbuff_t *parameter_tvb; 263 proto_tree *subtree; 264 265%(DEFAULT_BODY)s 266 267 if (!parameter_tvb) 268 return offset; 269 270subtree = proto_item_add_subtree(actx->created_item, ett_camel_locationnumber); 271dissect_isup_location_number_parameter(parameter_tvb, actx->pinfo, subtree, NULL); 272#.END 273 274#---------------------------------------------------------------------------------------- 275#.FN_BODY GenericNumber VAL_PTR = ¶meter_tvb 276 tvbuff_t *parameter_tvb; 277 278%(DEFAULT_BODY)s 279 280 if (!parameter_tvb) 281 return offset; 282 283dissect_isup_generic_number_parameter(parameter_tvb, actx->pinfo, tree, NULL); 284#.END 285 286#---------------------------------------------------------------------------------------- 287#.FN_BODY Cause VAL_PTR = ¶meter_tvb 288 289tvbuff_t *parameter_tvb; 290guint8 Cause_value; 291proto_tree *subtree; 292 293%(DEFAULT_BODY)s 294 295 if (!parameter_tvb) 296 return offset; 297 subtree = proto_item_add_subtree(actx->created_item, ett_camel_cause); 298 299 dissect_q931_cause_ie(parameter_tvb, 0, tvb_reported_length_remaining(parameter_tvb,0), subtree, hf_camel_cause_indicator, &Cause_value, isup_parameter_type_value); 300#.END 301 302#---------------------------------------------------------------------------------------- 303#.FN_BODY RPCause VAL_PTR = ¶meter_tvb 304 305tvbuff_t *parameter_tvb; 306guint8 Cause_value; 307proto_tree *subtree; 308 309%(DEFAULT_BODY)s 310 311 if (!parameter_tvb) 312 return offset; 313 subtree = proto_item_add_subtree(actx->created_item, ett_camel_RPcause); 314 315 dissect_RP_cause_ie(parameter_tvb, 0, tvb_reported_length_remaining(parameter_tvb,0), subtree, hf_camel_RP_Cause, &Cause_value); 316#.END 317 318#---------------------------------------------------------------------------------------- 319#.FN_BODY DateAndTime 320 321 322/* 323* date_option = 1 european dd:mm:yyyy 324* date_option = 2 american mm:dd:yyyy 325*/ 326 327/* 328* Output should be HH:MM:SS;dd/mm/yyyy 329* if european is selected, and HH:MM:SS;mm/dd/yyyy 330* otherwise. 331*/ 332 333 guint8 digit_pair; 334 guint8 i = 0, curr_offset; 335 char camel_time[CAMEL_DATE_AND_TIME_LEN]; 336 char c[CAMEL_DATE_AND_TIME_LEN]; /*temporary container*/ 337 338 /* 2 digits per octet, 7 octets total + 5 delimiters */ 339 340 for (curr_offset = 0; curr_offset < 7 ; curr_offset++) 341 /*Loop to extract date*/ 342 { 343 digit_pair = tvb_get_guint8(tvb, curr_offset); 344 345 proto_tree_add_uint(tree, 346 hf_digit, 347 tvb, 348 curr_offset, 349 1, 350 digit_pair & 0x0F); 351 352 proto_tree_add_uint(tree, 353 hf_digit, 354 tvb, 355 curr_offset, 356 1, 357 digit_pair >>4); 358 359 360 c[i] = camel_number_to_char( digit_pair & 0x0F); 361 i++; 362 c[i] = camel_number_to_char( digit_pair >>4); 363 i++; 364 } 365 366 /* Pretty print date */ 367 /* XXX - Should we use sprintf here instead of assembling the string by 368 * hand? */ 369 370 camel_time[0] = c[8]; 371 camel_time[1] = c[9]; 372 camel_time[2] = ':'; 373 camel_time[3] = c[10]; 374 camel_time[4] = c[11]; 375 camel_time[5] = ':'; 376 camel_time[6] = c[12]; 377 camel_time[7] = c[13]; 378 camel_time[8] = ';'; 379 if ( EUROPEAN_DATE == date_format) /*european*/ 380 { 381 camel_time[9] = c[6]; /*day*/ 382 camel_time[10] = c[7]; 383 camel_time[11] = '/'; 384 camel_time[12] = c[4]; /*month*/ 385 camel_time[13] = c[5]; 386 } 387 else /*american*/ 388 { 389 camel_time[9] = c[4]; /*month*/ 390 camel_time[10] = c[5]; 391 camel_time[11] = '/'; 392 camel_time[12] = c[6]; /*day*/ 393 camel_time[13] = c[7]; 394 } 395 camel_time[14] = '/'; 396 camel_time[15] = c[0]; 397 camel_time[16] = c[1]; 398 camel_time[17] = c[2]; 399 camel_time[18] = c[3]; 400 401 camel_time[CAMEL_DATE_AND_TIME_LEN - 1] = '\0'; 402 403/*start = 0, length = 7*/ 404 405 proto_tree_add_string(tree, 406 hf_index, 407 tvb, 408 0, 409 7, 410 camel_time); 411 412 return 7; /* 7 octets eaten*/ 413#.END 414 415#---------------------------------------------------------------------------------------- 416#.FN_BODY BearerCapability/bearerCap VAL_PTR = ¶meter_tvb 417 tvbuff_t *parameter_tvb; 418 419%(DEFAULT_BODY)s 420 421 if (!parameter_tvb) 422 return offset; 423 424 dissect_q931_bearer_capability_ie(parameter_tvb, 0, tvb_reported_length_remaining(parameter_tvb,0), tree); 425#.END 426 427#---------------------------------------------------------------------------------------- 428#.FN_BODY OriginalCalledPartyID VAL_PTR = ¶meter_tvb 429 430 tvbuff_t *parameter_tvb; 431 proto_tree *subtree; 432 433%(DEFAULT_BODY)s 434 435 if (!parameter_tvb) 436 return offset; 437 subtree = proto_item_add_subtree(actx->created_item, ett_camel_originalcalledpartyid); 438 dissect_isup_original_called_number_parameter(parameter_tvb, actx->pinfo, subtree, NULL); 439#.END 440 441#---------------------------------------------------------------------------------------- 442#.FN_PARS RedirectingPartyID 443 444 VAL_PTR = ¶meter_tvb 445 446#.FN_BODY RedirectingPartyID 447 448 tvbuff_t *parameter_tvb; 449 proto_tree *subtree; 450 451%(DEFAULT_BODY)s 452 453 if (!parameter_tvb) 454 return offset; 455 subtree = proto_item_add_subtree(actx->created_item, ett_camel_redirectingpartyid); 456 dissect_isup_redirecting_number_parameter(parameter_tvb, actx->pinfo, subtree, NULL); 457#.END 458 459#---------------------------------------------------------------------------------------- 460#.FN_PARS AccessPointName 461 VAL_PTR = ¶meter_tvb 462 463#.FN_BODY AccessPointName 464 465 tvbuff_t *parameter_tvb; 466 proto_tree *subtree; 467 468%(DEFAULT_BODY)s 469 470 if (!parameter_tvb) 471 return offset; 472 subtree = proto_item_add_subtree(actx->created_item, ett_camel_AccessPointName); 473 de_sm_apn(parameter_tvb, subtree, actx->pinfo, 0, tvb_reported_length(parameter_tvb), NULL, 0); 474#.END 475 476#---------------------------------------------------------------------------------------- 477#.FN_BODY EndUserAddress/pDPTypeOrganization VAL_PTR = ¶meter_tvb 478 479 tvbuff_t *parameter_tvb; 480 481%(DEFAULT_BODY)s 482 483 if (!parameter_tvb) 484 return offset; 485 PDPTypeOrganization = (tvb_get_guint8(parameter_tvb,0) &0x0f); 486#.END 487 488#---------------------------------------------------------------------------------------- 489#.FN_BODY EndUserAddress/pDPTypeNumber VAL_PTR = ¶meter_tvb 490 491 tvbuff_t *parameter_tvb; 492 proto_tree *subtree; 493 494%(DEFAULT_BODY)s 495 496 if (!parameter_tvb) 497 return offset; 498 PDPTypeNumber = tvb_get_guint8(parameter_tvb,0); 499 subtree = proto_item_add_subtree(actx->created_item, ett_camel_pdptypenumber); 500 switch (PDPTypeOrganization){ 501 case 0: /* ETSI */ 502 proto_tree_add_item(subtree, hf_camel_PDPTypeNumber_etsi, parameter_tvb, 0, 1, ENC_BIG_ENDIAN); 503 break; 504 case 1: /* IETF */ 505 proto_tree_add_item(subtree, hf_camel_PDPTypeNumber_ietf, parameter_tvb, 0, 1, ENC_BIG_ENDIAN); 506 break; 507 default: 508 break; 509 } 510#.END 511 512 513#.FN_BODY EndUserAddress/pDPAddress VAL_PTR = ¶meter_tvb 514 515 tvbuff_t *parameter_tvb; 516 proto_tree *subtree; 517 518%(DEFAULT_BODY)s 519 520 if (!parameter_tvb) 521 return offset; 522 subtree = proto_item_add_subtree(actx->created_item, ett_camel_pdptypenumber); 523 switch (PDPTypeOrganization){ 524 case 0: /* ETSI */ 525 break; 526 case 1: /* IETF */ 527 switch(PDPTypeNumber){ 528 case 0x21: /* IPv4 */ 529 proto_tree_add_item(subtree, hf_camel_PDPAddress_IPv4, parameter_tvb, 0, tvb_reported_length(parameter_tvb), ENC_BIG_ENDIAN); 530 break; 531 case 0x57: /* IPv6 */ 532 proto_tree_add_item(subtree, hf_camel_PDPAddress_IPv6, parameter_tvb, 0, tvb_reported_length(parameter_tvb), ENC_NA); 533 break; 534 default: 535 break; 536 } 537 default: 538 break; 539 540 } 541#.END 542 543#---------------------------------------------------------------------------------------- 544#.FN_BODY LocationInformationGPRS/cellGlobalIdOrServiceAreaIdOrLAI 545 proto_tree *subtree; 546 int start_offset; 547 548 start_offset = offset; 549%(DEFAULT_BODY)s 550 551 subtree = proto_item_add_subtree(actx->created_item, ett_camel_pdptypenumber); 552 553 if (tvb_reported_length_remaining(tvb,start_offset) == 7){ 554 dissect_gsm_map_CellGlobalIdOrServiceAreaIdFixedLength(TRUE, tvb, start_offset, actx, subtree, hf_camel_cellGlobalIdOrServiceAreaIdFixedLength); 555 }else{ 556 dissect_gsm_map_LAIFixedLength(TRUE, tvb, start_offset, actx, subtree, hf_camel_locationAreaId); 557 } 558#.END 559 560#---------------------------------------------------------------------------------------- 561#.FN_BODY AChBillingChargingCharacteristics VAL_PTR = ¶meter_tvb 562 tvbuff_t *parameter_tvb; 563 proto_tree *subtree; 564 565%(DEFAULT_BODY)s 566 if (!parameter_tvb) 567 return offset; 568 subtree = proto_item_add_subtree(actx->created_item, ett_camel_CAMEL_AChBillingChargingCharacteristics); 569 if((camel_ver == 2)||(camel_ver == 1)){ 570 return dissect_camel_CAMEL_AChBillingChargingCharacteristicsV2(FALSE, parameter_tvb, 0, actx, subtree, hf_camel_CAMEL_AChBillingChargingCharacteristics); 571 } 572 dissect_camel_CAMEL_AChBillingChargingCharacteristics(FALSE, parameter_tvb, 0, actx, subtree, hf_camel_CAMEL_AChBillingChargingCharacteristics); 573 574#.FN_BODY FCIBillingChargingCharacteristics VAL_PTR = ¶meter_tvb 575 tvbuff_t *parameter_tvb; 576 proto_tree *subtree; 577 578%(DEFAULT_BODY)s 579 if (!parameter_tvb) 580 return offset; 581 subtree = proto_item_add_subtree(actx->created_item, ett_camel_CAMEL_FCIBillingChargingCharacteristics); 582 dissect_camel_CAMEL_FCIBillingChargingCharacteristics(FALSE, parameter_tvb, 0, actx, subtree, hf_camel_CAMEL_FCIBillingChargingCharacteristics); 583 584#.FN_BODY FCIGPRSBillingChargingCharacteristics VAL_PTR = ¶meter_tvb 585 tvbuff_t *parameter_tvb; 586 proto_tree *subtree; 587 588%(DEFAULT_BODY)s 589 if (!parameter_tvb) 590 return offset; 591 subtree = proto_item_add_subtree(actx->created_item, ett_camel_CAMEL_FCIGPRSBillingChargingCharacteristics); 592 dissect_camel_CAMEL_FCIGPRSBillingChargingCharacteristics(FALSE, parameter_tvb, 0, actx, subtree, hf_camel_CAMEL_FCIGPRSBillingChargingCharacteristics); 593 594#.FN_BODY FCISMSBillingChargingCharacteristics VAL_PTR = ¶meter_tvb 595 tvbuff_t *parameter_tvb; 596 proto_tree *subtree; 597 598%(DEFAULT_BODY)s 599 if (!parameter_tvb) 600 return offset; 601 subtree = proto_item_add_subtree(actx->created_item, ett_camel_CAMEL_FCISMSBillingChargingCharacteristics); 602 dissect_camel_CAMEL_FCISMSBillingChargingCharacteristics(FALSE, parameter_tvb, 0, actx, subtree, hf_camel_CAMEL_FCISMSBillingChargingCharacteristics); 603 604#.FN_BODY SCIBillingChargingCharacteristics VAL_PTR = ¶meter_tvb 605 tvbuff_t *parameter_tvb; 606 proto_tree *subtree; 607 608%(DEFAULT_BODY)s 609 if (!parameter_tvb) 610 return offset; 611 subtree = proto_item_add_subtree(actx->created_item, ett_camel_CAMEL_SCIBillingChargingCharacteristics); 612 dissect_camel_CAMEL_SCIBillingChargingCharacteristics(FALSE, parameter_tvb, 0, actx, subtree, hf_camel_CAMEL_SCIBillingChargingCharacteristics); 613 614#.FN_BODY SCIGPRSBillingChargingCharacteristics VAL_PTR = ¶meter_tvb 615 tvbuff_t *parameter_tvb; 616 proto_tree *subtree; 617 618%(DEFAULT_BODY)s 619 if (!parameter_tvb) 620 return offset; 621 subtree = proto_item_add_subtree(actx->created_item, ett_camel_CAMEL_SCIGPRSBillingChargingCharacteristics); 622 dissect_camel_CAMEL_SCIGPRSBillingChargingCharacteristics(FALSE, parameter_tvb, 0, actx, subtree, hf_camel_CAMEL_SCIGPRSBillingChargingCharacteristics); 623 624#.FN_BODY CallResult VAL_PTR = ¶meter_tvb 625 tvbuff_t *parameter_tvb; 626 proto_tree *subtree; 627 628%(DEFAULT_BODY)s 629 if (!parameter_tvb) 630 return offset; 631 subtree = proto_item_add_subtree(actx->created_item, ett_camel_CAMEL_CallResult); 632 dissect_camel_CAMEL_CallResult(FALSE, parameter_tvb, 0, actx, subtree, hf_camel_CAMEL_CallResult); 633 634# V3 and V4 incompatibillity bug #1719 635#.FN_BODY CAMEL-AChBillingChargingCharacteristics/timeDurationCharging/audibleIndicator 636 if (tvb_reported_length_remaining(tvb,offset) < 2) 637 offset = dissect_camel_BOOLEAN(TRUE, tvb, offset, actx , tree, hf_camel_audibleIndicatorTone); 638 else 639%(DEFAULT_BODY)s 640 641#.FN_BODY CalledPartyBCDNumber VAL_PTR = ¶meter_tvb 642/* See 3GPP TS 29.078 643 * and 3GPP TS 24.008, section 10.5.4.7 644 * Indicates the Called Party Number, including service selection information. 645 * Refer to 3GPP TS 24.008 [9] for encoding. 646 * This data type carries only the 'type of number', 'numbering plan 647 * identification' and 'number digit' fields defined in 3GPP TS 24.008 [9]; 648 * it does not carry the 'called party BCD number IEI' or 'length of called 649 * party BCD number contents'. 650 * In the context of the DestinationSubscriberNumber field in ConnectSMSArg or 651 * InitialDPSMSArg, a CalledPartyBCDNumber may also contain an alphanumeric 652 * character string. In this case, type-of-number '101'B is used, in accordance 653 * with 3GPP TS 23.040 [6]. The address is coded in accordance with the 654 * GSM 7-bit default alphabet definition and the SMS packing rules 655 * as specified in 3GPP TS 23.038 [15] in this case. 656 */ 657 tvbuff_t *parameter_tvb; 658 proto_tree *subtree; 659 660%(DEFAULT_BODY)s 661 662 if (!parameter_tvb) 663 return offset; 664 subtree = proto_item_add_subtree(actx->created_item, ett_camel_calledpartybcdnumber); 665 de_cld_party_bcd_num(parameter_tvb, subtree, actx->pinfo, 0, tvb_reported_length(parameter_tvb), NULL, 0); 666 667#.END 668 669#.FN_BODY Digits VAL_PTR = ¶meter_tvb 670/* 671* Digits {PARAMETERS-BOUND : bound} ::= OCTET STRING (SIZE( 672* bound.&minDigitsLength .. bound.&maxDigitsLength)) 673*-- Indicates the address signalling digits. 674*-- Refer to ETSI EN 300 356 1 [23] Generic Number & Generic Digits parameters for encoding. 675*-- The coding of the subfields 'NumberQualifier' in Generic Number and 'TypeOfDigits' in 676*-- Generic Digits are irrelevant to the CAP; 677*-- the ASN.1 tags are sufficient to identify the parameter. 678*-- The ISUP format does not allow to exclude these subfields, 679*-- therefore the value is network operator specific. 680*-- 681*-- The following parameters shall use Generic Number: 682*-- - AdditionalCallingPartyNumber for InitialDP 683*-- - AssistingSSPIPRoutingAddress for EstablishTemporaryConnection 684*-- - CorrelationID for AssistRequestInstructions 685*-- - CalledAddressValue for all occurrences, CallingAddressValue for all occurrences. 686*-- 687*-- The following parameters shall use Generic Digits: 688*-- - CorrelationID in EstablishTemporaryConnection 689*-- - number in VariablePart 690*-- - digitsResponse in ReceivedInformationArg 691*-- - midCallEvents in oMidCallSpecificInfo and tMidCallSpecificInfo 692*-- 693*-- In the digitsResponse and midCallevents, the digits may also include the '*', '#', 694*-- a, b, c and d digits by using the IA5 character encoding scheme. If the BCD even or 695*-- BCD odd encoding scheme is used, then the following encoding shall be applied for the 696*-- non-decimal characters: 1011 (*), 1100 (#). 697*-- 698*-- AssistingSSPIPRoutingAddress in EstablishTemporaryConnection and CorrelationID in 699*-- AssistRequestInstructions may contain a Hex B digit as address signal. Refer to 700*-- Annex A.6 for the usage of the Hex B digit. 701*-- 702*-- Note that when CorrelationID is transported in Generic Digits, then the digits shall 703*-- always be BCD encoded. 704*/ 705 tvbuff_t *parameter_tvb; 706 proto_tree *subtree; 707 gint ett = -1; 708 gboolean digits = FALSE; 709 710 offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index, 711 ¶meter_tvb); 712 713 if (!parameter_tvb) 714 return offset; 715 716 if (hf_index == hf_camel_calledAddressValue) { 717 ett = ett_camel_calledAddressValue; 718 } else if (hf_index == hf_camel_callingAddressValue) { 719 ett = ett_camel_callingAddressValue; 720 } else if (hf_index == hf_camel_additionalCallingPartyNumber) { 721 ett = ett_camel_additionalcallingpartynumber; 722 } else if (hf_index == hf_camel_assistingSSPIPRoutingAddress) { 723 ett = ett_camel_assistingSSPIPRoutingAddress; 724 } else if (hf_index == hf_camel_correlationID) { 725 ett = ett_camel_correlationID; 726 digits = (opcode == opcode_establishTemporaryConnection) ? TRUE : FALSE; 727 } else if (hf_index == hf_camel_dTMFDigitsCompleted) { 728 ett = ett_camel_dTMFDigitsCompleted; 729 digits = TRUE; 730 } else if (hf_index == hf_camel_dTMFDigitsTimeOut) { 731 ett = ett_camel_dTMFDigitsTimeOut; 732 digits = TRUE; 733 } else if (hf_index == hf_camel_number) { 734 ett = ett_camel_number; 735 digits = TRUE; 736 } else if (hf_index == hf_camel_digitsResponse) { 737 ett = ett_camel_digitsResponse; 738 digits = TRUE; 739 } 740 741 subtree = proto_item_add_subtree(actx->created_item, ett); 742 if (digits) { 743 dissect_isup_generic_digits_parameter(parameter_tvb, subtree, NULL); 744 } else { 745 dissect_isup_generic_number_parameter(parameter_tvb, actx->pinfo, subtree, NULL); 746 } 747 748# I don't know how to "access" the EstablishTemporaryConnectionArg-PDU which would have been cleaner. 749#.FN_BODY EstablishTemporaryConnectionArg 750 751 if(camel_ver==2){ 752 return dissect_camel_EstablishTemporaryConnectionArgV2(implicit_tag, tvb, offset, actx, tree, hf_index); 753 } 754%(DEFAULT_BODY)s 755 756#.FN_BODY SpecializedResourceReportArg 757 if (camel_ver < 4) { 758 return dissect_camel_SpecializedResourceReportArgV23(implicit_tag, tvb, offset, actx, tree, hf_camel_allAnnouncementsComplete); 759 } 760%(DEFAULT_BODY)s 761 762#.TYPE_ATTR 763PDPTypeOrganization TYPE = FT_UINT8 DISPLAY = BASE_DEC BITMASK = 0x0f STRINGS = VALS(gsm_map_PDP_Type_Organisation_vals) 764DateAndTime TYPE = FT_STRING DISPLAY = BASE_NONE 765Code/local TYPE = FT_INT32 DISPLAY = BASE_DEC STRINGS = VALS(camel_opr_code_strings) 766ServiceInteractionIndicatorsTwo/holdTreatmentIndicator TYPE = FT_INT32 DISPLAY = BASE_DEC STRINGS = VALS(camel_holdTreatmentIndicator_values) 767ServiceInteractionIndicatorsTwo/cwTreatmentIndicator TYPE = FT_INT32 DISPLAY = BASE_DEC STRINGS = VALS(camel_cwTreatmentIndicator_values) 768ServiceInteractionIndicatorsTwo/ectTreatmentIndicator TYPE = FT_INT32 DISPLAY = BASE_DEC STRINGS = VALS(camel_ectTreatmentIndicator_values) 769#.FIELD_ATTR 770EventSpecificInformationSMS/o-smsFailureSpecificInfo/failureCause ABBREV=mo-smsfailureCause 771EventSpecificInformationBCSM/routeSelectFailureSpecificInfo/failureCause ABBREV=routeSelectfailureCause 772EventSpecificInformationSMS/t-smsFailureSpecificInfo/failureCause ABBREV=t-smsfailureCause 773Tone/duration ABBREV=toneDuration 774GapIndicators/duration ABBREV=gapIndicatorsDuration 775InbandInfo/duration ABBREV=inbandInfoDuration 776 777#.END 778