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