For proto_tree_add_item(..., proto_xxx, ...)use ENC_NA as the encoding arg.
[obnox/wireshark/wip.git] / epan / dissectors / packet-skinny.c
1 /* packet-skinny.c
2  *
3  * Dissector for the Skinny Client Control Protocol
4  *   (The "D-Channel"-Protocol for Cisco Systems' IP-Phones)
5  * Copyright 2001, Joerg Mayer (see AUTHORS file)
6  *
7  * Paul E. Erkkila (pee@erkkila.org) - fleshed out the decode
8  * skeleton to report values for most message/message fields.
9  * Much help from Guy Harris on figuring out the wireshark api.
10  *
11  * This file is based on packet-aim.c, which is
12  * Copyright 2000, Ralf Hoelzer <ralf@well.com>
13  *
14  * $Id$
15  *
16  * Wireshark - Network traffic analyzer
17  * By Gerald Combs <gerald@wireshark.org>
18  * Copyright 1998 Gerald Combs
19  *
20  * This program is free software; you can redistribute it and/or
21  * modify it under the terms of the GNU General Public License
22  * as published by the Free Software Foundation; either version 2
23  * of the License, or (at your option) any later version.
24  *
25  * This program is distributed in the hope that it will be useful,
26  * but WITHOUT ANY WARRANTY; without even the implied warranty of
27  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
28  * GNU General Public License for more details.
29  *
30  * You should have received a copy of the GNU General Public License
31  * along with this program; if not, write to the Free Software
32  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
33  */
34
35 /* This implementation is based on a draft version of the 3.0
36  * specification
37  */
38
39 #ifdef HAVE_CONFIG_H
40 # include "config.h"
41 #endif
42
43 #include <epan/packet.h>
44 #include <epan/prefs.h>
45 #include <epan/tap.h>
46
47 #include "packet-rtp.h"
48 #include "packet-tcp.h"
49 #include "packet-ssl.h"
50 #include "packet-skinny.h"
51
52 #define TCP_PORT_SKINNY 2000
53 #define SSL_PORT_SKINNY 2443 /* IANA assigned to PowerClient Central Storage Facility */
54
55 #define SKINNY_SOFTKEY0  0x01
56 #define SKINNY_SOFTKEY1  0x02
57 #define SKINNY_SOFTKEY2  0x04
58 #define SKINNY_SOFTKEY3  0x08
59 #define SKINNY_SOFTKEY4  0x10
60 #define SKINNY_SOFTKEY5  0x20
61 #define SKINNY_SOFTKEY6  0x40
62 #define SKINNY_SOFTKEY7  0x80
63 #define SKINNY_SOFTKEY8  0x100
64 #define SKINNY_SOFTKEY9  0x200
65 #define SKINNY_SOFTKEY10 0x400
66 #define SKINNY_SOFTKEY11 0x800
67 #define SKINNY_SOFTKEY12 0x1000
68 #define SKINNY_SOFTKEY13 0x2000
69 #define SKINNY_SOFTKEY14 0x4000
70 #define SKINNY_SOFTKEY15 0x8000
71
72 /* KeyMap Show/No Show */
73 static const true_false_string softKeyMapValues = {
74   "Show",
75   "Do Not Show"
76 };
77
78 #define BASIC_MSG_TYPE 0x00
79 #define CM7_MSG_TYPE_A 0x12
80 #define CM7_MSG_TYPE_B 0x11
81
82 static const value_string header_version[] = {
83   { BASIC_MSG_TYPE, "Basic" },
84   { CM7_MSG_TYPE_A, "CM7 type A" },
85   { CM7_MSG_TYPE_B, "CM7 type B" },
86   { 0             , NULL }
87 };
88
89 /* I will probably need this again when I change things
90  * to function pointers, but let me use the existing
91  * infrastructure for now
92  *
93  * typedef struct {
94  *   guint32    id;
95  *   char *     name;
96  * } message_id_t;
97  */
98
99 static const value_string  message_id[] = {
100
101   /* Station -> Callmanager */
102   {0x0000, "KeepAliveMessage"},
103   {0x0001, "RegisterMessage"},
104   {0x0002, "IpPortMessage"},
105   {0x0003, "KeypadButtonMessage"},
106   {0x0004, "EnblocCallMessage"},
107   {0x0005, "StimulusMessage"},
108   {0x0006, "OffHookMessage"},
109   {0x0007, "OnHookMessage"},
110   {0x0008, "HookFlashMessage"},
111   {0x0009, "ForwardStatReqMessage"},
112   {0x000A, "SpeedDialStatReqMessage"},
113   {0x000B, "LineStatReqMessage"},
114   {0x000C, "ConfigStatReqMessage"},
115   {0x000D, "TimeDateReqMessage"},
116   {0x000E, "ButtonTemplateReqMessage"},
117   {0x000F, "VersionReqMessage"},
118   {0x0010, "CapabilitiesResMessage"},
119   {0x0011, "MediaPortListMessage"},
120   {0x0012, "ServerReqMessage"},
121   {0x0020, "AlarmMessage"},
122   {0x0021, "MulticastMediaReceptionAck"},
123   {0x0022, "OpenReceiveChannelAck"},
124   {0x0023, "ConnectionStatisticsRes"},
125   {0x0024, "OffHookWithCgpnMessage"},
126   {0x0025, "SoftKeySetReqMessage"},
127   {0x0026, "SoftKeyEventMessage"},
128   {0x0027, "UnregisterMessage"},
129   {0x0028, "SoftKeyTemplateReqMessage"},
130   {0x0029, "RegisterTokenReq"},
131   {0x002A, "MediaTransmissionFailure"},
132   {0x002B, "HeadsetStatusMessage"},
133   {0x002C, "MediaResourceNotification"},
134   {0x002D, "RegisterAvailableLinesMessage"},
135   {0x002E, "DeviceToUserDataMessage"},
136   {0x002F, "DeviceToUserDataResponseMessage"},
137   {0x0030, "UpdateCapabilitiesMessage"},
138   {0x0031, "OpenMultiMediaReceiveChannelAckMessage"},
139   {0x0032, "ClearConferenceMessage"},
140   {0x0033, "ServiceURLStatReqMessage"},
141   {0x0034, "FeatureStatReqMessage"},
142   {0x0035, "CreateConferenceResMessage"},
143   {0x0036, "DeleteConferenceResMessage"},
144   {0x0037, "ModifyConferenceResMessage"},
145   {0x0038, "AddParticipantResMessage"},
146   {0x0039, "AuditConferenceResMessage"},
147   {0x0040, "AuditParticipantResMessage"},
148   {0x0041, "DeviceToUserDataVersion1Message"},
149   {0x0042, "DeviceToUserDataResponseVersion1Message"},
150   {0x0048, "DialedPhoneBookMessage"},
151
152   /* Callmanager -> Station */
153   /* 0x0000, 0x0003? */
154   {0x0081, "RegisterAckMessage"},
155   {0x0082, "StartToneMessage"},
156   {0x0083, "StopToneMessage"},
157   {0x0085, "SetRingerMessage"},
158   {0x0086, "SetLampMessage"},
159   {0x0087, "SetHkFDetectMessage"},
160   {0x0088, "SetSpeakerModeMessage"},
161   {0x0089, "SetMicroModeMessage"},
162   {0x008A, "StartMediaTransmission"},
163   {0x008B, "StopMediaTransmission"},
164   {0x008C, "StartMediaReception"},
165   {0x008D, "StopMediaReception"},
166   {0x008F, "CallInfoMessage"},
167   {0x0090, "ForwardStatMessage"},
168   {0x0091, "SpeedDialStatMessage"},
169   {0x0092, "LineStatMessage"},
170   {0x0093, "ConfigStatMessage"},
171   {0x0094, "DefineTimeDate"},
172   {0x0095, "StartSessionTransmission"},
173   {0x0096, "StopSessionTransmission"},
174   {0x0097, "ButtonTemplateMessage"},
175   {0x0098, "VersionMessage"},
176   {0x0099, "DisplayTextMessage"},
177   {0x009A, "ClearDisplay"},
178   {0x009B, "CapabilitiesReqMessage"},
179   {0x009C, "EnunciatorCommandMessage"},
180   {0x009D, "RegisterRejectMessage"},
181   {0x009E, "ServerResMessage"},
182   {0x009F, "Reset"},
183   {0x0100, "KeepAliveAckMessage"},
184   {0x0101, "StartMulticastMediaReception"},
185   {0x0102, "StartMulticastMediaTransmission"},
186   {0x0103, "StopMulticastMediaReception"},
187   {0x0104, "StopMulticastMediaTransmission"},
188   {0x0105, "OpenReceiveChannel"},
189   {0x0106, "CloseReceiveChannel"},
190   {0x0107, "ConnectionStatisticsReq"},
191   {0x0108, "SoftKeyTemplateResMessage"},
192   {0x0109, "SoftKeySetResMessage"},
193   {0x0110, "SelectSoftKeysMessage"},
194   {0x0111, "CallStateMessage"},
195   {0x0112, "DisplayPromptStatusMessage"},
196   {0x0113, "ClearPromptStatusMessage"},
197   {0x0114, "DisplayNotifyMessage"},
198   {0x0115, "ClearNotifyMessage"},
199   {0x0116, "ActivateCallPlaneMessage"},
200   {0x0117, "DeactivateCallPlaneMessage"},
201   {0x0118, "UnregisterAckMessage"},
202   {0x0119, "BackSpaceReqMessage"},
203   {0x011A, "RegisterTokenAck"},
204   {0x011B, "RegisterTokenReject"},
205
206   {0x011C, "StartMediaFailureDetection"},
207   {0x011D, "DialedNumberMessage"},
208   {0x011E, "UserToDeviceDataMessage"},
209   {0x011F, "FeatureStatMessage"},
210   {0x0120, "DisplayPriNotifyMessage"},
211   {0x0121, "ClearPriNotifyMessage"},
212   {0x0122, "StartAnnouncementMessage"},
213   {0x0123, "StopAnnouncementMessage"},
214   {0x0124, "AnnouncementFinishMessage"},
215   {0x0127, "NotifyDtmfToneMessage"},
216   {0x0128, "SendDtmfToneMessage"},
217   {0x0129, "SubscribeDtmfPayloadReqMessage"},
218   {0x012A, "SubscribeDtmfPayloadResMessage"},
219   {0x012B, "SubscribeDtmfPayloadErrMessage"},
220   {0x012C, "UnSubscribeDtmfPayloadReqMessage"},
221   {0x012D, "UnSubscribeDtmfPayloadResMessage"},
222   {0x012E, "UnSubscribeDtmfPayloadErrMessage"},
223   {0x012F, "ServiceURLStatMessage"},
224   {0x0130, "CallSelectStatMessage"},
225   {0x0131, "OpenMultiMediaChannelMessage"},
226   {0x0132, "StartMultiMediaTransmission"},
227   {0x0133, "StopMultiMediaTransmission"},
228   {0x0134, "MiscellaneousCommandMessage"},
229   {0x0135, "FlowControlCommandMessage"},
230   {0x0136, "CloseMultiMediaReceiveChannel"},
231   {0x0137, "CreateConferenceReqMessage"},
232   {0x0138, "DeleteConferenceReqMessage"},
233   {0x0139, "ModifyConferenceReqMessage"},
234   {0x013A, "AddParticipantReqMessage"},
235   {0x013B, "DropParticipantReqMessage"},
236   {0x013C, "AuditConferenceReqMessage"},
237   {0x013D, "AuditParticipantReqMessage"},
238   {0x013F, "UserToDeviceDataVersion1Message"},
239   {0x014A, "CM5CallInfoMessage"},
240   {0x0152, "DialedPhoneBookAckMessage"},
241   {0x015A, "XMLAlarmMessage"},
242
243   {0     , NULL}        /* terminator */
244 };
245 static value_string_ext message_id_ext = VALUE_STRING_EXT_INIT(message_id);
246
247 /*
248  * Device type to text conversion table
249  */
250 static const value_string  deviceTypes[] = {
251   {1  , "30SPplus"},
252   {2  , "12SPplus"},
253   {3  , "12SP"},
254   {4  , "12"},
255   {5  , "30VIP"},
256   {6  , "Telecaster"},
257   {7  , "TelecasterMgr"},
258   {8  , "TelecasterBus"},
259   {9  , "Polycom"},
260   {10 , "VGC"},
261   {12 , "ATA"},
262   {20 , "Virtual30SPplus"},
263   {21 , "PhoneApplication"},
264   {30 , "AnalogAccess"},
265   {40 , "DigitalAccessPRI"},
266   {41 , "DigitalAccessT1"},
267   {42 , "DigitalAccessTitan2"},
268   {43 , "DigitalAccessLennon"},
269   {47 , "AnalogAccessElvis"},
270   {50 , "ConferenceBridge"},
271   {51 , "ConferenceBridgeYoko"},
272   {52 , "ConferenceBridgeDixieLand"},
273   {53 , "ConferenceBridgeSummit"},
274   {60 , "H225"},
275   {61 , "H323Phone"},
276   {62 , "H323Trunk"},
277   {70 , "MusicOnHold"},
278   {71 , "Pilot"},
279   {72 , "TapiPort"},
280   {73 , "TapiRoutePoint"},
281   {80 , "VoiceInBox"},
282   {81 , "VoiceInboxAdmin"},
283   {82 , "LineAnnunciator"},
284   {83 , "SoftwareMtpDixieLand"},
285   {84 , "CiscoMediaServer"},
286   {85 , "ConferenceBridgeFlint"},
287   {90 , "RouteList"},
288   {100, "LoadSimulator"},
289   {110, "MediaTerminationPoint"},
290   {111, "MediaTerminationPointYoko"},
291   {112, "MediaTerminationPointDixieLand"},
292   {113, "MediaTerminationPointSummit"},
293   {120, "MGCPStation"},
294   {121, "MGCPTrunk"},
295   {122, "RASProxy"},
296   {125, "Trunk"},
297   {126, "Annunciator"},
298   {127, "MonitorBridge"},
299   {128, "Recorder"},
300   {129, "MonitorBridgeYoko"},
301   {131, "SipTrunk"},
302   {254, "UnknownMGCPGateway"},
303   {255, "NotDefined"},
304   { 0    , NULL}
305 };
306 static value_string_ext deviceTypes_ext = VALUE_STRING_EXT_INIT(deviceTypes);
307
308 /*
309  * keypad button -> text conversion
310  */
311 static const value_string keypadButtons[] = {
312   {0x0   , "Zero"},
313   {0x1   , "One"},
314   {0x2   , "Two"},
315   {0x3   , "Three"},
316   {0x4   , "Four"},
317   {0x5   , "Five"},
318   {0x6   , "Six"},
319   {0x7   , "Seven"},
320   {0x8   , "Eight"},
321   {0x9   , "Nine"},
322   {0xa   , "A"},
323   {0xb   , "B"},
324   {0xc   , "C"},
325   {0xd   , "D"},
326   {0xe   , "Star"},
327   {0xf   , "Pound"},
328   {0     , NULL}
329 };
330 static value_string_ext keypadButtons_ext = VALUE_STRING_EXT_INIT(keypadButtons);
331
332 static const value_string deviceStimuli[] = {
333   {0x1  , "LastNumberRedial"},
334   {0x2  , "SpeedDial"},
335   {0x3  , "Hold"},
336   {0x4  , "Transfer"},
337   {0x5  , "ForwardAll"},
338   {0x6  , "ForwardBusy"},
339   {0x7  , "ForwardNoAnswer"},
340   {0x8  , "Display"},
341   {0x9  , "Line"},
342   {0xa  , "T120Chat"},
343   {0xb  , "T120Whiteboard"},
344   {0xc  , "T120ApplicationSharing"},
345   {0xd  , "T120FileTransfer"},
346   {0xe  , "Video"},
347   {0xf  , "VoiceMail"},
348   {0x10 , "AutoAnswerRelease"},
349   {0x11 , "AutoAnswer"},
350   {0x12 , "Select"},
351   {0x13 , "Privacy"},
352   {0x14 , "ServiceURL"},
353   {0x1B , "MaliciousCall"},
354   {0x21 , "GenericAppB1"},
355   {0x22 , "GenericAppB2"},
356   {0x23 , "GenericAppB3"},
357   {0x24 , "GenericAppB4"},
358   {0x25 , "GenericAppB5"},
359   {0x7b , "MeetMeConference"},
360   {0x7d , "Conference"},
361   {0x7e , "CallPark"},
362   {0x7f , "CallPickup"},
363   {0x80 , "GroupCallPickup"},
364   {0,NULL}
365 };
366 static value_string_ext deviceStimuli_ext = VALUE_STRING_EXT_INIT(deviceStimuli);
367
368
369 /* Note i'm only using 7 later on cuz i'm lazy ;) */
370 #define DeviceMaxCapabilities 18 /* max capabilities allowed in Cap response message */
371
372 static const value_string mediaPayloads[] = {
373   {1   , "Non-standard codec"},
374   {2   , "G.711 A-law 64k"},
375   {3   , "G.711 A-law 56k"},
376   {4   , "G.711 u-law 64k"},
377   {5   , "G.711 u-law 56k"},
378   {6   , "G.722 64k"},
379   {7   , "G.722 56k"},
380   {8   , "G.722 48k"},
381   {9   , "G.723.1"},
382   {10  , "G.728"},
383   {11  , "G.729"},
384   {12  , "G.729 Annex A"},
385   {13  , "IS11172 AudioCap"},   /* IS11172 is an ISO MPEG standard */
386   {14  , "IS13818 AudioCap"},   /* IS13818 is an ISO MPEG standard */
387   {15  , "G.729 Annex B"},
388   {16  , "G.729 Annex A+Annex B"},
389   {18  , "GSM Full Rate"},
390   {19  , "GSM Half Rate"},
391   {20  , "GSM Enhanced Full Rate"},
392   {25  , "Wideband 256k"},
393   {32  , "Data 64k"},
394   {33  , "Data 56k"},
395   {80  , "GSM"},
396   {81  , "ActiveVoice"},
397   {82  , "G.726 32K"},
398   {83  , "G.726 24K"},
399   {84  , "G.726 16K"},
400   {85  , "G.729B"},
401   {86  , "G.729B Low Complexity"},
402   {100 , "H261"},
403   {101 , "H263"},
404   {102 , "Video"},
405   {105 , "T120"},
406   {106 , "H224"},
407   {257 , "RFC2833_DynPayload"},
408   {0  , NULL}
409 };
410 static value_string_ext mediaPayloads_ext = VALUE_STRING_EXT_INIT(mediaPayloads);
411
412 static const value_string alarmSeverities[] = {
413   {0   , "Critical"},
414   {1   , "Warning"},
415   {2   , "Informational"},
416   {4   , "Unknown"},
417   {7   , "Major"},
418   {8   , "Minor"},
419   {10  , "Marginal"},
420   {20  , "TraceInfo"},
421   {0  , NULL}
422 };
423 static value_string_ext alarmSeverities_ext = VALUE_STRING_EXT_INIT(alarmSeverities);
424
425 static const value_string multicastMediaReceptionStatus[] = {
426   {0  , "Ok"},
427   {1  , "Error"},
428   {0  , NULL}
429 };
430
431 static const value_string openReceiveChanStatus[] = {
432   {0   , "orcOk"},
433   {1   , "orcError"},
434   {0   , NULL}
435 };
436
437
438 static const value_string statsProcessingTypes[] = {
439   {0   , "clearStats"},
440   {1   , "doNotClearStats"},
441   {0   , NULL}
442 };
443
444 #define SkMaxSoftKeyCount 18 /* this value should be the same as the max soft key value */
445 static const value_string softKeyEvents[] = {
446   {1   , "Redial"},
447   {2   , "NewCall"},
448   {3   , "Hold"},
449   {4   , "Transfer"},
450   {5   , "CFwdAll"},
451   {6   , "CFwdBusy"},
452   {7   , "CFwdNoAnswer"},
453   {8   , "BackSpace"},
454   {9   , "EndCall"},
455   {10  , "Resume"},
456   {11  , "Answer"},
457   {12  , "Info"},
458   {13  , "Confrn"},
459   {14  , "Park"},
460   {15  , "Join"},
461   {16  , "MeetMeConfrn"},
462   {17  , "CallPickUp"},
463   {18  , "GrpCallPickUp"},
464   {0   , NULL}
465 };
466 static value_string_ext softKeyEvents_ext = VALUE_STRING_EXT_INIT(softKeyEvents);
467
468 /* Define info index for each softkey event for Telecaster station. */
469 static const value_string softKeyIndexes[] = {
470   {301  , "RedialInfoIndex"},
471   {302  , "NewCallInfoIndex"},
472   {303  , "HoldInfoIndex"},
473   {304  , "TrnsferInfoIndex"},
474   {305  , "CFwdAllInfoIndex"},
475   {306  , "CFwdBusyInfoIndex"},     /* not used yet */
476   {307  , "CFwdNoAnswerInfoIndex"}, /* not used yet */
477   {308  , "BackSpaceInfoIndex"},
478   {309  , "EndCallInfoIndex"},
479   {310  , "ResumeInfoIndex"},
480   {311  , "AnswerInfoIndex"},
481   {312  , "InfoInfoIndex"},
482   {313  , "ConfrnInfoIndex"},
483   {314  , "ParkInfoIndex"},
484   {315  , "JoinInfoIndex"},
485   {316  , "MeetMeConfrnInfoIndex"},
486   {317  , "CallPickUpInfoIndex"},
487   {318  , "GrpCallPickUpInfoIndex"},
488   {0   , NULL}
489 };
490 static value_string_ext softKeyIndexes_ext = VALUE_STRING_EXT_INIT(softKeyIndexes);
491
492
493 static const value_string buttonDefinitions[] = {
494   {0x1  , "LastNumberRedial"},
495   {0x2  , "SpeedDial"},
496   {0x3  , "Hold"},
497   {0x4  , "Transfer"},
498   {0x5  , "ForwardAll"},
499   {0x6  , "ForwardBusy"},
500   {0x7  , "ForwardNoAnswer"},
501   {0x8  , "Display"},
502   {0x9  , "Line"},
503   {0xa  , "T120Chat"},
504   {0xb  , "T120Whiteboard"},
505   {0xc  , "T120ApplicationSharing"},
506   {0xd  , "T120FileTransfer"},
507   {0xe  , "Video"},
508   {0x10 , "AnswerRelease"},
509   {0xf0 , "Keypad"},
510   {0xfd , "AEC"},
511   {0xff , "Undefined"},
512   {0   , NULL}
513 };
514 static value_string_ext buttonDefinitions_ext = VALUE_STRING_EXT_INIT(buttonDefinitions);
515
516 #define StationTotalSoftKeySets 10 /* total number of the soft key sets */
517 static const value_string keySetNames[] = {
518   {0   , "OnHook"},
519   {1   , "Connected"},
520   {2   , "OnHold"},
521   {3   , "RingIn"},
522   {4   , "OffHook"},
523   {5   , "Connected with transfer"},
524   {6   , "Digits after dialing first digit"},
525   {7   , "Connected with conference"},
526   {8   , "RingOut"},
527   {9   , "OffHook with features"},
528   {0   , NULL}
529 };
530 static value_string_ext keySetNames_ext = VALUE_STRING_EXT_INIT(keySetNames);
531
532 #if 0
533 /* Define soft key labels for the Telecaster station */
534 static const value_string softKeyLabel[] _U_ = {
535   {0   , "undefined"},
536   {1   , "Redial"},
537   {2   , "NewCall"},
538   {3   , "Hold"},
539   {4   , "Trnsfer"},
540   {5   , "CFwdAll"},
541   {6   , "CFwdBusy"},
542   {7   , "CFwdNoAnswer"},
543   {8   , "<<"},
544   {9   , "EndCall"},
545   {10  , "Resume"},
546   {11  , "Answer"},
547   {12  , "Info"},
548   {13  , "Confrn"},
549   {14  , "Park"},
550   {15  , "Join"},
551   {16  , "MeetMe"},
552   {17  , "PickUp"},
553   {18  , "GPickUp"},
554   {0   , NULL}
555 };
556 #endif
557
558 /*
559  * define lamp modes;
560  * lamp cadence is defined as follows
561  * Wink (on 80%) = 448msec on / 64msec off
562  * Flash (fast flash) = 32msec on / 32msec off
563  * Blink (on 50%) = 512msec on / 512msec off
564  * On (on steady)
565  */
566 static const value_string stationLampModes[] = {
567   {0   , "Undefined"},
568   {0x1 , "Off"},
569   {0x2 , "On"},
570   {0x3 , "Wink"},
571   {0x4 , "Flash"},
572   {0x5 , "Blink"},
573   {0   , NULL}
574 };
575 static value_string_ext stationLampModes_ext = VALUE_STRING_EXT_INIT(stationLampModes);
576
577 /* Defined the Call States to be sent to the Telecaste station.
578  * These are NOT the call states used in CM internally. Instead,
579  * they are the call states sent from CM and understood by the Telecaster station
580  */
581 static const value_string skinny_stationCallStates[] = {
582   {1   , "OffHook"},
583   {2   , "OnHook"},
584   {3   , "RingOut"},
585   {4   , "RingIn"},
586   {5   , "Connected"},
587   {6   , "Busy"},
588   {7   , "Congestion"},
589   {8   , "Hold"},
590   {9   , "CallWaiting"},
591   {10  , "CallTransfer"},
592   {11  , "CallPark"},
593   {12  , "Proceed"},
594   {13  , "CallRemoteMultiline"},
595   {14  , "InvalidNumber"},
596   {0   , NULL}
597 };
598 static value_string_ext skinny_stationCallStates_ext = VALUE_STRING_EXT_INIT(skinny_stationCallStates);
599
600 /* Defined Call Type */
601 static const value_string skinny_callTypes[] = {
602   {1   , "InBoundCall"},
603   {2   , "OutBoundCall"},
604   {3   , "ForwardCall"},
605   {0   , NULL}
606 };
607
608 /*
609  * define station-playable tones;
610  * for tone definitions see SR-TSV-002275, "BOC Notes on the LEC Networks -- 1994"
611  */
612 static const value_string skinny_deviceTones[] = {
613   {0x0  , "Silence"},
614   {0x1  , "Dtmf1"},
615   {0x2  , "Dtmf2"},
616   {0x3  , "Dtmf3"},
617   {0x4  , "Dtmf4"},
618   {0x5  , "Dtmf5"},
619   {0x6  , "Dtmf6"},
620   {0x7  , "Dtmf7"},
621   {0x8  , "Dtmf8"},
622   {0x9  , "Dtmf9"},
623   {0xa  , "Dtmf0"},
624   {0xe  , "DtmfStar"},
625   {0xf  , "DtmfPound"},
626   {0x10 , "DtmfA"},
627   {0x11 , "DtmfB"},
628   {0x12 , "DtmfC"},
629   {0x13 , "DtmfD"},
630   {0x21 , "InsideDialTone"},
631   {0x22 , "OutsideDialTone"},
632   {0x23 , "LineBusyTone"},
633   {0x24 , "AlertingTone"},
634   {0x25 , "ReorderTone"},
635   {0x26 , "RecorderWarningTone"},
636   {0x27 , "RecorderDetectedTone"},
637   {0x28 , "RevertingTone"},
638   {0x29 , "ReceiverOffHookTone"},
639   {0x2a , "PartialDialTone"},
640   {0x2b , "NoSuchNumberTone"},
641   {0x2c , "BusyVerificationTone"},
642   {0x2d , "CallWaitingTone"},
643   {0x2e , "ConfirmationTone"},
644   {0x2f , "CampOnIndicationTone"},
645   {0x30 , "RecallDialTone"},
646   {0x31 , "ZipZip"},
647   {0x32 , "Zip"},
648   {0x33 , "BeepBonk"},
649   {0x34 , "MusicTone"},
650   {0x35 , "HoldTone"},
651   {0x36 , "TestTone"},
652   {0x37 , "DtMoniterWarningTone"},
653   {0x40 , "AddCallWaiting"},
654   {0x41 , "PriorityCallWait"},
655   {0x42 , "RecallDial"},
656   {0x43 , "BargIn"},
657   {0x44 , "DistinctAlert"},
658   {0x45 , "PriorityAlert"},
659   {0x46 , "ReminderRing"},
660   {0x47 , "PrecedenceRingBack"},
661   {0x48 , "PreemptionTone"},
662   {0x50 , "MF1"},
663   {0x51 , "MF2"},
664   {0x52 , "MF3"},
665   {0x53 , "MF4"},
666   {0x54 , "MF5"},
667   {0x55 , "MF6"},
668   {0x56 , "MF7"},
669   {0x57 , "MF8"},
670   {0x58 , "MF9"},
671   {0x59 , "MF0"},
672   {0x5a , "MFKP1"},
673   {0x5b , "MFST"},
674   {0x5c , "MFKP2"},
675   {0x5d , "MFSTP"},
676   {0x5e , "MFST3P"},
677   {0x5f , "MILLIWATT"},
678   {0x60 , "MILLIWATTTEST"},
679   {0x61 , "HIGHTONE"},
680   {0x62 , "FLASHOVERRIDE"},
681   {0x63 , "FLASH"},
682   {0x64 , "PRIORITY"},
683   {0x65 , "IMMEDIATE"},
684   {0x66 , "PREAMPWARN"},
685   {0x67 , "2105HZ"},
686   {0x68 , "2600HZ"},
687   {0x69 , "440HZ"},
688   {0x6a , "300HZ"},
689   {0x77 , "MLPP_PALA"},
690   {0x78 , "MLPP_ICA"},
691   {0x79 , "MLPP_VCA"},
692   {0x7A , "MLPP_BPA"},
693   {0x7B , "MLPP_BNEA"},
694   {0x7C , "MLPP_UPA"},
695   {0x7f , "NoTone"},
696   {0   , NULL}
697 };
698 static value_string_ext skinny_deviceTones_ext = VALUE_STRING_EXT_INIT(skinny_deviceTones);
699
700 /* define ring types */
701 static const value_string skinny_ringTypes[] = {
702   {0x1  , "RingOff"},
703   {0x2  , "InsideRing"},
704   {0x3  , "OutsideRing"},
705   {0x4  , "FeatureRing"},
706   {0x5  , "FlashOnly"},
707   {0x6  , "PrecedenceRing"},
708   {0   , NULL}
709 };
710 static value_string_ext skinny_ringTypes_ext = VALUE_STRING_EXT_INIT(skinny_ringTypes);
711
712 static const value_string skinny_ringModes[] = {
713   {0x1  , "RingForever"},
714   {0x2  , "RingOnce"},
715   {0   , NULL}
716 };
717
718 static const value_string skinny_speakerModes[] = {
719   {1   , "SpeakerOn"},
720   {2   , "SpeakerOff"},
721   {0   , NULL}
722 };
723
724 static const value_string skinny_silenceSuppressionModes[] = {
725   {0   , "Media_SilenceSuppression_Off"},
726   {1   , "Media_SilenceSuppression_On"},
727   {0   , NULL}
728 };
729
730 static const value_string skinny_g723BitRates[] = {
731   {1   , "Media_G723BRate_5_3"},
732   {2   , "Media_G723BRate_6_4"},
733   {0   , NULL}
734 };
735
736 /* define device reset types  */
737 static const value_string skinny_deviceResetTypes[] = {
738   {1   , "DEVICE_RESET"},
739   {2   , "DEVICE_RESTART"},
740   {0   , NULL}
741 };
742
743 static const value_string skinny_echoCancelTypes[] = {
744   {0    , "Media_EchoCancellation_Off"},
745   {1    , "Media_EchoCancellation_On"},
746   {0    , NULL}
747 };
748
749 static const value_string skinny_deviceUnregisterStatusTypes[] = {
750   {0   , "Ok"},
751   {1   , "Error"},
752   {2   , "NAK"}, /* Unregister request is rejected for reaso n such as existence of a call */
753   {0   , NULL}
754 };
755
756 static const value_string skinny_createConfResults[] = {
757   {0   , "Ok"},
758   {1   , "ResourceNotAvailable"},
759   {2   , "ConferenceAlreadyExist"},
760   {3   , "SystemErr"},
761   {0   , NULL}
762 };
763
764 static const value_string skinny_modifyConfResults[] = {
765   {0   , "Ok"},
766   {1   , "ResourceNotAvailable"},
767   {2   , "ConferenceNotExist"},
768   {3   , "InvalidParameter"},
769   {4   , "MoreActiveCallsThanReserved"},
770   {5   , "InvalidResourceType"},
771   {6   , "SystemErr"},
772   {0   , NULL}
773 };
774 static value_string_ext skinny_modifyConfResults_ext = VALUE_STRING_EXT_INIT(skinny_modifyConfResults);
775
776 static const value_string skinny_deleteConfResults[] = {
777   {0   , "Ok"},
778   {1   , "ConferenceNotExist"},
779   {2   , "SystemErr"},
780   {0   , NULL}
781 };
782
783 static const value_string skinny_addParticipantResults[] = {
784   {0   , "Ok"},
785   {1   , "ResourceNotAvailable"},
786   {2   , "ConferenceNotExist"},
787   {3   , "DuplicateCallRef"},
788   {4   , "SystemErr"},
789   {0   , NULL}
790 };
791 static value_string_ext skinny_addParticipantResults_ext = VALUE_STRING_EXT_INIT(skinny_addParticipantResults);
792
793 static const value_string skinny_auditParticipantResults[] = {
794   {0   , "Ok"},
795   {1   , "ConferenceNotExist"},
796   {0   , NULL}
797 };
798
799 /* define hook flash detection mode */
800 static const value_string skinny_hookFlashDetectModes[] = {
801   {1   , "HookFlashOn"},
802   {2   , "HookFlashOff"},
803   {0   , NULL}
804 };
805
806 /* define headset mode */
807 static const value_string skinny_headsetModes[] = {
808   {1   , "HeadsetOn"},
809   {2   , "HeadsetOff"},
810   {0   , NULL}
811 };
812
813 /* define station microphone modes;
814  * Mic On - The speakerphone's microphone is turned on ONLY if the phone is in the "Speaker On (Off Hook)"
815  * state (see above).
816  * Mic Off - The microphone is turned off or, if it's not on, the command is ignored.
817  */
818 static const value_string skinny_microphoneModes[] = {
819   {1   , "MicOn"},
820   {2   , "MicOff"},
821   {0   , NULL}
822 };
823
824 /* define the session request types */
825 static const value_string skinny_sessionTypes[] = {
826   {1   , "Chat"},
827   {2   , "Whiteboard"},
828   {4   , "ApplicationSharing"},
829   {8   , "FileTransfer"},
830   {10  , "Video"},
831   {0   , NULL}
832 };
833 static value_string_ext skinny_sessionTypes_ext = VALUE_STRING_EXT_INIT(skinny_sessionTypes);
834
835 static const value_string skinny_mediaEnunciationTypes[] = {
836   {1  , "None"},
837   {2  , "CallPark"},
838   {0  , NULL}
839 };
840
841 static const value_string skinny_resourceTypes[] = {
842   {1  , "Conference"},
843   {2  , "IVR"},
844   {0  , NULL}
845 };
846
847 static const value_string skinny_sequenceFlags[] = {
848   {0  , "StationSequenceFirst"},
849   {1  , "StationSequenceMore"},
850   {2  , "StationSequenceLast"},
851   {0  , NULL}
852 };
853
854 static const value_string skinny_Layouts[] = {
855   {0  , "NoLayout"},
856   {1  , "OneByOne"},
857   {2  , "OneByTwo"},
858   {3  , "TwoByTwo"},
859   {4  , "TwoByTwo3Alt1"},
860   {5  , "TwoByTwo3Alt2"},
861   {6  , "ThreeByThree"},
862   {7  , "ThreeByThree6Alt1"},
863   {8  , "ThreeByThree6Alt2"},
864   {9  , "ThreeByThree4Alt1"},
865   {10 , "ThreeByThree4Alt2"},
866   {0  , NULL}
867 };
868 static value_string_ext skinny_Layouts_ext = VALUE_STRING_EXT_INIT(skinny_Layouts);
869
870 static const value_string skinny_transmitOrReceive[] = {
871   {1  , "Station_Receive_only"},
872   {2  , "Station_Transmit_only"},
873   {3  , "Station_Receive_Transmit"},
874   {0  , NULL}
875 };
876
877 static const value_string skinny_endOfAnnAck[] = {
878   {0  , "NoAnnAckRequired"},
879   {1  , "AnnAckRequired"},
880   {0  , NULL}
881 };
882
883 static const value_string skinny_annPlayMode[] = {
884   {0  , "AnnXmlConfigMode"},
885   {1  , "AnnOneShotMode"},
886   {2  , "AnnContinuousMode"},
887   {0  , NULL}
888 };
889
890 static const value_string skinny_annPlayStatus[] = {
891   {0  , "PlayToneOK"},
892   {1  , "PlayToneErr"},
893   {0  , NULL}
894 };
895
896 static const value_string skinny_miscCommandType[] = {
897   {0  , "videoFreezePicture"},
898   {1  , "videoFastUpdatePicture"},
899   {2  , "videoFastUpdateGOB"},
900   {3  , "videoFastUpdateMB"},
901   {4  , "lostPicture"},
902   {5  , "lostPartialPicture"},
903   {6  , "recoveryReferencePicture"},
904   {7  , "temporalSpatialTradeOff"},
905   {0  , NULL}
906 };
907 static value_string_ext skinny_miscCommandType_ext = VALUE_STRING_EXT_INIT(skinny_miscCommandType);
908
909 static const value_string skinny_formatTypes[] = {
910   {1  , "sqcif (128x96)"},
911   {2  , "qcif (176x144)"},
912   {3  , "cif (352x288)"},
913   {4  , "4cif (704x576)"},
914   {5  , "16cif (1408x1152)"},
915   {6  , "custom_base"},
916   {0  , NULL}
917 };
918 static value_string_ext skinny_formatTypes_ext = VALUE_STRING_EXT_INIT(skinny_formatTypes);
919
920 static const value_string cast_callSecurityStatusTypes[] = {
921   {0   , "CallSecurityStatusUnknown"},
922   {1   , "CallSecurityStatusNotAuthenticated"},
923   {2   , "CallSecurityStatusAuthenticated"},
924   {0   , NULL}
925 };
926
927 #define StationMaxDirnumSize 24         /* max size of calling or called party dirnum  */
928 #define StationMaxNameSize 40           /* max size of calling party's name  */
929 #define StationMaxDisplayNameSize 44    /* max size of display name  */
930 #define StationMaxDeviceNameSize 16     /* max size of station's IP name  */
931 #define StationMaxSpeedDials 10         /* max number of speed dial numbers allowed on a station */
932 #define StationMaxVersionSize 16        /* max chars in version string  */
933 #define StationMaxButtonTemplateSize 42 /* max button template size */
934 #define StationMaxDisplayTextSize 33    /* max text size in DisplayText message */
935 #define StationMaxPorts 10              /* max number of ports on one device */
936 #define StationDateTemplateSize 6       /* date template in the form M/D/Y, D/M/Y, ... */
937 #define StationMaxServerNameSize 48     /* max size of server name */
938 #define StationMaxServers 5             /* max servers */
939 #define StationMaxDeviceDirnums 1024    /* max dir numbers per SCM device */
940 #define StationMaxDirnums 64            /* max dir numbers per physical station (also used in db request msg); */
941 #define StationMaxSoftKeyLabelSize 16   /* max label size in the message */
942 #define StationMaxSoftKeyDefinition 32       /* max number of soft key definition in the message */
943 #define StationMaxSoftKeySetDefinition 16    /* max number of soft key set definition in the message */
944 #define StationMaxSoftKeyIndex 16            /* max number of soft key indices in a station soft key set */
945 #define StationMaxDisplayPromptStatusSize 32 /* max status text size in the display status message */
946 #define StationMaxDisplayNotifySize 32       /* max prompt text size in the display prompt message */
947 #define StationMaxAlarmMessageSize 80        /* max size for an alarm message */
948 #define StationMaxUserDeviceDataSize 2000    /* max size of user data between application and device */
949 #define StationMaxConference 32
950 #define AppConferenceIDSize 32
951 #define AppDataSize 24
952 #define MAX_CUSTOM_PICTURES 6
953 #define MAX_LAYOUT_WITH_SAME_SERVICE 5
954 #define MAX_SERVICE_TYPE 4
955 #define DeviceMaxCapabilities 18         /* max capabilities allowed in Cap response message */
956 #define StationMaxCapabilities       DeviceMaxCapabilities
957 #define StationMaxVideoCapabilities 10
958 #define StationMaxDataCapabilities  5
959 #define MAX_LEVEL_PREFERENCE 4
960 #define MaxAnnouncementList 32
961 #define StationMaxMonitorParties 16      /* Max Monitor Bridge whisper matrix parties,  rm, M&R in Parche */
962 #define StationMaxServiceURLSize 256     /* max number of service URLs length */
963 #define MAX_PICTURE_FORMAT 5
964 #define MAX_REFERENCE_PICTURE 4
965
966 /* Initialize the protocol and registered fields */
967 static int proto_skinny          = -1;
968 static int hf_skinny_data_length = -1;
969 static int hf_skinny_hdr_version = -1;
970 static int hf_skinny_messageid   = -1;
971 static int hf_skinny_deviceName  = -1;
972 static int hf_skinny_stationUserId = -1;
973 static int hf_skinny_stationInstance = -1;
974 static int hf_skinny_deviceType = -1;
975 static int hf_skinny_maxStreams = -1;
976 static int hf_skinny_stationIpPort = -1;
977 static int hf_skinny_stationKeypadButton = -1;
978 static int hf_skinny_calledPartyNumber = -1;
979 static int hf_skinny_stimulus = -1;
980 static int hf_skinny_stimulusInstance = -1;
981 static int hf_skinny_lineNumber = -1;
982 static int hf_skinny_speedDialNumber = -1;
983 static int hf_skinny_capCount = -1;
984 static int hf_skinny_payloadCapability = -1;
985 static int hf_skinny_maxFramesPerPacket = -1;
986 static int hf_skinny_alarmSeverity = -1;
987 static int hf_skinny_alarmParam1 = -1;
988 static int hf_skinny_alarmParam2 = -1;
989 static int hf_skinny_receptionStatus = -1;
990 static int hf_skinny_passThruPartyID = -1;
991 static int hf_skinny_ORCStatus = -1;
992 static int hf_skinny_ipAddress = -1;
993 static int hf_skinny_portNumber = -1;
994 static int hf_skinny_statsProcessingType = -1;
995 static int hf_skinny_callIdentifier = -1;
996 static int hf_skinny_packetsSent = -1;
997 static int hf_skinny_octetsSent  = -1;
998 static int hf_skinny_packetsRecv = -1;
999 static int hf_skinny_octetsRecv  = -1;
1000 static int hf_skinny_packetsLost = -1;
1001 static int hf_skinny_latency     = -1;
1002 static int hf_skinny_jitter      = -1;
1003 static int hf_skinny_directoryNumber = -1;
1004 static int hf_skinny_softKeyEvent = -1;
1005 static int hf_skinny_lineInstance = -1;
1006 static int hf_skinny_keepAliveInterval = -1;
1007 static int hf_skinny_dateTemplate = -1;
1008 static int hf_skinny_secondaryKeepAliveInterval = -1;
1009 static int hf_skinny_buttonOffset = -1;
1010 static int hf_skinny_buttonCount = -1;
1011 static int hf_skinny_totalButtonCount = -1;
1012 static int hf_skinny_buttonInstanceNumber = -1;
1013 static int hf_skinny_buttonDefinition = -1;
1014 static int hf_skinny_softKeyOffset = -1;
1015 static int hf_skinny_softKeyCount = -1;
1016 static int hf_skinny_totalSoftKeyCount = -1;
1017 static int hf_skinny_softKeyLabel = -1;
1018 static int hf_skinny_softKeySetOffset = -1;
1019 static int hf_skinny_softKeySetCount = -1;
1020 static int hf_skinny_totalSoftKeySetCount = -1;
1021 static int hf_skinny_softKeyTemplateIndex = -1;
1022 static int hf_skinny_softKeyInfoIndex = -1;
1023 static int hf_skinny_softKeySetDescription = -1;
1024 static int hf_skinny_softKeyMap = -1;
1025 static int hf_skinny_softKey0 = -1;
1026 static int hf_skinny_softKey1 = -1;
1027 static int hf_skinny_softKey2 = -1;
1028 static int hf_skinny_softKey3 = -1;
1029 static int hf_skinny_softKey4 = -1;
1030 static int hf_skinny_softKey5 = -1;
1031 static int hf_skinny_softKey6 = -1;
1032 static int hf_skinny_softKey7 = -1;
1033 static int hf_skinny_softKey8 = -1;
1034 static int hf_skinny_softKey9 = -1;
1035 static int hf_skinny_softKey10 = -1;
1036 static int hf_skinny_softKey11 = -1;
1037 static int hf_skinny_softKey12 = -1;
1038 static int hf_skinny_softKey13 = -1;
1039 static int hf_skinny_softKey14 = -1;
1040 static int hf_skinny_softKey15 = -1;
1041 static int hf_skinny_lampMode = -1;
1042 static int hf_skinny_messageTimeOutValue = -1;
1043 static int hf_skinny_displayMessage = -1;
1044 static int hf_skinny_lineDirNumber = -1;
1045 static int hf_skinny_lineFullyQualifiedDisplayName = -1;
1046 static int hf_skinny_lineDisplayName = -1;
1047 static int hf_skinny_speedDialDirNumber = -1;
1048 static int hf_skinny_speedDialDisplayName = -1;
1049 static int hf_skinny_dateYear = -1;
1050 static int hf_skinny_dateMonth = -1;
1051 static int hf_skinny_dayOfWeek = -1;
1052 static int hf_skinny_dateDay = -1;
1053 static int hf_skinny_dateHour = -1;
1054 static int hf_skinny_dateMinute = -1;
1055 static int hf_skinny_dateSeconds = -1;
1056 static int hf_skinny_dateMilliseconds = -1;
1057 static int hf_skinny_timeStamp = -1;
1058 static int hf_skinny_callState = -1;
1059 static int hf_skinny_deviceTone = -1;
1060 static int hf_skinny_callingPartyName = -1;
1061 static int hf_skinny_callingPartyNumber = -1;
1062 static int hf_skinny_calledPartyName = -1;
1063 static int hf_skinny_callType = -1;
1064 static int hf_skinny_originalCalledPartyName = -1;
1065 static int hf_skinny_originalCalledParty = -1;
1066 static int hf_skinny_ringType = -1;
1067 static int hf_skinny_ringMode = -1;
1068 static int hf_skinny_speakerMode = -1;
1069 static int hf_skinny_remoteIpAddr = -1;
1070 static int hf_skinny_remotePortNumber = -1;
1071 static int hf_skinny_millisecondPacketSize = -1;
1072 static int hf_skinny_precedenceValue = -1;
1073 static int hf_skinny_silenceSuppression = -1;
1074 static int hf_skinny_g723BitRate = -1;
1075 static int hf_skinny_conferenceID = -1;
1076 static int hf_skinny_deviceResetType = -1;
1077 static int hf_skinny_echoCancelType = -1;
1078 static int hf_skinny_deviceUnregisterStatus = -1;
1079 static int hf_skinny_hookFlashDetectMode = -1;
1080 static int hf_skinny_detectInterval = -1;
1081 static int hf_skinny_microphoneMode = -1;
1082 static int hf_skinny_headsetMode = -1;
1083 static int hf_skinny_unknown = -1;
1084 static int hf_skinny_rawData = -1;
1085 static int hf_skinny_xmlData = -1;
1086 static int hf_skinny_activeForward = -1;
1087 static int hf_skinny_forwardAllActive = -1;
1088 static int hf_skinny_forwardBusyActive = -1;
1089 static int hf_skinny_forwardNoAnswerActive = -1;
1090 static int hf_skinny_forwardNumber = -1;
1091 static int hf_skinny_serverName = -1;
1092 static int hf_skinny_numberLines = -1;
1093 static int hf_skinny_numberSpeedDials = -1;
1094 static int hf_skinny_userName = -1;
1095 static int hf_skinny_sessionType = -1;
1096 static int hf_skinny_version = -1;
1097 static int hf_skinny_mediaEnunciationType = -1;
1098 static int hf_skinny_serverIdentifier = -1;
1099 static int hf_skinny_serverListenPort = -1;
1100 static int hf_skinny_serverIpAddress = -1;
1101 static int hf_skinny_multicastIpAddress = -1;
1102 static int hf_skinny_multicastPort = -1;
1103 static int hf_skinny_tokenRejWaitTime = -1;
1104 static int hf_skinny_numberOfInServiceStreams = -1;
1105 static int hf_skinny_maxStreamsPerConf = -1;
1106 static int hf_skinny_numberOfOutOfServiceStreams = -1;
1107 static int hf_skinny_applicationID = -1;
1108 static int hf_skinny_serviceNum = -1;
1109 static int hf_skinny_serviceURLIndex = -1;
1110 static int hf_skinny_featureIndex = -1;
1111 static int hf_skinny_createConfResults = -1;
1112 static int hf_skinny_modifyConfResults = -1;
1113 static int hf_skinny_deleteConfResults = -1;
1114 static int hf_skinny_addParticipantResults = -1;
1115 static int hf_skinny_passThruData = -1;
1116 static int hf_skinny_last = -1;
1117 static int hf_skinny_numberOfEntries = -1;
1118 static int hf_skinny_auditParticipantResults = -1;
1119 static int hf_skinny_participantEntry = -1;
1120 static int hf_skinny_resourceTypes = -1;
1121 static int hf_skinny_numberOfReservedParticipants = -1;
1122 static int hf_skinny_numberOfActiveParticipants = -1;
1123 static int hf_skinny_appID = -1;
1124 static int hf_skinny_appData = -1;
1125 static int hf_skinny_appConfID = -1;
1126 static int hf_skinny_sequenceFlag = -1;
1127 static int hf_skinny_displayPriority = -1;
1128 static int hf_skinny_appInstanceID = -1;
1129 static int hf_skinny_routingID = -1;
1130 static int hf_skinny_audioCapCount = -1;
1131 static int hf_skinny_videoCapCount = -1;
1132 static int hf_skinny_dataCapCount = -1;
1133 static int hf_skinny_RTPPayloadFormat = -1;
1134 static int hf_skinny_customPictureFormatCount = -1;
1135 static int hf_skinny_pictureWidth = -1;
1136 static int hf_skinny_pictureHeight = -1;
1137 static int hf_skinny_pixelAspectRatio = -1;
1138 static int hf_skinny_clockConversionCode = -1;
1139 static int hf_skinny_clockDivisor = -1;
1140 static int hf_skinny_activeStreamsOnRegistration = -1;
1141 static int hf_skinny_maxBW = -1;
1142 static int hf_skinny_serviceResourceCount = -1;
1143 static int hf_skinny_layoutCount = -1;
1144 static int hf_skinny_layout = -1;
1145 static int hf_skinny_maxConferences = -1;
1146 static int hf_skinny_activeConferenceOnRegistration = -1;
1147 static int hf_skinny_transmitOrReceive = -1;
1148 static int hf_skinny_levelPreferenceCount = -1;
1149 static int hf_skinny_transmitPreference = -1;
1150 static int hf_skinny_format = -1;
1151 static int hf_skinny_maxBitRate = -1;
1152 static int hf_skinny_minBitRate = -1;
1153 static int hf_skinny_MPI = -1;
1154 static int hf_skinny_serviceNumber = -1;
1155 static int hf_skinny_temporalSpatialTradeOffCapability = -1;
1156 static int hf_skinny_stillImageTransmission = -1;
1157 static int hf_skinny_h263_capability_bitfield = -1;
1158 static int hf_skinny_annexNandWFutureUse = -1;
1159 static int hf_skinny_modelNumber = -1;
1160 static int hf_skinny_bandwidth = -1;
1161 static int hf_skinny_protocolDependentData = -1;
1162 static int hf_skinny_priority = -1;
1163 static int hf_skinny_payloadDtmf = -1;
1164 static int hf_skinny_featureID = -1;
1165 static int hf_skinny_featureTextLabel = -1;
1166 static int hf_skinny_featureStatus = -1;
1167 static int hf_skinny_notify = -1;
1168 static int hf_skinny_endOfAnnAck = -1;
1169 static int hf_skinny_annPlayMode = -1;
1170 static int hf_skinny_annPlayStatus = -1;
1171 static int hf_skinny_locale = -1;
1172 static int hf_skinny_country = -1;
1173 static int hf_skinny_matrixConfPartyID = -1;
1174 static int hf_skinny_hearingConfPartyMask = -1;
1175 static int hf_skinny_serviceURL = -1;
1176 static int hf_skinny_serviceURLDisplayName = -1;
1177 static int hf_skinny_callSelectStat = -1;
1178 static int hf_skinny_isConferenceCreator = -1;
1179 static int hf_skinny_payload_rfc_number = -1;
1180 static int hf_skinny_payloadType = -1;
1181 static int hf_skinny_bitRate = -1;
1182 static int hf_skinny_pictureFormatCount = -1;
1183 static int hf_skinny_confServiceNum = -1;
1184 static int hf_skinny_DSCPValue = -1;
1185 static int hf_skinny_miscCommandType = -1;
1186 static int hf_skinny_temporalSpatialTradeOff = -1;
1187 static int hf_skinny_firstGOB = -1;
1188 static int hf_skinny_numberOfGOBs = -1;
1189 static int hf_skinny_firstMB = -1;
1190 static int hf_skinny_numberOfMBs = -1;
1191 static int hf_skinny_pictureNumber = -1;
1192 static int hf_skinny_longTermPictureIndex = -1;
1193 static int hf_skinny_recoveryReferencePictureCount = -1;
1194 static int hf_skinny_transactionID = -1;
1195 static int hf_cast_lastRedirectingPartyName = -1;
1196 static int hf_cast_lastRedirectingParty = -1;
1197 static int hf_cast_cgpnVoiceMailbox = -1;
1198 static int hf_cast_cdpnVoiceMailbox = -1;
1199 static int hf_cast_originalCdpnVoiceMailbox = -1;
1200 static int hf_cast_lastRedirectingVoiceMailbox = -1;
1201 static int hf_cast_originalCdpnRedirectReason = -1;
1202 static int hf_cast_lastRedirectingReason = -1;
1203 static int hf_cast_callInstance = -1;
1204 static int hf_cast_callSecurityStatus = -1;
1205 static int hf_skinny_directoryIndex = -1;
1206 static int hf_skinny_directoryPhoneNumber = -1;
1207
1208 /* Skinny content type and internet media type used by other dissectors
1209  *  * are the same.  List of media types from IANA at:
1210  *   * http://www.iana.org/assignments/media-types/index.html */
1211 static dissector_table_t media_type_dissector_table;
1212
1213 /* Initialize the subtree pointers */
1214 static gint ett_skinny          = -1;
1215 static gint ett_skinny_tree     = -1;
1216 static gint ett_skinny_softKeyMap = -1;
1217
1218 /* desegmentation of SCCP */
1219 static gboolean skinny_desegment = TRUE;
1220
1221 static dissector_handle_t rtp_handle=NULL;
1222
1223 /* tap register id */
1224 static int skinny_tap = -1;
1225
1226 /* skinny protocol tap info */
1227 #define MAX_SKINNY_MESSAGES_IN_PACKET 10
1228 static skinny_info_t pi_arr[MAX_SKINNY_MESSAGES_IN_PACKET];
1229 static int pi_current = 0;
1230 static skinny_info_t *si;
1231
1232 /* Get the length of a single SCCP PDU */
1233 static guint get_skinny_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset)
1234 {
1235   guint32 hdr_data_length;
1236
1237   /*
1238    * Get the length of the SCCP packet.
1239    */
1240   hdr_data_length = tvb_get_letohl(tvb, offset);
1241
1242   /*
1243    * That length doesn't include the length of the header itself;
1244    * add that in.
1245    */
1246   return hdr_data_length + 8;
1247 }
1248
1249 static void
1250 dissect_skinny_xml(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, const gint start, gint length)
1251 {
1252   proto_item *item = NULL;
1253   proto_tree *subtree = NULL;
1254   tvbuff_t *next_tvb;
1255   dissector_handle_t handle;
1256
1257   item = proto_tree_add_item(tree, hf_skinny_xmlData, tvb, start, length, ENC_ASCII|ENC_NA);
1258   subtree = proto_item_add_subtree(item, 0);
1259   next_tvb = tvb_new_subset(tvb, start, length, -1);
1260   handle = dissector_get_string_handle(media_type_dissector_table, "text/xml");
1261   if (handle != NULL) {
1262     call_dissector(handle, next_tvb, pinfo, subtree);
1263    }
1264 }
1265
1266 /* Dissect a single SCCP PDU */
1267 static void
1268 dissect_skinny_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
1269 {
1270   int offset = 0;
1271   gboolean is_video = FALSE; /* FIX ME: need to indicate video or not */
1272
1273   /* Header fields */
1274   guint32 hdr_data_length;
1275   guint32 hdr_version;
1276   guint32 data_messageid;
1277   /*  guint32 data_size; */
1278
1279   guint i = 0;
1280   guint t = 0;
1281   int j = 0;
1282   guint count;
1283   int val;
1284
1285   guint32 capCount;
1286   guint32 softKeyCount;
1287   guint32 softKeySetCount;
1288   guint16 validKeyMask;
1289
1290   /* Set up structures we will need to add the protocol subtree and manage it */
1291   proto_item *ti;
1292   proto_tree *skinny_tree = NULL;
1293   proto_item *ti_sub;
1294   proto_tree *skinny_sub_tree;
1295   proto_tree *skinny_sub_tree_sav;
1296   proto_tree *skinny_sub_tree_sav_sav;
1297
1298   proto_item *skm = NULL;
1299   proto_item *skm_tree = NULL;
1300
1301   hdr_data_length = tvb_get_letohl(tvb, offset);
1302   hdr_version     = tvb_get_letohl(tvb, offset+4);
1303   data_messageid  = tvb_get_letohl(tvb, offset+8);
1304
1305   /* Initialise stat info for passing to tap */
1306   pi_current++;
1307   if (pi_current == MAX_SKINNY_MESSAGES_IN_PACKET)
1308   {
1309         /* Overwrite info in first struct if run out of space... */
1310         pi_current = 0;
1311   }
1312   si = &pi_arr[pi_current];
1313   si->messId = data_messageid;
1314   si->messageName = val_to_str_ext(data_messageid, &message_id_ext, "0x%08X (Unknown)");
1315   si->callId = 0;
1316   si->lineId = 0;
1317   si->passThruId = 0;
1318   si->callState = 0;
1319   g_free(si->callingParty);
1320   si->callingParty = NULL;
1321   g_free(si->calledParty);
1322   si->calledParty = NULL;
1323
1324   /* In the interest of speed, if "tree" is NULL, don't do any work not
1325    * necessary to generate protocol tree items. */
1326   if (tree) {
1327     ti = proto_tree_add_item(tree, proto_skinny, tvb, offset, hdr_data_length+8, ENC_NA);
1328     skinny_tree = proto_item_add_subtree(ti, ett_skinny);
1329     proto_tree_add_uint(skinny_tree, hf_skinny_data_length, tvb, offset, 4, hdr_data_length);
1330     proto_tree_add_uint(skinny_tree, hf_skinny_hdr_version, tvb, offset+4, 4, hdr_version);
1331   }
1332
1333   if (check_col(pinfo->cinfo, COL_INFO)) {
1334     col_add_fstr(pinfo->cinfo, COL_INFO,"%s ", si->messageName);
1335         col_set_fence(pinfo->cinfo, COL_INFO);
1336   }
1337
1338   if (tree) {
1339     proto_tree_add_uint(skinny_tree, hf_skinny_messageid, tvb,offset+8, 4, data_messageid );
1340   }
1341
1342   {
1343     switch(data_messageid) {
1344
1345     case 0x0000: /* KeepAliveMessage */
1346       break;
1347
1348     case 0x0001: /* RegisterMessage */
1349       proto_tree_add_item(skinny_tree, hf_skinny_deviceName, tvb, offset+12, StationMaxDeviceNameSize, ENC_ASCII|ENC_NA);
1350       proto_tree_add_item(skinny_tree, hf_skinny_stationUserId, tvb, offset+28, 4, ENC_LITTLE_ENDIAN);
1351       proto_tree_add_item(skinny_tree, hf_skinny_stationInstance, tvb, offset+32, 4, ENC_LITTLE_ENDIAN);
1352       proto_tree_add_item(skinny_tree, hf_skinny_ipAddress, tvb, offset+36, 4, ENC_BIG_ENDIAN);
1353       proto_tree_add_item(skinny_tree, hf_skinny_deviceType, tvb, offset+40, 4, ENC_LITTLE_ENDIAN);
1354       proto_tree_add_item(skinny_tree, hf_skinny_maxStreams, tvb, offset+44, 4, ENC_LITTLE_ENDIAN);
1355       break;
1356
1357     case 0x0002: /* IpPortMessage */
1358       proto_tree_add_item(skinny_tree, hf_skinny_stationIpPort, tvb, offset+12, 2, ENC_BIG_ENDIAN);
1359       break;
1360
1361     case 0x0003: /* KeypadButtonMessage */
1362       proto_tree_add_item(skinny_tree, hf_skinny_stationKeypadButton, tvb, offset+12, 4, ENC_LITTLE_ENDIAN);
1363       if (hdr_data_length > 8) {
1364           proto_tree_add_item(skinny_tree, hf_skinny_lineInstance, tvb, offset+16, 4, ENC_LITTLE_ENDIAN);
1365                   proto_tree_add_item(skinny_tree, hf_skinny_callIdentifier, tvb, offset+20, 4, ENC_LITTLE_ENDIAN);
1366                   si->lineId = tvb_get_letohl(tvb, offset+16);
1367                   si->callId = tvb_get_letohl(tvb, offset+20);
1368       }
1369       break;
1370
1371     case 0x0004: /* EnblocCallMessage -- This decode NOT verified*/
1372       proto_tree_add_item(skinny_tree, hf_skinny_calledPartyNumber, tvb, offset+12, StationMaxDirnumSize, ENC_ASCII|ENC_NA);
1373       break;
1374
1375     case 0x0005: /* StimulusMessage */
1376       proto_tree_add_item(skinny_tree, hf_skinny_stimulus, tvb, offset+12, 4, ENC_LITTLE_ENDIAN);
1377       proto_tree_add_item(skinny_tree, hf_skinny_stimulusInstance, tvb, offset+16, 4, ENC_LITTLE_ENDIAN);
1378       if (hdr_data_length > 12) {
1379                   proto_tree_add_item(skinny_tree, hf_skinny_callIdentifier, tvb, offset+20, 4, ENC_LITTLE_ENDIAN);
1380               si->callId = tvb_get_letohl(tvb, offset+20);
1381       }
1382       break;
1383
1384     case 0x0006: /* OffHookMessage */
1385       if (hdr_data_length > 4) {
1386                   proto_tree_add_item(skinny_tree, hf_skinny_lineInstance, tvb, offset+12, 4, ENC_LITTLE_ENDIAN);
1387                   proto_tree_add_item(skinny_tree, hf_skinny_callIdentifier, tvb, offset+16, 4, ENC_LITTLE_ENDIAN);
1388                   si->lineId = tvb_get_letohl(tvb, offset+12);
1389                   si->callId = tvb_get_letohl(tvb, offset+16);
1390       }
1391       break;
1392
1393     case 0x0007: /* OnHookMessage */
1394       if (hdr_data_length > 4) {
1395                   proto_tree_add_item(skinny_tree, hf_skinny_lineInstance, tvb, offset+12, 4, ENC_LITTLE_ENDIAN);
1396                   proto_tree_add_item(skinny_tree, hf_skinny_callIdentifier, tvb, offset+16, 4, ENC_LITTLE_ENDIAN);
1397                   si->lineId = tvb_get_letohl(tvb, offset+12);
1398                   si->callId = tvb_get_letohl(tvb, offset+16);
1399       }
1400       break;
1401
1402     case 0x0008: /* HookFlashMessage */
1403       break;
1404
1405     case 0x0009: /* ForwardStatReqMessage */
1406       proto_tree_add_item(skinny_tree, hf_skinny_lineNumber, tvb, offset+12, 4, ENC_LITTLE_ENDIAN);
1407       break;
1408
1409     case 0x000a: /* SpeedDialStatReqMessage */
1410       proto_tree_add_item(skinny_tree, hf_skinny_speedDialNumber, tvb, offset+12, 4, ENC_LITTLE_ENDIAN);
1411       break;
1412
1413     case 0x000b: /* LineStatReqMessage */
1414       proto_tree_add_item(skinny_tree, hf_skinny_lineNumber, tvb, offset+12, 4, ENC_LITTLE_ENDIAN);
1415       break;
1416
1417     case 0x000c: /* ConfigStatReqMessage */
1418       break;
1419
1420     case 0x000d: /* TimeDateReqMessage */
1421       break;
1422
1423     case 0x000e: /* ButtonTemplateReqMessage */
1424       break;
1425
1426     case 0x000f: /* VersionReqMessage */
1427       break;
1428
1429     case 0x0010: /* CapabilitiesResMessage  - VERIFIED AS IS */
1430       /* FIXME -- we are only going to decode the first 7 protocol fields for now cuz that's all it sent me
1431        * on the phone i was working with. I should probably skip the struct decode and use a more piece
1432        * type method using the capCount definition to control the decode loop
1433        *
1434        * basically changing StationMaxCapabilities definition
1435        *
1436        */
1437       capCount = tvb_get_letohl(tvb, offset+12);
1438       proto_tree_add_uint(skinny_tree, hf_skinny_capCount, tvb, offset+12, 4, capCount);
1439       for (i = 0; i < capCount; i++) {
1440               proto_tree_add_item(skinny_tree, hf_skinny_payloadCapability, tvb, offset+(i*16)+16, 4, ENC_LITTLE_ENDIAN);
1441               proto_tree_add_item(skinny_tree, hf_skinny_maxFramesPerPacket, tvb, offset+(i*16)+20, 2, ENC_LITTLE_ENDIAN);
1442               /* FIXME -- decode the union under here as required, is always 0 on my equipment */
1443       }
1444       break;
1445
1446     case 0x0011: /* MediaPortListMessage */
1447       break;
1448
1449     case 0x0012: /* ServerReqMessage */
1450       break;
1451
1452     case 0x0020: /* AlarmMessage */
1453       proto_tree_add_item(skinny_tree, hf_skinny_alarmSeverity, tvb, offset+12, 4, ENC_LITTLE_ENDIAN);
1454       proto_tree_add_item(skinny_tree, hf_skinny_displayMessage, tvb, offset+16, StationMaxAlarmMessageSize, ENC_ASCII|ENC_NA);
1455       proto_tree_add_item(skinny_tree, hf_skinny_alarmParam1, tvb, offset+96, 4, ENC_LITTLE_ENDIAN);
1456       proto_tree_add_item(skinny_tree, hf_skinny_alarmParam2, tvb, offset+100, 4, ENC_BIG_ENDIAN);
1457       break;
1458
1459     case 0x0021: /* MulticastMediaReceptionAck - This decode NOT verified */
1460       proto_tree_add_item(skinny_tree, hf_skinny_receptionStatus, tvb, offset+12, 4, ENC_LITTLE_ENDIAN);
1461       proto_tree_add_item(skinny_tree, hf_skinny_passThruPartyID, tvb, offset+16, 4, ENC_LITTLE_ENDIAN);
1462       si->passThruId = tvb_get_letohl(tvb, offset+16);
1463       break;
1464
1465     case 0x0022: /* OpenReceiveChannelAck */
1466       if (hdr_version == BASIC_MSG_TYPE) {
1467         proto_tree_add_item(skinny_tree, hf_skinny_ORCStatus, tvb, offset+12, 4, ENC_LITTLE_ENDIAN);
1468         proto_tree_add_item(skinny_tree, hf_skinny_ipAddress, tvb, offset+16, 4, ENC_BIG_ENDIAN);
1469         proto_tree_add_item(skinny_tree, hf_skinny_portNumber, tvb, offset+20, 4, ENC_LITTLE_ENDIAN);
1470         proto_tree_add_item(skinny_tree, hf_skinny_passThruPartyID, tvb, offset+24, 4, ENC_LITTLE_ENDIAN);
1471         if (rtp_handle) {
1472           address src_addr;
1473           guint32 ipv4_address;
1474
1475           src_addr.type = AT_IPv4;
1476           src_addr.len = 4;
1477           src_addr.data = (guint8 *)&ipv4_address;
1478           ipv4_address = tvb_get_ipv4(tvb, offset+16);
1479           rtp_add_address(pinfo, &src_addr, tvb_get_letohl(tvb, offset+20), 0, "Skinny", pinfo->fd->num, is_video, NULL);
1480         }
1481         si->passThruId = tvb_get_letohl(tvb, offset+24);
1482       } else if (hdr_version == CM7_MSG_TYPE_A || hdr_version == CM7_MSG_TYPE_B) {
1483         proto_tree_add_item(skinny_tree, hf_skinny_ORCStatus, tvb, offset+12, 4, ENC_LITTLE_ENDIAN);
1484         /* unknown uint32_t stuff */
1485         proto_tree_add_item(skinny_tree, hf_skinny_ipAddress, tvb, offset+20, 4, ENC_BIG_ENDIAN);
1486         /* 3x unknown uint32_t stuff, space for IPv6 maybe */
1487         proto_tree_add_item(skinny_tree, hf_skinny_portNumber, tvb, offset+36, 4, ENC_LITTLE_ENDIAN);
1488         proto_tree_add_item(skinny_tree, hf_skinny_passThruPartyID, tvb, offset+40, 4, ENC_LITTLE_ENDIAN);
1489         if (rtp_handle) {
1490           address src_addr;
1491           guint32 ipv4_address;
1492
1493           src_addr.type = AT_IPv4;
1494           src_addr.len = 4;
1495           src_addr.data = (guint8 *)&ipv4_address;
1496           ipv4_address = tvb_get_ipv4(tvb, offset+20);
1497           rtp_add_address(pinfo, &src_addr, tvb_get_letohl(tvb, offset+36), 0, "Skinny", pinfo->fd->num, is_video, NULL);
1498         }
1499         si->passThruId = tvb_get_letohl(tvb, offset+40);
1500       }
1501       break;
1502
1503     case 0x0023: /* ConnectionStatisticsRes */
1504       proto_tree_add_item(skinny_tree, hf_skinny_directoryNumber, tvb, offset+12, StationMaxDirnumSize, ENC_ASCII|ENC_NA);
1505       proto_tree_add_item(skinny_tree, hf_skinny_callIdentifier, tvb, offset+36, 4, ENC_LITTLE_ENDIAN);
1506       proto_tree_add_item(skinny_tree, hf_skinny_statsProcessingType, tvb, offset+40, 4, ENC_LITTLE_ENDIAN);
1507       proto_tree_add_item(skinny_tree, hf_skinny_packetsSent, tvb, offset+44, 4, ENC_LITTLE_ENDIAN);
1508       proto_tree_add_item(skinny_tree, hf_skinny_octetsSent, tvb, offset+48, 4, ENC_LITTLE_ENDIAN);
1509       proto_tree_add_item(skinny_tree, hf_skinny_packetsRecv, tvb, offset+52, 4, ENC_LITTLE_ENDIAN);
1510       proto_tree_add_item(skinny_tree, hf_skinny_octetsRecv, tvb, offset+56, 4, ENC_LITTLE_ENDIAN);
1511       proto_tree_add_item(skinny_tree, hf_skinny_packetsLost, tvb, offset+60, 4, ENC_LITTLE_ENDIAN);
1512       proto_tree_add_item(skinny_tree, hf_skinny_jitter, tvb, offset+64, 4, ENC_LITTLE_ENDIAN);
1513       proto_tree_add_item(skinny_tree, hf_skinny_latency, tvb, offset+68, 4, ENC_LITTLE_ENDIAN);
1514       si->callId = tvb_get_letohl(tvb, offset+36);
1515       break;
1516
1517     case 0x0024: /* OffHookWithCgpnMessage */
1518       proto_tree_add_item(skinny_tree, hf_skinny_calledPartyNumber, tvb, offset+12,StationMaxDirnumSize, ENC_ASCII|ENC_NA);
1519       break;
1520
1521     case 0x0025: /* SoftKeySetReqMessage */
1522       break;
1523
1524     case 0x0026: /* SoftKeyEventMessage */
1525       proto_tree_add_item(skinny_tree, hf_skinny_softKeyEvent, tvb, offset+12, 4, ENC_LITTLE_ENDIAN);
1526       proto_tree_add_item(skinny_tree, hf_skinny_lineInstance, tvb, offset+16, 4, ENC_LITTLE_ENDIAN);
1527       proto_tree_add_item(skinny_tree, hf_skinny_callIdentifier, tvb, offset+20, 4, ENC_LITTLE_ENDIAN);
1528       si->lineId = tvb_get_letohl(tvb, offset+16);
1529       si->callId = tvb_get_letohl(tvb, offset+20);
1530       break;
1531
1532     case 0x0027: /* UnregisterMessage */
1533       break;
1534
1535     case 0x0028: /* softKeyTemplateRequest */
1536       break;
1537
1538     case 0x0029: /* RegisterTokenReq */
1539       proto_tree_add_item(skinny_tree, hf_skinny_deviceName, tvb, offset+12, 4, ENC_ASCII|ENC_NA);
1540       i = offset+12+StationMaxDeviceNameSize;
1541       proto_tree_add_item(skinny_tree, hf_skinny_stationUserId, tvb, i, 4, ENC_LITTLE_ENDIAN);
1542       proto_tree_add_item(skinny_tree, hf_skinny_stationInstance, tvb, i+4, 4, ENC_LITTLE_ENDIAN);
1543       proto_tree_add_item(skinny_tree, hf_skinny_ipAddress, tvb, i+8, 4, ENC_BIG_ENDIAN);
1544       proto_tree_add_item(skinny_tree, hf_skinny_deviceType, tvb, i+12, 4, ENC_LITTLE_ENDIAN);
1545       break;
1546
1547     case 0x002A: /* MediaTransmissionFailure */
1548       proto_tree_add_item(skinny_tree, hf_skinny_conferenceID, tvb, offset+12, 4, ENC_LITTLE_ENDIAN);
1549       proto_tree_add_item(skinny_tree, hf_skinny_passThruPartyID, tvb, offset+16, 4, ENC_LITTLE_ENDIAN);
1550       proto_tree_add_item(skinny_tree, hf_skinny_ipAddress, tvb, offset+20, 4, ENC_BIG_ENDIAN);
1551       proto_tree_add_item(skinny_tree, hf_skinny_portNumber, tvb, offset+24, 4, ENC_LITTLE_ENDIAN);
1552       proto_tree_add_item(skinny_tree, hf_skinny_callIdentifier, tvb, offset+28, 4, ENC_LITTLE_ENDIAN);
1553       si->passThruId = tvb_get_letohl(tvb, offset+16);
1554       si->callId = tvb_get_letohl(tvb, offset+28);
1555       break;
1556
1557     case 0x002B: /* HeadsetStatusMessage */
1558       proto_tree_add_item(skinny_tree, hf_skinny_headsetMode, tvb, offset+12, 4, ENC_LITTLE_ENDIAN);
1559       break;
1560
1561     case 0x002C: /* MediaResourceNotification */
1562       proto_tree_add_item(skinny_tree, hf_skinny_deviceType, tvb, offset+12, 4, ENC_LITTLE_ENDIAN);
1563       proto_tree_add_item(skinny_tree, hf_skinny_numberOfInServiceStreams, tvb, offset+16, 4, ENC_LITTLE_ENDIAN);
1564       proto_tree_add_item(skinny_tree, hf_skinny_maxStreamsPerConf, tvb, offset+20, 4, ENC_LITTLE_ENDIAN);
1565       proto_tree_add_item(skinny_tree, hf_skinny_numberOfOutOfServiceStreams, tvb, offset+24, 4, ENC_LITTLE_ENDIAN);
1566       break;
1567
1568     case 0x002D: /* RegisterAvailableLinesMessage */
1569       proto_tree_add_item(skinny_tree, hf_skinny_numberLines, tvb, offset+12, 4, ENC_LITTLE_ENDIAN);
1570       break;
1571
1572     case 0x002E: /* DeviceToUserDataMessage */
1573       proto_tree_add_item(skinny_tree, hf_skinny_applicationID, tvb, offset+12, 4, ENC_LITTLE_ENDIAN);
1574       proto_tree_add_item(skinny_tree, hf_skinny_lineInstance, tvb, offset+16, 4, ENC_LITTLE_ENDIAN);
1575       proto_tree_add_item(skinny_tree, hf_skinny_callIdentifier, tvb, offset+20, 4, ENC_LITTLE_ENDIAN);
1576       proto_tree_add_item(skinny_tree, hf_skinny_transactionID, tvb, offset+24, 4, ENC_LITTLE_ENDIAN);
1577       proto_tree_add_item(skinny_tree, hf_skinny_data_length, tvb, offset+28, 4, ENC_LITTLE_ENDIAN);
1578       count = tvb_get_letohl( tvb, offset+28);
1579       dissect_skinny_xml(skinny_tree, tvb, pinfo, offset+30, count);
1580       si->lineId = tvb_get_letohl(tvb, offset+16);
1581       si->callId = tvb_get_letohl(tvb, offset+20);
1582       break;
1583
1584     case 0x002F: /* DeviceToUserDataResponseMessage */
1585       proto_tree_add_item(skinny_tree, hf_skinny_applicationID, tvb, offset+12, 4, ENC_LITTLE_ENDIAN);
1586       proto_tree_add_item(skinny_tree, hf_skinny_lineInstance, tvb, offset+16, 4, ENC_LITTLE_ENDIAN);
1587       proto_tree_add_item(skinny_tree, hf_skinny_callIdentifier, tvb, offset+20, 4, ENC_LITTLE_ENDIAN);
1588       proto_tree_add_item(skinny_tree, hf_skinny_transactionID, tvb, offset+24, 4, ENC_LITTLE_ENDIAN);
1589       proto_tree_add_item(skinny_tree, hf_skinny_data_length, tvb, offset+28, 4, ENC_LITTLE_ENDIAN);
1590       count = tvb_get_letohl( tvb, offset+28);
1591       dissect_skinny_xml(skinny_tree, tvb, pinfo, offset+30, count);
1592       si->lineId = tvb_get_letohl(tvb, offset+12);
1593       si->callId = tvb_get_letohl(tvb, offset+16);
1594       break;
1595
1596     case 0x0030: /* UpdateCapabilitiesMessage */
1597       /* to do - this message is very large and will span multiple packets, it would be nice to someday */
1598       /* find out a way to join the next packet and get the complete message to decode */
1599       proto_tree_add_item(skinny_tree, hf_skinny_audioCapCount, tvb, offset+12, 4, ENC_LITTLE_ENDIAN);
1600       proto_tree_add_item(skinny_tree, hf_skinny_videoCapCount, tvb, offset+16, 4, ENC_LITTLE_ENDIAN);
1601       proto_tree_add_item(skinny_tree, hf_skinny_dataCapCount, tvb, offset+20, 4, ENC_LITTLE_ENDIAN);
1602       proto_tree_add_item(skinny_tree, hf_skinny_RTPPayloadFormat, tvb, offset+24, 4, ENC_LITTLE_ENDIAN);
1603       proto_tree_add_item(skinny_tree, hf_skinny_customPictureFormatCount, tvb, offset+28, 4, ENC_LITTLE_ENDIAN);
1604       count = offset+32;
1605       for ( i = 0; i < MAX_CUSTOM_PICTURES; i++ ) {
1606         ti_sub = proto_tree_add_text(skinny_tree, tvb, offset, 20, "customPictureFormat[%d]", i);
1607         skinny_sub_tree = proto_item_add_subtree(ti_sub, ett_skinny_tree);
1608         proto_tree_add_item(skinny_sub_tree, hf_skinny_pictureWidth, tvb, count, 4, ENC_LITTLE_ENDIAN);
1609         count+= 4;
1610         proto_tree_add_item(skinny_sub_tree, hf_skinny_pictureHeight, tvb, count, 4, ENC_LITTLE_ENDIAN);
1611         count+= 4;
1612         proto_tree_add_item(skinny_sub_tree, hf_skinny_pixelAspectRatio, tvb, count, 4, ENC_LITTLE_ENDIAN);
1613         count+= 4;
1614         proto_tree_add_item(skinny_sub_tree, hf_skinny_clockConversionCode, tvb, count, 4, ENC_LITTLE_ENDIAN);
1615         count+= 4;
1616         proto_tree_add_item(skinny_sub_tree, hf_skinny_clockDivisor, tvb, count, 4, ENC_LITTLE_ENDIAN);
1617         count+= 4;
1618       }
1619       ti_sub = proto_tree_add_text(skinny_tree, tvb, offset, 8, "confResources");
1620       skinny_sub_tree = proto_item_add_subtree(ti_sub, ett_skinny_tree);
1621       proto_tree_add_item(skinny_sub_tree, hf_skinny_activeStreamsOnRegistration, tvb, count, 4, ENC_LITTLE_ENDIAN);
1622       count+= 4;
1623       proto_tree_add_item(skinny_sub_tree, hf_skinny_maxBW, tvb, count, 4, ENC_LITTLE_ENDIAN);
1624       count+= 4;
1625       proto_tree_add_item(skinny_sub_tree, hf_skinny_serviceResourceCount, tvb, count, 4, ENC_LITTLE_ENDIAN);
1626       count+= 4;
1627       skinny_sub_tree_sav = skinny_sub_tree;
1628       for ( i = 0; i < MAX_SERVICE_TYPE; i++ ) {
1629         ti_sub = proto_tree_add_text(skinny_sub_tree_sav, tvb, offset, 20, "serviceResource[%d]", i);
1630         skinny_sub_tree = proto_item_add_subtree(ti_sub, ett_skinny_tree);
1631         proto_tree_add_item(skinny_sub_tree, hf_skinny_layoutCount, tvb, count, 4, ENC_LITTLE_ENDIAN);
1632         count+= 4;
1633         skinny_sub_tree_sav_sav = skinny_sub_tree_sav;
1634         for ( t = 0; t < MAX_LAYOUT_WITH_SAME_SERVICE; t++ ) {
1635           ti_sub = proto_tree_add_text(skinny_sub_tree_sav, tvb, offset, 20, "layouts[%d]", t);
1636           skinny_sub_tree = proto_item_add_subtree(ti_sub, ett_skinny_tree);
1637           proto_tree_add_item(skinny_sub_tree, hf_skinny_layout, tvb, count, 4, ENC_LITTLE_ENDIAN);
1638           count+= 4;
1639         }
1640         skinny_sub_tree = skinny_sub_tree_sav_sav;
1641         proto_tree_add_item(skinny_sub_tree, hf_skinny_serviceNum, tvb, count, 4, ENC_LITTLE_ENDIAN);
1642         count+= 4;
1643         proto_tree_add_item(skinny_sub_tree, hf_skinny_maxStreams, tvb, count, 4, ENC_LITTLE_ENDIAN);
1644         count+= 4;
1645         proto_tree_add_item(skinny_sub_tree, hf_skinny_maxConferences, tvb, count, 4, ENC_LITTLE_ENDIAN);
1646         count+= 4;
1647         proto_tree_add_item(skinny_sub_tree, hf_skinny_activeConferenceOnRegistration, tvb, count, 4, ENC_LITTLE_ENDIAN);
1648         count+= 4;
1649       }
1650       for ( i = 0; i < StationMaxCapabilities; i++ ) {
1651         ti_sub = proto_tree_add_text(skinny_tree, tvb, offset, 20, "audiocaps[%d]", i);
1652         skinny_sub_tree = proto_item_add_subtree(ti_sub, ett_skinny_tree);
1653         proto_tree_add_item(skinny_sub_tree, hf_skinny_payloadCapability, tvb, count, 4, ENC_LITTLE_ENDIAN);
1654         count+= 4;
1655         proto_tree_add_item(skinny_sub_tree, hf_skinny_maxFramesPerPacket, tvb, count, 2, ENC_LITTLE_ENDIAN);
1656         count+= 4;
1657         /* skip past union it is only for G723 */
1658         count+= 8;
1659       }
1660       for ( i = 0; i < StationMaxVideoCapabilities; i++ ) {
1661         ti_sub = proto_tree_add_text(skinny_tree, tvb, offset, 20, "vidCaps[%d]", i);
1662         skinny_sub_tree = proto_item_add_subtree(ti_sub, ett_skinny_tree);
1663         proto_tree_add_item(skinny_sub_tree, hf_skinny_payloadCapability, tvb, count, 4, ENC_LITTLE_ENDIAN);
1664         count+= 4;
1665         proto_tree_add_item(skinny_sub_tree, hf_skinny_transmitOrReceive, tvb, count, 4, ENC_LITTLE_ENDIAN);
1666         count+= 4;
1667         proto_tree_add_item(skinny_sub_tree, hf_skinny_levelPreferenceCount, tvb, count, 4, ENC_LITTLE_ENDIAN);
1668         count+= 4;
1669         skinny_sub_tree_sav = skinny_sub_tree;
1670         for ( t = 0; t < MAX_LEVEL_PREFERENCE; t++ ) {
1671           ti_sub = proto_tree_add_text(skinny_sub_tree_sav, tvb, offset, 20, "levelPreference[%d]", t);
1672           skinny_sub_tree = proto_item_add_subtree(ti_sub, ett_skinny_tree);
1673           proto_tree_add_item(skinny_sub_tree, hf_skinny_transmitPreference, tvb, count, 4, ENC_LITTLE_ENDIAN);
1674           count+= 4;
1675           proto_tree_add_item(skinny_sub_tree, hf_skinny_format, tvb, count, 4, ENC_LITTLE_ENDIAN);
1676           count+= 4;
1677           proto_tree_add_item(skinny_sub_tree, hf_skinny_maxBitRate, tvb, count, 4, ENC_LITTLE_ENDIAN);
1678           count+= 4;
1679           proto_tree_add_item(skinny_sub_tree, hf_skinny_minBitRate, tvb, count, 4, ENC_LITTLE_ENDIAN);
1680           count+= 4;
1681           proto_tree_add_item(skinny_sub_tree, hf_skinny_MPI, tvb, count, 4, ENC_LITTLE_ENDIAN);
1682           count+= 4;
1683           proto_tree_add_item(skinny_sub_tree, hf_skinny_serviceNumber, tvb, count, 4, ENC_LITTLE_ENDIAN);
1684           count+= 4;
1685         }
1686         val = count;
1687
1688         /* H.261 */
1689         ti_sub = proto_tree_add_text(skinny_sub_tree_sav, tvb, offset, 8, "h261VideoCapability");
1690         skinny_sub_tree = proto_item_add_subtree(ti_sub, ett_skinny_tree);
1691         proto_tree_add_item(skinny_sub_tree, hf_skinny_temporalSpatialTradeOffCapability, tvb, count, 4, ENC_LITTLE_ENDIAN);
1692         count+= 4;
1693         proto_tree_add_item(skinny_sub_tree, hf_skinny_stillImageTransmission, tvb, count, 4, ENC_LITTLE_ENDIAN);
1694         count+= 4;
1695
1696         /* H.263 */
1697         count = val;
1698         ti_sub = proto_tree_add_text(skinny_sub_tree_sav, tvb, offset, 8, "h263VideoCapability");
1699         skinny_sub_tree = proto_item_add_subtree(ti_sub, ett_skinny_tree);
1700         proto_tree_add_item(skinny_sub_tree, hf_skinny_h263_capability_bitfield, tvb, count, 4, ENC_LITTLE_ENDIAN);
1701         count+= 4;
1702         proto_tree_add_item(skinny_sub_tree, hf_skinny_annexNandWFutureUse, tvb, count, 4, ENC_LITTLE_ENDIAN);
1703         count+= 4;
1704
1705         /* Video */
1706         count = val;
1707         ti_sub = proto_tree_add_text(skinny_sub_tree_sav, tvb, offset, 8, "vieoVideoCapability");
1708         skinny_sub_tree = proto_item_add_subtree(ti_sub, ett_skinny_tree);
1709         proto_tree_add_item(skinny_sub_tree, hf_skinny_modelNumber, tvb, count, 4, ENC_LITTLE_ENDIAN);
1710         count+= 4;
1711         proto_tree_add_item(skinny_sub_tree, hf_skinny_bandwidth, tvb, count, 4, ENC_LITTLE_ENDIAN);
1712         count+= 4;
1713       }
1714       for ( i = 0; i < StationMaxDataCapabilities; i++ ) {
1715         ti_sub = proto_tree_add_text(skinny_tree, tvb, offset, 20, "dataCaps[%d]", i);
1716         skinny_sub_tree = proto_item_add_subtree(ti_sub, ett_skinny_tree);
1717         proto_tree_add_item(skinny_sub_tree, hf_skinny_payloadCapability, tvb, count, 4, ENC_LITTLE_ENDIAN);
1718         count+= 4;
1719         proto_tree_add_item(skinny_sub_tree, hf_skinny_transmitOrReceive, tvb, count, 4, ENC_LITTLE_ENDIAN);
1720         count+= 4;
1721         proto_tree_add_item(skinny_sub_tree, hf_skinny_protocolDependentData, tvb, count, 4, ENC_LITTLE_ENDIAN);
1722         count+= 4;
1723         proto_tree_add_item(skinny_sub_tree, hf_skinny_maxBitRate, tvb, count, 4, ENC_LITTLE_ENDIAN);
1724         count+= 4;
1725       }
1726       break;
1727
1728     case 0x0031: /* OpenMultiMediaReceiveChannelAckMessage */
1729       proto_tree_add_item(skinny_tree, hf_skinny_ORCStatus, tvb, offset+12, 4, ENC_LITTLE_ENDIAN);
1730       proto_tree_add_item(skinny_tree, hf_skinny_ipAddress, tvb, offset+16, 4, ENC_BIG_ENDIAN);
1731       proto_tree_add_item(skinny_tree, hf_skinny_portNumber, tvb, offset+20, 4, ENC_LITTLE_ENDIAN);
1732       proto_tree_add_item(skinny_tree, hf_skinny_passThruPartyID, tvb, offset+24, 4, ENC_LITTLE_ENDIAN);
1733       proto_tree_add_item(skinny_tree, hf_skinny_callIdentifier, tvb, offset+28, 4, ENC_LITTLE_ENDIAN);
1734       si->passThruId = tvb_get_letohl(tvb, offset+24);
1735       si->callId = tvb_get_letohl(tvb, offset+28);
1736       break;
1737
1738     case 0x0032: /* ClearConferenceMessage */
1739       proto_tree_add_item(skinny_tree, hf_skinny_conferenceID, tvb, offset+12, 4, ENC_LITTLE_ENDIAN);
1740       proto_tree_add_item(skinny_tree, hf_skinny_serviceNum, tvb, offset+16, 4, ENC_LITTLE_ENDIAN);
1741       break;
1742
1743     case 0x0033: /* ServiceURLStatReqMessage */
1744       proto_tree_add_item(skinny_tree, hf_skinny_serviceURLIndex, tvb, offset+12, 4, ENC_LITTLE_ENDIAN);
1745       break;
1746
1747     case 0x0034: /* FeatureStatReqMessage */
1748       proto_tree_add_item(skinny_tree, hf_skinny_featureIndex, tvb, offset+12, 4, ENC_LITTLE_ENDIAN);
1749       break;
1750
1751     case 0x0035: /* CreateConferenceResMessage */
1752       proto_tree_add_item(skinny_tree, hf_skinny_conferenceID, tvb, offset+12, 4, ENC_LITTLE_ENDIAN);
1753       proto_tree_add_item(skinny_tree, hf_skinny_createConfResults, tvb, offset+16, 4, ENC_LITTLE_ENDIAN);
1754       proto_tree_add_item(skinny_tree, hf_skinny_data_length, tvb, offset+20, 4, ENC_LITTLE_ENDIAN);
1755       count = tvb_get_letohl( tvb, offset+20);
1756       proto_tree_add_uint(skinny_tree, hf_skinny_passThruData, tvb, offset+24, 1, count);
1757       break;
1758
1759     case 0x0036: /* DeleteConferenceResMessage */
1760       proto_tree_add_item(skinny_tree, hf_skinny_conferenceID, tvb, offset+12, 4, ENC_LITTLE_ENDIAN);
1761       proto_tree_add_item(skinny_tree, hf_skinny_deleteConfResults, tvb, offset+16, 4, ENC_LITTLE_ENDIAN);
1762       break;
1763
1764     case 0x0037: /* ModifyConferenceResMessage */
1765       proto_tree_add_item(skinny_tree, hf_skinny_conferenceID, tvb, offset+12, 4, ENC_LITTLE_ENDIAN);
1766       proto_tree_add_item(skinny_tree, hf_skinny_modifyConfResults, tvb, offset+16, 4, ENC_LITTLE_ENDIAN);
1767       proto_tree_add_item(skinny_tree, hf_skinny_data_length, tvb, offset+20, 4, ENC_LITTLE_ENDIAN);
1768       count = tvb_get_letohl( tvb, offset+20);
1769       proto_tree_add_uint(skinny_tree, hf_skinny_passThruData, tvb, offset+24, 1, count);
1770       break;
1771
1772     case 0x0038: /* AddParticipantResMessage */
1773       proto_tree_add_item(skinny_tree, hf_skinny_conferenceID, tvb, offset+12, 4, ENC_LITTLE_ENDIAN);
1774       proto_tree_add_item(skinny_tree, hf_skinny_callIdentifier, tvb, offset+16, 4, ENC_LITTLE_ENDIAN);
1775       proto_tree_add_item(skinny_tree, hf_skinny_addParticipantResults, tvb, offset+20, 4, ENC_LITTLE_ENDIAN);
1776       si->callId = tvb_get_letohl(tvb, offset+16);
1777       break;
1778
1779     case 0x0039: /* AuditConferenceResMessage */
1780       proto_tree_add_item(skinny_tree, hf_skinny_last, tvb, offset+12, 4, ENC_LITTLE_ENDIAN);
1781       proto_tree_add_item(skinny_tree, hf_skinny_numberOfEntries, tvb, offset+16, 4, ENC_LITTLE_ENDIAN);
1782       count = offset+20;
1783       for ( i = 0; i < StationMaxConference; i++ ) {
1784         proto_tree_add_item(skinny_tree, hf_skinny_conferenceID, tvb, count, 4, ENC_LITTLE_ENDIAN);
1785         count += 4;
1786         proto_tree_add_item(skinny_tree, hf_skinny_resourceTypes, tvb, count, 4, ENC_LITTLE_ENDIAN);
1787         count += 4;
1788         proto_tree_add_item(skinny_tree, hf_skinny_numberOfReservedParticipants, tvb, count, 4, ENC_LITTLE_ENDIAN);
1789         count += 4;
1790         proto_tree_add_item(skinny_tree, hf_skinny_numberOfActiveParticipants, tvb, count, 4, ENC_LITTLE_ENDIAN);
1791         count += 4;
1792         proto_tree_add_item(skinny_tree, hf_skinny_appID, tvb, count, 4, ENC_LITTLE_ENDIAN);
1793         count += 4;
1794         proto_tree_add_uint(skinny_tree, hf_skinny_appConfID, tvb, count, 1, AppConferenceIDSize);
1795         count += AppConferenceIDSize;
1796         proto_tree_add_uint(skinny_tree, hf_skinny_appData, tvb, count, 1, AppDataSize);
1797         count += AppDataSize;
1798       }
1799       break;
1800
1801     case 0x0040: /* AuditParticipantResMessage */
1802       proto_tree_add_item(skinny_tree, hf_skinny_auditParticipantResults, tvb, offset+12, 4, ENC_LITTLE_ENDIAN);
1803       proto_tree_add_item(skinny_tree, hf_skinny_last, tvb, offset+16, 4, ENC_LITTLE_ENDIAN);
1804       proto_tree_add_item(skinny_tree, hf_skinny_conferenceID, tvb, offset+20, 4, ENC_LITTLE_ENDIAN);
1805       proto_tree_add_item(skinny_tree, hf_skinny_numberOfEntries, tvb, offset+24, 4, ENC_LITTLE_ENDIAN);
1806       count = tvb_get_letohl( tvb, offset+24);
1807       for ( i = 0; i < count; i++ ) {
1808         proto_tree_add_item(skinny_tree, hf_skinny_participantEntry, tvb, offset+28+(i*4), 4, ENC_LITTLE_ENDIAN);
1809       }
1810       break;
1811
1812     case 0x0041: /* DeviceToUserDataVersion1Message */
1813       proto_tree_add_item(skinny_tree, hf_skinny_applicationID, tvb, offset+12, 4, ENC_LITTLE_ENDIAN);
1814       proto_tree_add_item(skinny_tree, hf_skinny_lineInstance, tvb, offset+16, 4, ENC_LITTLE_ENDIAN);
1815       proto_tree_add_item(skinny_tree, hf_skinny_callIdentifier, tvb, offset+20, 4, ENC_LITTLE_ENDIAN);
1816       proto_tree_add_item(skinny_tree, hf_skinny_transactionID, tvb, offset+24, 4, ENC_LITTLE_ENDIAN);
1817       proto_tree_add_item(skinny_tree, hf_skinny_data_length, tvb, offset+28, 4, ENC_LITTLE_ENDIAN);
1818       count = tvb_get_letohl( tvb, offset+28);
1819       proto_tree_add_item(skinny_tree, hf_skinny_sequenceFlag, tvb, offset+30, 4, ENC_LITTLE_ENDIAN);
1820       proto_tree_add_item(skinny_tree, hf_skinny_displayPriority, tvb, offset+34, 4, ENC_LITTLE_ENDIAN);
1821       proto_tree_add_item(skinny_tree, hf_skinny_conferenceID, tvb, offset+38, 4, ENC_LITTLE_ENDIAN);
1822       proto_tree_add_item(skinny_tree, hf_skinny_appInstanceID, tvb, offset+42, 4, ENC_LITTLE_ENDIAN);
1823       proto_tree_add_item(skinny_tree, hf_skinny_routingID, tvb, offset+46, 4, ENC_LITTLE_ENDIAN);
1824       dissect_skinny_xml(skinny_tree, tvb, pinfo, offset+50, count);
1825       si->lineId = tvb_get_letohl(tvb, offset+16);
1826       si->callId = tvb_get_letohl(tvb, offset+20);
1827       break;
1828
1829     case 0x0042: /* DeviceToUserDataResponseVersion1Message */
1830       proto_tree_add_item(skinny_tree, hf_skinny_applicationID, tvb, offset+12, 4, ENC_LITTLE_ENDIAN);
1831       proto_tree_add_item(skinny_tree, hf_skinny_lineInstance, tvb, offset+16, 4, ENC_LITTLE_ENDIAN);
1832       proto_tree_add_item(skinny_tree, hf_skinny_callIdentifier, tvb, offset+20, 4, ENC_LITTLE_ENDIAN);
1833       proto_tree_add_item(skinny_tree, hf_skinny_transactionID, tvb, offset+24, 4, ENC_LITTLE_ENDIAN);
1834       proto_tree_add_item(skinny_tree, hf_skinny_data_length, tvb, offset+28, 4, ENC_LITTLE_ENDIAN);
1835       count = tvb_get_letohl( tvb, offset+28);
1836       proto_tree_add_item(skinny_tree, hf_skinny_sequenceFlag, tvb, offset+30, 4, ENC_LITTLE_ENDIAN);
1837       proto_tree_add_item(skinny_tree, hf_skinny_displayPriority, tvb, offset+34, 4, ENC_LITTLE_ENDIAN);
1838       proto_tree_add_item(skinny_tree, hf_skinny_conferenceID, tvb, offset+38, 4, ENC_LITTLE_ENDIAN);
1839       proto_tree_add_item(skinny_tree, hf_skinny_appInstanceID, tvb, offset+42, 4, ENC_LITTLE_ENDIAN);
1840       proto_tree_add_item(skinny_tree, hf_skinny_routingID, tvb, offset+46, 4, ENC_LITTLE_ENDIAN);
1841       dissect_skinny_xml(skinny_tree, tvb, pinfo, offset+50, count);
1842       si->lineId = tvb_get_letohl(tvb, offset+16);
1843       si->callId = tvb_get_letohl(tvb, offset+20);
1844       break;
1845
1846     case 0x0048: /* DialedPhoneBookMessage */
1847       proto_tree_add_item(skinny_tree, hf_skinny_directoryIndex, tvb, offset+12, 4, ENC_LITTLE_ENDIAN);
1848       proto_tree_add_item(skinny_tree, hf_skinny_lineInstance, tvb, offset+16, 4, ENC_LITTLE_ENDIAN);
1849       proto_tree_add_item(skinny_tree, hf_skinny_unknown, tvb, offset+20, 4, ENC_LITTLE_ENDIAN);
1850       proto_tree_add_item(skinny_tree, hf_skinny_directoryPhoneNumber, tvb, offset+24, 256, ENC_ASCII|ENC_NA);
1851       break;
1852
1853
1854       /*
1855        *
1856        *  Call manager -> client messages start here(ish)
1857        *
1858        */
1859     case 0x0081: /* RegisterAckMessage */
1860       proto_tree_add_item(skinny_tree, hf_skinny_keepAliveInterval, tvb, offset+12, 4, ENC_LITTLE_ENDIAN);
1861       proto_tree_add_item(skinny_tree, hf_skinny_dateTemplate, tvb, offset+16, StationDateTemplateSize, ENC_ASCII|ENC_NA);
1862       proto_tree_add_item(skinny_tree, hf_skinny_secondaryKeepAliveInterval, tvb, offset+24, 4, ENC_LITTLE_ENDIAN);
1863       break;
1864
1865     case 0x0082: /* StartToneMessage */
1866       proto_tree_add_item(skinny_tree, hf_skinny_deviceTone, tvb, offset+12, 4, ENC_LITTLE_ENDIAN);
1867       /* offset 16 to 19: reserved */
1868       if (hdr_data_length > 12) {
1869                   proto_tree_add_item(skinny_tree, hf_skinny_lineInstance, tvb, offset+20, 4, ENC_LITTLE_ENDIAN);
1870                   proto_tree_add_item(skinny_tree, hf_skinny_callIdentifier, tvb, offset+24, 4, ENC_LITTLE_ENDIAN);
1871                   si->lineId = tvb_get_letohl(tvb, offset+20);
1872                   si->callId = tvb_get_letohl(tvb, offset+24);
1873       }
1874       break;
1875
1876     case 0x0083: /* StopToneMessage */
1877       if (hdr_data_length > 4) {
1878                   proto_tree_add_item(skinny_tree, hf_skinny_lineInstance, tvb, offset+12, 4, ENC_LITTLE_ENDIAN);
1879                   proto_tree_add_item(skinny_tree, hf_skinny_callIdentifier, tvb, offset+16, 4, ENC_LITTLE_ENDIAN);
1880                   si->lineId = tvb_get_letohl(tvb, offset+12);
1881                   si->callId = tvb_get_letohl(tvb, offset+16);
1882       }
1883       break;
1884
1885     case 0x0085: /* SetRingerMessage */
1886       proto_tree_add_item(skinny_tree, hf_skinny_ringType, tvb, offset+12, 4, ENC_LITTLE_ENDIAN);
1887       proto_tree_add_item(skinny_tree, hf_skinny_ringMode, tvb, offset+16, 4, ENC_LITTLE_ENDIAN);
1888       if (hdr_data_length > 12) {
1889                   proto_tree_add_item(skinny_tree, hf_skinny_lineInstance, tvb, offset+20, 4, ENC_LITTLE_ENDIAN);
1890                   proto_tree_add_item(skinny_tree, hf_skinny_callIdentifier, tvb, offset+24, 4, ENC_LITTLE_ENDIAN);
1891                   si->lineId = tvb_get_letohl(tvb, offset+20);
1892                   si->callId = tvb_get_letohl(tvb, offset+24);
1893       }
1894       break;
1895
1896     case 0x0086: /* SetLampMessage */
1897       proto_tree_add_item(skinny_tree, hf_skinny_stimulus, tvb, offset+12, 4, ENC_LITTLE_ENDIAN);
1898       proto_tree_add_item(skinny_tree, hf_skinny_stimulusInstance, tvb, offset+16, 4, ENC_LITTLE_ENDIAN);
1899       proto_tree_add_item(skinny_tree, hf_skinny_lampMode, tvb, offset+20, 4, ENC_LITTLE_ENDIAN);
1900       break;
1901
1902     case 0x0087: /* SetHookFlashDetectModeMessage */
1903       proto_tree_add_item(skinny_tree, hf_skinny_hookFlashDetectMode, tvb, offset+12, 4, ENC_LITTLE_ENDIAN);
1904       proto_tree_add_item(skinny_tree, hf_skinny_detectInterval, tvb, offset+16, 4, ENC_LITTLE_ENDIAN);
1905       break;
1906
1907     case 0x0088: /* SetSpeakerModeMessage */
1908
1909       proto_tree_add_item(skinny_tree, hf_skinny_speakerMode, tvb, offset+12, 4, ENC_LITTLE_ENDIAN);
1910       break;
1911
1912     case 0x0089: /* SetMicroModeMessage */
1913       proto_tree_add_item(skinny_tree, hf_skinny_microphoneMode, tvb, offset+12, 4, ENC_LITTLE_ENDIAN);
1914       break;
1915
1916     case 0x008a: /* StartMediaTransmission */
1917       if (hdr_version == BASIC_MSG_TYPE) {
1918         proto_tree_add_item(skinny_tree, hf_skinny_conferenceID,          tvb, offset+12, 4, ENC_LITTLE_ENDIAN);
1919         proto_tree_add_item(skinny_tree, hf_skinny_passThruPartyID,       tvb, offset+16, 4, ENC_LITTLE_ENDIAN);
1920         proto_tree_add_item(skinny_tree, hf_skinny_remoteIpAddr,          tvb, offset+20, 4, ENC_BIG_ENDIAN);
1921         proto_tree_add_item(skinny_tree, hf_skinny_remotePortNumber,      tvb, offset+24, 4, ENC_LITTLE_ENDIAN);
1922         proto_tree_add_item(skinny_tree, hf_skinny_millisecondPacketSize, tvb, offset+28, 4, ENC_LITTLE_ENDIAN);
1923         proto_tree_add_item(skinny_tree, hf_skinny_payloadCapability,     tvb, offset+32, 4, ENC_LITTLE_ENDIAN);
1924         proto_tree_add_item(skinny_tree, hf_skinny_precedenceValue,       tvb, offset+36, 4, ENC_LITTLE_ENDIAN);
1925         proto_tree_add_item(skinny_tree, hf_skinny_silenceSuppression,    tvb, offset+40, 4, ENC_LITTLE_ENDIAN);
1926         proto_tree_add_item(skinny_tree, hf_skinny_maxFramesPerPacket,    tvb, offset+44, 2, ENC_LITTLE_ENDIAN);
1927         proto_tree_add_item(skinny_tree, hf_skinny_g723BitRate,           tvb, offset+48, 4, ENC_LITTLE_ENDIAN);
1928         if (rtp_handle) {
1929           address src_addr;
1930           guint32 ipv4_address;
1931
1932           src_addr.type = AT_IPv4;
1933           src_addr.len = 4;
1934           src_addr.data = (char *)&ipv4_address;
1935           ipv4_address = tvb_get_ipv4(tvb, offset+20);
1936           rtp_add_address(pinfo, &src_addr, tvb_get_letohl(tvb, offset+24), 0, "Skinny", pinfo->fd->num, is_video, NULL);
1937         }
1938         si->passThruId = tvb_get_letohl(tvb, offset+16);
1939       }
1940       else if (hdr_version == CM7_MSG_TYPE_A || hdr_version == CM7_MSG_TYPE_B)
1941       {
1942         proto_tree_add_item(skinny_tree, hf_skinny_conferenceID,          tvb, offset+12, 4, ENC_LITTLE_ENDIAN);
1943         proto_tree_add_item(skinny_tree, hf_skinny_passThruPartyID,       tvb, offset+16, 4, ENC_LITTLE_ENDIAN);
1944         /* unknown uint32_t stuff */
1945         proto_tree_add_item(skinny_tree, hf_skinny_remoteIpAddr,          tvb, offset+24, 4, ENC_BIG_ENDIAN);
1946         /* 3x unknown uint32_t stuff, space for IPv6 maybe */
1947         proto_tree_add_item(skinny_tree, hf_skinny_remotePortNumber,      tvb, offset+40, 4, ENC_LITTLE_ENDIAN);
1948         proto_tree_add_item(skinny_tree, hf_skinny_millisecondPacketSize, tvb, offset+44, 4, ENC_LITTLE_ENDIAN);
1949         proto_tree_add_item(skinny_tree, hf_skinny_payloadCapability,     tvb, offset+48, 4, ENC_LITTLE_ENDIAN);
1950         /* There is some more... */
1951         /* proto_tree_add_item(skinny_tree, hf_skinny_precedenceValue,       tvb, offset+52, 4, ENC_LITTLE_ENDIAN); */
1952         /* proto_tree_add_item(skinny_tree, hf_skinny_silenceSuppression,    tvb, offset+56, 4, ENC_LITTLE_ENDIAN); */
1953         /* proto_tree_add_item(skinny_tree, hf_skinny_maxFramesPerPacket,    tvb, offset+60, 2, ENC_LITTLE_ENDIAN); */
1954         /* proto_tree_add_item(skinny_tree, hf_skinny_g723BitRate,           tvb, offset+62, 4, ENC_LITTLE_ENDIAN); */
1955         if (rtp_handle) {
1956           address src_addr;
1957           guint32 ipv4_address;
1958
1959           src_addr.type = AT_IPv4;
1960           src_addr.len = 4;
1961           src_addr.data = (char *)&ipv4_address;
1962           ipv4_address = tvb_get_ipv4(tvb, offset+24);
1963           rtp_add_address(pinfo, &src_addr, tvb_get_letohl(tvb, offset+40), 0, "Skinny", pinfo->fd->num, is_video, NULL);
1964         }
1965         si->passThruId = tvb_get_letohl(tvb, offset+16);
1966       }
1967       break;
1968
1969     case 0x008b: /* StopMediaTransmission */
1970       proto_tree_add_item(skinny_tree, hf_skinny_conferenceID, tvb, offset+12, 4, ENC_LITTLE_ENDIAN);
1971       proto_tree_add_item(skinny_tree, hf_skinny_passThruPartyID, tvb, offset+16, 4, ENC_LITTLE_ENDIAN);
1972       si->passThruId = tvb_get_letohl(tvb, offset+16);
1973       break;
1974
1975     case 0x008c: /* StartMediaReception */
1976       break;
1977
1978     case 0x008d: /* StopMediaReception */
1979       break;
1980
1981     case 0x008f: /* CallInfoMessage */
1982       i = offset+12;
1983       proto_tree_add_item(skinny_tree, hf_skinny_callingPartyName, tvb, i, StationMaxNameSize, ENC_ASCII|ENC_NA);
1984       proto_tree_add_item(skinny_tree, hf_skinny_callingPartyNumber, tvb, i, StationMaxDirnumSize, ENC_ASCII|ENC_NA);
1985       i += StationMaxNameSize;
1986       si->callingParty = g_strdup(tvb_format_stringzpad(tvb, i, StationMaxDirnumSize));
1987       i += StationMaxDirnumSize;
1988       proto_tree_add_item(skinny_tree, hf_skinny_calledPartyName, tvb, i, StationMaxNameSize, ENC_ASCII|ENC_NA);
1989       i += StationMaxNameSize;
1990       proto_tree_add_item(skinny_tree, hf_skinny_calledPartyNumber, tvb, i, StationMaxDirnumSize, ENC_ASCII|ENC_NA);
1991       si->calledParty = g_strdup(tvb_format_stringzpad(tvb, i, StationMaxDirnumSize));
1992       i += StationMaxDirnumSize;
1993       proto_tree_add_item(skinny_tree, hf_skinny_lineInstance, tvb, i, 4, ENC_LITTLE_ENDIAN);
1994       si->lineId = tvb_get_letohl(tvb, i);
1995       i += 4;
1996       proto_tree_add_item(skinny_tree, hf_skinny_callIdentifier, tvb, i, 4, ENC_LITTLE_ENDIAN);
1997       si->callId = tvb_get_letohl(tvb, i);
1998       i += 4;
1999       proto_tree_add_item(skinny_tree, hf_skinny_callType, tvb, i, 4, ENC_LITTLE_ENDIAN);
2000       i += 4;
2001       proto_tree_add_item(skinny_tree, hf_skinny_originalCalledPartyName, tvb, i, StationMaxNameSize, ENC_ASCII|ENC_NA);
2002       i += StationMaxNameSize;
2003       proto_tree_add_item(skinny_tree, hf_skinny_originalCalledParty, tvb, i, StationMaxDirnumSize, ENC_ASCII|ENC_NA);
2004       i += StationMaxDirnumSize;
2005       proto_tree_add_item(skinny_tree, hf_cast_lastRedirectingPartyName, tvb, i, StationMaxNameSize, ENC_ASCII|ENC_NA);
2006       i += StationMaxNameSize;
2007       proto_tree_add_item(skinny_tree, hf_cast_lastRedirectingParty, tvb, i, StationMaxDirnumSize, ENC_ASCII|ENC_NA);
2008       i += StationMaxDirnumSize;
2009       proto_tree_add_item(skinny_tree, hf_cast_originalCdpnRedirectReason, tvb, i, 4, ENC_LITTLE_ENDIAN);
2010       i += 4;
2011       proto_tree_add_item(skinny_tree, hf_cast_lastRedirectingReason, tvb, i, 4, ENC_LITTLE_ENDIAN);
2012       i += 4;
2013       proto_tree_add_item(skinny_tree, hf_cast_cgpnVoiceMailbox, tvb, i, StationMaxDirnumSize, ENC_ASCII|ENC_NA);
2014       i += StationMaxDirnumSize;
2015       proto_tree_add_item(skinny_tree, hf_cast_cdpnVoiceMailbox, tvb, i, StationMaxDirnumSize, ENC_ASCII|ENC_NA);
2016       i += StationMaxDirnumSize;
2017       proto_tree_add_item(skinny_tree, hf_cast_originalCdpnVoiceMailbox, tvb, i, StationMaxDirnumSize, ENC_ASCII|ENC_NA);
2018       i += StationMaxDirnumSize;
2019       proto_tree_add_item(skinny_tree, hf_cast_lastRedirectingVoiceMailbox, tvb, i, StationMaxDirnumSize, ENC_ASCII|ENC_NA);
2020       i += StationMaxDirnumSize;
2021       proto_tree_add_item(skinny_tree, hf_cast_callInstance, tvb, i, 4, ENC_LITTLE_ENDIAN);
2022       i += 4;
2023       proto_tree_add_item(skinny_tree, hf_cast_callSecurityStatus, tvb, i, 4, ENC_LITTLE_ENDIAN);
2024       i += 4;
2025       val = tvb_get_letohl( tvb, i);
2026       ti_sub = proto_tree_add_text(skinny_tree, tvb, i, 8, "partyPIRestrictionBits");
2027       skinny_sub_tree = proto_item_add_subtree(ti_sub, ett_skinny_tree);
2028       proto_tree_add_text(skinny_sub_tree, tvb, i, 4, "%s",
2029               decode_boolean_bitfield( val, 0x01, 4*8, "Does RestrictCallingPartyName", "Doesn't RestrictCallingPartyName"));
2030       proto_tree_add_text(skinny_sub_tree, tvb, i, 4, "%s",
2031               decode_boolean_bitfield( val, 0x02, 4*8, "Does RestrictCallingPartyNumber", "Doesn't RestrictCallingPartyNumber"));
2032       proto_tree_add_text(skinny_sub_tree, tvb, i, 4, "%s",
2033               decode_boolean_bitfield( val, 0x04, 4*8, "Does RestrictCalledPartyName", "Doesn't RestrictCalledPartyName"));
2034       proto_tree_add_text(skinny_sub_tree, tvb, i, 4, "%s",
2035               decode_boolean_bitfield( val, 0x08, 4*8, "Does RestrictCalledPartyNumber", "Doesn't RestrictCalledPartyNumber"));
2036       proto_tree_add_text(skinny_sub_tree, tvb, i, 4, "%s",
2037               decode_boolean_bitfield( val, 0x10, 4*8, "Does RestrictOriginalCalledPartyName", "Doesn't RestrictOriginalCalledPartyName"));
2038       proto_tree_add_text(skinny_sub_tree, tvb, i, 4, "%s",
2039               decode_boolean_bitfield( val, 0x20, 4*8, "Does RestrictOriginalCalledPartyNumber", "Doesn't RestrictOriginalCalledPartyNumber"));
2040       proto_tree_add_text(skinny_sub_tree, tvb, i, 4, "%s",
2041               decode_boolean_bitfield( val, 0x40, 4*8, "Does RestrictLastRedirectPartyName", "Doesn't RestrictLastRedirectPartyName"));
2042       proto_tree_add_text(skinny_sub_tree, tvb, i, 4, "%s",
2043               decode_boolean_bitfield( val, 0x80, 4*8, "Does RestrictLastRedirectPartyNumber", "Doesn't RestrictLastRedirectPartyNumber"));
2044       break;
2045
2046     case 0x0090: /* ForwardStatMessage */
2047       proto_tree_add_item(skinny_tree, hf_skinny_activeForward, tvb, offset+12, 4, ENC_LITTLE_ENDIAN);
2048       proto_tree_add_item(skinny_tree, hf_skinny_lineNumber, tvb, offset+16, 4, ENC_LITTLE_ENDIAN);
2049       proto_tree_add_item(skinny_tree, hf_skinny_forwardAllActive, tvb, offset+20, 4, ENC_LITTLE_ENDIAN);
2050       proto_tree_add_item(skinny_tree, hf_skinny_forwardNumber, tvb, offset+24, StationMaxDirnumSize, ENC_ASCII|ENC_NA);
2051       i = offset+24+StationMaxDirnumSize;
2052       proto_tree_add_item(skinny_tree, hf_skinny_forwardBusyActive, tvb, i, 4, ENC_LITTLE_ENDIAN);
2053       i += 4;
2054       proto_tree_add_item(skinny_tree, hf_skinny_forwardNumber, tvb, i, StationMaxDirnumSize, ENC_ASCII|ENC_NA);
2055       i += StationMaxDirnumSize;
2056       proto_tree_add_item(skinny_tree, hf_skinny_forwardNoAnswerActive, tvb, i, 4, ENC_LITTLE_ENDIAN);
2057       i += 4;
2058       proto_tree_add_item(skinny_tree, hf_skinny_forwardNumber, tvb, i, StationMaxDirnumSize, ENC_ASCII|ENC_NA);
2059       break;
2060
2061     case 0x0091: /* SpeedDialStatMessage */
2062       proto_tree_add_item(skinny_tree, hf_skinny_speedDialNumber, tvb, offset+12, 4, ENC_LITTLE_ENDIAN);
2063       proto_tree_add_item(skinny_tree, hf_skinny_speedDialDirNumber, tvb, offset+16, StationMaxDirnumSize, ENC_ASCII|ENC_NA);
2064       proto_tree_add_item(skinny_tree, hf_skinny_speedDialDisplayName, tvb, offset+40, StationMaxNameSize, ENC_ASCII|ENC_NA);
2065       break;
2066
2067     case 0x0092: /* LineStatMessage */
2068       proto_tree_add_item(skinny_tree, hf_skinny_lineNumber, tvb, offset+12, 4, ENC_LITTLE_ENDIAN);
2069       proto_tree_add_item(skinny_tree, hf_skinny_lineDirNumber, tvb, offset+16, StationMaxDirnumSize, ENC_ASCII|ENC_NA);
2070       proto_tree_add_item(skinny_tree, hf_skinny_lineFullyQualifiedDisplayName, tvb, offset+16+StationMaxDirnumSize, StationMaxNameSize, ENC_ASCII|ENC_NA);
2071       proto_tree_add_item(skinny_tree, hf_skinny_lineDisplayName, tvb, offset+16+StationMaxDirnumSize+StationMaxNameSize, StationMaxDisplayNameSize, ENC_ASCII|ENC_NA);
2072       break;
2073
2074     case 0x0093: /* ConfigStatMessage */
2075       proto_tree_add_item(skinny_tree, hf_skinny_deviceName, tvb, offset+12, StationMaxDeviceNameSize, ENC_ASCII|ENC_NA);
2076       i = offset+12+StationMaxDeviceNameSize;
2077       proto_tree_add_item(skinny_tree, hf_skinny_stationUserId, tvb, i, 4, ENC_LITTLE_ENDIAN);
2078       i += 4;
2079       proto_tree_add_item(skinny_tree, hf_skinny_stationInstance, tvb, i, 4, ENC_LITTLE_ENDIAN);
2080       i += 4;
2081       proto_tree_add_item(skinny_tree, hf_skinny_userName, tvb, i, StationMaxNameSize, ENC_ASCII|ENC_NA);
2082       i += StationMaxNameSize;
2083       proto_tree_add_item(skinny_tree, hf_skinny_serverName, tvb, i, StationMaxNameSize, ENC_ASCII|ENC_NA);
2084       i += StationMaxNameSize;
2085       proto_tree_add_item(skinny_tree, hf_skinny_numberLines, tvb, i, 4, ENC_LITTLE_ENDIAN);
2086       proto_tree_add_item(skinny_tree, hf_skinny_numberSpeedDials, tvb, i+4, 4, ENC_LITTLE_ENDIAN);
2087       break;
2088
2089     case 0x0094: /* DefineTimeDate */
2090       proto_tree_add_item(skinny_tree, hf_skinny_dateYear,   tvb, offset+12, 4, ENC_LITTLE_ENDIAN);
2091       proto_tree_add_item(skinny_tree, hf_skinny_dateMonth,  tvb, offset+16, 4, ENC_LITTLE_ENDIAN);
2092       proto_tree_add_item(skinny_tree, hf_skinny_dayOfWeek,  tvb, offset+20, 4, ENC_LITTLE_ENDIAN);
2093       proto_tree_add_item(skinny_tree, hf_skinny_dateDay,    tvb, offset+24, 4, ENC_LITTLE_ENDIAN);
2094       proto_tree_add_item(skinny_tree, hf_skinny_dateHour,   tvb, offset+28, 4, ENC_LITTLE_ENDIAN);
2095       proto_tree_add_item(skinny_tree, hf_skinny_dateMinute, tvb, offset+32, 4, ENC_LITTLE_ENDIAN);
2096       proto_tree_add_item(skinny_tree, hf_skinny_dateSeconds,tvb, offset+36, 4, ENC_LITTLE_ENDIAN);
2097       proto_tree_add_item(skinny_tree, hf_skinny_dateMilliseconds,tvb, offset+40, 4, ENC_LITTLE_ENDIAN);
2098       proto_tree_add_item(skinny_tree, hf_skinny_timeStamp, tvb, offset+44, 4, ENC_LITTLE_ENDIAN);
2099       break;
2100
2101     case 0x0095: /* StartSessionTransmission */
2102       proto_tree_add_item(skinny_tree, hf_skinny_remoteIpAddr,  tvb, offset+12, 4, ENC_BIG_ENDIAN);
2103       proto_tree_add_item(skinny_tree, hf_skinny_sessionType, tvb, offset+16, 4, ENC_LITTLE_ENDIAN);
2104       break;
2105
2106     case 0x0096: /* StopSessionTransmission */
2107       proto_tree_add_item(skinny_tree, hf_skinny_remoteIpAddr,  tvb, offset+12, 4, ENC_BIG_ENDIAN);
2108       proto_tree_add_item(skinny_tree, hf_skinny_sessionType, tvb, offset+16, 4, ENC_LITTLE_ENDIAN);
2109       break;
2110
2111     case 0x0097: /* ButtonTemplateMessage  */
2112       /*
2113        * FIXME
2114        * This decode prints out oogly subtree maybe? or something besides the VALS...
2115        * note to self: uint8 != 4 kk thx info ^_^
2116        *
2117        */
2118       proto_tree_add_item(skinny_tree, hf_skinny_buttonOffset, tvb, offset+12, 4, ENC_LITTLE_ENDIAN);
2119       proto_tree_add_item(skinny_tree, hf_skinny_buttonCount,  tvb, offset+16, 4, ENC_LITTLE_ENDIAN);
2120       proto_tree_add_item(skinny_tree, hf_skinny_totalButtonCount, tvb, offset+20, 4, ENC_LITTLE_ENDIAN);
2121       for (i = 0; i < StationMaxButtonTemplateSize; i++) {
2122               proto_tree_add_item(skinny_tree, hf_skinny_buttonInstanceNumber, tvb, offset+(i*2)+24, 1, ENC_LITTLE_ENDIAN);
2123               proto_tree_add_item(skinny_tree, hf_skinny_buttonDefinition, tvb, offset+(i*2)+25, 1, ENC_LITTLE_ENDIAN);
2124       }
2125       break;
2126
2127     case 0x0098: /* VersionMessage */
2128       proto_tree_add_item(skinny_tree, hf_skinny_version, tvb, offset+12, StationMaxVersionSize, ENC_ASCII|ENC_NA);
2129       break;
2130
2131     case 0x0099: /* DisplayTextMessage */
2132       proto_tree_add_item(skinny_tree, hf_skinny_displayMessage, tvb, offset+12, StationMaxDisplayTextSize, ENC_ASCII|ENC_NA);
2133       break;
2134
2135     case 0x009a: /* ClearDisplay */
2136       break;
2137
2138     case 0x009b: /* CapabilitiesReqMessage */
2139       break;
2140
2141     case 0x009c: /* EnunciatorCommandMessage */
2142       proto_tree_add_item(skinny_tree, hf_skinny_mediaEnunciationType, tvb, offset+12, 4, ENC_LITTLE_ENDIAN);
2143       for (i = 0; i < StationMaxDirnumSize; i++) {
2144               proto_tree_add_item(skinny_tree, hf_skinny_unknown, tvb, offset+16+(i*4), 4, ENC_LITTLE_ENDIAN);
2145       }
2146       i = offset+16+StationMaxDirnumSize;
2147       proto_tree_add_item(skinny_tree, hf_skinny_mediaEnunciationType, tvb, i, 4, ENC_LITTLE_ENDIAN);
2148       break;
2149
2150     case 0x009d: /* RegisterRejectMessage */
2151       proto_tree_add_item(skinny_tree, hf_skinny_displayMessage, tvb, offset+12, StationMaxDisplayTextSize, ENC_ASCII|ENC_NA);
2152       break;
2153
2154     case 0x009e: /* ServerResMessage */
2155       for (i = 0; i < StationMaxServers; i++) {
2156               proto_tree_add_item(skinny_tree, hf_skinny_serverIdentifier, tvb, offset+12+(i*StationMaxServers), StationMaxServerNameSize, ENC_ASCII|ENC_NA);
2157       }
2158       j = offset+12+(i*StationMaxServers);
2159       for (i = 0; i < StationMaxServers; i++) {
2160               proto_tree_add_item(skinny_tree, hf_skinny_serverListenPort, tvb, j+(i*4), 4,  ENC_LITTLE_ENDIAN);
2161       }
2162       j = j+(i*4);
2163       for (i = 0; i < StationMaxServers; i++) {
2164               proto_tree_add_item(skinny_tree, hf_skinny_serverIpAddress, tvb, j+(i*4), 4, ENC_BIG_ENDIAN);
2165       }
2166       break;
2167
2168     case 0x009f: /* Reset */
2169       proto_tree_add_item(skinny_tree, hf_skinny_deviceResetType, tvb, offset+12, 4, ENC_LITTLE_ENDIAN);
2170       break;
2171
2172     case 0x0100: /* KeepAliveAckMessage */
2173       break;
2174
2175     case 0x0101: /* StartMulticastMediaReception */
2176       proto_tree_add_item(skinny_tree, hf_skinny_conferenceID, tvb, offset+12, 4, ENC_LITTLE_ENDIAN);
2177       proto_tree_add_item(skinny_tree, hf_skinny_passThruPartyID, tvb, offset+16, 4, ENC_LITTLE_ENDIAN);
2178       proto_tree_add_item(skinny_tree, hf_skinny_multicastIpAddress, tvb, offset+20, 4, ENC_BIG_ENDIAN);
2179       proto_tree_add_item(skinny_tree, hf_skinny_multicastPort, tvb, offset+24, 4, ENC_LITTLE_ENDIAN);
2180       proto_tree_add_item(skinny_tree, hf_skinny_millisecondPacketSize, tvb, offset+28, 4, ENC_LITTLE_ENDIAN);
2181       proto_tree_add_item(skinny_tree, hf_skinny_payloadCapability, tvb, offset+32, 4, ENC_LITTLE_ENDIAN);
2182       proto_tree_add_item(skinny_tree, hf_skinny_echoCancelType, tvb, offset+36, 4, ENC_LITTLE_ENDIAN);
2183       proto_tree_add_item(skinny_tree, hf_skinny_g723BitRate, tvb, offset+40, 4, ENC_LITTLE_ENDIAN);
2184       si->passThruId = tvb_get_letohl(tvb, offset+16);
2185       break;
2186
2187     case 0x0102: /* StartMulticastMediaTransmission */
2188       proto_tree_add_item(skinny_tree, hf_skinny_conferenceID, tvb, offset+12, 4, ENC_LITTLE_ENDIAN);
2189       proto_tree_add_item(skinny_tree, hf_skinny_passThruPartyID, tvb, offset+16, 4, ENC_LITTLE_ENDIAN);
2190       proto_tree_add_item(skinny_tree, hf_skinny_multicastIpAddress, tvb, offset+20, 4, ENC_BIG_ENDIAN);
2191       proto_tree_add_item(skinny_tree, hf_skinny_multicastPort, tvb, offset+24, 4, ENC_LITTLE_ENDIAN);
2192       proto_tree_add_item(skinny_tree, hf_skinny_millisecondPacketSize, tvb, offset+28, 4, ENC_LITTLE_ENDIAN);
2193       proto_tree_add_item(skinny_tree, hf_skinny_payloadCapability, tvb, offset+32, 4, ENC_LITTLE_ENDIAN);
2194       proto_tree_add_item(skinny_tree, hf_skinny_precedenceValue, tvb, offset+36, 4, ENC_LITTLE_ENDIAN);
2195       proto_tree_add_item(skinny_tree, hf_skinny_silenceSuppression, tvb, offset+40, 4, ENC_LITTLE_ENDIAN);
2196       proto_tree_add_item(skinny_tree, hf_skinny_maxFramesPerPacket, tvb, offset+44, 2, ENC_LITTLE_ENDIAN);
2197       proto_tree_add_item(skinny_tree, hf_skinny_g723BitRate, tvb, offset+48, 4, ENC_LITTLE_ENDIAN);
2198       si->passThruId = tvb_get_letohl(tvb, offset+16);
2199       break;
2200
2201     case 0x0103: /* StopMulticastMediaReception */
2202       proto_tree_add_item(skinny_tree, hf_skinny_conferenceID, tvb, offset+12, 4, ENC_LITTLE_ENDIAN);
2203       proto_tree_add_item(skinny_tree, hf_skinny_passThruPartyID, tvb, offset+16, 4, ENC_LITTLE_ENDIAN);
2204       si->passThruId = tvb_get_letohl(tvb, offset+16);
2205       break;
2206
2207     case 0x0104: /* StopMulticastMediaTransmission */
2208       proto_tree_add_item(skinny_tree, hf_skinny_conferenceID, tvb, offset+12, 4, ENC_LITTLE_ENDIAN);
2209       proto_tree_add_item(skinny_tree, hf_skinny_passThruPartyID, tvb, offset+16, 4, ENC_LITTLE_ENDIAN);
2210       si->passThruId = tvb_get_letohl(tvb, offset+16);
2211       break;
2212
2213     case 0x105: /* OpenReceiveChannel */
2214       proto_tree_add_item(skinny_tree, hf_skinny_conferenceID,            tvb, offset+12, 4, ENC_LITTLE_ENDIAN);
2215       proto_tree_add_item(skinny_tree, hf_skinny_passThruPartyID,         tvb, offset+16, 4, ENC_LITTLE_ENDIAN);
2216       proto_tree_add_item(skinny_tree, hf_skinny_millisecondPacketSize,   tvb, offset+20, 4, ENC_LITTLE_ENDIAN);
2217       proto_tree_add_item(skinny_tree, hf_skinny_payloadCapability,       tvb, offset+24, 4, ENC_LITTLE_ENDIAN);
2218       proto_tree_add_item(skinny_tree, hf_skinny_echoCancelType,          tvb, offset+28, 4, ENC_LITTLE_ENDIAN);
2219       proto_tree_add_item(skinny_tree, hf_skinny_g723BitRate,             tvb, offset+32, 4, ENC_LITTLE_ENDIAN);
2220       si->passThruId = tvb_get_letohl(tvb, offset+16);
2221       break;
2222
2223     case 0x0106: /* CloseReceiveChannel */
2224       proto_tree_add_item(skinny_tree, hf_skinny_conferenceID, tvb, offset+12, 4, ENC_LITTLE_ENDIAN);
2225       proto_tree_add_item(skinny_tree, hf_skinny_passThruPartyID, tvb, offset+16, 4, ENC_LITTLE_ENDIAN);
2226       si->passThruId = tvb_get_letohl(tvb, offset+16);
2227       break;
2228
2229     case 0x0107: /* ConnectionStatisticsReq */
2230
2231       i = 12;
2232       proto_tree_add_item(skinny_tree, hf_skinny_directoryNumber, tvb, i, StationMaxDirnumSize, ENC_ASCII|ENC_NA);
2233       i = 12 + StationMaxDirnumSize;
2234       proto_tree_add_item(skinny_tree, hf_skinny_callIdentifier, tvb, i, 4, ENC_LITTLE_ENDIAN);
2235       si->callId = tvb_get_letohl(tvb, i);
2236       i = i+4;
2237       proto_tree_add_item(skinny_tree, hf_skinny_statsProcessingType, tvb, i, 4, ENC_LITTLE_ENDIAN);
2238       break;
2239
2240     case 0x0108: /* SoftKeyTemplateResMessage */
2241       proto_tree_add_item(skinny_tree, hf_skinny_softKeyOffset, tvb, offset+12, 4, ENC_LITTLE_ENDIAN);
2242       softKeyCount = tvb_get_letohl(tvb, offset+16);
2243       proto_tree_add_uint(skinny_tree, hf_skinny_softKeyCount, tvb, offset+16, 4, softKeyCount);
2244       proto_tree_add_item(skinny_tree, hf_skinny_totalSoftKeyCount, tvb, offset+20, 4, ENC_LITTLE_ENDIAN);
2245       for (i = 0; ((i < StationMaxSoftKeyDefinition) && (i < softKeyCount)); i++){
2246               proto_tree_add_item(skinny_tree, hf_skinny_softKeyLabel, tvb, offset+(i*20)+24, StationMaxSoftKeyLabelSize, ENC_ASCII|ENC_NA);
2247               proto_tree_add_item(skinny_tree, hf_skinny_softKeyEvent, tvb, offset+(i*20)+40, 4, ENC_LITTLE_ENDIAN);
2248       }
2249       /* there is more data here, but it doesn't make a whole lot of sense, I imagine
2250        * it's just some not zero'd out stuff in the packet or...
2251        */
2252       break;
2253
2254     case 0x0109: /* SoftKeySetResMessage */
2255       proto_tree_add_item(skinny_tree, hf_skinny_softKeySetOffset, tvb, offset+12, 4, ENC_LITTLE_ENDIAN);
2256       softKeySetCount = tvb_get_letohl(tvb, offset+16);
2257       proto_tree_add_uint(skinny_tree, hf_skinny_softKeySetCount, tvb, offset+16, 4, softKeySetCount);
2258       proto_tree_add_item(skinny_tree, hf_skinny_totalSoftKeySetCount, tvb, offset+20, 4, ENC_LITTLE_ENDIAN);
2259       for (i = 0; ((i < StationMaxSoftKeySetDefinition) && (i < softKeySetCount)); i++) {
2260               proto_tree_add_uint(skinny_tree, hf_skinny_softKeySetDescription, tvb, offset+24+(i*48) , 1, i);
2261               for (j = 0; j < StationMaxSoftKeyIndex; j++) {
2262                 proto_tree_add_item(skinny_tree, hf_skinny_softKeyTemplateIndex, tvb, offset+24+(i*48)+j, 1, ENC_LITTLE_ENDIAN);
2263               }
2264               for (j = 0; j < StationMaxSoftKeyIndex; j++) {
2265                 proto_tree_add_item(skinny_tree, hf_skinny_softKeyInfoIndex, tvb, offset+24+(i*48)+StationMaxSoftKeyIndex+(j*2), 2, ENC_LITTLE_ENDIAN);
2266               }
2267       }
2268       break;
2269
2270     case 0x0110: /* SelectSoftKeysMessage */
2271       proto_tree_add_item(skinny_tree, hf_skinny_lineInstance, tvb, offset+12, 4, ENC_LITTLE_ENDIAN);
2272       proto_tree_add_item(skinny_tree, hf_skinny_callIdentifier, tvb, offset+16, 4, ENC_LITTLE_ENDIAN);
2273       proto_tree_add_item(skinny_tree, hf_skinny_softKeySetDescription, tvb, offset+20, 4, ENC_LITTLE_ENDIAN);
2274       validKeyMask = tvb_get_letohs(tvb, offset + 24);
2275       skm = proto_tree_add_uint(skinny_tree, hf_skinny_softKeyMap, tvb, offset + 24, 4, validKeyMask);
2276       skm_tree = proto_item_add_subtree(skm, ett_skinny_softKeyMap);
2277       proto_tree_add_boolean(skm_tree, hf_skinny_softKey0,  tvb, offset + 24, 4, validKeyMask);
2278       proto_tree_add_boolean(skm_tree, hf_skinny_softKey1,  tvb, offset + 24, 4, validKeyMask);
2279       proto_tree_add_boolean(skm_tree, hf_skinny_softKey2,  tvb, offset + 24, 4, validKeyMask);
2280       proto_tree_add_boolean(skm_tree, hf_skinny_softKey3,  tvb, offset + 24, 4, validKeyMask);
2281       proto_tree_add_boolean(skm_tree, hf_skinny_softKey4,  tvb, offset + 24, 4, validKeyMask);
2282       proto_tree_add_boolean(skm_tree, hf_skinny_softKey5,  tvb, offset + 24, 4, validKeyMask);
2283       proto_tree_add_boolean(skm_tree, hf_skinny_softKey6,  tvb, offset + 24, 4, validKeyMask);
2284       proto_tree_add_boolean(skm_tree, hf_skinny_softKey7,  tvb, offset + 24, 4, validKeyMask);
2285       proto_tree_add_boolean(skm_tree, hf_skinny_softKey8,  tvb, offset + 24, 4, validKeyMask);
2286       proto_tree_add_boolean(skm_tree, hf_skinny_softKey9,  tvb, offset + 24, 4, validKeyMask);
2287       proto_tree_add_boolean(skm_tree, hf_skinny_softKey10, tvb, offset + 24, 4, validKeyMask);
2288       proto_tree_add_boolean(skm_tree, hf_skinny_softKey11, tvb, offset + 24, 4, validKeyMask);
2289       proto_tree_add_boolean(skm_tree, hf_skinny_softKey12, tvb, offset + 24, 4, validKeyMask);
2290       proto_tree_add_boolean(skm_tree, hf_skinny_softKey13, tvb, offset + 24, 4, validKeyMask);
2291       proto_tree_add_boolean(skm_tree, hf_skinny_softKey14, tvb, offset + 24, 4, validKeyMask);
2292       proto_tree_add_boolean(skm_tree, hf_skinny_softKey15, tvb, offset + 24, 4, validKeyMask);
2293       si->lineId = tvb_get_letohl(tvb, offset+12);
2294       si->callId = tvb_get_letohl(tvb, offset+16);
2295       break;
2296
2297     case 0x0111: /* CallStateMessage */
2298       proto_tree_add_item(skinny_tree, hf_skinny_callState, tvb, offset+12, 4, ENC_LITTLE_ENDIAN);
2299       proto_tree_add_item(skinny_tree, hf_skinny_lineInstance, tvb, offset+16, 4, ENC_LITTLE_ENDIAN);
2300       proto_tree_add_item(skinny_tree, hf_skinny_callIdentifier, tvb, offset+20, 4, ENC_LITTLE_ENDIAN);
2301       si->lineId = tvb_get_letohl(tvb, offset+16);
2302       si->callId = tvb_get_letohl(tvb, offset+20);
2303       si->callState = tvb_get_letohl(tvb, offset+12);
2304       break;
2305
2306     case 0x0112: /* DisplayPromptStatusMessage */
2307       proto_tree_add_item(skinny_tree, hf_skinny_messageTimeOutValue, tvb, offset+12, 4, ENC_LITTLE_ENDIAN);
2308       proto_tree_add_item(skinny_tree, hf_skinny_displayMessage, tvb, offset+16, StationMaxDisplayPromptStatusSize, ENC_ASCII|ENC_NA);
2309       proto_tree_add_item(skinny_tree, hf_skinny_lineInstance, tvb, offset+48, 4, ENC_LITTLE_ENDIAN);
2310       proto_tree_add_item(skinny_tree, hf_skinny_callIdentifier, tvb, offset+52, 4, ENC_LITTLE_ENDIAN);
2311       si->lineId = tvb_get_letohl(tvb, offset+48);
2312       si->callId = tvb_get_letohl(tvb, offset+52);
2313       break;
2314
2315     case 0x0113: /* ClearPromptStatusMessage */
2316       proto_tree_add_item(skinny_tree, hf_skinny_lineInstance  , tvb, offset+12, 4, ENC_LITTLE_ENDIAN);
2317       proto_tree_add_item(skinny_tree, hf_skinny_callIdentifier, tvb, offset+16, 4, ENC_LITTLE_ENDIAN);
2318       si->lineId = tvb_get_letohl(tvb, offset+12);
2319       si->callId = tvb_get_letohl(tvb, offset+16);
2320       break;
2321
2322     case 0x0114: /* DisplayNotifyMessage */
2323       proto_tree_add_item(skinny_tree, hf_skinny_messageTimeOutValue, tvb, offset+12, 4, ENC_LITTLE_ENDIAN);
2324       proto_tree_add_item(skinny_tree, hf_skinny_displayMessage, tvb, offset+16, StationMaxDisplayNotifySize , ENC_ASCII|ENC_NA);
2325       break;
2326
2327     case 0x0115: /* ClearNotifyMessage */
2328       break;
2329
2330     case 0x0116: /* ActivateCallPlaneMessage */
2331       proto_tree_add_item(skinny_tree, hf_skinny_lineInstance, tvb, offset+12, 4, ENC_LITTLE_ENDIAN);
2332       si->lineId = tvb_get_letohl(tvb, offset+12);
2333       break;
2334
2335     case 0x0117: /* DeactivateCallPlaneMessage */
2336       break;
2337
2338     case 0x0118: /* UnregisterAckMessage */
2339       proto_tree_add_item(skinny_tree, hf_skinny_deviceUnregisterStatus, tvb, offset+12, 4, ENC_LITTLE_ENDIAN);
2340       break;
2341
2342     case 0x0119: /* BackSpaceReqMessage */
2343       proto_tree_add_item(skinny_tree, hf_skinny_lineInstance, tvb, offset+12, 4, ENC_LITTLE_ENDIAN);
2344       proto_tree_add_item(skinny_tree, hf_skinny_callIdentifier, tvb, offset+16, 4, ENC_LITTLE_ENDIAN);
2345       si->lineId = tvb_get_letohl(tvb, offset+12);
2346       si->callId = tvb_get_letohl(tvb, offset+16);
2347       break;
2348
2349     case 0x011a: /* RegisterTokenAck */
2350       break;
2351
2352     case 0x011B: /* RegisterTokenReject */
2353       proto_tree_add_item(skinny_tree, hf_skinny_tokenRejWaitTime, tvb, offset+12, 4, ENC_LITTLE_ENDIAN);
2354       break;
2355
2356     case 0x011C: /* StartMediaFailureDetection */
2357       proto_tree_add_item(skinny_tree, hf_skinny_conferenceID, tvb, offset+12, 4, ENC_LITTLE_ENDIAN);
2358       proto_tree_add_item(skinny_tree, hf_skinny_passThruPartyID, tvb, offset+16, 4, ENC_LITTLE_ENDIAN);
2359       proto_tree_add_item(skinny_tree, hf_skinny_millisecondPacketSize, tvb, offset+20, 4, ENC_LITTLE_ENDIAN);
2360       proto_tree_add_item(skinny_tree, hf_skinny_payloadCapability, tvb, offset+24, 4, ENC_LITTLE_ENDIAN);
2361       proto_tree_add_item(skinny_tree, hf_skinny_echoCancelType, tvb, offset+28, 4, ENC_LITTLE_ENDIAN);
2362       proto_tree_add_item(skinny_tree, hf_skinny_g723BitRate, tvb, offset+32, 4, ENC_LITTLE_ENDIAN);
2363       proto_tree_add_item(skinny_tree, hf_skinny_callIdentifier, tvb, offset+34, 4, ENC_LITTLE_ENDIAN);
2364       si->passThruId = tvb_get_letohl(tvb, offset+16);
2365       si->callId = tvb_get_letohl(tvb, offset+34);
2366       break;
2367
2368     case 0x011D: /* DialedNumberMessage */
2369       proto_tree_add_item(skinny_tree, hf_skinny_calledPartyNumber, tvb, offset+12, StationMaxDirnumSize, ENC_ASCII|ENC_NA);
2370       proto_tree_add_item(skinny_tree, hf_skinny_lineInstance, tvb, offset+12+StationMaxDirnumSize, 4, ENC_LITTLE_ENDIAN);
2371       proto_tree_add_item(skinny_tree, hf_skinny_callIdentifier, tvb, offset+12+StationMaxDirnumSize+4, 4, ENC_LITTLE_ENDIAN);
2372       si->lineId = tvb_get_letohl(tvb, offset+12+StationMaxDirnumSize);
2373       si->callId = tvb_get_letohl(tvb, offset+16+StationMaxDirnumSize);
2374       break;
2375
2376     case 0x011E: /* UserToDeviceDataMessage */
2377       proto_tree_add_item(skinny_tree, hf_skinny_applicationID, tvb, offset+12, 4, ENC_LITTLE_ENDIAN);
2378       proto_tree_add_item(skinny_tree, hf_skinny_lineInstance, tvb, offset+16, 4, ENC_LITTLE_ENDIAN);
2379       proto_tree_add_item(skinny_tree, hf_skinny_callIdentifier, tvb, offset+20, 4, ENC_LITTLE_ENDIAN);
2380       proto_tree_add_item(skinny_tree, hf_skinny_transactionID, tvb, offset+24, 4, ENC_LITTLE_ENDIAN);
2381       proto_tree_add_item(skinny_tree, hf_skinny_data_length, tvb, offset+28, 4, ENC_LITTLE_ENDIAN);
2382       count = tvb_get_letohl( tvb, offset+28);
2383       dissect_skinny_xml(skinny_tree, tvb, pinfo, offset+30, count);
2384       si->lineId = tvb_get_letohl(tvb, offset+16);
2385       si->callId = tvb_get_letohl(tvb, offset+20);
2386       break;
2387
2388     case 0x011F: /* FeatureStatMessage */
2389       proto_tree_add_item(skinny_tree, hf_skinny_featureIndex, tvb, offset+12, 4, ENC_LITTLE_ENDIAN);
2390       proto_tree_add_item(skinny_tree, hf_skinny_featureID, tvb, offset+16, 4, ENC_LITTLE_ENDIAN);
2391       proto_tree_add_item(skinny_tree, hf_skinny_featureTextLabel, tvb, offset+20, StationMaxNameSize, ENC_ASCII|ENC_NA);
2392       proto_tree_add_item(skinny_tree, hf_skinny_featureStatus, tvb, offset+20+StationMaxNameSize, 4, ENC_LITTLE_ENDIAN);
2393       break;
2394
2395     case 0x0120: /* DisplayPriNotifyMessage */
2396       proto_tree_add_item(skinny_tree, hf_skinny_messageTimeOutValue, tvb, offset+12, 4, ENC_LITTLE_ENDIAN);
2397       proto_tree_add_item(skinny_tree, hf_skinny_priority, tvb, offset+16, 4, ENC_LITTLE_ENDIAN);
2398       proto_tree_add_item(skinny_tree, hf_skinny_notify, tvb, offset+16, StationMaxDisplayNotifySize, ENC_ASCII|ENC_NA);
2399       break;
2400
2401     case 0x0121: /* ClearPriNotifyMessage */
2402       proto_tree_add_item(skinny_tree, hf_skinny_priority, tvb, offset+12, 4, ENC_LITTLE_ENDIAN);
2403       break;
2404
2405     case 0x0122: /* StartAnnouncementMessage */
2406       count = offset+12;
2407       for ( i = 0; i < MaxAnnouncementList; i++ ) {
2408         proto_tree_add_item(skinny_tree, hf_skinny_locale, tvb, count, 4, ENC_LITTLE_ENDIAN);
2409         count += 4;
2410         proto_tree_add_item(skinny_tree, hf_skinny_country, tvb, count, 4, ENC_LITTLE_ENDIAN);
2411         count += 4;
2412         proto_tree_add_item(skinny_tree, hf_skinny_deviceTone, tvb, count, 4, ENC_LITTLE_ENDIAN);
2413         count += 4;
2414       }
2415       proto_tree_add_item(skinny_tree, hf_skinny_endOfAnnAck, tvb, count, 4, ENC_LITTLE_ENDIAN);
2416       count += 4;
2417       proto_tree_add_item(skinny_tree, hf_skinny_conferenceID, tvb, count, 4, ENC_LITTLE_ENDIAN);
2418       count += 4;
2419
2420       for ( i = 0; i < StationMaxMonitorParties; i++ ) {
2421         proto_tree_add_item(skinny_tree, hf_skinny_matrixConfPartyID, tvb, count, 4, ENC_LITTLE_ENDIAN);
2422         count += 4;
2423       }
2424       proto_tree_add_item(skinny_tree, hf_skinny_hearingConfPartyMask, tvb, count, 4, ENC_LITTLE_ENDIAN);
2425       count += 4;
2426       proto_tree_add_item(skinny_tree, hf_skinny_annPlayMode, tvb, count, 4, ENC_LITTLE_ENDIAN);
2427       break;
2428
2429     case 0x0123: /* StopAnnouncementMessage */
2430       proto_tree_add_item(skinny_tree, hf_skinny_conferenceID, tvb, offset+12, 4, ENC_LITTLE_ENDIAN);
2431       break;
2432
2433     case 0x0124: /* AnnouncementFinishMessage */
2434       proto_tree_add_item(skinny_tree, hf_skinny_conferenceID, tvb, offset+12, 4, ENC_LITTLE_ENDIAN);
2435       proto_tree_add_item(skinny_tree, hf_skinny_annPlayStatus, tvb, offset+16, 4, ENC_LITTLE_ENDIAN);
2436       break;
2437
2438     case 0x0127: /* NotifyDtmfToneMessage */
2439       proto_tree_add_item(skinny_tree, hf_skinny_deviceTone, tvb, offset+12, 4, ENC_LITTLE_ENDIAN);
2440       proto_tree_add_item(skinny_tree, hf_skinny_conferenceID, tvb, offset+16, 4, ENC_LITTLE_ENDIAN);
2441       proto_tree_add_item(skinny_tree, hf_skinny_passThruPartyID, tvb, offset+20, 4, ENC_LITTLE_ENDIAN);
2442       si->passThruId = tvb_get_letohl(tvb, offset+20);
2443       break;
2444
2445     case 0x0128: /* SendDtmfToneMessage */
2446       proto_tree_add_item(skinny_tree, hf_skinny_deviceTone, tvb, offset+12, 4, ENC_LITTLE_ENDIAN);
2447       proto_tree_add_item(skinny_tree, hf_skinny_conferenceID, tvb, offset+16, 4, ENC_LITTLE_ENDIAN);
2448       proto_tree_add_item(skinny_tree, hf_skinny_passThruPartyID, tvb, offset+20, 4, ENC_LITTLE_ENDIAN);
2449       si->passThruId = tvb_get_letohl(tvb, offset+20);
2450       break;
2451
2452     case 0x0129: /* SubscribeDtmfPayloadReqMessage */
2453       proto_tree_add_item(skinny_tree, hf_skinny_payloadDtmf, tvb, offset+12, 4, ENC_LITTLE_ENDIAN);
2454       proto_tree_add_item(skinny_tree, hf_skinny_conferenceID, tvb, offset+16, 4, ENC_LITTLE_ENDIAN);
2455       proto_tree_add_item(skinny_tree, hf_skinny_passThruPartyID, tvb, offset+20, 4, ENC_LITTLE_ENDIAN);
2456       si->passThruId = tvb_get_letohl(tvb, offset+20);
2457       break;
2458
2459     case 0x012A: /* SubscribeDtmfPayloadResMessage */
2460       proto_tree_add_item(skinny_tree, hf_skinny_payloadDtmf, tvb, offset+12, 4, ENC_LITTLE_ENDIAN);
2461       proto_tree_add_item(skinny_tree, hf_skinny_conferenceID, tvb, offset+16, 4, ENC_LITTLE_ENDIAN);
2462       proto_tree_add_item(skinny_tree, hf_skinny_passThruPartyID, tvb, offset+20, 4, ENC_LITTLE_ENDIAN);
2463       si->passThruId = tvb_get_letohl(tvb, offset+20);
2464       break;
2465
2466     case 0x012B: /* SubscribeDtmfPayloadErrMessage */
2467       proto_tree_add_item(skinny_tree, hf_skinny_payloadDtmf, tvb, offset+12, 4, ENC_LITTLE_ENDIAN);
2468       proto_tree_add_item(skinny_tree, hf_skinny_conferenceID, tvb, offset+16, 4, ENC_LITTLE_ENDIAN);
2469       proto_tree_add_item(skinny_tree, hf_skinny_passThruPartyID, tvb, offset+20, 4, ENC_LITTLE_ENDIAN);
2470       si->passThruId = tvb_get_letohl(tvb, offset+20);
2471       break;
2472
2473     case 0x012C: /* UnSubscribeDtmfPayloadReqMessage */
2474       proto_tree_add_item(skinny_tree, hf_skinny_payloadDtmf, tvb, offset+12, 4, ENC_LITTLE_ENDIAN);
2475       proto_tree_add_item(skinny_tree, hf_skinny_conferenceID, tvb, offset+16, 4, ENC_LITTLE_ENDIAN);
2476       proto_tree_add_item(skinny_tree, hf_skinny_passThruPartyID, tvb, offset+20, 4, ENC_LITTLE_ENDIAN);
2477       si->passThruId = tvb_get_letohl(tvb, offset+20);
2478       break;
2479
2480     case 0x012D: /* UnSubscribeDtmfPayloadResMessage */
2481       proto_tree_add_item(skinny_tree, hf_skinny_payloadDtmf, tvb, offset+12, 4, ENC_LITTLE_ENDIAN);
2482       proto_tree_add_item(skinny_tree, hf_skinny_conferenceID, tvb, offset+16, 4, ENC_LITTLE_ENDIAN);
2483       proto_tree_add_item(skinny_tree, hf_skinny_passThruPartyID, tvb, offset+20, 4, ENC_LITTLE_ENDIAN);
2484       si->passThruId = tvb_get_letohl(tvb, offset+20);
2485       break;
2486
2487     case 0x012E: /* UnSubscribeDtmfPayloadErrMessage */
2488       proto_tree_add_item(skinny_tree, hf_skinny_payloadDtmf, tvb, offset+12, 4, ENC_LITTLE_ENDIAN);
2489       proto_tree_add_item(skinny_tree, hf_skinny_conferenceID, tvb, offset+16, 4, ENC_LITTLE_ENDIAN);
2490       proto_tree_add_item(skinny_tree, hf_skinny_passThruPartyID, tvb, offset+20, 4, ENC_LITTLE_ENDIAN);
2491       si->passThruId = tvb_get_letohl(tvb, offset+20);
2492       break;
2493
2494     case 0x012F: /* ServiceURLStatMessage */
2495       proto_tree_add_item(skinny_tree, hf_skinny_serviceURLIndex, tvb, offset+12, 4, ENC_LITTLE_ENDIAN);
2496       proto_tree_add_item(skinny_tree, hf_skinny_serviceURL, tvb, offset+16, StationMaxServiceURLSize, ENC_ASCII|ENC_NA);
2497       proto_tree_add_item(skinny_tree, hf_skinny_serviceURLDisplayName, tvb, offset+16+StationMaxServiceURLSize, StationMaxNameSize, ENC_ASCII|ENC_NA);
2498       break;
2499
2500     case 0x0130: /* CallSelectStatMessage */
2501       proto_tree_add_item(skinny_tree, hf_skinny_callSelectStat, tvb, offset+12, 4, ENC_LITTLE_ENDIAN);
2502       proto_tree_add_item(skinny_tree, hf_skinny_callIdentifier, tvb, offset+16, 4, ENC_LITTLE_ENDIAN);
2503       proto_tree_add_item(skinny_tree, hf_skinny_lineInstance, tvb, offset+20, 4, ENC_LITTLE_ENDIAN);
2504       si->lineId = tvb_get_letohl(tvb, offset+16);
2505       si->callId = tvb_get_letohl(tvb, offset+20);
2506       break;
2507
2508     case 0x0131: /* OpenMultiMediaChannelMessage */
2509       proto_tree_add_item(skinny_tree, hf_skinny_conferenceID, tvb, offset+12, 4, ENC_LITTLE_ENDIAN);
2510       proto_tree_add_item(skinny_tree, hf_skinny_passThruPartyID, tvb, offset+16, 4, ENC_LITTLE_ENDIAN);
2511       proto_tree_add_item(skinny_tree, hf_skinny_payloadCapability, tvb, offset+20, 4, ENC_LITTLE_ENDIAN);
2512       proto_tree_add_item(skinny_tree, hf_skinny_lineInstance, tvb, offset+24, 4, ENC_LITTLE_ENDIAN);
2513       proto_tree_add_item(skinny_tree, hf_skinny_callIdentifier, tvb, offset+28, 4, ENC_LITTLE_ENDIAN);
2514       proto_tree_add_item(skinny_tree, hf_skinny_payload_rfc_number, tvb, offset+32, 4, ENC_LITTLE_ENDIAN);
2515       proto_tree_add_item(skinny_tree, hf_skinny_payloadType, tvb, offset+36, 4, ENC_LITTLE_ENDIAN);
2516       proto_tree_add_item(skinny_tree, hf_skinny_isConferenceCreator, tvb, offset+40, 4, ENC_LITTLE_ENDIAN);
2517       si->passThruId = tvb_get_letohl(tvb, offset+16);
2518       si->lineId = tvb_get_letohl(tvb, offset+24);
2519       si->callId = tvb_get_letohl(tvb, offset+28);
2520
2521       /* add audio part of union */
2522                   ti_sub = proto_tree_add_text(skinny_tree, tvb, offset, 12, "audioParameters");
2523                   skinny_sub_tree = proto_item_add_subtree(ti_sub, ett_skinny_tree);
2524       proto_tree_add_item(skinny_sub_tree, hf_skinny_millisecondPacketSize, tvb, offset+44, 4, ENC_LITTLE_ENDIAN);
2525       proto_tree_add_item(skinny_sub_tree, hf_skinny_echoCancelType, tvb, offset+48, 4, ENC_LITTLE_ENDIAN);
2526       proto_tree_add_item(skinny_sub_tree, hf_skinny_g723BitRate, tvb, offset+52, 4, ENC_LITTLE_ENDIAN);
2527
2528       /* add video part of union */
2529                   ti_sub = proto_tree_add_text(skinny_tree, tvb, offset, 30, "vidParameters");
2530                   skinny_sub_tree = proto_item_add_subtree(ti_sub, ett_skinny_tree);
2531       proto_tree_add_item(skinny_sub_tree, hf_skinny_bitRate, tvb, offset+44, 4, ENC_LITTLE_ENDIAN);
2532       proto_tree_add_item(skinny_sub_tree, hf_skinny_pictureFormatCount, tvb, offset+48, 4, ENC_LITTLE_ENDIAN);
2533       skinny_sub_tree_sav = skinny_sub_tree;
2534       count = offset+52;
2535       for ( i = 0; i < MAX_PICTURE_FORMAT; i++ ) {
2536                     ti_sub = proto_tree_add_text(skinny_sub_tree_sav, tvb, offset, 8 * MAX_PICTURE_FORMAT, "pictureFormat[%d]", i);
2537                     skinny_sub_tree = proto_item_add_subtree(ti_sub, ett_skinny_tree);
2538         proto_tree_add_item(skinny_sub_tree, hf_skinny_format, tvb, count, 4, ENC_LITTLE_ENDIAN);
2539         count += 4;
2540         proto_tree_add_item(skinny_sub_tree, hf_skinny_MPI, tvb, count, 4, ENC_LITTLE_ENDIAN);
2541         count += 4;
2542       }
2543       skinny_sub_tree = skinny_sub_tree_sav;
2544       proto_tree_add_item(skinny_sub_tree, hf_skinny_confServiceNum, tvb, count, 4, ENC_LITTLE_ENDIAN);
2545       count += 4;
2546
2547       val = count;
2548       /* add H261 part of union */
2549                   ti_sub = proto_tree_add_text(skinny_sub_tree_sav, tvb, offset, 8, "h261VideoCapability");
2550                   skinny_sub_tree = proto_item_add_subtree(ti_sub, ett_skinny_tree);
2551             proto_tree_add_item(skinny_sub_tree, hf_skinny_temporalSpatialTradeOffCapability, tvb, count, 4, ENC_LITTLE_ENDIAN);
2552       count += 4;
2553             proto_tree_add_item(skinny_sub_tree, hf_skinny_stillImageTransmission, tvb, count, 4, ENC_LITTLE_ENDIAN);
2554
2555       /* add H263 part of union */
2556       count = val;
2557                   ti_sub = proto_tree_add_text(skinny_sub_tree_sav, tvb, offset, 8, "h263VideoCapability");
2558                   skinny_sub_tree = proto_item_add_subtree(ti_sub, ett_skinny_tree);
2559             proto_tree_add_item(skinny_sub_tree, hf_skinny_h263_capability_bitfield, tvb, count, 4, ENC_LITTLE_ENDIAN);
2560       count += 4;
2561             proto_tree_add_item(skinny_sub_tree, hf_skinny_annexNandWFutureUse, tvb, count, 4, ENC_LITTLE_ENDIAN);
2562
2563       /* add Vieo part of union */
2564       count = val;
2565                   ti_sub = proto_tree_add_text(skinny_sub_tree_sav, tvb, offset, 8, "vieoVideoCapability");
2566                   skinny_sub_tree = proto_item_add_subtree(ti_sub, ett_skinny_tree);
2567             proto_tree_add_item(skinny_sub_tree, hf_skinny_modelNumber, tvb, count, 4, ENC_LITTLE_ENDIAN);
2568       count += 4;
2569             proto_tree_add_item(skinny_sub_tree, hf_skinny_bandwidth, tvb, count, 4, ENC_LITTLE_ENDIAN);
2570
2571       /* add data part of union */
2572                   ti_sub = proto_tree_add_text(skinny_tree, tvb, offset, 8, "dataParameters");
2573                   skinny_sub_tree = proto_item_add_subtree(ti_sub, ett_skinny_tree);
2574             proto_tree_add_item(skinny_sub_tree, hf_skinny_protocolDependentData, tvb, offset+44, 4, ENC_LITTLE_ENDIAN);
2575             proto_tree_add_item(skinny_sub_tree, hf_skinny_maxBitRate, tvb, offset+48, 4, ENC_LITTLE_ENDIAN);
2576       break;
2577
2578     case 0x0132: /* StartMultiMediaTransmission */
2579       proto_tree_add_item(skinny_tree, hf_skinny_conferenceID, tvb, offset+12, 4, ENC_LITTLE_ENDIAN);
2580       proto_tree_add_item(skinny_tree, hf_skinny_passThruPartyID, tvb, offset+16, 4, ENC_LITTLE_ENDIAN);
2581       proto_tree_add_item(skinny_tree, hf_skinny_payloadCapability, tvb, offset+20, 4, ENC_LITTLE_ENDIAN);
2582       proto_tree_add_item(skinny_tree, hf_skinny_ipAddress, tvb, offset+24, 4, ENC_BIG_ENDIAN);
2583       proto_tree_add_item(skinny_tree, hf_skinny_portNumber, tvb, offset+28, 4, ENC_LITTLE_ENDIAN);
2584       proto_tree_add_item(skinny_tree, hf_skinny_callIdentifier, tvb, offset+32, 4, ENC_LITTLE_ENDIAN);
2585       proto_tree_add_item(skinny_tree, hf_skinny_payload_rfc_number, tvb, offset+36, 4, ENC_LITTLE_ENDIAN);
2586       proto_tree_add_item(skinny_tree, hf_skinny_payloadType, tvb, offset+40, 4, ENC_LITTLE_ENDIAN);
2587       proto_tree_add_item(skinny_tree, hf_skinny_DSCPValue, tvb, offset+44, 4, ENC_LITTLE_ENDIAN);
2588       si->passThruId = tvb_get_letohl(tvb, offset+16);
2589       si->callId = tvb_get_letohl(tvb, offset+32);
2590
2591       /* add audio part of union */
2592                   ti_sub = proto_tree_add_text(skinny_tree, tvb, offset, 12, "audioParameters");
2593                   skinny_sub_tree = proto_item_add_subtree(ti_sub, ett_skinny_tree);
2594       proto_tree_add_item(skinny_sub_tree, hf_skinny_millisecondPacketSize, tvb, offset+48, 4, ENC_LITTLE_ENDIAN);
2595       proto_tree_add_item(skinny_sub_tree, hf_skinny_echoCancelType, tvb, offset+52, 4, ENC_LITTLE_ENDIAN);
2596       proto_tree_add_item(skinny_sub_tree, hf_skinny_g723BitRate, tvb, offset+56, 4, ENC_LITTLE_ENDIAN);
2597
2598       /* add video part of union */
2599                   ti_sub = proto_tree_add_text(skinny_tree, tvb, offset, 30, "vidParameters");
2600                   skinny_sub_tree = proto_item_add_subtree(ti_sub, ett_skinny_tree);
2601       proto_tree_add_item(skinny_sub_tree, hf_skinny_bitRate, tvb, offset+48, 4, ENC_LITTLE_ENDIAN);
2602       proto_tree_add_item(skinny_sub_tree, hf_skinny_pictureFormatCount, tvb, offset+52, 4, ENC_LITTLE_ENDIAN);
2603       skinny_sub_tree_sav = skinny_sub_tree;
2604       count = offset+56;
2605       for ( i = 0; i < MAX_PICTURE_FORMAT; i++ ) {
2606                     ti_sub = proto_tree_add_text(skinny_sub_tree_sav, tvb, offset, 8 * MAX_PICTURE_FORMAT, "pictureFormat[%d]", i);
2607                     skinny_sub_tree = proto_item_add_subtree(ti_sub, ett_skinny_tree);
2608         proto_tree_add_item(skinny_sub_tree, hf_skinny_format, tvb, count, 4, ENC_LITTLE_ENDIAN);
2609         count += 4;
2610         proto_tree_add_item(skinny_sub_tree, hf_skinny_MPI, tvb, count, 4, ENC_LITTLE_ENDIAN);
2611         count += 4;
2612       }
2613       skinny_sub_tree = skinny_sub_tree_sav;
2614       proto_tree_add_item(skinny_sub_tree, hf_skinny_confServiceNum, tvb, count, 4, ENC_LITTLE_ENDIAN);
2615       count += 4;
2616
2617       val = count;
2618       /* add H261 part of union */
2619                   ti_sub = proto_tree_add_text(skinny_sub_tree_sav, tvb, offset, 8, "h261VideoCapability");
2620                   skinny_sub_tree = proto_item_add_subtree(ti_sub, ett_skinny_tree);
2621             proto_tree_add_item(skinny_sub_tree, hf_skinny_temporalSpatialTradeOffCapability, tvb, count, 4, ENC_LITTLE_ENDIAN);
2622       count += 4;
2623             proto_tree_add_item(skinny_sub_tree, hf_skinny_stillImageTransmission, tvb, count, 4, ENC_LITTLE_ENDIAN);
2624
2625       /* add H263 part of union */
2626       count = val;
2627                   ti_sub = proto_tree_add_text(skinny_sub_tree_sav, tvb, offset, 8, "h263VideoCapability");
2628                   skinny_sub_tree = proto_item_add_subtree(ti_sub, ett_skinny_tree);
2629             proto_tree_add_item(skinny_sub_tree, hf_skinny_h263_capability_bitfield, tvb, count, 4, ENC_LITTLE_ENDIAN);
2630       count += 4;
2631             proto_tree_add_item(skinny_sub_tree, hf_skinny_annexNandWFutureUse, tvb, count, 4, ENC_LITTLE_ENDIAN);
2632
2633       /* add Vieo part of union */
2634       count = val;
2635                   ti_sub = proto_tree_add_text(skinny_sub_tree_sav, tvb, offset, 8, "vieoVideoCapability");
2636                   skinny_sub_tree = proto_item_add_subtree(ti_sub, ett_skinny_tree);
2637             proto_tree_add_item(skinny_sub_tree, hf_skinny_modelNumber, tvb, count, 4, ENC_LITTLE_ENDIAN);
2638       count += 4;
2639             proto_tree_add_item(skinny_sub_tree, hf_skinny_bandwidth, tvb, count, 4, ENC_LITTLE_ENDIAN);
2640
2641       /* add data part of union */
2642                   ti_sub = proto_tree_add_text(skinny_tree, tvb, offset, 8, "dataParameters");
2643                   skinny_sub_tree = proto_item_add_subtree(ti_sub, ett_skinny_tree);
2644             proto_tree_add_item(skinny_sub_tree, hf_skinny_protocolDependentData, tvb, offset+48, 4, ENC_LITTLE_ENDIAN);
2645             proto_tree_add_item(skinny_sub_tree, hf_skinny_maxBitRate, tvb, offset+52, 4, ENC_LITTLE_ENDIAN);
2646       break;
2647
2648     case 0x0133: /* StopMultiMediaTransmission */
2649       proto_tree_add_item(skinny_tree, hf_skinny_conferenceID, tvb, offset+12, 4, ENC_LITTLE_ENDIAN);
2650       proto_tree_add_item(skinny_tree, hf_skinny_passThruPartyID, tvb, offset+16, 4, ENC_LITTLE_ENDIAN);
2651       proto_tree_add_item(skinny_tree, hf_skinny_callIdentifier, tvb, offset+20, 4, ENC_LITTLE_ENDIAN);
2652       si->passThruId = tvb_get_letohl(tvb, offset+16);
2653       si->callId = tvb_get_letohl(tvb, offset+20);
2654       break;
2655
2656     case 0x0134: /* MiscellaneousCommandMessage */
2657       proto_tree_add_item(skinny_tree, hf_skinny_conferenceID, tvb, offset+12, 4, ENC_LITTLE_ENDIAN);
2658       proto_tree_add_item(skinny_tree, hf_skinny_passThruPartyID, tvb, offset+16, 4, ENC_LITTLE_ENDIAN);
2659       proto_tree_add_item(skinny_tree, hf_skinny_callIdentifier, tvb, offset+20, 4, ENC_LITTLE_ENDIAN);
2660       proto_tree_add_item(skinny_tree, hf_skinny_miscCommandType, tvb, offset+24, 4, ENC_LITTLE_ENDIAN);
2661       si->passThruId = tvb_get_letohl(tvb, offset+16);
2662       si->callId = tvb_get_letohl(tvb, offset+20);
2663
2664       /* show videoFreezePicture */
2665       /* not sure of format */
2666
2667       /* show videoFastUpdatePicture */
2668       /* not sure of format */
2669
2670       /* show videoFastUpdateGOB */
2671                   ti_sub = proto_tree_add_text(skinny_tree, tvb, offset, 8, "videoFastUpdateGOB");
2672                   skinny_sub_tree = proto_item_add_subtree(ti_sub, ett_skinny_tree);
2673       proto_tree_add_item(skinny_sub_tree, hf_skinny_firstGOB, tvb, offset+28, 4, ENC_LITTLE_ENDIAN);
2674       proto_tree_add_item(skinny_sub_tree, hf_skinny_numberOfGOBs, tvb, offset+32, 4, ENC_LITTLE_ENDIAN);
2675
2676       /* show videoFastUpdateMB */
2677                   ti_sub = proto_tree_add_text(skinny_tree, tvb, offset, 8, "videoFastUpdateGOB");
2678                   skinny_sub_tree = proto_item_add_subtree(ti_sub, ett_skinny_tree);
2679       proto_tree_add_item(skinny_sub_tree, hf_skinny_firstGOB, tvb, offset+28, 4, ENC_LITTLE_ENDIAN);
2680       proto_tree_add_item(skinny_sub_tree, hf_skinny_firstMB, tvb, offset+32, 4, ENC_LITTLE_ENDIAN);
2681       proto_tree_add_item(skinny_sub_tree, hf_skinny_numberOfMBs, tvb, offset+36, 4, ENC_LITTLE_ENDIAN);
2682
2683       /* show lostPicture */
2684                   ti_sub = proto_tree_add_text(skinny_tree, tvb, offset, 8, "lostPicture");
2685                   skinny_sub_tree = proto_item_add_subtree(ti_sub, ett_skinny_tree);
2686       proto_tree_add_item(skinny_sub_tree, hf_skinny_pictureNumber, tvb, offset+28, 4, ENC_LITTLE_ENDIAN);
2687       proto_tree_add_item(skinny_sub_tree, hf_skinny_longTermPictureIndex, tvb, offset+32, 4, ENC_LITTLE_ENDIAN);
2688
2689       /* show lostPartialPicture */
2690                   ti_sub = proto_tree_add_text(skinny_tree, tvb, offset, 8, "lostPartialPicture");
2691                   skinny_sub_tree = proto_item_add_subtree(ti_sub, ett_skinny_tree);
2692       proto_tree_add_item(skinny_sub_tree, hf_skinny_pictureNumber, tvb, offset+28, 4, ENC_LITTLE_ENDIAN);
2693       proto_tree_add_item(skinny_sub_tree, hf_skinny_longTermPictureIndex, tvb, offset+32, 4, ENC_LITTLE_ENDIAN);
2694       proto_tree_add_item(skinny_sub_tree, hf_skinny_firstMB, tvb, offset+36, 4, ENC_LITTLE_ENDIAN);
2695       proto_tree_add_item(skinny_sub_tree, hf_skinny_numberOfMBs, tvb, offset+40, 4, ENC_LITTLE_ENDIAN);
2696
2697       /* show recoveryReferencePicture */
2698                   ti_sub = proto_tree_add_text(skinny_tree, tvb, offset, 8, "recoveryReferencePicture");
2699                   skinny_sub_tree = proto_item_add_subtree(ti_sub, ett_skinny_tree);
2700       proto_tree_add_item(skinny_sub_tree, hf_skinny_recoveryReferencePictureCount, tvb, offset+28, 4, ENC_LITTLE_ENDIAN);
2701       skinny_sub_tree_sav = skinny_sub_tree;
2702       for ( i = 0; i < MAX_REFERENCE_PICTURE; i++ ) {
2703                     ti_sub = proto_tree_add_text(skinny_sub_tree_sav, tvb, offset, 8, "recoveryReferencePicture[%d]", i);
2704                     skinny_sub_tree = proto_item_add_subtree(ti_sub, ett_skinny_tree);
2705         proto_tree_add_item(skinny_sub_tree, hf_skinny_pictureNumber, tvb, offset+32+(i*8), 4, ENC_LITTLE_ENDIAN);
2706         proto_tree_add_item(skinny_sub_tree, hf_skinny_longTermPictureIndex, tvb, offset+36+(i*8), 4, ENC_LITTLE_ENDIAN);
2707       }
2708
2709       /* show temporalSpatialTradeOff */
2710                   ti_sub = proto_tree_add_text(skinny_tree, tvb, offset, 4, "temporalSpatialTradeOff");
2711                   skinny_sub_tree = proto_item_add_subtree(ti_sub, ett_skinny_tree);
2712       proto_tree_add_item(skinny_sub_tree, hf_skinny_temporalSpatialTradeOff, tvb, offset+28, 4, ENC_LITTLE_ENDIAN);
2713       break;
2714
2715     case 0x0135: /* FlowControlCommandMessage */
2716       proto_tree_add_item(skinny_tree, hf_skinny_conferenceID, tvb, offset+12, 4, ENC_LITTLE_ENDIAN);
2717       proto_tree_add_item(skinny_tree, hf_skinny_passThruPartyID, tvb, offset+16, 4, ENC_LITTLE_ENDIAN);
2718       proto_tree_add_item(skinny_tree, hf_skinny_callIdentifier, tvb, offset+20, 4, ENC_LITTLE_ENDIAN);
2719       proto_tree_add_item(skinny_tree, hf_skinny_maxBitRate, tvb, offset+24, 4, ENC_LITTLE_ENDIAN);
2720       si->passThruId = tvb_get_letohl(tvb, offset+16);
2721       si->callId = tvb_get_letohl(tvb, offset+20);
2722       break;
2723
2724     case 0x0136: /* CloseMultiMediaReceiveChannel */
2725       proto_tree_add_item(skinny_tree, hf_skinny_conferenceID, tvb, offset+12, 4, ENC_LITTLE_ENDIAN);
2726       proto_tree_add_item(skinny_tree, hf_skinny_passThruPartyID, tvb, offset+16, 4, ENC_LITTLE_ENDIAN);
2727       proto_tree_add_item(skinny_tree, hf_skinny_callIdentifier, tvb, offset+20, 4, ENC_LITTLE_ENDIAN);
2728       si->passThruId = tvb_get_letohl(tvb, offset+16);
2729       si->callId = tvb_get_letohl(tvb, offset+20);
2730       break;
2731
2732     case 0x0137: /* CreateConferenceReqMessage */
2733       proto_tree_add_item(skinny_tree, hf_skinny_conferenceID, tvb, offset+12, 4, ENC_LITTLE_ENDIAN);
2734       proto_tree_add_item(skinny_tree, hf_skinny_numberOfReservedParticipants, tvb, offset+16, 4, ENC_LITTLE_ENDIAN);
2735       proto_tree_add_item(skinny_tree, hf_skinny_resourceTypes, tvb, offset+16, 4, ENC_LITTLE_ENDIAN);
2736       proto_tree_add_item(skinny_tree, hf_skinny_appID, tvb, offset+20, 4, ENC_LITTLE_ENDIAN);
2737       count = offset+24;
2738       proto_tree_add_uint(skinny_tree, hf_skinny_appConfID, tvb, count, 1, AppConferenceIDSize);
2739       count += AppConferenceIDSize;
2740       proto_tree_add_uint(skinny_tree, hf_skinny_appData, tvb, count, 1, AppDataSize);
2741       count += AppDataSize;
2742       proto_tree_add_item(skinny_tree, hf_skinny_data_length, tvb, count, 4, ENC_LITTLE_ENDIAN);
2743       val = tvb_get_letohl( tvb, count);
2744       count += 4;
2745       proto_tree_add_uint(skinny_tree, hf_skinny_passThruData, tvb, count, 1, val);
2746       break;
2747
2748     case 0x0138: /* DeleteConferenceReqMessage */
2749       proto_tree_add_item(skinny_tree, hf_skinny_conferenceID, tvb, offset+12, 4, ENC_LITTLE_ENDIAN);
2750       break;
2751
2752     case 0x0139: /* ModifyConferenceReqMessage */
2753       proto_tree_add_item(skinny_tree, hf_skinny_conferenceID, tvb, offset+12, 4, ENC_LITTLE_ENDIAN);
2754       proto_tree_add_item(skinny_tree, hf_skinny_numberOfReservedParticipants, tvb, offset+16, 4, ENC_LITTLE_ENDIAN);
2755       proto_tree_add_item(skinny_tree, hf_skinny_appID, tvb, offset+20, 4, ENC_LITTLE_ENDIAN);
2756       count = offset+24;
2757       proto_tree_add_uint(skinny_tree, hf_skinny_appConfID, tvb, count, 1, AppConferenceIDSize);
2758       count += AppConferenceIDSize;
2759       proto_tree_add_uint(skinny_tree, hf_skinny_appData, tvb, count, 1, AppDataSize);
2760       count += AppDataSize;
2761       proto_tree_add_item(skinny_tree, hf_skinny_data_length, tvb, count, 4, ENC_LITTLE_ENDIAN);
2762       val = tvb_get_letohl( tvb, count);
2763       count += 4;
2764       proto_tree_add_uint(skinny_tree, hf_skinny_passThruData, tvb, count, 1, val);
2765       break;
2766
2767     case 0x013A: /* AddParticipantReqMessage */
2768       proto_tree_add_item(skinny_tree, hf_skinny_conferenceID, tvb, offset+12, 4, ENC_LITTLE_ENDIAN);
2769       proto_tree_add_item(skinny_tree, hf_skinny_callIdentifier, tvb, offset+16, 4, ENC_LITTLE_ENDIAN);
2770       si->callId = tvb_get_letohl(tvb, offset+16);
2771       break;
2772
2773     case 0x013B: /* DropParticipantReqMessage */
2774       proto_tree_add_item(skinny_tree, hf_skinny_conferenceID, tvb, offset+12, 4, ENC_LITTLE_ENDIAN);
2775       proto_tree_add_item(skinny_tree, hf_skinny_callIdentifier, tvb, offset+16, 4, ENC_LITTLE_ENDIAN);
2776       si->callId = tvb_get_letohl(tvb, offset+16);
2777       break;
2778
2779     case 0x013C: /* AuditConferenceReqMessage */
2780       break;
2781
2782     case 0x013D: /* AuditParticipantReqMessage */
2783       proto_tree_add_item(skinny_tree, hf_skinny_conferenceID, tvb, offset+12, 4, ENC_LITTLE_ENDIAN);
2784       break;
2785
2786     case 0x013F: /* UserToDeviceDataVersion1Message */
2787       proto_tree_add_item(skinny_tree, hf_skinny_applicationID, tvb, offset+12, 4, ENC_LITTLE_ENDIAN);
2788       proto_tree_add_item(skinny_tree, hf_skinny_lineInstance, tvb, offset+16, 4, ENC_LITTLE_ENDIAN);
2789       proto_tree_add_item(skinny_tree, hf_skinny_callIdentifier, tvb, offset+20, 4, ENC_LITTLE_ENDIAN);
2790       proto_tree_add_item(skinny_tree, hf_skinny_transactionID, tvb, offset+24, 4, ENC_LITTLE_ENDIAN);
2791       proto_tree_add_item(skinny_tree, hf_skinny_data_length, tvb, offset+28, 4, ENC_LITTLE_ENDIAN);
2792       count = tvb_get_letohl( tvb, offset+28);
2793       proto_tree_add_item(skinny_tree, hf_skinny_sequenceFlag, tvb, offset+30, 4, ENC_LITTLE_ENDIAN);
2794       proto_tree_add_item(skinny_tree, hf_skinny_displayPriority, tvb, offset+34, 4, ENC_LITTLE_ENDIAN);
2795       proto_tree_add_item(skinny_tree, hf_skinny_conferenceID, tvb, offset+38, 4, ENC_LITTLE_ENDIAN);
2796       proto_tree_add_item(skinny_tree, hf_skinny_appInstanceID, tvb, offset+42, 4, ENC_LITTLE_ENDIAN);
2797       proto_tree_add_item(skinny_tree, hf_skinny_routingID, tvb, offset+46, 4, ENC_LITTLE_ENDIAN);
2798       dissect_skinny_xml(skinny_tree, tvb, pinfo, offset+50, count);
2799       si->lineId = tvb_get_letohl(tvb, offset+16);
2800       si->callId = tvb_get_letohl(tvb, offset+20);
2801       break;
2802
2803     case 0x014A: /* CM5CallInfoMessage */
2804       proto_tree_add_item(skinny_tree, hf_skinny_lineInstance, tvb, offset+12, 4, ENC_LITTLE_ENDIAN);
2805       proto_tree_add_item(skinny_tree, hf_skinny_callIdentifier, tvb, offset+16, 4, ENC_LITTLE_ENDIAN);
2806       proto_tree_add_item(skinny_tree, hf_skinny_callType, tvb, offset+20, 4, ENC_LITTLE_ENDIAN);
2807       si->lineId = tvb_get_letohl(tvb, offset+12);
2808       /* 5x unknown uint32_t stuff */
2809         /* strings */
2810         {
2811         i = offset+44;
2812         if(hdr_version == BASIC_MSG_TYPE)
2813         {
2814           /* 8x party numbers */
2815           count = tvb_strnlen(tvb, i, -1)+1;
2816           proto_tree_add_item(skinny_tree, hf_skinny_callingPartyNumber, tvb, i, count, ENC_ASCII|ENC_NA);
2817           i += count;
2818           count = tvb_strnlen(tvb, i, -1)+1;
2819           proto_tree_add_item(skinny_tree, hf_skinny_calledPartyNumber, tvb, i, count, ENC_ASCII|ENC_NA);
2820           i += count;
2821           count = tvb_strnlen(tvb, i, -1)+1;
2822           proto_tree_add_item(skinny_tree, hf_skinny_originalCalledParty, tvb, i, count, ENC_ASCII|ENC_NA);
2823           i += count;
2824           count = tvb_strnlen(tvb, i, -1)+1;
2825           proto_tree_add_item(skinny_tree, hf_cast_lastRedirectingParty, tvb, i, count, ENC_ASCII|ENC_NA);
2826           i += count;
2827           count = tvb_strnlen(tvb, i, -1)+1;
2828           proto_tree_add_item(skinny_tree, hf_cast_cgpnVoiceMailbox, tvb, i, count, ENC_ASCII|ENC_NA);
2829           i += count;
2830           count = tvb_strnlen(tvb, i, -1)+1;
2831           proto_tree_add_item(skinny_tree, hf_cast_cdpnVoiceMailbox, tvb, i, count, ENC_ASCII|ENC_NA);
2832           i += count;
2833           count = tvb_strnlen(tvb, i, -1)+1;
2834           proto_tree_add_item(skinny_tree, hf_cast_originalCdpnVoiceMailbox, tvb, i, count, ENC_ASCII|ENC_NA);
2835           i += count;
2836           count = tvb_strnlen(tvb, i, -1)+1;
2837           proto_tree_add_item(skinny_tree, hf_cast_lastRedirectingVoiceMailbox, tvb, i, count, ENC_ASCII|ENC_NA);
2838           i += count;
2839           /* 4x party names */
2840           count = tvb_strnlen(tvb, i, -1)+1;
2841           proto_tree_add_item(skinny_tree, hf_skinny_callingPartyName, tvb, i, count, ENC_ASCII|ENC_NA);
2842           i += count;
2843           count = tvb_strnlen(tvb, i, -1)+1;
2844           proto_tree_add_item(skinny_tree, hf_skinny_calledPartyName, tvb, i, count, ENC_ASCII|ENC_NA);
2845           i += count;
2846           count = tvb_strnlen(tvb, i, -1)+1;
2847           proto_tree_add_item(skinny_tree, hf_skinny_originalCalledPartyName, tvb, i, count, ENC_ASCII|ENC_NA);
2848           i += count;
2849           count = tvb_strnlen(tvb, i, -1)+1;
2850           proto_tree_add_item(skinny_tree, hf_cast_lastRedirectingPartyName, tvb, i, count, ENC_ASCII|ENC_NA);
2851         }
2852         else if(hdr_version == CM7_MSG_TYPE_B || hdr_version == CM7_MSG_TYPE_A)
2853         {/* I'm not sure. Not enough examples. */
2854           /* 8x party numbers */
2855           count = tvb_strnlen(tvb, i, -1)+1;
2856           proto_tree_add_item(skinny_tree, hf_skinny_callingPartyNumber, tvb, i, count, ENC_ASCII|ENC_NA);
2857           i += count;
2858           count = tvb_strnlen(tvb, i, -1)+1;
2859           proto_tree_add_item(skinny_tree, hf_cast_cgpnVoiceMailbox, tvb, i, count, ENC_ASCII|ENC_NA);
2860           i += count;
2861           count = tvb_strnlen(tvb, i, -1)+1;
2862           proto_tree_add_item(skinny_tree, hf_skinny_calledPartyNumber, tvb, i, count, ENC_ASCII|ENC_NA);
2863           i += count;
2864           count = tvb_strnlen(tvb, i, -1)+1;
2865           proto_tree_add_item(skinny_tree, hf_skinny_originalCalledParty, tvb, i, count, ENC_ASCII|ENC_NA);
2866           i += count;
2867           count = tvb_strnlen(tvb, i, -1)+1;
2868           proto_tree_add_item(skinny_tree, hf_cast_lastRedirectingParty, tvb, i, count, ENC_ASCII|ENC_NA);
2869           i += count;
2870           count = tvb_strnlen(tvb, i, -1)+1;
2871           proto_tree_add_item(skinny_tree, hf_cast_cdpnVoiceMailbox, tvb, i, count, ENC_ASCII|ENC_NA);
2872           i += count;
2873           count = tvb_strnlen(tvb, i, -1)+1;
2874           proto_tree_add_item(skinny_tree, hf_cast_originalCdpnVoiceMailbox, tvb, i, count, ENC_ASCII|ENC_NA);
2875           i += count;
2876           count = tvb_strnlen(tvb, i, -1)+1;
2877           proto_tree_add_item(skinny_tree, hf_cast_lastRedirectingVoiceMailbox, tvb, i, count, ENC_ASCII|ENC_NA);
2878           i += count;
2879           /* 4x party names */
2880           count = tvb_strnlen(tvb, i, -1)+1;
2881           proto_tree_add_item(skinny_tree, hf_skinny_callingPartyName, tvb, i, count, ENC_ASCII|ENC_NA);
2882           i += count;
2883           count = tvb_strnlen(tvb, i, -1)+1;
2884           proto_tree_add_item(skinny_tree, hf_skinny_calledPartyName, tvb, i, count, ENC_ASCII|ENC_NA);
2885           i += count;
2886           count = tvb_strnlen(tvb, i, -1)+1;
2887           proto_tree_add_item(skinny_tree, hf_skinny_originalCalledPartyName, tvb, i, count, ENC_ASCII|ENC_NA);
2888           i += count;
2889           count = tvb_strnlen(tvb, i, -1)+1;
2890           proto_tree_add_item(skinny_tree, hf_cast_lastRedirectingPartyName, tvb, i, count, ENC_ASCII|ENC_NA);
2891         }
2892       }
2893       break;
2894
2895     case 0x0152: /* DialedPhoneBookAckMessage */
2896       proto_tree_add_item(skinny_tree, hf_skinny_directoryIndex, tvb, offset+12, 4, ENC_LITTLE_ENDIAN);
2897       proto_tree_add_item(skinny_tree, hf_skinny_lineInstance, tvb, offset+16, 4, ENC_LITTLE_ENDIAN);
2898       proto_tree_add_item(skinny_tree, hf_skinny_unknown, tvb, offset+20, 4, ENC_LITTLE_ENDIAN);
2899       proto_tree_add_item(skinny_tree, hf_skinny_unknown, tvb, offset+24, 4, ENC_LITTLE_ENDIAN);
2900       break;
2901
2902     case 0x015A: /* XMLAlarmMessage */
2903       dissect_skinny_xml(skinny_tree, tvb, pinfo, offset+12, hdr_data_length-4);
2904       break;
2905
2906     default:
2907       proto_tree_add_item(skinny_tree, hf_skinny_rawData, tvb, offset+12, hdr_data_length-4, ENC_NA);
2908       break;
2909     }
2910   }
2911   tap_queue_packet(skinny_tap, pinfo, si);
2912 }
2913
2914
2915 /* Code to actually dissect the packets */
2916 static gboolean
2917 dissect_skinny(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
2918 {
2919   /* The general structure of a packet: {IP-Header|TCP-Header|n*SKINNY}
2920    * SKINNY-Packet: {Header(Size, Reserved)|Data(MessageID, Message-Data)}
2921    */
2922   /* Header fields */
2923   guint32 hdr_data_length;
2924   guint32 hdr_version;
2925
2926   /* check, if this is really an SKINNY packet, they start with a length + 0 */
2927
2928   if (tvb_length_remaining(tvb, 0) < 8)
2929   {
2930     return FALSE;
2931   }
2932   /* get relevant header information */
2933   hdr_data_length = tvb_get_letohl(tvb, 0);
2934   hdr_version     = tvb_get_letohl(tvb, 4);
2935
2936   /*  data_size       = MIN(8+hdr_data_length, tvb_length(tvb)) - 0xC; */
2937
2938   if ((hdr_data_length < 4) ||
2939       ((hdr_version != BASIC_MSG_TYPE) &&
2940        (hdr_version != CM7_MSG_TYPE_A) &&
2941        (hdr_version != CM7_MSG_TYPE_B))
2942      )
2943   {
2944       /* Not an SKINNY packet, just happened to use the same port */
2945     return FALSE;
2946   }
2947
2948   /* Make entries in Protocol column and Info column on summary display */
2949   col_set_str(pinfo->cinfo, COL_PROTOCOL, "SKINNY");
2950
2951   col_set_str(pinfo->cinfo, COL_INFO, "Skinny Client Control Protocol");
2952
2953   tcp_dissect_pdus(tvb, pinfo, tree, skinny_desegment, 4,
2954         get_skinny_pdu_len, dissect_skinny_pdu);
2955
2956   return TRUE;
2957 }
2958
2959 /* Register the protocol with Wireshark */
2960 void
2961 proto_register_skinny(void)
2962 {
2963
2964   /* Setup list of header fields */
2965   static hf_register_info hf[] = {
2966     { &hf_skinny_data_length,
2967       { "Data length", "skinny.data_length",
2968         FT_UINT32, BASE_DEC, NULL, 0x0,
2969         "Number of bytes in the data portion.",
2970         HFILL }
2971     },
2972     { &hf_skinny_hdr_version,
2973       { "Header version", "skinny.hdr_version",
2974         FT_UINT32, BASE_HEX, VALS(header_version), 0x0,
2975         NULL,
2976         HFILL }
2977     },
2978     /* FIXME: Enable use of message name ???  */
2979     { &hf_skinny_messageid,
2980       { "Message ID", "skinny.messageid",
2981         FT_UINT32, BASE_HEX|BASE_EXT_STRING, &message_id_ext, 0x0,
2982         "The function requested/done with this message.",
2983         HFILL }
2984     },
2985
2986     { &hf_skinny_deviceName,
2987       { "Device name", "skinny.deviceName",
2988         FT_STRING, BASE_NONE, NULL, 0x0,
2989         "The device name of the phone.",
2990         HFILL }
2991     },
2992
2993     { &hf_skinny_stationUserId,
2994       { "Station user ID", "skinny.stationUserId",
2995         FT_UINT32, BASE_DEC, NULL, 0x0,
2996         NULL,
2997         HFILL }
2998     },
2999
3000     { &hf_skinny_stationInstance,
3001       { "Station instance", "skinny.stationInstance",
3002         FT_UINT32, BASE_DEC, NULL, 0x0,
3003         NULL,
3004         HFILL }
3005     },
3006
3007     { &hf_skinny_deviceType,
3008       { "Device type", "skinny.deviceType",
3009         FT_UINT32, BASE_DEC|BASE_EXT_STRING, &deviceTypes_ext, 0x0,
3010         "DeviceType of the station.",
3011         HFILL }
3012     },
3013
3014     { &hf_skinny_maxStreams,
3015       { "Max streams", "skinny.maxStreams",
3016         FT_UINT32, BASE_DEC, NULL, 0x0,
3017         "32 bit unsigned integer indicating the maximum number of simultansous RTP duplex streams that the client can handle.",
3018         HFILL }
3019     },
3020
3021     { &hf_skinny_stationIpPort,
3022       { "Station ip port", "skinny.stationIpPort",
3023         FT_UINT16, BASE_DEC, NULL, 0x0,
3024         NULL,
3025         HFILL }
3026     },
3027
3028     { &hf_skinny_stationKeypadButton,
3029       { "Keypad button", "skinny.stationKeypadButton",
3030         FT_UINT32, BASE_HEX|BASE_EXT_STRING, &keypadButtons_ext, 0x0,
3031         "The button pressed on the phone.",
3032         HFILL }
3033     },
3034
3035     { &hf_skinny_calledPartyNumber,
3036       { "Called party number", "skinny.calledParty",
3037         FT_STRING, BASE_NONE, NULL, 0x0,
3038         "The number called.",
3039         HFILL }
3040     },
3041
3042     { &hf_skinny_stimulus,
3043       { "Stimulus", "skinny.stimulus",
3044         FT_UINT32, BASE_HEX|BASE_EXT_STRING, &deviceStimuli_ext, 0x0,
3045         "Reason for the device stimulus message.",
3046         HFILL }
3047     },
3048
3049     { &hf_skinny_stimulusInstance,
3050       { "Stimulus instance", "skinny.stimulusInstance",
3051         FT_UINT32, BASE_DEC, NULL, 0x0,
3052         NULL,
3053         HFILL }
3054     },
3055
3056     { &hf_skinny_lineNumber,
3057       { "Line number", "skinny.lineNumber",
3058         FT_UINT32, BASE_DEC, NULL, 0x0,
3059         NULL,
3060         HFILL }
3061     },
3062
3063     { &hf_skinny_speedDialNumber,
3064       { "Speed-dial number", "skinny.speedDialNumber",
3065         FT_UINT32, BASE_DEC, NULL, 0x0,
3066         "Which speed dial number",
3067         HFILL }
3068     },
3069
3070     { &hf_skinny_capCount,
3071       { "Capabilities count", "skinny.capCount",
3072         FT_UINT32, BASE_DEC, NULL, 0x0,
3073         "How many capabilities",
3074         HFILL }
3075     },
3076
3077     { &hf_skinny_payloadCapability,
3078       { "Payload capability", "skinny.payloadCapability",
3079         FT_UINT32, BASE_DEC|BASE_EXT_STRING, &mediaPayloads_ext, 0x0,
3080         "The payload capability for this media capability structure.",
3081         HFILL }
3082     },
3083
3084     { &hf_skinny_maxFramesPerPacket,
3085       { "Max frames per packet", "skinny.maxFramesPerPacket",
3086         FT_UINT16, BASE_DEC, NULL, 0x0,
3087         NULL,
3088         HFILL }
3089     },
3090
3091     { &hf_skinny_alarmSeverity,
3092       { "Alarm severity", "skinny.alarmSeverity",
3093         FT_UINT32, BASE_DEC|BASE_EXT_STRING, &alarmSeverities_ext, 0x0,
3094         "The severity of the reported alarm.",
3095         HFILL }
3096     },
3097
3098     { &hf_skinny_alarmParam1,
3099       { "Alarm param 1", "skinny.alarmParam1",
3100         FT_UINT32, BASE_HEX, NULL, 0x0,
3101         "An as yet undecoded param1 value from the alarm message",
3102         HFILL }
3103     },
3104
3105     { &hf_skinny_alarmParam2,
3106       { "Alarm param 2", "skinny.alarmParam2",
3107         FT_IPv4, BASE_NONE, NULL, 0x0,
3108         "This is the second alarm parameter i think it's an ip address",
3109         HFILL }
3110     },
3111
3112     { &hf_skinny_receptionStatus,
3113       { "Reception status", "skinny.receptionStatus",
3114         FT_UINT32, BASE_DEC, VALS(multicastMediaReceptionStatus), 0x0,
3115         "The current status of the multicast media.",
3116         HFILL }
3117     },
3118
3119     { &hf_skinny_passThruPartyID,
3120       { "Pass-thru party ID", "skinny.passThruPartyID",
3121         FT_UINT32, BASE_DEC, NULL, 0x0,
3122         NULL,
3123         HFILL }
3124     },
3125
3126     { &hf_skinny_ORCStatus,
3127       { "Opened receive-channel status", "skinny.openReceiveChannelStatus",
3128         FT_UINT32, BASE_DEC, VALS(openReceiveChanStatus), 0x0,
3129         NULL,
3130         HFILL }
3131     },
3132
3133     { &hf_skinny_ipAddress,
3134       { "IP address", "skinny.ipAddress",
3135         FT_IPv4, BASE_NONE, NULL, 0x0,
3136         NULL,
3137         HFILL }
3138     },
3139
3140     { &hf_skinny_portNumber,
3141       { "Port number", "skinny.portNumber",
3142         FT_UINT32, BASE_DEC, NULL, 0x0,
3143         NULL,
3144         HFILL }
3145     },
3146
3147     { &hf_skinny_statsProcessingType,
3148       { "Stats processing type", "skinny.statsProcessingType",
3149         FT_UINT32, BASE_DEC, VALS(statsProcessingTypes), 0x0,
3150         "What do do after you send the stats.",
3151         HFILL }
3152     },
3153
3154     { &hf_skinny_callIdentifier,
3155       { "Call identifier", "skinny.callIdentifier",
3156         FT_UINT32, BASE_DEC, NULL, 0x0,
3157         NULL,
3158         HFILL }
3159     },
3160
3161     { &hf_skinny_packetsSent,
3162       { "Packets sent", "skinny.packetsSent",
3163         FT_UINT32, BASE_DEC, NULL, 0x0,
3164         NULL,
3165         HFILL }
3166     },
3167
3168     { &hf_skinny_octetsSent,
3169       { "Octets sent", "skinny.octetsSent",
3170         FT_UINT32, BASE_DEC, NULL, 0x0,
3171         NULL,
3172         HFILL }
3173     },
3174
3175     { &hf_skinny_packetsRecv,
3176       { "Packets Received", "skinny.packetsRecv",
3177         FT_UINT32, BASE_DEC, NULL, 0x0,
3178         NULL,
3179         HFILL }
3180     },
3181
3182     { &hf_skinny_octetsRecv,
3183       { "Octets received", "skinny.octetsRecv",
3184         FT_UINT32, BASE_DEC, NULL, 0x0,
3185         NULL,
3186         HFILL }
3187     },
3188
3189     { &hf_skinny_packetsLost,
3190       { "Packets lost", "skinny.packetsLost",
3191         FT_UINT32, BASE_DEC, NULL, 0x0,
3192         NULL,
3193         HFILL }
3194     },
3195
3196     { &hf_skinny_latency,
3197       { "Latency(ms)", "skinny.latency",
3198         FT_UINT32, BASE_DEC, NULL, 0x0,
3199         "Average packet latency during the call.",
3200         HFILL }
3201     },
3202
3203     { &hf_skinny_jitter,
3204       { "Jitter", "skinny.jitter",
3205         FT_UINT32, BASE_DEC, NULL, 0x0,
3206         "Average jitter during the call.",
3207         HFILL }
3208     },
3209
3210     { &hf_skinny_directoryNumber,
3211       { "Directory number", "skinny.directoryNumber",
3212         FT_STRING, BASE_NONE, NULL, 0x0,
3213         "The number we are reporting statistics for.",
3214         HFILL }
3215     },
3216
3217     { &hf_skinny_lineInstance,
3218       { "Line instance", "skinny.lineInstance",
3219         FT_UINT32, BASE_DEC, NULL, 0x0,
3220         "The display call plane associated with this call.",
3221         HFILL }
3222     },
3223
3224     { &hf_skinny_softKeyEvent,
3225       { "Soft-key event", "skinny.softKeyEvent",
3226         FT_UINT32, BASE_DEC|BASE_EXT_STRING, &softKeyEvents_ext, 0x0,
3227         "Which softkey event is being reported.",
3228         HFILL }
3229     },
3230
3231     { &hf_skinny_keepAliveInterval,
3232       { "Keep-alive interval", "skinny.keepAliveInterval",
3233         FT_UINT32, BASE_DEC, NULL, 0x0,
3234         "How often are keep alives exchanges between the client and the call manager.",
3235         HFILL }
3236     },
3237
3238     { &hf_skinny_secondaryKeepAliveInterval,
3239       { "Secondary keep-alive interval", "skinny.secondaryKeepAliveInterval",
3240         FT_UINT32, BASE_DEC, NULL, 0x0,
3241         "How often are keep alives exchanges between the client and the secondary call manager.",
3242         HFILL }
3243     },
3244
3245     { &hf_skinny_dateTemplate,
3246       { "Date template", "skinny.dateTemplate",
3247         FT_STRING, BASE_NONE, NULL, 0x0,
3248         "The display format for the date/time on the phone.",
3249         HFILL }
3250     },
3251
3252     { &hf_skinny_buttonOffset,
3253       { "Button offset", "skinny.buttonOffset",
3254         FT_UINT32, BASE_DEC, NULL, 0x0,
3255         "Offset is the number of the first button referenced by this message.",
3256         HFILL }
3257     },
3258
3259     { &hf_skinny_buttonCount,
3260       { "Buttons count", "skinny.buttonCount",
3261         FT_UINT32, BASE_DEC, NULL, 0x0,
3262         "Number of (VALID) button definitions in this message.",
3263         HFILL }
3264     },
3265
3266     { &hf_skinny_totalButtonCount,
3267       { "Total buttons count", "skinny.totalButtonCount",
3268         FT_UINT32, BASE_DEC, NULL, 0x0,
3269         "The total number of buttons defined for this phone.",
3270         HFILL }
3271     },
3272
3273     { &hf_skinny_buttonInstanceNumber,
3274       { "Instance number", "skinny.buttonInstanceNumber",
3275         FT_UINT8, BASE_HEX|BASE_EXT_STRING, &keypadButtons_ext, 0x0,
3276         "The button instance number for a button or the StationKeyPad value, repeats allowed.",
3277         HFILL }
3278     },
3279
3280     { &hf_skinny_buttonDefinition,
3281       { "Button definition", "skinny.buttonDefinition",
3282         FT_UINT8, BASE_HEX|BASE_EXT_STRING, &buttonDefinitions_ext, 0x0,
3283         "The button type for this instance (ie line, speed dial, ....",
3284         HFILL }
3285     },
3286
3287     { &hf_skinny_softKeyOffset,
3288       { "Soft-Key offset", "skinny.softKeyOffset",
3289         FT_UINT32, BASE_DEC, NULL, 0x0,
3290         "The offset for the first soft key in this message.",
3291         HFILL }
3292     },
3293
3294     { &hf_skinny_softKeyCount,
3295       { "Soft-keys count", "skinny.softKeyCount",
3296         FT_UINT32, BASE_DEC, NULL, 0x0,
3297         "The number of valid softkeys in this message.",
3298         HFILL }
3299     },
3300
3301     { &hf_skinny_totalSoftKeyCount,
3302       { "Total soft-keys count", "skinny.totalSoftKeyCount",
3303         FT_UINT32, BASE_DEC, NULL, 0x0,
3304         "The total number of softkeys for this device.",
3305         HFILL }
3306     },
3307
3308     { &hf_skinny_softKeyLabel,
3309       { "Soft-key label", "skinny.softKeyLabel",
3310         FT_STRING, BASE_NONE, NULL, 0x0,
3311         "The text label for this soft key.",
3312         HFILL }
3313     },
3314
3315     { &hf_skinny_softKeySetOffset,
3316       { "Soft-key-set offset", "skinny.softKeySetOffset",
3317         FT_UINT32, BASE_DEC, NULL, 0x0,
3318         "The offset for the first soft key set in this message.",
3319         HFILL }
3320     },
3321
3322     { &hf_skinny_softKeySetCount,
3323       { "Soft-key-sets count", "skinny.softKeySetCount",
3324         FT_UINT32, BASE_DEC, NULL, 0x0,
3325         "The number of valid softkey sets in this message.",
3326         HFILL }
3327     },
3328
3329     { &hf_skinny_totalSoftKeySetCount,
3330       { "Total soft-key-sets count", "skinny.totalSoftKeySetCount",
3331         FT_UINT32, BASE_DEC, NULL, 0x0,
3332         "The total number of softkey sets for this device.",
3333         HFILL }
3334     },
3335
3336     { &hf_skinny_softKeyTemplateIndex,
3337       { "Soft-key template index", "skinny.softKeyTemplateIndex",
3338         FT_UINT8, BASE_DEC|BASE_EXT_STRING, &softKeyEvents_ext, 0x0,
3339         "Array of size 16 8-bit unsigned ints containing an index into the softKeyTemplate.",
3340         HFILL }
3341     },
3342
3343     { &hf_skinny_softKeyInfoIndex,
3344       { "Soft-key info index", "skinny.softKeyInfoIndex",
3345         FT_UINT16, BASE_DEC|BASE_EXT_STRING, &softKeyIndexes_ext, 0x0,
3346         "Array of size 16 16-bit unsigned integers containing an index into the soft key description information.",
3347         HFILL }
3348     },
3349
3350     { &hf_skinny_softKeySetDescription,
3351       { "Soft-key set description", "skinny.softKeySetDescription",
3352         FT_UINT8, BASE_DEC|BASE_EXT_STRING, &keySetNames_ext, 0x0,
3353         "A text description of what this softkey when this softkey set is displayed",
3354         HFILL }
3355     },
3356
3357     { &hf_skinny_softKeyMap,
3358       { "Soft-key map","skinny.softKeyMap",
3359         FT_UINT16, BASE_HEX, NULL, 0x0,
3360         NULL,
3361         HFILL }
3362     },
3363
3364     { &hf_skinny_softKey0,
3365       { "SoftKey0", "skinny.softKeyMap.0",
3366         FT_BOOLEAN, 16, TFS(&softKeyMapValues), SKINNY_SOFTKEY0,
3367         NULL,
3368         HFILL }
3369     },
3370
3371     { &hf_skinny_softKey1,
3372       { "SoftKey1", "skinny.softKeyMap.1",
3373         FT_BOOLEAN, 16, TFS(&softKeyMapValues), SKINNY_SOFTKEY1,
3374         NULL,
3375         HFILL }
3376     },
3377
3378     { &hf_skinny_softKey2,
3379       { "SoftKey2", "skinny.softKeyMap.2",
3380         FT_BOOLEAN, 16, TFS(&softKeyMapValues), SKINNY_SOFTKEY2,
3381         NULL,
3382         HFILL }
3383     },
3384
3385     { &hf_skinny_softKey3,
3386       { "SoftKey3", "skinny.softKeyMap.3",
3387         FT_BOOLEAN, 16, TFS(&softKeyMapValues), SKINNY_SOFTKEY3,
3388         NULL,
3389         HFILL }
3390     },
3391
3392     { &hf_skinny_softKey4,
3393       { "SoftKey4", "skinny.softKeyMap.4",
3394         FT_BOOLEAN, 16, TFS(&softKeyMapValues), SKINNY_SOFTKEY4,
3395         NULL,
3396         HFILL }
3397     },
3398
3399     { &hf_skinny_softKey5,
3400       { "SoftKey5", "skinny.softKeyMap.5",
3401         FT_BOOLEAN, 16, TFS(&softKeyMapValues), SKINNY_SOFTKEY5,
3402         NULL,
3403         HFILL }
3404     },
3405
3406     { &hf_skinny_softKey6,
3407       { "SoftKey6", "skinny.softKeyMap.6",
3408         FT_BOOLEAN, 16, TFS(&softKeyMapValues), SKINNY_SOFTKEY6,
3409         NULL,
3410         HFILL }
3411     },
3412
3413     { &hf_skinny_softKey7,
3414       { "SoftKey7", "skinny.softKeyMap.7",
3415         FT_BOOLEAN, 16, TFS(&softKeyMapValues), SKINNY_SOFTKEY7,
3416         NULL,
3417         HFILL }
3418     },
3419
3420     { &hf_skinny_softKey8,
3421       { "SoftKey8", "skinny.softKeyMap.8",
3422         FT_BOOLEAN, 16, TFS(&softKeyMapValues), SKINNY_SOFTKEY8,
3423         NULL,
3424         HFILL }
3425     },
3426
3427     { &hf_skinny_softKey9,
3428       { "SoftKey9", "skinny.softKeyMap.9",
3429         FT_BOOLEAN, 16, TFS(&softKeyMapValues), SKINNY_SOFTKEY9,
3430         NULL,
3431         HFILL }
3432     },
3433
3434     { &hf_skinny_softKey10,
3435       { "SoftKey10", "skinny.softKeyMap.10",
3436         FT_BOOLEAN, 16, TFS(&softKeyMapValues), SKINNY_SOFTKEY10,
3437         NULL,
3438         HFILL }
3439     },
3440
3441     { &hf_skinny_softKey11,
3442       { "SoftKey11", "skinny.softKeyMap.11",
3443         FT_BOOLEAN, 16, TFS(&softKeyMapValues), SKINNY_SOFTKEY11,
3444         NULL,
3445         HFILL }
3446     },
3447
3448     { &hf_skinny_softKey12,
3449       { "SoftKey12", "skinny.softKeyMap.12",
3450         FT_BOOLEAN, 16, TFS(&softKeyMapValues), SKINNY_SOFTKEY12,
3451         NULL,
3452         HFILL }
3453     },
3454
3455     { &hf_skinny_softKey13,
3456       { "SoftKey13", "skinny.softKeyMap.13",
3457         FT_BOOLEAN, 16, TFS(&softKeyMapValues), SKINNY_SOFTKEY13,
3458         NULL,
3459         HFILL }
3460     },
3461
3462     { &hf_skinny_softKey14,
3463       { "SoftKey14", "skinny.softKeyMap.14",
3464         FT_BOOLEAN, 16, TFS(&softKeyMapValues), SKINNY_SOFTKEY14,
3465         NULL,
3466         HFILL }
3467     },
3468
3469     { &hf_skinny_softKey15,
3470       { "SoftKey15", "skinny.softKeyMap.15",
3471         FT_BOOLEAN, 16, TFS(&softKeyMapValues), SKINNY_SOFTKEY15,
3472         NULL,
3473         HFILL }
3474     },
3475
3476     { &hf_skinny_lampMode,
3477       { "Lamp mode", "skinny.lampMode",
3478         FT_UINT32, BASE_DEC|BASE_EXT_STRING, &stationLampModes_ext, 0x0,
3479         NULL,
3480         HFILL }
3481     },
3482
3483     { &hf_skinny_messageTimeOutValue,
3484       { "Message time-out", "skinny.messageTimeOutValue",
3485         FT_UINT32, BASE_DEC, NULL, 0x0,
3486         "The timeout in seconds for this message",
3487         HFILL }
3488     },
3489
3490     { &hf_skinny_displayMessage,
3491       { "Display message", "skinny.displayMessage",
3492         FT_STRING, BASE_NONE, NULL, 0x0,
3493         "The message displayed on the phone.",
3494         HFILL }
3495     },
3496
3497     { &hf_skinny_lineDirNumber,
3498       { "Line directory number", "skinny.lineDirNumber",
3499         FT_STRING, BASE_NONE, NULL, 0x0,
3500         "The directory number for this line.",
3501         HFILL }
3502     },
3503
3504     { &hf_skinny_lineFullyQualifiedDisplayName,
3505       { "Fully qualified display name", "skinny.fqdn",
3506         FT_STRING, BASE_NONE, NULL, 0x0,
3507         "The full display name for this line.",
3508         HFILL }
3509     },
3510
3511     { &hf_skinny_lineDisplayName,
3512       { "Display name", "skinny.displayName",
3513         FT_STRING, BASE_NONE, NULL, 0x0,
3514         "The display name for this line.",
3515         HFILL }
3516     },
3517
3518     { &hf_skinny_speedDialDirNumber,
3519       { "Speed-dial number", "skinny.speedDialDirNum",
3520         FT_STRING, BASE_NONE, NULL, 0x0,
3521         "the number to dial for this speed dial.",
3522         HFILL }
3523     },
3524
3525     { &hf_skinny_speedDialDisplayName,
3526       { "Speed-dial display", "skinny.speedDialDisplay",
3527         FT_STRING, BASE_NONE, NULL, 0x0,
3528         "The text to display for this speed dial.",
3529         HFILL }
3530     },
3531
3532     { &hf_skinny_dateYear,
3533       { "Year", "skinny.year",
3534         FT_UINT32, BASE_DEC, NULL, 0x0,
3535         "The current year",
3536         HFILL }
3537     },
3538
3539     { &hf_skinny_dateMonth,
3540       { "Month", "skinny.month",
3541         FT_UINT32, BASE_DEC, NULL, 0x0,
3542         "The current month",
3543         HFILL }
3544     },
3545
3546     { &hf_skinny_dayOfWeek,
3547       { "Day of week", "skinny.dayOfWeek",
3548         FT_UINT32, BASE_DEC, NULL, 0x0,
3549         "The day of the week",
3550         HFILL }
3551     },
3552
3553     { &hf_skinny_dateDay,
3554       { "Day", "skinny.day",
3555         FT_UINT32, BASE_DEC, NULL, 0x0,
3556         "The day of the current month",
3557         HFILL }
3558     },
3559
3560     { &hf_skinny_dateHour,
3561       { "Hour", "skinny.hour",
3562         FT_UINT32, BASE_DEC, NULL, 0x0,
3563         "Hour of the day",
3564         HFILL }
3565     },
3566
3567     { &hf_skinny_dateMinute,
3568       { "Minute", "skinny.minute",
3569         FT_UINT32, BASE_DEC, NULL, 0x0,
3570         NULL,
3571         HFILL }
3572     },
3573
3574     { &hf_skinny_dateSeconds,
3575       { "Seconds", "skinny.dateSeconds",
3576         FT_UINT32, BASE_DEC, NULL, 0x0,
3577         NULL,
3578         HFILL }
3579     },
3580
3581     { &hf_skinny_dateMilliseconds,
3582       { "Milliseconds", "skinny.dateMilliseconds",
3583         FT_UINT32, BASE_DEC, NULL, 0x0,
3584         NULL,
3585         HFILL }
3586     },
3587
3588     { &hf_skinny_timeStamp,
3589       { "Timestamp", "skinny.timeStamp",
3590         FT_UINT32, BASE_DEC, NULL, 0x0,
3591         "Time stamp for the call reference",
3592         HFILL }
3593     },
3594     { &hf_skinny_callState,
3595       { "Call state", "skinny.callState",
3596         FT_UINT32, BASE_DEC|BASE_EXT_STRING, &skinny_stationCallStates_ext, 0x0,
3597         "The D channel call state of the call",
3598         HFILL }
3599     },
3600
3601     { &hf_skinny_deviceTone,
3602       { "Tone", "skinny.deviceTone",
3603         FT_UINT32, BASE_HEX|BASE_EXT_STRING, &skinny_deviceTones_ext, 0x0,
3604         "Which tone to play",
3605         HFILL }
3606     },
3607
3608     { &hf_skinny_callingPartyName,
3609       { "Calling party name", "skinny.callingPartyName",
3610         FT_STRING, BASE_NONE, NULL, 0x0,
3611         "The passed name of the calling party.",
3612         HFILL }
3613     },
3614
3615     { &hf_skinny_callingPartyNumber,
3616       { "Calling party number", "skinny.callingParty",
3617         FT_STRING, BASE_NONE, NULL, 0x0,
3618         "The passed number of the calling party.",
3619         HFILL }
3620     },
3621
3622     { &hf_skinny_calledPartyName,
3623       { "Called party name", "skinny.calledPartyName",
3624         FT_STRING, BASE_NONE, NULL, 0x0,
3625         "The name of the party we are calling.",
3626         HFILL }
3627     },
3628
3629     { &hf_skinny_callType,
3630       { "Call type", "skinny.callType",
3631         FT_UINT32, BASE_DEC, VALS(skinny_callTypes), 0x0,
3632         "What type of call, in/out/etc",
3633         HFILL }
3634     },
3635
3636     { &hf_skinny_originalCalledPartyName,
3637       { "Original called party name", "skinny.originalCalledPartyName",
3638         FT_STRING, BASE_NONE, NULL, 0x0,
3639         NULL,
3640         HFILL }
3641     },
3642
3643     { &hf_skinny_originalCalledParty,
3644       { "Original called party number", "skinny.originalCalledParty",
3645         FT_STRING, BASE_NONE, NULL, 0x0,
3646         NULL,
3647         HFILL }
3648     },
3649
3650     { &hf_skinny_ringType,
3651       { "Ring type", "skinny.ringType",
3652         FT_UINT32, BASE_HEX|BASE_EXT_STRING, &skinny_ringTypes_ext, 0x0,
3653         "What type of ring to play",
3654         HFILL }
3655     },
3656
3657     { &hf_skinny_ringMode,
3658       { "Ring mode", "skinny.ringMode",
3659         FT_UINT32, BASE_HEX, VALS(skinny_ringModes), 0x0,
3660         "What mode of ring to play",
3661         HFILL }
3662     },
3663
3664     { &hf_skinny_speakerMode,
3665       { "Speaker", "skinny.speakerMode",
3666         FT_UINT32, BASE_HEX, VALS(skinny_speakerModes), 0x0,
3667         "This message sets the speaker mode on/off",
3668         HFILL }
3669     },
3670
3671     { &hf_skinny_remoteIpAddr,
3672       { "Remote IP address", "skinny.remoteIpAddr",
3673         FT_IPv4, BASE_NONE, NULL, 0x0,
3674         "The remote end ip address for this stream",
3675         HFILL }
3676     },
3677
3678     { &hf_skinny_remotePortNumber,
3679       { "Remote port", "skinny.remotePortNumber",
3680         FT_UINT32, BASE_DEC, NULL, 0x0,
3681         "The remote port number listening for this stream",
3682         HFILL }
3683     },
3684
3685     { &hf_skinny_millisecondPacketSize,
3686       { "MS/packet", "skinny.millisecondPacketSize",
3687         FT_UINT32, BASE_DEC, NULL, 0x0,
3688         "The number of milliseconds of conversation in each packet",
3689         HFILL }
3690     },
3691
3692     { &hf_skinny_precedenceValue,
3693       { "Precedence", "skinny.precedenceValue",
3694         FT_UINT32, BASE_DEC, NULL, 0x0,
3695         NULL,
3696         HFILL }
3697     },
3698
3699     { &hf_skinny_silenceSuppression,
3700       { "Silence suppression", "skinny.silenceSuppression",
3701         FT_UINT32, BASE_HEX, VALS(skinny_silenceSuppressionModes), 0x0,
3702         "Mode for silence suppression",
3703         HFILL }
3704     },
3705
3706     { &hf_skinny_g723BitRate,
3707       { "G723 bitrate", "skinny.g723BitRate",
3708         FT_UINT32, BASE_DEC, VALS(skinny_g723BitRates), 0x0,
3709         "The G723 bit rate for this stream/JUNK if not g723 stream",
3710         HFILL }
3711     },
3712
3713     { &hf_skinny_conferenceID,
3714       { "Conference ID", "skinny.conferenceID",
3715         FT_UINT32, BASE_DEC, NULL, 0x0,
3716         NULL,
3717         HFILL }
3718     },
3719
3720     { &hf_skinny_deviceResetType,
3721       { "Reset type", "skinny.deviceResetType",
3722         FT_UINT32, BASE_DEC, VALS(skinny_deviceResetTypes), 0x0,
3723         "How the devices it to be reset (reset/restart)",
3724         HFILL }
3725     },
3726
3727     { &hf_skinny_echoCancelType,
3728       { "Echo-cancel type", "skinny.echoCancelType",
3729         FT_UINT32, BASE_DEC, VALS(skinny_echoCancelTypes), 0x0,
3730         "Is echo cancelling enabled or not",
3731         HFILL }
3732     },
3733
3734     { &hf_skinny_deviceUnregisterStatus,
3735       { "Unregister status", "skinny.deviceUnregisterStatus",
3736         FT_UINT32, BASE_DEC, VALS(skinny_deviceUnregisterStatusTypes), 0x0,
3737         "The status of the device unregister request (*CAN* be refused)",
3738         HFILL }
3739     },
3740
3741     { &hf_skinny_hookFlashDetectMode,
3742       { "Hook flash mode", "skinny.hookFlashDetectMode",
3743         FT_UINT32, BASE_DEC, VALS(skinny_hookFlashDetectModes), 0x0,
3744         "Which method to use to detect that a hook flash has occured",
3745         HFILL }
3746     },
3747
3748     { &hf_skinny_detectInterval,
3749       { "HF Detect Interval", "skinny.detectInterval",
3750         FT_UINT32, BASE_DEC, NULL, 0x0,
3751         "The number of milliseconds that determines a hook flash has occured",
3752         HFILL }
3753     },
3754
3755     { &hf_skinny_headsetMode,
3756       { "Headset mode", "skinny.headsetMode",
3757         FT_UINT32, BASE_DEC, VALS(skinny_headsetModes), 0x0,
3758         "Turns on and off the headset on the set",
3759         HFILL }
3760     },
3761
3762     { &hf_skinny_microphoneMode,
3763       { "Microphone mode", "skinny.microphoneMode",
3764         FT_UINT32, BASE_DEC, VALS(skinny_microphoneModes), 0x0,
3765         "Turns on and off the microphone on the set",
3766         HFILL }
3767     },
3768
3769     { &hf_skinny_activeForward,
3770       { "Active forward", "skinny.activeForward",
3771         FT_UINT32, BASE_DEC, NULL, 0x0,
3772         "This is non zero to indicate that a forward is active on the line",
3773         HFILL }
3774     },
3775
3776     { &hf_skinny_forwardAllActive,
3777       { "Forward all", "skinny.forwardAllActive",
3778         FT_UINT32, BASE_DEC, NULL, 0x0,
3779         "Forward all calls",
3780         HFILL }
3781     },
3782
3783     { &hf_skinny_forwardBusyActive,
3784       { "Forward busy", "skinny.forwardBusyActive",
3785         FT_UINT32, BASE_DEC, NULL, 0x0,
3786         "Forward calls when busy",
3787         HFILL }
3788     },
3789
3790     { &hf_skinny_forwardNoAnswerActive,
3791       { "Forward no answer", "skinny.forwardNoAnswerActive",
3792         FT_UINT32, BASE_DEC, NULL, 0x0,
3793         "Forward only when no answer",
3794         HFILL }
3795     },
3796
3797     { &hf_skinny_forwardNumber,
3798       { "Forward number", "skinny.forwardNumber",
3799         FT_STRING, BASE_NONE, NULL, 0x0,
3800         "The number to forward calls to.",
3801         HFILL }
3802     },
3803
3804     { &hf_skinny_userName,
3805       { "Username", "skinny.userName",
3806         FT_STRING, BASE_NONE, NULL, 0x0,
3807         "Username for this device.",
3808         HFILL }
3809     },
3810
3811     { &hf_skinny_serverName,
3812       { "Server name", "skinny.serverName",
3813         FT_STRING, BASE_NONE, NULL, 0x0,
3814         "The server name for this device.",
3815         HFILL }
3816     },
3817
3818     { &hf_skinny_numberLines,
3819       { "Number of lines", "skinny.numberLines",
3820         FT_UINT32, BASE_DEC, NULL, 0x0,
3821         "How many lines this device has",
3822         HFILL }
3823     },
3824
3825     { &hf_skinny_numberSpeedDials,
3826       { "Number of speed-dials", "skinny.numberSpeedDials",
3827         FT_UINT32, BASE_DEC, NULL, 0x0,
3828         "The number of speed dials this device has",
3829         HFILL }
3830     },
3831
3832     { &hf_skinny_sessionType,
3833       { "Session type", "skinny.sessionType",
3834         FT_UINT32, BASE_DEC|BASE_EXT_STRING, &skinny_sessionTypes_ext, 0x0,
3835         "The type of this session.",
3836         HFILL }
3837     },
3838
3839     { &hf_skinny_version,
3840       { "Version", "skinny.version",
3841         FT_STRING, BASE_NONE, NULL, 0x0,
3842         NULL,
3843         HFILL }
3844     },
3845
3846     { &hf_skinny_mediaEnunciationType,
3847       { "Enunciation type", "skinny.mediaEnunciationType",
3848         FT_UINT32, BASE_DEC, VALS(skinny_mediaEnunciationTypes), 0x0,
3849         NULL,
3850         HFILL }
3851     },
3852
3853     { &hf_skinny_serverIdentifier,
3854       { "Server identifier", "skinny.serverIdentifier",
3855         FT_STRING, BASE_NONE, NULL, 0x0,
3856         NULL,
3857         HFILL }
3858     },
3859
3860     { &hf_skinny_serverListenPort,
3861       { "Server port", "skinny.serverListenPort",
3862         FT_UINT32, BASE_DEC, NULL, 0x0,
3863         NULL,
3864         HFILL }
3865     },
3866
3867     { &hf_skinny_serverIpAddress,
3868       { "Server IP address", "skinny.serverIpAddress",
3869         FT_IPv4, BASE_NONE, NULL, 0x0,
3870         NULL,
3871         HFILL }
3872     },
3873
3874     { &hf_skinny_multicastPort,
3875       { "Multicast port", "skinny.multicastPort",
3876         FT_UINT32, BASE_DEC, NULL, 0x0,
3877         NULL,
3878         HFILL }
3879     },
3880
3881     { &hf_skinny_multicastIpAddress,
3882       { "Multicast IP address", "skinny.multicastIpAddress",
3883         FT_IPv4, BASE_NONE, NULL, 0x0,
3884         NULL,
3885         HFILL }
3886     },
3887
3888     { &hf_skinny_tokenRejWaitTime,
3889       { "Retry wait time", "skinny.tokenRejWaitTime",
3890         FT_UINT32, BASE_DEC, NULL, 0x0,
3891         NULL,
3892         HFILL }
3893     },
3894
3895     { &hf_skinny_unknown,
3896       { "Unknown data", "skinny.unknown",
3897         FT_UINT32, BASE_HEX, NULL, 0x0,
3898         "Place holder for unknown data.",
3899         HFILL }
3900     },
3901
3902     { &hf_skinny_rawData,
3903       { "Unknown raw data", "skinny.rawData",
3904         FT_BYTES, BASE_NONE, NULL, 0x0,
3905         "Place holder for unknown raw data.",
3906         HFILL }
3907     },
3908
3909     { &hf_skinny_xmlData,
3910       { "XML data", "skinny.xmlData",
3911         FT_STRING, BASE_NONE, NULL, 0x0,
3912         NULL,
3913         HFILL }
3914     },
3915
3916     { &hf_skinny_numberOfInServiceStreams,
3917       { "Number of in-service streams", "skinny.numberOfInServiceStreams",
3918         FT_UINT32, BASE_DEC, NULL, 0x0,
3919         NULL,
3920         HFILL }
3921     },
3922
3923     { &hf_skinny_maxStreamsPerConf,
3924       { "Max streams per conf", "skinny.maxStreamsPerConf",
3925         FT_UINT32, BASE_DEC, NULL, 0x0,
3926         NULL,
3927         HFILL }
3928     },
3929
3930     { &hf_skinny_numberOfOutOfServiceStreams,
3931       { "Number of out-of-service streams", "skinny.numberOfOutOfServiceStreams",
3932         FT_UINT32, BASE_DEC, NULL, 0x0,
3933         NULL,
3934         HFILL }
3935     },
3936
3937     { &hf_skinny_applicationID,
3938       { "Application ID", "skinny.applicationID",
3939         FT_UINT32, BASE_DEC, NULL, 0x0,
3940         "Application ID.",
3941         HFILL }
3942     },
3943
3944     { &hf_skinny_transactionID,
3945       { "Transaction ID", "skinny.transactionID",
3946         FT_UINT32, BASE_DEC, NULL, 0x0,
3947         NULL,
3948         HFILL }
3949     },
3950
3951     { &hf_skinny_serviceNum,
3952       { "Service number", "skinny.serviceNum",
3953         FT_UINT32, BASE_DEC, NULL, 0x0,
3954         NULL,
3955         HFILL }
3956     },
3957
3958     { &hf_skinny_serviceURLIndex,
3959       { "Service URL index", "skinny.serviceURLIndex",
3960         FT_UINT32, BASE_DEC, NULL, 0x0,
3961         NULL,
3962         HFILL }
3963     },
3964
3965     { &hf_skinny_featureIndex,
3966       { "Feature index", "skinny.featureIndex",
3967         FT_UINT32, BASE_DEC, NULL, 0x0,
3968         NULL,
3969         HFILL }
3970     },
3971
3972     { &hf_skinny_createConfResults,
3973       { "Create conf results", "skinny.createConfResults",
3974         FT_UINT32, BASE_DEC, VALS(skinny_createConfResults), 0x0,
3975         NULL,
3976         HFILL }
3977     },
3978
3979     { &hf_skinny_modifyConfResults,
3980       { "Modify conf results", "skinny.modifyConfResults",
3981         FT_UINT32, BASE_DEC|BASE_EXT_STRING, &skinny_modifyConfResults_ext, 0x0,
3982         NULL,
3983         HFILL }
3984     },
3985
3986     { &hf_skinny_deleteConfResults,
3987       { "Delete conf results", "skinny.deleteConfResults",
3988         FT_UINT32, BASE_DEC, VALS(skinny_deleteConfResults), 0x0,
3989         NULL,
3990         HFILL }
3991     },
3992
3993     { &hf_skinny_addParticipantResults,
3994       { "Add participant results", "skinny.addParticipantResults",
3995         FT_UINT32, BASE_DEC|BASE_EXT_STRING, &skinny_addParticipantResults_ext, 0x0,
3996         NULL,
3997         HFILL }
3998     },
3999
4000     { &hf_skinny_passThruData,
4001       { "Pass-thru data", "skinny.passThruData",
4002         FT_UINT8, BASE_HEX, NULL, 0x0,
4003         NULL,
4004         HFILL }
4005     },
4006
4007     { &hf_skinny_auditParticipantResults,
4008       { "Audit participant results", "skinny.auditParticipantResults",
4009         FT_UINT32, BASE_DEC, VALS(skinny_auditParticipantResults), 0x0,
4010         NULL,
4011         HFILL }
4012     },
4013
4014     { &hf_skinny_last,
4015       { "Last", "skinny.last",
4016         FT_UINT32, BASE_DEC, NULL, 0x0,
4017         NULL,
4018         HFILL }
4019     },
4020
4021     { &hf_skinny_numberOfEntries,
4022       { "Number of entries", "skinny.numberOfEntries",
4023         FT_UINT32, BASE_DEC, NULL, 0x0,
4024         NULL,
4025         HFILL }
4026     },
4027
4028     { &hf_skinny_participantEntry,
4029       { "Participant entry", "skinny.participantEntry",
4030         FT_UINT32, BASE_DEC, NULL, 0x0,
4031         NULL,
4032         HFILL }
4033     },
4034
4035     { &hf_skinny_resourceTypes,
4036       { "ResourceType", "skinny.resourceTypes",
4037         FT_UINT32, BASE_DEC, VALS(skinny_resourceTypes), 0x0,
4038         NULL,
4039         HFILL }
4040     },
4041
4042     { &hf_skinny_numberOfReservedParticipants,
4043       { "Number of reserved participants", "skinny.numberOfReservedParticipants",
4044         FT_UINT32, BASE_DEC, NULL, 0x0,
4045         NULL,
4046         HFILL }
4047     },
4048
4049     { &hf_skinny_numberOfActiveParticipants,
4050       { "Number of active participants", "skinny.numberOfActiveParticipants",
4051         FT_UINT32, BASE_DEC, NULL, 0x0,
4052         NULL,
4053         HFILL }
4054     },
4055
4056     { &hf_skinny_appID,
4057       { "Application ID", "skinny.appID",
4058         FT_UINT32, BASE_DEC, NULL, 0x0,
4059         NULL,
4060         HFILL }
4061     },
4062
4063     { &hf_skinny_appData,
4064       { "Application data", "skinny.appData",
4065         FT_UINT8, BASE_HEX, NULL, 0x0,
4066         NULL,
4067         HFILL }
4068     },
4069
4070     { &hf_skinny_appConfID,
4071       { "Application conf ID", "skinny.appConfID",
4072         FT_UINT8, BASE_HEX, NULL, 0x0,
4073         NULL,
4074         HFILL }
4075     },
4076
4077     { &hf_skinny_sequenceFlag,
4078       { "Sequence flag", "skinny.sequenceFlag",
4079         FT_UINT32, BASE_DEC, VALS(skinny_sequenceFlags), 0x0,
4080         NULL,
4081         HFILL }
4082     },
4083
4084     { &hf_skinny_displayPriority,
4085       { "Display priority", "skinny.displayPriority",
4086         FT_UINT32, BASE_DEC, NULL, 0x0,
4087         NULL,
4088         HFILL }
4089     },
4090
4091     { &hf_skinny_appInstanceID,
4092       { "Application instance ID", "skinny.appInstanceID",
4093         FT_UINT32, BASE_DEC, NULL, 0x0,
4094         NULL,
4095         HFILL }
4096     },
4097
4098     { &hf_skinny_routingID,
4099       { "Routing ID", "skinny.routingID",
4100         FT_UINT32, BASE_DEC, NULL, 0x0,
4101         NULL,
4102         HFILL }
4103     },
4104
4105     { &hf_skinny_audioCapCount,
4106       { "Audio cap count", "skinny.audioCapCount",
4107         FT_UINT32, BASE_DEC, NULL, 0x0,
4108         NULL,
4109         HFILL }
4110     },
4111
4112     { &hf_skinny_videoCapCount,
4113       { "Video cap count", "skinny.videoCapCount",
4114         FT_UINT32, BASE_DEC, NULL, 0x0,
4115         NULL,
4116         HFILL }
4117     },
4118
4119     { &hf_skinny_dataCapCount,
4120       { "Data cap count", "skinny.dataCapCount",
4121         FT_UINT32, BASE_DEC, NULL, 0x0,
4122         NULL,
4123         HFILL }
4124     },
4125
4126     { &hf_skinny_RTPPayloadFormat,
4127       { "RTP payload format", "skinny.RTPPayloadFormat",
4128         FT_UINT32, BASE_DEC, NULL, 0x0,
4129         NULL,
4130         HFILL }
4131     },
4132
4133     { &hf_skinny_customPictureFormatCount,
4134       { "Custom picture format count", "skinny.customPictureFormatCount",
4135         FT_UINT32, BASE_DEC, NULL, 0x0,
4136         NULL,
4137         HFILL }
4138     },
4139
4140     { &hf_skinny_pictureWidth,
4141       { "Picture width", "skinny.pictureWidth",
4142         FT_UINT32, BASE_DEC, NULL, 0x0,
4143         NULL,
4144         HFILL }
4145     },
4146
4147     { &hf_skinny_pictureHeight,
4148       { "Picture height", "skinny.pictureHeight",
4149         FT_UINT32, BASE_DEC, NULL, 0x0,
4150         NULL,
4151         HFILL }
4152     },
4153
4154     { &hf_skinny_pixelAspectRatio,
4155       { "Pixel aspect ratio", "skinny.pixelAspectRatio",
4156         FT_UINT32, BASE_DEC, NULL, 0x0,
4157         NULL,
4158         HFILL }
4159     },
4160
4161     { &hf_skinny_clockConversionCode,
4162       { "Clock conversion code", "skinny.clockConversionCode",
4163         FT_UINT32, BASE_DEC, NULL, 0x0,
4164         NULL,
4165         HFILL }
4166     },
4167
4168     { &hf_skinny_clockDivisor,
4169       { "Clock divisor", "skinny.clockDivisor",
4170         FT_UINT32, BASE_DEC, NULL, 0x0,
4171         NULL,
4172         HFILL }
4173     },
4174
4175     { &hf_skinny_activeStreamsOnRegistration,
4176       { "Active streams on registration", "skinny.activeStreamsOnRegistration",
4177         FT_UINT32, BASE_DEC, NULL, 0x0,
4178         NULL,
4179         HFILL }
4180     },
4181
4182     { &hf_skinny_maxBW,
4183       { "Max BW", "skinny.maxBW",
4184         FT_UINT32, BASE_DEC, NULL, 0x0,
4185         NULL,
4186         HFILL }
4187     },
4188
4189     { &hf_skinny_serviceResourceCount,
4190       { "Service resource count", "skinny.serviceResourceCount",
4191         FT_UINT32, BASE_DEC, NULL, 0x0,
4192         NULL,
4193         HFILL }
4194     },
4195
4196     { &hf_skinny_layoutCount,
4197       { "Layout count", "skinny.layoutCount",
4198         FT_UINT32, BASE_DEC, NULL, 0x0,
4199         NULL,
4200         HFILL }
4201     },
4202
4203     { &hf_skinny_layout,
4204       { "Layout", "skinny.layout",
4205         FT_UINT32, BASE_DEC|BASE_EXT_STRING, &skinny_Layouts_ext, 0x0,
4206         NULL,
4207         HFILL }
4208     },
4209
4210     { &hf_skinny_maxConferences,
4211       { "Max conferences", "skinny.maxConferences",
4212         FT_UINT32, BASE_DEC, NULL, 0x0,
4213         NULL,
4214         HFILL }
4215     },
4216
4217     { &hf_skinny_activeConferenceOnRegistration,
4218       { "Active conference on registration", "skinny.activeConferenceOnRegistration",
4219         FT_UINT32, BASE_DEC, NULL, 0x0,
4220         NULL,
4221         HFILL }
4222     },
4223
4224     { &hf_skinny_transmitOrReceive,
4225       { "Transmit or receive", "skinny.transmitOrReceive",
4226         FT_UINT32, BASE_DEC, VALS(skinny_transmitOrReceive), 0x0,
4227         NULL,
4228         HFILL }
4229     },
4230
4231     { &hf_skinny_levelPreferenceCount,
4232       { "Level preference count", "skinny.levelPreferenceCount",
4233         FT_UINT32, BASE_DEC, NULL, 0x0,
4234         NULL,
4235         HFILL }
4236     },
4237
4238     { &hf_skinny_transmitPreference,
4239       { "Transmit preference", "skinny.transmitPreference",
4240         FT_UINT32, BASE_DEC, NULL, 0x0,
4241         NULL,
4242         HFILL }
4243     },
4244
4245     { &hf_skinny_format,
4246       { "Format", "skinny.format",
4247         FT_UINT32, BASE_DEC|BASE_EXT_STRING, &skinny_formatTypes_ext, 0x0,
4248         NULL,
4249         HFILL }
4250     },
4251
4252     { &hf_skinny_maxBitRate,
4253       { "Max bitrate", "skinny.maxBitRate",
4254         FT_UINT32, BASE_DEC, NULL, 0x0,
4255         NULL,
4256         HFILL }
4257     },
4258
4259     { &hf_skinny_minBitRate,
4260       { "Min bitrate", "skinny.minBitRate",
4261         FT_UINT32, BASE_DEC, NULL, 0x0,
4262         NULL,
4263         HFILL }
4264     },
4265
4266     { &hf_skinny_MPI,
4267       { "MPI", "skinny.MPI",
4268         FT_UINT32, BASE_DEC, NULL, 0x0,
4269         NULL,
4270         HFILL }
4271     },
4272
4273     { &hf_skinny_serviceNumber,
4274       { "Service number", "skinny.serviceNumber",
4275         FT_UINT32, BASE_DEC, NULL, 0x0,
4276         NULL,
4277         HFILL }
4278     },
4279
4280     { &hf_skinny_temporalSpatialTradeOffCapability,
4281       { "Temporal spatial trade off capability", "skinny.temporalSpatialTradeOffCapability",
4282         FT_UINT32, BASE_DEC, NULL, 0x0,
4283         NULL,
4284         HFILL }
4285     },
4286
4287     { &hf_skinny_stillImageTransmission,
4288       { "Still image transmission", "skinny.stillImageTransmission",
4289         FT_UINT32, BASE_DEC, NULL, 0x0,
4290         NULL,
4291         HFILL }
4292     },
4293
4294     { &hf_skinny_h263_capability_bitfield,
4295       { "H263 capability bitfield", "skinny.h263_capability_bitfield",
4296         FT_UINT32, BASE_DEC, NULL, 0x0,
4297         NULL,
4298         HFILL }
4299     },
4300
4301     { &hf_skinny_annexNandWFutureUse,
4302       { "Annex N and W future use", "skinny.annexNandWFutureUse",
4303         FT_UINT32, BASE_DEC, NULL, 0x0,
4304         NULL,
4305         HFILL }
4306     },
4307
4308     { &hf_skinny_modelNumber,
4309       { "Model number", "skinny.modelNumber",
4310         FT_UINT32, BASE_DEC, NULL, 0x0,
4311         NULL,
4312         HFILL }
4313     },
4314
4315     { &hf_skinny_bandwidth,
4316       { "Bandwidth", "skinny.bandwidth",
4317         FT_UINT32, BASE_DEC, NULL, 0x0,
4318         NULL,
4319         HFILL }
4320     },
4321
4322     { &hf_skinny_protocolDependentData,
4323       { "Protocol dependent data", "skinny.protocolDependentData",
4324         FT_UINT32, BASE_DEC, NULL, 0x0,
4325         NULL,
4326         HFILL }
4327     },
4328
4329     { &hf_skinny_priority,
4330       { "Priority", "skinny.priority",
4331         FT_UINT32, BASE_DEC, NULL, 0x0,
4332         NULL,
4333         HFILL }
4334     },
4335
4336     { &hf_skinny_payloadDtmf,
4337       { "Payload DTMF", "skinny.payloadDtmf",
4338         FT_UINT32, BASE_DEC, NULL, 0x0,
4339         "RTP payload type.",
4340         HFILL }
4341     },
4342
4343     { &hf_skinny_featureID,
4344       { "Feature ID", "skinny.featureID",
4345         FT_UINT32, BASE_DEC, NULL, 0x0,
4346         NULL,
4347         HFILL }
4348     },
4349
4350     { &hf_skinny_featureTextLabel,
4351       { "Feature text label", "skinny.featureTextLabel",
4352         FT_STRING, BASE_NONE, NULL, 0x0,
4353         "The feature label text that is displayed on the phone.",
4354         HFILL }
4355     },
4356
4357     { &hf_skinny_featureStatus,
4358       { "Feature status", "skinny.featureStatus",
4359         FT_UINT32, BASE_DEC, NULL, 0x0,
4360         NULL,
4361         HFILL }
4362     },
4363
4364     { &hf_skinny_notify,
4365       { "Notify", "skinny.notify",
4366         FT_STRING, BASE_NONE, NULL, 0x0,
4367         "The message notify text that is displayed on the phone.",
4368         HFILL }
4369     },
4370
4371     { &hf_skinny_endOfAnnAck,
4372       { "End of ann. ack", "skinny.endOfAnnAck",
4373         FT_UINT32, BASE_DEC, VALS(skinny_endOfAnnAck), 0x0,
4374         "End of announcement ack.",
4375         HFILL }
4376     },
4377
4378     { &hf_skinny_annPlayMode,
4379       { "Ann. play mode", "skinny.annPlayMode",
4380         FT_UINT32, BASE_DEC, VALS(skinny_annPlayMode), 0x0,
4381         "Announcement play mode.",
4382         HFILL }
4383     },
4384
4385     { &hf_skinny_annPlayStatus,
4386       { "Ann. play status", "skinny.annPlayStatus",
4387         FT_UINT32, BASE_DEC, VALS(skinny_annPlayStatus), 0x0,
4388         "Announcement play status.",
4389         HFILL }
4390     },
4391
4392     { &hf_skinny_locale,
4393       { "Locale", "skinny.locale",
4394         FT_UINT32, BASE_DEC, NULL, 0x0,
4395         "User locale ID.",
4396         HFILL }
4397     },
4398
4399     { &hf_skinny_country,
4400       { "Country", "skinny.country",
4401         FT_UINT32, BASE_DEC, NULL, 0x0,
4402         "Country ID (Network locale).",
4403         HFILL }
4404     },
4405
4406     { &hf_skinny_matrixConfPartyID,
4407       { "Matrix conf party ID", "skinny.matrixConfPartyID",
4408         FT_UINT32, BASE_DEC, NULL, 0x0,
4409         "Existing conference parties.",
4410         HFILL }
4411     },
4412
4413     { &hf_skinny_hearingConfPartyMask,
4414       { "Hearing conf party mask", "skinny.hearingConfPartyMask",
4415         FT_UINT32, BASE_DEC, NULL, 0x0,
4416         "Bit mask of conference parties to hear media received on this stream.  Bit0 = matrixConfPartyID[0], Bit1 = matrixConfPartiID[1].",
4417         HFILL }
4418     },
4419
4420     { &hf_skinny_serviceURL,
4421       { "Service URL value", "skinny.serviceURL",
4422         FT_STRING, BASE_NONE, NULL, 0x0,
4423         NULL,
4424         HFILL }
4425     },
4426
4427     { &hf_skinny_serviceURLDisplayName,
4428       { "Service URL display name", "skinny.serviceURLDisplayName",
4429         FT_STRING, BASE_NONE, NULL, 0x0,
4430         NULL,
4431         HFILL }
4432     },
4433
4434     { &hf_skinny_callSelectStat,
4435       { "Call select stat", "skinny.callSelectStat",
4436         FT_UINT32, BASE_DEC, NULL, 0x0,
4437         NULL,
4438         HFILL }
4439     },
4440
4441     { &hf_skinny_isConferenceCreator,
4442       { "Is conference creator", "skinny.isConferenceCreator",
4443         FT_UINT32, BASE_DEC, NULL, 0x0,
4444         NULL,
4445         HFILL }
4446     },
4447
4448     { &hf_skinny_payload_rfc_number,
4449       { "Payload RFC number", "skinny.payload_rfc_number",
4450         FT_UINT32, BASE_DEC, NULL, 0x0,
4451         NULL,
4452         HFILL }
4453     },
4454
4455     { &hf_skinny_payloadType,
4456       { "Payload type", "skinny.payloadType",
4457         FT_UINT32, BASE_DEC, NULL, 0x0,
4458         NULL,
4459         HFILL }
4460     },
4461
4462     { &hf_skinny_bitRate,
4463       { "Bitrate", "skinny.bitRate",
4464         FT_UINT32, BASE_DEC, NULL, 0x0,
4465         NULL,
4466         HFILL }
4467     },
4468
4469     { &hf_skinny_pictureFormatCount,
4470       { "Picture format count", "skinny.pictureFormatCount",
4471         FT_UINT32, BASE_DEC, NULL, 0x0,
4472         NULL,
4473         HFILL }
4474     },
4475
4476     { &hf_skinny_confServiceNum,
4477       { "Conf service number", "skinny.confServiceNum",
4478         FT_UINT32, BASE_DEC, NULL, 0x0,
4479         "Conference service number.",
4480         HFILL }
4481     },
4482
4483     { &hf_skinny_DSCPValue,
4484       { "DSCP value", "skinny.DSCPValue",
4485         FT_UINT32, BASE_DEC, NULL, 0x0,
4486         NULL,
4487         HFILL }
4488     },
4489
4490     { &hf_skinny_miscCommandType,
4491       { "Misc command type", "skinny.miscCommandType",
4492         FT_UINT32, BASE_DEC|BASE_EXT_STRING, &skinny_miscCommandType_ext, 0x0,
4493         NULL,
4494         HFILL }
4495     },
4496
4497     { &hf_skinny_temporalSpatialTradeOff,
4498       { "Temporal spatial trade-off", "skinny.temporalSpatialTradeOff",
4499         FT_UINT32, BASE_DEC, NULL, 0x0,
4500         NULL,
4501         HFILL }
4502     },
4503
4504     { &hf_skinny_firstGOB,
4505       { "First GOB", "skinny.firstGOB",
4506         FT_UINT32, BASE_DEC, NULL, 0x0,
4507         NULL,
4508         HFILL }
4509     },
4510
4511     { &hf_skinny_numberOfGOBs,
4512       { "Number of GOBs", "skinny.numberOfGOBs",
4513         FT_UINT32, BASE_DEC, NULL, 0x0,
4514         NULL,
4515         HFILL }
4516     },
4517
4518     { &hf_skinny_firstMB,
4519       { "First MB", "skinny.firstMB",
4520         FT_UINT32, BASE_DEC, NULL, 0x0,
4521         NULL,
4522         HFILL }
4523     },
4524
4525     { &hf_skinny_numberOfMBs,
4526       { "Number of MBs", "skinny.numberOfMBs",
4527         FT_UINT32, BASE_DEC, NULL, 0x0,
4528         NULL,
4529         HFILL }
4530     },
4531
4532     { &hf_skinny_pictureNumber,
4533       { "Picture number", "skinny.pictureNumber",
4534         FT_UINT32, BASE_DEC, NULL, 0x0,
4535         NULL,
4536         HFILL }
4537     },
4538
4539     { &hf_skinny_longTermPictureIndex,
4540       { "Long-term picture index", "skinny.longTermPictureIndex",
4541         FT_UINT32, BASE_DEC, NULL, 0x0,
4542         NULL,
4543         HFILL }
4544     },
4545
4546     { &hf_skinny_recoveryReferencePictureCount,
4547       { "Recovery-reference picture count", "skinny.recoveryReferencePictureCount",
4548         FT_UINT32, BASE_DEC, NULL, 0x0,
4549         NULL,
4550         HFILL }
4551     },
4552
4553     { &hf_cast_lastRedirectingPartyName,
4554       { "Last redirecting party name", "cast.lastRedirectingPartyName",
4555         FT_STRING, BASE_NONE, NULL, 0x0,
4556         NULL,
4557         HFILL }
4558     },
4559
4560     { &hf_cast_lastRedirectingParty,
4561       { "Last redirecting party", "cast.lastRedirectingParty",
4562         FT_STRING, BASE_NONE, NULL, 0x0,
4563         NULL,
4564         HFILL }
4565     },
4566
4567     { &hf_cast_cgpnVoiceMailbox,
4568       { "Calling party voice mailbox", "cast.cgpnVoiceMailbox",
4569         FT_STRING, BASE_NONE, NULL, 0x0,
4570         NULL,
4571         HFILL }
4572     },
4573
4574     { &hf_cast_cdpnVoiceMailbox,
4575       { "Called party voice mailbox", "cast.cdpnVoiceMailbox",
4576         FT_STRING, BASE_NONE, NULL, 0x0,
4577         NULL,
4578         HFILL }
4579     },
4580
4581     { &hf_cast_originalCdpnVoiceMailbox,
4582       { "Original called party voice mailbox", "cast.originalCdpnVoiceMailbox",
4583         FT_STRING, BASE_NONE, NULL, 0x0,
4584         NULL,
4585         HFILL }
4586     },
4587
4588     { &hf_cast_lastRedirectingVoiceMailbox,
4589       { "Last redirecting voice mailbox", "cast.lastRedirectingVoiceMailbox",
4590         FT_STRING, BASE_NONE, NULL, 0x0,
4591         NULL,
4592         HFILL }
4593     },
4594
4595     { &hf_cast_originalCdpnRedirectReason,
4596       { "Original called party redirect reason", "cast.originalCdpnRedirectReason",
4597         FT_UINT32, BASE_DEC, NULL, 0x0,
4598         NULL,
4599         HFILL }
4600     },
4601
4602     { &hf_cast_lastRedirectingReason,
4603       { "Last redirecting reason", "cast.lastRedirectingReason",
4604         FT_UINT32, BASE_DEC, NULL, 0x0,
4605         NULL,
4606         HFILL }
4607     },
4608
4609     { &hf_cast_callInstance,
4610       { "Call instance", "cast.callInstance",
4611         FT_UINT32, BASE_DEC, NULL, 0x0,
4612         NULL,
4613         HFILL }
4614     },
4615
4616     { &hf_cast_callSecurityStatus,
4617       { "Call security status", "cast.callSecurityStatus",
4618         FT_UINT32, BASE_DEC, VALS(cast_callSecurityStatusTypes), 0x0,
4619         NULL,
4620         HFILL }
4621     },
4622
4623     { &hf_skinny_directoryIndex,
4624       { "Directory index", "skinny.directoryIndex",
4625         FT_UINT32, BASE_DEC, NULL, 0x0,
4626         NULL,
4627         HFILL }
4628     },
4629
4630     { &hf_skinny_directoryPhoneNumber,
4631       { "Directory phone number", "skinny.directoryPhoneNumber",
4632         FT_STRING, BASE_NONE, NULL, 0x0,
4633         NULL,
4634         HFILL }
4635     },
4636
4637   };
4638
4639   /* Setup protocol subtree array */
4640   static gint *ett[] = {
4641     &ett_skinny,
4642     &ett_skinny_tree,
4643     &ett_skinny_softKeyMap,
4644   };
4645
4646   module_t *skinny_module;
4647
4648   /* Register the protocol name and description */
4649   proto_skinny = proto_register_protocol("Skinny Client Control Protocol",
4650                                          "SKINNY", "skinny");
4651
4652   /* Required function calls to register the header fields and subtrees used */
4653   proto_register_field_array(proto_skinny, hf, array_length(hf));
4654   proto_register_subtree_array(ett, array_length(ett));
4655
4656   skinny_module = prefs_register_protocol(proto_skinny, NULL);
4657   prefs_register_bool_preference(skinny_module, "desegment",
4658     "Reassemble SCCP messages spanning multiple TCP segments",
4659     "Whether the SCCP dissector should reassemble messages spanning multiple TCP segments."
4660     " To use this option, you must also enable \"Allow subdissectors to reassemble TCP streams\" in the TCP protocol settings.",
4661     &skinny_desegment);
4662
4663   skinny_tap = register_tap("skinny");
4664 }
4665
4666 void
4667 proto_reg_handoff_skinny(void)
4668 {
4669   static gboolean skinny_prefs_initialized = FALSE;
4670   dissector_handle_t skinny_handle;
4671
4672   if (!skinny_prefs_initialized) {
4673     rtp_handle = find_dissector("rtp");
4674     /* Skinny content type and internet media type used by other dissectors are the same */
4675     media_type_dissector_table = find_dissector_table("media_type");
4676     skinny_handle = new_create_dissector_handle(dissect_skinny, proto_skinny);
4677     dissector_add_uint("tcp.port", TCP_PORT_SKINNY, skinny_handle);
4678     ssl_dissector_add(SSL_PORT_SKINNY, "skinny", TRUE);
4679     skinny_prefs_initialized = TRUE;
4680   }
4681 }
4682