2 * Routines for h450 packet dissection
3 * Based on the previous h450 dissector by:
4 * 2003 Graeme Reid (graeme.reid@norwoodsystems.com)
5 * Copyright 2005, Anders Broman <anders.broman@ericsson.com>
9 * Wireshark - Network traffic analyzer
10 * By Gerald Combs <gerald@wireshark.org>
11 * Copyright 1998 Gerald Combs
13 * This program is free software; you can redistribute it and/or
14 * modify it under the terms of the GNU General Public License
15 * as published by the Free Software Foundation; either version 2
16 * of the License, or (at your option) any later version.
18 * This program is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU General Public License for more details.
23 * You should have received a copy of the GNU General Public License
24 * along with this program; if not, write to the Free Software
25 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
27 * Credit to Tomas Kukosa for developing the Asn2eth compiler.
36 #include <epan/packet.h>
37 #include <epan/conversation.h>
42 #include "packet-h450.h"
44 #include "packet-ber.h"
45 #include "packet-per.h"
46 #include "packet-h225.h"
51 /* H.450.2 Call Transfer constants */
52 #define CallTransferIdentify 7
53 #define CallTransferAbandon 8
54 #define CallTransferInitiate 9
55 #define CallTransferSetup 10
56 #define CallTransferUpdate 13
57 #define SubaddressTransfer 14
58 #define CallTransferComplete 12
59 #define CallTransferActive 11
61 /* H.450.3 Call Diversion constants */
62 #define ActivateDiversionQ 15
63 #define DeactivateDiversionQ 16
64 #define InterrogateDiversionQ 17
65 #define CheckRestriction 18
66 #define CallRerouting 19
67 #define DivertingLegInformation1 20
68 #define DivertingLegInformation2 21
69 #define DivertingLegInformation3 22
70 #define DivertingLegInformation4 100
71 #define CfnrDivertedLegFailed 23
73 /* H.450.4 Call Hold constants */
74 #define HoldNotific 101
75 #define RetrieveNotific 102
76 #define RemoteHold 103
77 #define RemoteRetrieve 104
79 /* H.450.5 Call Park and Pickup constants */
82 #define GroupIndicationOn 108
83 #define GroupIndicationOff 109
88 #define CpickupNotify 114
90 /* H.450.6 Call Waiting constants */
91 #define CallWaiting 105
93 /* H.450.7 Message Waiting Indication constants */
94 #define MWIActivate 80
95 #define MWIDeactivate 81
96 #define MWIInterrogate 82
98 /* H.450.8 Name Identification constants */
99 #define NIcallingName 0
100 #define NIalertingName 1
101 #define NIconnectedName 2
104 /* H.450.9 Call Completion constants */
105 #define CCBSRequest 40
106 #define CCNRRequest 27
108 #define CCExecPossible 29
113 /* H.450.10 Call Offer constants */
114 #define CallOfferRequest 34
115 #define RemoteUserAlerting 115
116 #define CFBOverride 49
118 /* H.450.11 Call Intrusion constants */
119 #define CallIntrusionRequest 43
120 #define CallIntrusionGetCIPL 44
121 #define CallIntrusionIsolate 45
122 #define CallIntrusionForcedRelease 46
123 #define CallIntrusionWOBRequest 47
124 #define CallIntrusionSilentMonitor 116
125 #define CallIntrusionNotification 117
127 /* H.450.12 Common Information Operations constants */
128 #define CmnRequest 84
131 /* TODO - define other H.450.x constants here */
132 static dissector_handle_t h4501_handle=NULL;
134 /* Initialize the protocol and registered fields */
135 static int proto_h4501 = -1;
137 static int hf_h4501 = -1;
138 static int hf_h4501_constrained_invokeId = -1;
139 static int hf_h4501_invokeId = -1;
140 static int hf_h4501_localOpcode = -1;
141 static int hf_h4501_globalCode = -1;
142 static int hf_h4501_globalargument = -1;
143 static int hf_h4501_opcode = -1;
144 static int hf_h4501_ReturnResult_result = -1;
145 static int hf_h4501_result = -1;
146 static int hf_h4501_ReturnResult = -1;
147 static int hf_h4501_localErrorCode = -1;
148 static int hf_h4501_errorCode = -1;
149 static int hf_h4501_parameter = -1;
150 static int hf_h4501_ReturnError = -1;
151 static int hf_h4501_GeneralProblem = -1;
152 static int hf_h4501_InvokeProblem = -1;
153 static int hf_h4501_ReturnResultProblem = -1;
154 static int hf_h4501_ReturnErrorProblem = -1;
155 static int hf_h4501_problem = -1;
156 static int hf_h4501_Reject = -1;
158 static int hf_h4502_CTIdentifyRes = -1;
159 static int hf_h4502_DummyRes = -1;
160 static int hf_h4502_DummyArg = -1;
162 static int hf_h4503DeactivateDiversionQArg = -1;
163 static int hf_h4503InterrogateDiversionQ = -1;
164 static int hf_h4503CheckRestrictionArg = -1;
165 static int hf_h4503CallReroutingArg = -1;
166 static int hf_h4503DivertingLegInformation1Arg = -1;
167 static int hf_h4503DivertingLegInformation2Arg = -1;
168 static int hf_h4503DivertingLegInformation3Arg = -1;
169 static int hf_h4503DivertingLegInformation4Arg = -1;
170 static int hf_h4503CfnrDivertedLegFailedArg = -1;
172 static int hf_h4504_HoldNotificArg = -1;
173 static int hf_h4504_RetrieveNotificArg = -1;
174 static int hf_h4504_RemoteHoldArg = -1;
175 static int hf_h4504_RemoteRetrieveArg = -1;
176 static int hf_h4504_RemoteRetrieveRes = -1;
178 static int hf_h4507_MWIActivateArg = -1;
179 static int hf_h4507_MWIDeactivateArg = -1;
180 static int hf_h4507_MwiDummyRes = -1;
181 static int hf_h4507_MWIInterrogateArg = -1;
182 static int hf_h4507_MWIInterrogateRes = -1;
184 static int hf_h4508_CallingNameArg = -1;
185 static int hf_h4508_AlertingNameArg = -1;
186 static int hf_h4508_ConnectedNameArg = -1;
187 static int hf_h4508_BusyNameArg = -1;
188 static int hf_h45012_CmnRequest = -1;
189 static int hf_h45012_CmnInform = -1;
191 static int hf_h4501_Invoke = -1;
192 static int hf_h4501_ROS = -1;
194 #include "packet-h450-hf.c"
196 /* Initialize the subtree pointers */
197 static gint ett_h4501 = -1;
198 static gint ett_h4501_opcode = -1;
199 static gint ett_h4501_result = -1;
200 static gint ett_h4501_errorCode = -1;
202 static gint ett_h4501_problem = -1;
203 static gint ett_h4501_Reject = -1;
204 static gint ett_h4501_ReturnError = -1;
205 static gint ett_h4501_ReturnResult = -1;
206 static gint ett_h4501_Invoke = -1;
207 static gint ett_h4501_ROS = -1;
209 #include "packet-h450-ett.c"
211 /* Global variables */
212 static guint32 localOpcode;
213 static guint32 localErrorCode;
214 static const char *globalcode_oid_str;
215 static gboolean is_globalcode;
217 static const value_string localOpcode_vals[] = {
218 /* H.450.2 Call Transfer opcodes */
219 { CallTransferIdentify, "callTransferIdentify"},
220 { CallTransferAbandon, "callTransferAbandon"},
221 { CallTransferInitiate, "callTransferInitiate"},
222 { CallTransferSetup, "callTransferSetup"},
223 { CallTransferUpdate, "callTransferUpdate"},
224 { SubaddressTransfer, "subaddressTransfer"},
225 { CallTransferComplete, "callTransferComplete"},
226 { CallTransferActive, "callTransferActive"},
228 /* H.450.3 Call Diversion opcodes */
229 { ActivateDiversionQ, "activateDiversionQ"},
230 { DeactivateDiversionQ, "deactivateDiversionQ"},
231 { InterrogateDiversionQ, "interrogateDiversionQ"},
232 { CheckRestriction, "checkRestriction"},
233 { CallRerouting, "callRerouting"},
234 { DivertingLegInformation1,"divertingLegInformation1"},
235 { DivertingLegInformation2,"divertingLegInformation2"},
236 { DivertingLegInformation3,"divertingLegInformation3"},
237 { DivertingLegInformation4,"divertingLegInformation4"},
238 { CfnrDivertedLegFailed, "cfnrDivertedLegFailed"},
240 /* H.450.4 Call Hold opcodes */
241 { HoldNotific, "holdNotific"},
242 { RetrieveNotific, "retrieveNotific"},
243 { RemoteHold, "remoteHold"},
244 { RemoteRetrieve, "remoteRetrieve"},
246 /* H.450.5 Call Park and Pickup opcodes */
247 { CpRequest, "cpRequest"},
248 { CpSetup, "cpSetup"},
249 { GroupIndicationOn, "groupIndicationOn"},
250 { GroupIndicationOff, "groupIndicationOff"},
251 { Pickrequ, "pickrequ"},
253 { PickExe, "pickExe"},
254 { CpNotify, "cpNotify"},
255 { CpickupNotify, "cpickupNotify"},
257 /* H.450.6 Call Waiting opcodes */
258 { CallWaiting, "callWaiting"},
260 /* H.450.7 Message Waiting Indication constants */
261 { MWIActivate, "mwiActivate"},
262 { MWIDeactivate, "mwiDeactivate"},
263 { MWIInterrogate, "mwiInterrogate"},
265 /* H.450.8 Name Identification constants */
266 { NIcallingName, "niCallingName"},
267 { NIalertingName, "niAlertingName"},
268 { NIconnectedName, "niConnectedName"},
269 { NIbusyName, "niBusyName"},
271 /* H.450.9 Call Completion constants */
272 { CCBSRequest, "ccbsRequest"},
273 { CCNRRequest, "ccnrRequest"},
274 { CCCancel, "ccCancel"},
275 { CCExecPossible, "ccExecPossible"},
276 { CCRingout, "ccRingout"},
277 { CCSuspend, "ccSuspend"},
278 { CCResume, "ccResume"},
280 /* H.450.10 Call Offer constants */
281 { CallOfferRequest, "callOfferRequest"},
282 { RemoteUserAlerting, "remoteUserAlerting"},
283 { CFBOverride, "cfbOverride"},
285 /* H.450.11 Call Intrusion constants */
286 { CallIntrusionRequest, "callIntrusionRequest"},
287 { CallIntrusionGetCIPL, "callIntrusionGetCIPL"},
288 { CallIntrusionIsolate, "callIntrusionIsolate"},
289 { CallIntrusionForcedRelease,"callIntrusionForcedRelease"},
290 { CallIntrusionWOBRequest, "callIntrusionWOBRequest"},
291 { CallIntrusionSilentMonitor,"callIntrusionSilentMonitor"},
292 { CallIntrusionNotification, "callIntrusionNotification"},
294 /* TODO - add other H.450.x invoke opcodes here */
295 /* H.450.12 Common Information Operations constants */
296 { CmnRequest, "CmnRequest"},
297 { CmnInform, "CmnInform"},
301 static int dissect_h4501_argument(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree);
302 static int dissect_ros_ROSxxx(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, int hf_ind _U_);
306 #include "packet-h450-fn.c"
308 static const value_string InvokeProblem_vals[] = {
309 { 0, "duplicateInvocation"},
310 { 1, "unrecognizedOperation"},
311 { 2, "mistypedArgument"},
312 { 3, "resourceLimitation"},
313 { 4, "releaseInProgress"},
314 { 5, "unrecognizedLinkedId"},
315 { 6, "linkedResponseUnexpected"},
316 { 7, "unexpectedLinkedOperation"},
320 dissect_h4501_InvokeProblem(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
322 offset=dissect_per_constrained_integer(tvb, offset, pinfo, tree, hf_h4501_InvokeProblem, 0, 7, NULL, NULL, FALSE);
327 static const value_string ReturnResultProblem_vals[] = {
328 { 0, "unrecognizedInvocation"},
329 { 1, "resultResponseUnexpected"},
330 { 2, "mistypedResult"},
334 dissect_h4501_ReturnResultProblem(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
336 offset=dissect_per_constrained_integer(tvb, offset, pinfo, tree, hf_h4501_ReturnResultProblem, 0, 2, NULL, NULL, FALSE);
341 static const value_string ReturnErrorProblem_vals[] = {
342 { 0, "unrecognizedInvocation"},
343 { 1, "errorResponseUnexpected"},
344 { 2, "unrecognizedError"},
345 { 3, "unexpectedError"},
346 { 4, "mistypedParameter"},
350 dissect_h4501_ReturnErrorProblem(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
352 offset=dissect_per_constrained_integer(tvb, offset, pinfo, tree, hf_h4501_ReturnErrorProblem, 0, 4, NULL, NULL, FALSE);
356 static const value_string GeneralProblem_vals[] = {
357 { 0, "unrecognizedCompenent"},
358 { 1, "mistypedCompenent"},
359 { 2, "badlyStructuredCompenent"},
363 dissect_h4501_GeneralProblem(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
365 offset=dissect_per_constrained_integer(tvb, offset, pinfo, tree, hf_h4501_GeneralProblem, 0, 2, NULL, NULL, FALSE);
369 dissect_h4501_ReturnResult_result(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
371 tvbuff_t *result_tvb = NULL;
373 offset=dissect_per_octet_string(tvb, offset, pinfo, tree, -1, NO_BOUND, NO_BOUND, &result_tvb);
375 if(tvb_length(result_tvb)){
376 switch (localOpcode) {
377 case CallTransferIdentify:
378 dissect_h450_CTIdentifyRes(result_tvb, 0, pinfo, tree, hf_h4502_CTIdentifyRes);
381 case CallTransferInitiate:
382 case CallTransferSetup:
383 dissect_h450_DummyRes(result_tvb, 0, pinfo , tree, hf_h4502_DummyRes);
386 case ActivateDiversionQ:
387 dissect_ActivateDiversionQRes_PDU(result_tvb, pinfo, tree);
389 case DeactivateDiversionQ:
390 dissect_DeactivateDiversionQRes_PDU(result_tvb, pinfo, tree);
392 case InterrogateDiversionQ:
393 dissect_InterrogateDiversionQRes_PDU(result_tvb, pinfo, tree);
395 case CheckRestriction:
396 dissect_CheckRestrictionRes_PDU(result_tvb, pinfo, tree);
399 dissect_CallReroutingRes_PDU(result_tvb, pinfo, tree);
403 dissect_h450_RemoteRetrieveRes(result_tvb, 0, pinfo , tree, hf_h4504_RemoteRetrieveRes);
406 dissect_h450_MwiDummyRes(result_tvb, 0, pinfo , tree, hf_h4507_MwiDummyRes);
409 dissect_h450_MwiDummyRes(result_tvb, 0, pinfo , tree, hf_h4507_MwiDummyRes);
412 dissect_h450_MWIInterrogateRes(result_tvb, 0, pinfo , tree, hf_h4507_MWIInterrogateRes);
416 PER_NOT_DECODED_YET("Unrecognized H.450.x return result");
425 dissect_h4501_localOpcode(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
427 offset=dissect_per_integer(tvb, offset, pinfo, tree, hf_h4501_localOpcode, &localOpcode, NULL);
428 is_globalcode = FALSE;
434 dissect_h4501_globalCode(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
436 offset=dissect_per_object_identifier_str(tvb, offset, pinfo, tree, hf_h4501_globalCode, &globalcode_oid_str);
437 is_globalcode = TRUE;
442 static const value_string opcode_vals[] = {
447 static const per_choice_t opcode_choice[] = {
448 { 0, "local", ASN1_NO_EXTENSIONS,
449 dissect_h4501_localOpcode },
450 { 1, "global", ASN1_NO_EXTENSIONS,
451 dissect_h4501_globalCode },
455 dissect_h4501_opcode(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
457 offset=dissect_per_choice(tvb, offset, pinfo, tree, hf_h4501_opcode, ett_h4501_opcode, opcode_choice, NULL);
461 static const per_sequence_t result_sequence[] = {
462 { "opcode", ASN1_EXTENSION_ROOT, ASN1_NOT_OPTIONAL,
463 dissect_h4501_opcode },
464 { "result", ASN1_EXTENSION_ROOT, ASN1_NOT_OPTIONAL,
465 dissect_h4501_ReturnResult_result },
469 dissect_h4501_result(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
471 offset=dissect_per_sequence(tvb, offset, pinfo, tree, hf_h4501_result, ett_h4501_result, result_sequence);
476 dissect_h4501_parameter(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
478 /* TODO - decode return error parameter based on localErrorCode */
479 offset=dissect_per_octet_string(tvb, offset, pinfo, tree, hf_h4501_parameter, NO_BOUND, NO_BOUND, NULL);
482 static const value_string localErrorCode_vals[] = {
483 /* H.450.1 general error list */
484 { 0, "userNotSubscribed"},
485 { 1, "RejectedByNetwork"},
486 { 2, "RejectedByUser"},
487 { 3, "NotAvailable"},
488 { 5, "InsufficientInformation"},
489 { 6, "InvalidServedUserNumber"},
490 { 7, "InvalidCallState"},
491 { 8, "BasicServiceNotProvided"},
492 { 9, "NotIncomingCall"},
493 { 10, "SupplementaryServiceInteractionNotAllowed"},
494 { 11, "ResourceUnavailable"},
495 { 25, "CallFailure"},
496 { 43, "ProceduralError"},
498 /* H.450.2 Call Transfer return errors */
499 { 1004, "invalidReroutingNumber"},
500 { 1005, "unrecognizedCallIdentity"},
501 { 1006, "establishmentFailure"},
502 { 1008, "unspecified"},
504 /* H.450.4 Call Hold return errors */
505 { 2002, "undefined"},
507 /* H.450.5 Call Park and Pickup return errors */
508 { 2000, "callPickupIdInvalid"},
509 { 2001, "callAlreadyPickedUp"},
511 /* H.450.7 Message Waiting Indication return errors */
512 { 1018, "invalidMsgCentreId"},
513 { 31, "notActivated"},
515 /* H.450.9 Call Completion return errors */
516 { 1010, "shortTermRejection"},
517 { 1011, "longTermRejection"},
518 { 1012, "remoteUserBusyAgain"},
519 { 1013, "failureToMatch"},
521 /* H.450.11 Call Intrusion return errors */
523 { 1000, "temporarilyUnavailable"},
524 { 1007, "notAuthorized"},
526 /* TODO - add other H.450.x error codes here */
531 dissect_h4501_localErrorCode(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
533 offset=dissect_per_integer(tvb, offset, pinfo, tree, hf_h4501_localErrorCode, &localErrorCode, NULL);
538 static const value_string errorCode_vals[] = {
543 static const per_choice_t errorCode_choice[] = {
544 { 0, "local", ASN1_NO_EXTENSIONS,
545 dissect_h4501_localErrorCode },
546 { 1, "global", ASN1_NO_EXTENSIONS,
547 dissect_h4501_globalCode },
551 dissect_h4501_errorCode(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
553 offset=dissect_per_choice(tvb, offset, pinfo, tree, hf_h4501_errorCode, ett_h4501_errorCode, errorCode_choice, NULL);
557 static const value_string problem_vals[] = {
560 { 2, "returnResult" },
561 { 3, "returnError" },
564 static const per_choice_t problem_choice[] = {
565 { 0, "general", ASN1_NO_EXTENSIONS,
566 dissect_h4501_GeneralProblem },
567 { 1, "invoke", ASN1_NO_EXTENSIONS,
568 dissect_h4501_InvokeProblem },
569 { 2, "returnResult", ASN1_NO_EXTENSIONS,
570 dissect_h4501_ReturnResultProblem },
571 { 3, "returnError", ASN1_NO_EXTENSIONS,
572 dissect_h4501_ReturnErrorProblem },
576 dissect_h4501_problem(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
578 offset=dissect_per_choice(tvb, offset, pinfo, tree, hf_h4501_problem, ett_h4501_problem, problem_choice, NULL);
582 dissect_h4501_constrained_invokeId(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
584 offset=dissect_per_constrained_integer(tvb, offset, pinfo, tree, hf_h4501_constrained_invokeId, 0, 65535, NULL, NULL, FALSE);
590 dissect_h4501_invokeId(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
592 offset=dissect_per_integer(tvb, offset, pinfo, tree, hf_h4501_invokeId, NULL, NULL);
596 static const per_sequence_t Reject_sequence[] = {
597 { "invokeID", ASN1_NO_EXTENSIONS, ASN1_NOT_OPTIONAL,
598 dissect_h4501_invokeId },
599 { "problem", ASN1_NO_EXTENSIONS, ASN1_NOT_OPTIONAL,
600 dissect_h4501_problem },
604 dissect_h4501_Reject(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
606 offset=dissect_per_sequence(tvb, offset, pinfo, tree, hf_h4501_Reject, ett_h4501_Reject, Reject_sequence);
610 static const per_sequence_t ReturnError_sequence[] = {
611 { "invokeID", ASN1_NO_EXTENSIONS, ASN1_NOT_OPTIONAL,
612 dissect_h4501_invokeId },
613 { "errorCode", ASN1_NO_EXTENSIONS, ASN1_NOT_OPTIONAL,
614 dissect_h4501_errorCode },
615 { "parameter", ASN1_NO_EXTENSIONS, ASN1_OPTIONAL,
616 dissect_h4501_parameter },
620 dissect_h4501_ReturnError(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
622 offset=dissect_per_sequence(tvb, offset, pinfo, tree, hf_h4501_ReturnError, ett_h4501_ReturnError, ReturnError_sequence);
626 static const per_sequence_t ReturnResult_sequence[] = {
627 { "invokeID", ASN1_NO_EXTENSIONS, ASN1_NOT_OPTIONAL,
628 dissect_h4501_invokeId },
629 { "result", ASN1_NO_EXTENSIONS, ASN1_OPTIONAL,
630 dissect_h4501_result },
634 dissect_h4501_ReturnResult(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
636 offset=dissect_per_sequence(tvb, offset, pinfo, tree, hf_h4501_ReturnResult, ett_h4501_ReturnResult, ReturnResult_sequence);
640 static const per_sequence_t Invoke_sequence[] = {
641 { "invokeID", ASN1_NO_EXTENSIONS, ASN1_NOT_OPTIONAL,
642 dissect_h4501_constrained_invokeId },
643 { "linkedId", ASN1_NO_EXTENSIONS, ASN1_OPTIONAL,
644 dissect_h4501_invokeId },
645 { "opcode", ASN1_NO_EXTENSIONS, ASN1_NOT_OPTIONAL,
646 dissect_h4501_opcode },
647 { "argument", ASN1_NO_EXTENSIONS, ASN1_OPTIONAL,
648 dissect_h4501_argument },
652 dissect_h4501_Invoke(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
654 offset=dissect_per_sequence(tvb, offset, pinfo, tree, hf_h4501_Invoke, ett_h4501_Invoke, Invoke_sequence);
658 static const value_string ROS_vals[] = {
660 { 2, "returnResult" },
661 { 3, "returnError" },
665 static const per_choice_t ROS_choice[] = {
666 { 1, "invoke", ASN1_NO_EXTENSIONS,
667 dissect_h4501_Invoke },
668 { 2, "returnResult", ASN1_NO_EXTENSIONS,
669 dissect_h4501_ReturnResult },
670 { 3, "returnError", ASN1_NO_EXTENSIONS,
671 dissect_h4501_ReturnError },
672 { 4, "reject", ASN1_NO_EXTENSIONS,
673 dissect_h4501_Reject },
677 dissect_h4501_ROS(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
679 offset=dissect_per_choice(tvb, offset, pinfo, tree, hf_h4501_ROS, ett_h4501_ROS, ROS_choice, NULL);
684 dissect_h4501_argument(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
686 tvbuff_t *argument_tvb = NULL;
688 if ( is_globalcode ){
689 /* TODO call oid dissector
690 * call_ber_oid_callback isn't realy apropriate ?
692 offset = dissect_per_octet_string(tvb, offset, pinfo, tree, hf_h4501_globalargument, NO_BOUND, NO_BOUND, NULL);
693 is_globalcode = FALSE;
698 offset=dissect_per_octet_string(tvb, offset, pinfo, tree, -1, NO_BOUND, NO_BOUND, &argument_tvb);
700 if(tvb_length(argument_tvb)){
701 switch (localOpcode) {
703 case CallTransferIdentify: /* Localvalue 7 */
704 dissect_CallTransferIdentify_PDU(argument_tvb, pinfo, tree);
706 case CallTransferAbandon: /* Localvalue 8 */
707 dissect_CallTransferAbandon_PDU(argument_tvb, pinfo, tree);
709 case CallTransferInitiate: /* Localvalue 9 */
710 dissect_CallTransferInitiate_PDU(argument_tvb, pinfo, tree);
712 case CallTransferSetup: /* Localvalue 10 */
713 dissect_CallTransferSetup_PDU(argument_tvb, pinfo, tree);
715 case CallTransferUpdate: /* Localvalue 13 */
716 dissect_CallTransferUpdate_PDU(argument_tvb, pinfo, tree);
718 case SubaddressTransfer: /* Localvalue 14 */
719 dissect_SubaddressTransfer_PDU(argument_tvb, pinfo, tree);
721 case CallTransferComplete: /* Localvalue 12 */
722 dissect_CallTransferComplete_PDU(argument_tvb, pinfo, tree);
724 case CallTransferActive: /* Localvalue 11 */
725 dissect_CallTransferActive_PDU(argument_tvb, pinfo, tree);
728 case ActivateDiversionQ: /* Localvalue 15 */
729 dissect_ActivateDiversionQArg_PDU(argument_tvb, pinfo, tree);
731 case DeactivateDiversionQ: /* Localvalue 16 */
732 dissect_h450_DeactivateDiversionQArg(argument_tvb, 0, pinfo , tree, hf_h4503DeactivateDiversionQArg);
734 case InterrogateDiversionQ: /* Localvalue 17 */
735 dissect_h450_InterrogateDiversionQ(argument_tvb, 0, pinfo , tree, hf_h4503InterrogateDiversionQ);
737 case CheckRestriction: /* Localvalue 18 */
738 dissect_h450_CheckRestrictionArg(argument_tvb, 0, pinfo , tree, hf_h4503CheckRestrictionArg);
740 case CallRerouting: /* Localvalue 19 */
741 dissect_h450_CallReroutingArg(argument_tvb, 0, pinfo , tree, hf_h4503CallReroutingArg);
743 case DivertingLegInformation1: /* Localvalue 20 */
744 dissect_h450_DivertingLegInformation1Arg(argument_tvb, 0, pinfo , tree, hf_h4503DivertingLegInformation1Arg);
746 case DivertingLegInformation2: /* Localvalue 21 */
747 dissect_h450_DivertingLegInformation2Arg(argument_tvb, 0, pinfo , tree, hf_h4503DivertingLegInformation2Arg);
749 case DivertingLegInformation3: /* Localvalue 22 */
750 dissect_h450_DivertingLegInformation3Arg(argument_tvb, 0, pinfo , tree, hf_h4503DivertingLegInformation3Arg);
752 case DivertingLegInformation4: /* Localvalue 100 */
753 dissect_h450_DivertingLegInformation4Arg(argument_tvb, 0, pinfo , tree, hf_h4503DivertingLegInformation4Arg);
755 case CfnrDivertedLegFailed: /* Localvalue 23 */
756 dissect_h450_CfnrDivertedLegFailedArg(argument_tvb, 0, pinfo , tree, hf_h4503CfnrDivertedLegFailedArg);
758 /* H.450.4 Call Hold */
759 case HoldNotific: /* Localvalue 101 */
760 dissect_h450_HoldNotificArg(argument_tvb, 0, pinfo , tree, hf_h4504_HoldNotificArg);
762 case RetrieveNotific: /* Localvalue 102 */
763 dissect_h450_RetrieveNotificArg(argument_tvb, 0, pinfo , tree, hf_h4504_RetrieveNotificArg);
765 case RemoteHold: /* Localvalue 103 */
766 dissect_h450_RemoteHoldArg(argument_tvb, 0, pinfo , tree, hf_h4504_RemoteHoldArg);
768 case RemoteRetrieve: /* Localvalue 104 */
769 dissect_h450_RemoteRetrieveArg(argument_tvb, 0, pinfo , tree, hf_h4504_RemoteRetrieveArg);
772 /* H.450.5 Call Park and Pickup constants */
773 case CpRequest: /* Localvalue 106 */
774 case CpSetup: /* Localvalue 107 */
775 case GroupIndicationOn: /* Localvalue 108 */
776 case GroupIndicationOff: /* Localvalue 109 */
777 case Pickrequ: /* Localvalue 110 */
778 case Pickup: /* Localvalue 111 */
779 case PickExe: /* Localvalue 112 */
780 case CpNotify: /* Localvalue 113 */
781 case CpickupNotify: /* Localvalue 114 */
783 /* H.450.6 Call Waiting constants */
784 case CallWaiting: /* Localvalue 105 */
785 PER_NOT_DECODED_YET("Unrecognized H.450.x operation");
788 /* H.450.7 Message Waiting Indication */
789 case MWIActivate: /* Localvalue 80 */
790 dissect_h450_MWIActivateArg(argument_tvb, 0, pinfo , tree, hf_h4507_MWIActivateArg);
792 case MWIDeactivate: /* Localvalue 81 */
793 dissect_h450_MWIDeactivateArg(argument_tvb, 0, pinfo , tree, hf_h4507_MWIDeactivateArg);
795 case MWIInterrogate: /* Localvalue 82 */
796 dissect_h450_MWIInterrogateArg(argument_tvb, 0, pinfo , tree, hf_h4507_MWIInterrogateArg);
799 /* H.450.8 Name Identification */
800 case NIcallingName: /* Localvalue 0 */
801 dissect_h450_NameArg(argument_tvb, 0, pinfo , tree, hf_h4508_CallingNameArg);
803 case NIalertingName: /* Localvalue 1 */
804 dissect_h450_NameArg(argument_tvb, 0, pinfo , tree, hf_h4508_AlertingNameArg);
806 case NIconnectedName: /* Localvalue 2 */
807 dissect_h450_NameArg(argument_tvb, 0, pinfo , tree, hf_h4508_ConnectedNameArg);
809 case NIbusyName: /* Localvalue 3 */
810 dissect_h450_NameArg(argument_tvb, 0, pinfo , tree, hf_h4508_BusyNameArg);
813 /* H.450.9 Call Completion constants */
814 case CCBSRequest: /* Localvalue 40 */
815 case CCNRRequest: /* Localvalue 27 */
816 case CCCancel: /* Localvalue 28 */
817 case CCExecPossible: /* Localvalue 29 */
818 case CCRingout: /* Localvalue 31 */
819 case CCSuspend: /* Localvalue 32 */
820 case CCResume: /* Localvalue 33 */
822 /* H.450.10 Call Offer constants */
823 case CallOfferRequest: /* Localvalue 34 */
824 case RemoteUserAlerting: /* Localvalue 115 */
825 case CFBOverride: /* Localvalue 49 */
827 /* H.450.11 Call Intrusion constants */
828 case CallIntrusionRequest: /* Localvalue 43 */
829 case CallIntrusionGetCIPL: /* Localvalue 44 */
830 case CallIntrusionIsolate: /* Localvalue 45 */
831 case CallIntrusionForcedRelease: /* Localvalue 46 */
832 case CallIntrusionWOBRequest: /* Localvalue 47 */
833 case CallIntrusionSilentMonitor: /* Localvalue 116 */
834 case CallIntrusionNotification: /* Localvalue 117 */
835 PER_NOT_DECODED_YET("Unrecognized H.450.x operation");
837 /* H.450.12 Common Information Operations constants */
838 case CmnRequest: /* Localvalue 84 */
839 dissect_h450_CmnRequestArg(argument_tvb, 0, pinfo , tree, hf_h45012_CmnRequest);
841 case CmnInform: /* Localvalue 85 */
842 dissect_h450_CmnArg(argument_tvb, 0, pinfo , tree, hf_h45012_CmnInform);
845 /* TODO - decode other H.450.x invoke arguments here */
847 PER_NOT_DECODED_YET("Unrecognized H.450.x operation");
854 dissect_ros_ROSxxx(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, int hf_ind _U_){
856 offset = dissect_h4501_ROS(tvb, offset, pinfo, tree);
861 dissect_h4501(tvbuff_t *tvb, packet_info *pinfo, proto_tree* tree)
867 it=proto_tree_add_protocol_format(tree, proto_h4501, tvb, 0, -1, "H.450.1");
868 tr=proto_item_add_subtree(it, ett_h4501);
870 dissect_h450_H4501SupplementaryService(tvb, offset, pinfo, tr, hf_h4501);
873 /*--- proto_register_h450 -------------------------------------------*/
874 void proto_register_h450(void) {
877 static hf_register_info hf[] = {
879 { "SupplementaryService", "h4501.SupplementaryService", FT_NONE, BASE_NONE,
880 NULL, 0, "SupplementaryService sequence", HFILL }},
881 { &hf_h4501_constrained_invokeId,
882 { "invokeId", "h4501.invokeId", FT_UINT32, BASE_DEC,
883 NULL, 0, "invokeId", HFILL }},
884 { &hf_h4501_invokeId,
885 { "invokeId", "h4501.invokeId", FT_INT32, BASE_DEC,
886 NULL, 0, "invokeId", HFILL }},
887 { &hf_h4501_localOpcode,
888 { "opcode", "h4501.opcode", FT_INT32, BASE_DEC,
889 VALS(localOpcode_vals), 0, "local", HFILL }},
890 { &hf_h4501_globalCode,
891 { "global", "h4501.global", FT_STRING, BASE_HEX,
892 NULL, 0, "global", HFILL }},
893 { &hf_h4501_globalargument,
894 { "argument", "h4501.argument", FT_BYTES, BASE_HEX,
895 NULL, 0, "argument", HFILL }},
897 { "opcode", "h4501.opcode", FT_UINT32, BASE_DEC,
898 VALS(opcode_vals), 0, "opcode choice", HFILL }},
899 { &hf_h4501_ReturnResult_result,
900 { "result", "h4501.ReturnResult.result", FT_BYTES, BASE_HEX,
901 NULL, 0, "result", HFILL }},
903 { "result", "h4501.result", FT_NONE, BASE_NONE,
904 NULL, 0, "result sequence of", HFILL }},
905 { &hf_h4501_ReturnResult,
906 { "ReturnResult", "h4501.ReturnResult", FT_NONE, BASE_NONE,
907 NULL, 0, "ReturnResult sequence of", HFILL }},
908 { &hf_h4501_localErrorCode,
909 { "errorCode", "h4501.errorCode", FT_INT32, BASE_DEC,
910 VALS(localErrorCode_vals), 0, "local", HFILL }},
911 { &hf_h4501_errorCode,
912 { "errorCode", "h4501.errorCode", FT_UINT32, BASE_DEC,
913 VALS(errorCode_vals), 0, "errorCode", HFILL }},
914 { &hf_h4501_parameter,
915 { "parameter", "h4501.parameter", FT_BYTES, BASE_HEX,
916 NULL, 0, "parameter", HFILL }},
917 { &hf_h4501_ReturnError,
918 { "ReturnError", "h4501.ReturnError", FT_NONE, BASE_NONE,
919 NULL, 0, "ReturnError sequence of", HFILL }},
920 { &hf_h4501_GeneralProblem,
921 { "GeneralProblem", "h4501.GeneralProblem", FT_UINT32, BASE_DEC,
922 VALS(GeneralProblem_vals), 0, "GeneralProblem", HFILL }},
923 { &hf_h4501_InvokeProblem,
924 { "InvokeProblem", "h4501.InvokeProblem", FT_UINT32, BASE_DEC,
925 VALS(InvokeProblem_vals), 0, "InvokeProblem", HFILL }},
926 { &hf_h4501_ReturnResultProblem,
927 { "ReturnResultProblem", "h4501.ReturnResultProblem", FT_UINT32, BASE_DEC,
928 VALS(ReturnResultProblem_vals), 0, "ReturnResultProblem", HFILL }},
929 { &hf_h4501_ReturnErrorProblem,
930 { "ReturnErrorProblem", "h4501.ReturnErrorProblem", FT_UINT32, BASE_DEC,
931 VALS(ReturnErrorProblem_vals), 0, "ReturnErrorProblem", HFILL }},
933 { "problem", "h4501.problem", FT_UINT32, BASE_DEC,
934 VALS(problem_vals), 0, "problem choice", HFILL }},
936 { "Reject", "h4501.Reject", FT_NONE, BASE_NONE,
937 NULL, 0, "Reject sequence of", HFILL }},
939 { "ROS", "h4501.ROS", FT_UINT32, BASE_DEC,
940 VALS(ROS_vals), 0, "ROS choice", HFILL }},
942 { "Invoke", "h4501.Invoke", FT_NONE, BASE_NONE,
943 NULL, 0, "Invoke sequence of", HFILL }},
944 { &hf_h4502_CTIdentifyRes,
945 { "CTIdentifyRes", "h4502.CTIdentifyRes", FT_NONE, BASE_NONE,
946 NULL, 0, "CTIdentifyRes sequence of", HFILL }},
947 { &hf_h4502_DummyRes,
948 { "DummyRes", "h4502.DummyRes", FT_UINT32, BASE_DEC,
949 VALS(h450_DummyRes_vals), 0, "DummyRes Choice", HFILL }},
950 { &hf_h4502_DummyArg,
951 { "DummyArg", "h4502.DummyArg", FT_UINT32, BASE_DEC,
952 VALS(h450_DummyArg_vals), 0, "DummyArg choice", HFILL }},
953 { &hf_h4503DeactivateDiversionQArg,
954 { "DeactivateDiversionQArg", "h4503.DeactivateDiversionQArg", FT_NONE, BASE_NONE,
955 NULL, 0, "ActivateDiversionQArg sequence of", HFILL }},
956 { &hf_h4503InterrogateDiversionQ,
957 { "InterrogateDiversionQ", "h4503.InterrogateDiversionQ", FT_NONE, BASE_NONE,
958 NULL, 0, "InterrogateDiversionQ sequence of", HFILL }},
959 { &hf_h4503CheckRestrictionArg,
960 { "CheckRestrictionArg", "h4503.CheckRestrictionArg", FT_NONE, BASE_NONE,
961 NULL, 0, "CheckRestrictionArg sequence of", HFILL }},
962 { &hf_h4503CallReroutingArg,
963 { "CallReroutingArg", "h4503.CallReroutingArg", FT_NONE, BASE_NONE,
964 NULL, 0, "ActivateDiversionQArg sequence of", HFILL }},
965 { &hf_h4503DivertingLegInformation1Arg,
966 { "DivertingLegInformation1Arg", "h4503.DivertingLegInformation1Arg", FT_NONE, BASE_NONE,
967 NULL, 0, "DivertingLegInformation1Arg sequence of", HFILL }},
968 { &hf_h4503DivertingLegInformation2Arg,
969 { "DivertingLegInformation2Arg", "h4503.DivertingLegInformation2Arg", FT_NONE, BASE_NONE,
970 NULL, 0, "DivertingLegInformation1Arg sequence of", HFILL }},
971 { &hf_h4503DivertingLegInformation3Arg,
972 { "DivertingLegInformation3Arg", "h4503.DivertingLegInformation3Arg", FT_NONE, BASE_NONE,
973 NULL, 0, "DivertingLegInformation1Arg sequence of", HFILL }},
974 { &hf_h4503DivertingLegInformation4Arg,
975 { "DivertingLegInformation4Arg", "h4503.DivertingLegInformation4Arg", FT_NONE, BASE_NONE,
976 NULL, 0, "DivertingLegInformation4Arg sequence of", HFILL }},
977 { &hf_h4503CfnrDivertedLegFailedArg,
978 { "CfnrDivertedLegFailedArg", "h4503.CfnrDivertedLegFailedArg", FT_NONE, BASE_NONE,
979 NULL, 0, "ActivateDiversionQArg sequence of", HFILL }},
981 { &hf_h4504_HoldNotificArg,
982 { "HoldNotificArg", "h4504.HoldNotificArg", FT_NONE, BASE_NONE,
983 NULL, 0, "HoldNotificArg sequence of", HFILL }},
984 { &hf_h4504_RetrieveNotificArg,
985 { "RetrieveNotificArg", "h4504.RetrieveNotificArg", FT_NONE, BASE_NONE,
986 NULL, 0, "RetrieveNotificArg sequence of", HFILL }},
987 { &hf_h4504_RemoteHoldArg,
988 { "RemoteHoldArg", "h4504.RemoteHoldArg", FT_NONE, BASE_NONE,
989 NULL, 0, "RemoteHoldArg sequence of", HFILL }},
990 { &hf_h4504_RemoteRetrieveArg,
991 { "RemoteRetrieveArg", "h4504.RemoteRetrieveArg", FT_NONE, BASE_NONE,
992 NULL, 0, "RemoteRetrieveArg sequence of", HFILL }},
993 { &hf_h4504_RemoteRetrieveRes,
994 { "RemoteRetrieveRes", "h4504.RemoteRetrieveRes", FT_NONE, BASE_NONE,
995 NULL, 0, "RemoteRetrieveRes sequence of", HFILL }},
997 { &hf_h4507_MWIActivateArg,
998 { "MWIActivateArg", "h4507.MWIActivateArg", FT_NONE, BASE_NONE,
999 NULL, 0, "MWIActivateArg sequence of", HFILL }},
1000 { &hf_h4507_MwiDummyRes,
1001 { "MwiDummyRes", "h4507.MwiDummyRes", FT_NONE, BASE_NONE,
1002 NULL, 0, "MwiDummyRes sequence of", HFILL }},
1003 { &hf_h4507_MWIDeactivateArg,
1004 { "MWIDeactivateArg", "h4507.MWIDeactivateArg", FT_NONE, BASE_NONE,
1005 NULL, 0, "MWIDeactivateArg sequence of", HFILL }},
1006 { &hf_h4507_MWIInterrogateArg,
1007 { "MWIInterrogateArg", "h4507.MWIInterrogateArg", FT_NONE, BASE_NONE,
1008 NULL, 0, "MWIInterrogateArg sequence of", HFILL }},
1009 { &hf_h4507_MWIInterrogateRes,
1010 { "MWIInterrogateRes", "h4507.MWIInterrogateRes", FT_NONE, BASE_NONE,
1011 NULL, 0, "MWIInterrogateRes sequence of", HFILL }},
1013 { &hf_h4508_CallingNameArg,
1014 { "CallingNameArg", "h4508.CallingNameArg", FT_NONE, BASE_NONE,
1015 NULL, 0, "CallingNameArg sequence of", HFILL }},
1016 { &hf_h4508_AlertingNameArg,
1017 { "AlertingNameArg", "h4508.AlertingNameArg", FT_NONE, BASE_NONE,
1018 NULL, 0, "AlertingNameArg sequence of", HFILL }},
1019 { &hf_h4508_ConnectedNameArg,
1020 { "ConnectedNameArg", "h4508.ConnectedNameArg", FT_NONE, BASE_NONE,
1021 NULL, 0, "ConnectedNameArg sequence of", HFILL }},
1022 { &hf_h4508_BusyNameArg,
1023 { "BusyNameArg", "h4508.BusyNameArg", FT_NONE, BASE_NONE,
1024 NULL, 0, "BusyNameArg sequence of", HFILL }},
1025 { &hf_h45012_CmnRequest,
1026 { "CmnRequest", "h4508.CmnRequest", FT_NONE, BASE_NONE,
1027 NULL, 0, "CmnRequest sequence of", HFILL }},
1028 { &hf_h45012_CmnInform,
1029 { "CmnRequest", "h4508.CmnRequest", FT_NONE, BASE_NONE,
1030 NULL, 0, "CmnRequest sequence of", HFILL }},
1032 #include "packet-h450-hfarr.c"
1035 /* List of subtrees */
1036 static gint *ett[] = {
1040 &ett_h4501_errorCode,
1044 &ett_h4501_ReturnError,
1045 &ett_h4501_ReturnResult,
1048 #include "packet-h450-ettarr.c"
1052 /* Register protocol */
1053 proto_h4501 = proto_register_protocol(PNAME, PSNAME, PFNAME);
1054 /* Register fields and subtrees */
1055 proto_register_field_array(proto_h4501, hf, array_length(hf));
1056 proto_register_subtree_array(ett, array_length(ett));
1059 register_dissector("h4501", dissect_h4501, proto_h4501);
1065 /*--- proto_reg_handoff_h4501 ---------------------------------------*/
1067 proto_reg_handoff_h4501(void)
1070 h4501_handle = find_dissector("h4501");