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