root/src/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn_trace.h

/* [<][>][^][v][top][bottom][index][help] */

INCLUDED FROM


   1 /*
   2  * Copyright (c) 2010, Sangoma Technologies 
   3  * David Yat Sin <davidy@sangoma.com>
   4  * All rights reserved.
   5  *
   6  * Redistribution and use in source and binary forms, with or without
   7  * modification, are permitted provided that the following conditions
   8  * are met:
   9  *
  10  * * Redistributions of source code must retain the above copyright
  11  * notice, this list of conditions and the following disclaimer.
  12  *
  13  * * Redistributions in binary form must reproduce the above copyright
  14  * notice, this list of conditions and the following disclaimer in the
  15  * documentation and/or other materials provided with the distribution.
  16  *
  17  * * Neither the name of the original author; nor the names of any contributors
  18  * may be used to endorse or promote products derived from this software
  19  * without specific prior written permission.
  20  *
  21  *
  22  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  23  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  24  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  25  * A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER
  26  * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
  27  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
  28  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
  29  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
  30  * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
  31  * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  32  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  33  */
  34 #ifndef __FTMOD_SANGOMA_ISDN_TRACE_H__
  35 #define __FTMOD_SANGOMA_ISDN_TRACE_H__
  36 
  37 #define MX_CODE_TXT_LEN 70
  38 #define Q931_LOCKING_SHIFT                      0x90
  39 #define Q931_NON_LOCKING_SHIFT          0x98
  40 
  41 #define PROT_Q931_RELEASE_CAUSE_MISDIALED_TRUNK_PREFIX  5
  42 #define PROT_Q931_RELEASE_CAUSE_INVALID_NUMBER_FORMAT   28
  43 #define PROT_Q931_RELEASE_CAUSE_NO_CHAN_AVAIL                   34
  44 #define PROT_Q931_RELEASE_CAUSE_DEST_OUT_OF_ORDER               27
  45 #define PROT_Q931_RELEASE_CAUSE_IE_NOT_EXIST                    99
  46 #define PROT_Q931_RECOVERY_ON_TIMER_EXPIRE                              102
  47 #define PROT_Q931_RELEASE_CAUSE_WRONG_CALL_STATE                101
  48 
  49 
  50 #define PROT_Q931_IE_SEGMENTED_MESSAGE                  0x00
  51 #define PROT_Q931_IE_BEARER_CAP                                 0x04
  52 #define PROT_Q931_IE_CAUSE                                              0x08
  53 #define PROT_Q931_IE_CALL_IDENTITY                              0x10
  54 #define PROT_Q931_IE_CALL_STATE                                 0x14
  55 #define PROT_Q931_IE_CHANNEL_ID                                 0x18
  56 #define PROT_Q931_IE_FACILITY                                   0x1c
  57 #define PROT_Q931_IE_PROGRESS_IND                               0x1e
  58 #define PROT_Q931_IE_NETWORK_SPF_FACILITY               0x20
  59 #define PROT_Q931_IE_NOTIFICATION_IND                   0x27
  60 #define PROT_Q931_IE_DISPLAY                                    0x28
  61 #define PROT_Q931_IE_DATE_TIME                                  0x29
  62 #define PROT_Q931_IE_KEYPAD_FACILITY                    0x2c
  63 #define PROT_Q931_IE_INFORMATION_REQUEST                0x32
  64 #define PROT_Q931_IE_SIGNAL                                             0x34
  65 #define PROT_Q931_IE_SWITCHOOK                                  0x36
  66 #define PROT_Q931_IE_GENERIC_DIGITS                             0x37
  67 #define PROT_Q931_IE_FEATURE_ACT                                0x38
  68 #define PROT_Q931_IE_FEATURE_IND                                0x39
  69 #define PROT_Q931_IE_INFORMATION_RATE                   0x40
  70 #define PROT_Q931_IE_END_TO_END_TRANSIT_DELAY   0x42
  71 #define PROT_Q931_IE_TRANSIT_DELAY_SELECT_IND   0x43
  72 #define PROT_Q931_IE_PACKET_LAYER_BINARY_PARAMS 0x44
  73 #define PROT_Q931_IE_PACKET_LAYER_WINDOW_SIZE   0x45
  74 #define PROT_Q931_IE_PACKET_LAYER_SIZE                  0x46
  75 #define PROT_Q931_IE_CALLING_PARTY_NUMBER               0x6c
  76 #define PROT_Q931_IE_CALLING_PARTY_SUBADDRESS   0x6d
  77 #define PROT_Q931_IE_CALLED_PARTY_NUMBER                0x70
  78 #define PROT_Q931_IE_CALLED_PARTY_SUBADDRESS    0x71
  79 #define PROT_Q931_IE_REDIRECTING_NUMBER                 0x74
  80 #define PROT_Q931_IE_REDIRECTION_NUMBER                 0x76
  81 #define PROT_Q931_IE_TRANSIT_NETWORK_SELECTION  0x78
  82 #define PROT_Q931_IE_RESTART_IND                                0x79
  83 #define PROT_Q931_IE_LOW_LAYER_COMPAT                   0x7c
  84 #define PROT_Q931_IE_HIGH_LAYER_COMPAT                  0x7d
  85 #define PROT_Q931_IE_USER_USER                                  0x7e
  86 #define PROT_Q931_IE_SENDING_COMPLETE                   0xa1
  87 #define PROT_Q931_IE_ESCAPE_FOR_EXTENSION               0x7f
  88 #define PROT_Q931_IE_SENDING_COMPLETE                   0xa1
  89 
  90 #define NULL_CHAR 0
  91 
  92 
  93 struct code2str
  94 {
  95         int code;
  96         char text[MX_CODE_TXT_LEN];
  97 };
  98 
  99 enum {
 100         I_FRAME = 1,    /* Information frame */
 101         S_FRAME,                /* Supervisory frame */
 102         U_FRAME,                /* Unnumbered frame */
 103 };
 104 
 105 char ia5[16][8]={{NULL_CHAR,NULL_CHAR,' ','0','@','P','`','p'},
 106                                 {NULL_CHAR,NULL_CHAR,'!','1','A','Q','a','q'},
 107                                 {NULL_CHAR,NULL_CHAR,'"','2','B','R','b','r'},
 108                                 {NULL_CHAR,NULL_CHAR,'#','3','C','S','c','s'},
 109                                 {NULL_CHAR,NULL_CHAR,'$','4','D','T','d','t'},
 110                                 {NULL_CHAR,NULL_CHAR,'%','5','E','U','e','u'},
 111                                 {NULL_CHAR,NULL_CHAR,'&','6','F','V','f','v'},
 112                                 {NULL_CHAR,NULL_CHAR,'\'','7','G','W','g','w'},
 113                                 {NULL_CHAR,NULL_CHAR,'(','8','H','X','h','x'},
 114                                 {NULL_CHAR,NULL_CHAR,')','9','I','Y','i','y'},
 115                                 {NULL_CHAR,NULL_CHAR,'*',':','J','Z','j','z'},
 116                                 {NULL_CHAR,NULL_CHAR,'+',';','K','[','k','{'},
 117                                 {NULL_CHAR,NULL_CHAR,',','<','L','\\','l','|'},
 118                                 {NULL_CHAR,NULL_CHAR,'-','=','M',']','m','}'},
 119                                 {NULL_CHAR,NULL_CHAR,'.','>','N','^','n','~'},
 120                                 {NULL_CHAR,NULL_CHAR,'/','?','O','_','o',NULL_CHAR}};
 121 
 122 /* Based on Table 4 - pg 15 of Q.921 Recommendation */
 123 struct code2str dcodQ921FrameFormatTable[] = {
 124         {I_FRAME, "Information"},
 125         {S_FRAME, "Supervisory"},
 126         {U_FRAME, "Unnumbered"},
 127         {-1, "?"},
 128 };
 129 
 130 
 131 /* Based on Table 5 - pg 15 of Q.921 Recommendation */
 132 struct code2str dcodQ921SupervisoryCmdTable[] = {
 133         {0, "RR - receive ready"},
 134         {1, "RNR - receive not ready"},
 135         {2, "REJ - reject"},
 136         {-1, "Unknown"},
 137 };
 138 
 139 /* Based on Table 5 - pg 15 of Q.921 Recommendation */
 140 struct code2str dcodQ921UnnumberedCmdTable[] = {
 141         {0x0F, "SABME - set async balanced mode extended"},
 142         {0x03, "DM - disconnected mode"},
 143         {0x00, "UI - unnumbered information"},
 144         {0x08, "DISC - disconnect"},
 145         {0x0C, "UA - unnumbered acknowledgement"},
 146         {0x11, "FRMR - frame reject"},
 147         {0x17, "XID - Exchange Identification)"},
 148         {-1, "Unknown"},
 149 };
 150 
 151 struct code2str dcodQ931ProtDiscTable[] = {
 152         {0x08, "Q.931/I.451"},
 153         {0x09, "Q.2931"},
 154         {-1, "Unknown"},
 155 };
 156 
 157 struct code2str dcodQ931CallRefHiTable[] = {
 158         {0, "0"},
 159         {16, "1"},
 160         {32, "2"},
 161         {48, "3"},
 162         {64, "4"},
 163         {80, "5"},
 164         {96, "6"},
 165         {112, "7"},
 166         {128, "8"},
 167         {144, "9"},
 168         {160, "A"},
 169         {176, "B"},
 170         {192, "C"},
 171         {208, "D"},
 172         {224, "E"},
 173         {240, "F"},
 174         {-1,"?"},
 175 };
 176 
 177 struct code2str dcodQ931CallRefLoTable[] = {
 178         {0, "0"},
 179         {1, "1"},
 180         {2, "2"},
 181         {3, "3"},
 182         {4, "4"},
 183         {5, "5"},
 184         {6, "6"},
 185         {7, "7"},
 186         {8, "8"},
 187         {9, "9"},
 188         {10, "A"},
 189         {11, "B"},
 190         {12, "C"},
 191         {13, "D"},
 192         {14, "E"},
 193         {15, "F"},
 194         {-1, "?"},
 195 };
 196 
 197 #define PROT_Q931_MSGTYPE_ALERTING                      1
 198 #define PROT_Q931_MSGTYPE_PROCEEDING            2
 199 #define PROT_Q931_MSGTYPE_PROGRESS                      3
 200 #define PROT_Q931_MSGTYPE_SETUP                         5
 201 #define PROT_Q931_MSGTYPE_CONNECT                       7
 202 #define PROT_Q931_MSGTYPE_SETUP_ACK                     13
 203 #define PROT_Q931_MSGTYPE_CONNECT_ACK           15
 204 #define PROT_Q931_MSGTYPE_USER_INFO                     32
 205 #define PROT_Q931_MSGTYPE_SUSPEND_REJ           33
 206 #define PROT_Q931_MSGTYPE_RESUME_REJ            34
 207 #define PROT_Q931_MSGTYPE_SUSPEND                       37
 208 #define PROT_Q931_MSGTYPE_RESUME                        38
 209 #define PROT_Q931_MSGTYPE_SUSPEND_ACK           45
 210 #define PROT_Q931_MSGTYPE_RESUME_ACK            46
 211 #define PROT_Q931_MSGTYPE_DISCONNECT            69
 212 #define PROT_Q931_MSGTYPE_RESTART                       70
 213 #define PROT_Q931_MSGTYPE_RELEASE                       77
 214 #define PROT_Q931_MSGTYPE_RELEASE_ACK           78
 215 #define PROT_Q931_MSGTYPE_RELEASE_COMPLETE      90
 216 #define PROT_Q931_MSGTYPE_SEGMENT                       96
 217 #define PROT_Q931_MSGTYPE_FACILITY                      98
 218 #define PROT_Q931_MSGTYPE_NOTIFY                        110
 219 #define PROT_Q931_MSGTYPE_STATUS_ENQUIRY        117
 220 #define PROT_Q931_MSGTYPE_CONGESTION_CNTRL      121
 221 #define PROT_Q931_MSGTYPE_INFORMATION           123
 222 #define PROT_Q931_MSGTYPE_STATUS                        125
 223 
 224 
 225 struct code2str dcodQ931MsgTypeTable[] = {
 226         {PROT_Q931_MSGTYPE_ALERTING, "ALERT"},
 227         {PROT_Q931_MSGTYPE_PROCEEDING, "PROCEED"},
 228         {PROT_Q931_MSGTYPE_PROGRESS, "PROGRESS"},
 229         {PROT_Q931_MSGTYPE_SETUP, "SETUP"},
 230         {PROT_Q931_MSGTYPE_CONNECT, "CONNECT"},
 231         {PROT_Q931_MSGTYPE_SETUP_ACK, "SETUP ACK"},
 232         {PROT_Q931_MSGTYPE_CONNECT_ACK, "CONNECT ACK"},
 233         {PROT_Q931_MSGTYPE_USER_INFO, "USER INFO"},
 234         {PROT_Q931_MSGTYPE_SUSPEND_REJ, "SUSPEND REJ"},
 235         {PROT_Q931_MSGTYPE_RESUME_REJ, "RESUME REJ"},
 236         {PROT_Q931_MSGTYPE_SUSPEND, "SUSPEND"},
 237         {PROT_Q931_MSGTYPE_RESUME, "RESUME"},
 238         {PROT_Q931_MSGTYPE_SUSPEND_ACK, "SUSPEND ACK"},
 239         {PROT_Q931_MSGTYPE_RESUME_ACK, "RESUME ACK"},
 240         {PROT_Q931_MSGTYPE_DISCONNECT, "DISCONNECT"},
 241         {PROT_Q931_MSGTYPE_RESTART, "RESTART"},
 242         {PROT_Q931_MSGTYPE_RELEASE, "RELEASE"},
 243         {PROT_Q931_MSGTYPE_RELEASE_ACK, "RELEASR ACK"},
 244         {PROT_Q931_MSGTYPE_RELEASE_COMPLETE, "RELEASE COMPLETE"},
 245         {PROT_Q931_MSGTYPE_SEGMENT, "SEGMENT"},
 246         {PROT_Q931_MSGTYPE_FACILITY, "FACILITY"},
 247         {PROT_Q931_MSGTYPE_NOTIFY, "NOTIFY"},
 248         {PROT_Q931_MSGTYPE_STATUS_ENQUIRY, "STATUS ENQ"},
 249         {PROT_Q931_MSGTYPE_CONGESTION_CNTRL, "CONGESTION CTRL"},
 250         {PROT_Q931_MSGTYPE_INFORMATION, "INFO"},
 251         {PROT_Q931_MSGTYPE_STATUS, "STATUS"},
 252         {-1, "UNKNOWN"},
 253 };
 254 
 255 struct code2str dcodQ931CauseCodeTable[] = {
 256         {1, "Unallocated (unassigned) number"},
 257         {2, "No route to specified network"},
 258         {3, "No route to destination"},
 259         {4, "Send special information tone"},
 260         {5, "Misdialed trunk prefix"},
 261         {6, "Channel Unacceptable"},
 262         {7, "Call awarded and channel established"},
 263         {8, "Pre-emption"},
 264         {9, "Pre-emption-circuit reserved"},
 265         {16, "Normal call clearing"},
 266         {17, "User Busy"},
 267         {18, "No User Responding"},
 268         {19, "No Answer from User"},
 269         {20, "Subscriber Absent"},
 270         {21, "Call Rejected"},
 271         {22, "Number Changed"},
 272         {26, "Non-Selected User Clearing"},
 273         {27, "Destination Out-of-Order"},
 274         {28, "Invalid Number Format"},
 275         {29, "Facility Rejected"},
 276         {30, "Response to Status Enquiry"},
 277         {31, "Normal, Unspecified"},
 278         {34, "No Circuit/Channel Available"},
 279         {38, "Network Out-of-Order"},
 280         {39, "Permanent Frame Mode OOS"},
 281         {40, "Permanent Frame Mode Operational"},
 282         {41, "Temporary Failure"},
 283         {42, "Switching Equipment Congestion"},
 284         {43, "Access Information Discarded"},
 285         {44, "Requested Circuit/Channel not available"},
 286         {47, "Resource Unavailable, Unspecified"},
 287         {49, "Quality of Service not available"},
 288         {50, "Requested facility not subscribed"},
 289         {53, "Outgoing calls barred within CUG"},
 290         {55, "Incoming calls barred within CUG"},
 291         {57, "Bearer capability not authorized"},
 292         {58, "Bearer capability not presently available"},
 293         {62, "Inconsistency in access inf and subscriber"},
 294         {63, "Service or Option not available"},
 295         {65, "Bearer capability not implemented"},
 296         {66, "Channel type not implemented"},
 297         {69, "Requested facility not implemented"},
 298         {70, "Only restricted digital BC available"},
 299         {79, "Service or option not implemented"},
 300         {81, "Invalid call reference value"},
 301         {82, "Identified channel does not exist"},
 302         {83, "Suspended call exists"},
 303         {84, "Call identity in use"},
 304         {85, "No call suspended"},
 305         {86, "Call already cleared"},
 306         {87, "User not member of CUG"},
 307         {88, "Incompatible destination"},
 308         {90, "Non existent CUG"},
 309         {91, "Invalid transit network selection"},
 310         {95, "Invalid message, unspecified"},
 311         {96, "Mandatory IE missing"}, 
 312         {97, "Message type non-existent, not implemented"},
 313         {98, "Message not compatible with call state"},
 314         {99, "An IE or parameter does not exist"},
 315         {100, "Invalid IE contents"},
 316         {101, "Message not compatible with call state"},
 317         {102, "Recovery on timer expired"},
 318         {103, "Parameter non-existent, not impl"},
 319         {110, "Message with unrecognized parameter"},
 320         {111, "Protocol error, unspecified"},
 321         {127, "Interworking, unspecified"},
 322         {-1, "Unknown"},
 323 };
 324 
 325 struct code2str dcodQ931IEIDTable[] = {
 326         {PROT_Q931_IE_SEGMENTED_MESSAGE, "Segmented Message"},
 327         {PROT_Q931_IE_BEARER_CAP, "Bearer Capability"},
 328         {PROT_Q931_IE_CAUSE, "Cause"},
 329         {PROT_Q931_IE_CALL_IDENTITY, "Call Identity"},
 330         {PROT_Q931_IE_CALL_STATE, "Call State"},
 331         {PROT_Q931_IE_CHANNEL_ID, "Channel Id"},
 332         {PROT_Q931_IE_FACILITY, "Facility"},
 333         {PROT_Q931_IE_PROGRESS_IND, "Progress Indicator"},
 334         {PROT_Q931_IE_NETWORK_SPF_FACILITY, "Network Specific Facilities"},
 335         {PROT_Q931_IE_NOTIFICATION_IND, "Notification Indicator"},
 336         {PROT_Q931_IE_DISPLAY, "Display"},
 337         {PROT_Q931_IE_DATE_TIME, "Date/Time"},
 338         {PROT_Q931_IE_KEYPAD_FACILITY, "Keypad Facility"},
 339         {PROT_Q931_IE_INFORMATION_REQUEST, "Information Request"},
 340         {PROT_Q931_IE_SIGNAL, "Signal"},
 341         {PROT_Q931_IE_SWITCHOOK, "Switchhook"},
 342         {PROT_Q931_IE_GENERIC_DIGITS, "Generic Digits"},
 343         {PROT_Q931_IE_FEATURE_ACT, "Feature Activation"},
 344         {PROT_Q931_IE_FEATURE_IND, "Feature Indication"},
 345         {PROT_Q931_IE_INFORMATION_RATE, "Information Rate"},
 346         {PROT_Q931_IE_END_TO_END_TRANSIT_DELAY, "End-to-end Transit Delay"},
 347         {PROT_Q931_IE_TRANSIT_DELAY_SELECT_IND, "Transit Delay Selection and Indication"},
 348         {PROT_Q931_IE_PACKET_LAYER_BINARY_PARAMS, "Packet layer binary parameters"},
 349         {PROT_Q931_IE_PACKET_LAYER_WINDOW_SIZE, "Packet layer Window Size"},
 350         {PROT_Q931_IE_PACKET_LAYER_SIZE, "Packet layer Size"},
 351         {PROT_Q931_IE_CALLING_PARTY_NUMBER, "Calling Party Number"},
 352         {PROT_Q931_IE_CALLING_PARTY_SUBADDRESS, "Calling Party Subaddress"},
 353         {PROT_Q931_IE_CALLED_PARTY_NUMBER, "Called Party Number"},
 354         {PROT_Q931_IE_CALLED_PARTY_SUBADDRESS, "Called Party Subaddress"},
 355         {PROT_Q931_IE_REDIRECTING_NUMBER, "Redirecting Number"},
 356         {PROT_Q931_IE_REDIRECTION_NUMBER, "Redirection Number"},
 357         {PROT_Q931_IE_TRANSIT_NETWORK_SELECTION, "Transit Network Selection"},
 358         {PROT_Q931_IE_RESTART_IND, "Restart Indicator"},
 359         {PROT_Q931_IE_LOW_LAYER_COMPAT, "Low-Layer Compatibility"},
 360         {PROT_Q931_IE_HIGH_LAYER_COMPAT, "High-Layer Compatibility"},
 361         {PROT_Q931_IE_USER_USER, "User-User"},
 362         {PROT_Q931_IE_SENDING_COMPLETE, "Sending complete"},
 363         {PROT_Q931_IE_ESCAPE_FOR_EXTENSION, "Escape for extension"},
 364         {-1,"Unknown"},
 365 };
 366 
 367 struct code2str dcodQ931NumberingPlanTable[] = {
 368         {0, "unknown"},
 369         {1, "isdn"},
 370         {3, "data"},
 371         {4, "telex"},
 372         {8, "national"},
 373         {9, "private"},
 374         {15, "reserved"},
 375         {-1, "invalid"},
 376 };
 377 
 378 struct code2str dcodQ931TypeofNumberTable[] = {
 379         {0, "unknown"},
 380         {1, "international"},
 381         {2, "national"},
 382         {3, "network spf"},
 383         {4, "subscriber"},
 384         {6, "abbreviated"},
 385         {7, "reserved"},
 386         {-1, "invalid" },
 387 };
 388 
 389 struct code2str dcodQ931PresentationTable[] = {
 390         {0, "allowed"},
 391         {1, "restricted"},
 392         {2, "not available"},
 393         {-1, "invalid" },
 394 };
 395 
 396 struct code2str dcodQ931ScreeningTable[] = {
 397         {0, "user, not screened"},
 398         {1, "user, passed"},
 399         {2, "user, failed"},
 400         {3, "network, provided"},
 401         {-1, "invalid" },
 402 };
 403 
 404 struct code2str dcodQ931InfoChannelSelTable[] = {
 405         {0, "No Chan"},
 406         {1, "B1"},
 407         {2, "B2"},
 408         {3, "Any Chan"},
 409         {-1, "invalid" },
 410 };
 411 
 412 struct code2str dcodQ931ReasonTable[] = {
 413         {0x0, "Unknown"},
 414         {0x1, "Call forwarding busy"},
 415         {0x2, "Call forwarding no reply"},
 416         {0x4, "Call deflection"},
 417         {0x9, "Called DTE out of order"},
 418         {0xA, "Call forwarding by the called DTE"},
 419         {0xF, "Call forwarding unconditional"},
 420         {-1, "reserved" },
 421 };
 422 
 423 struct code2str dcodQ931BcCodingStandardTable[] = {
 424         {0x0, "ITU-T"},
 425         {0x1, "ISO/IEC"},
 426         {0x2, "National"},
 427         {0x3, "Defined standard"},
 428         {-1, "unknown"},
 429 };
 430 
 431 struct code2str dcodQ931BcInfTransferCapTable[] = {
 432         {0x00, "Speech"},
 433         {0x08, "Unrestricted digital"},
 434         {0x09, "Restricted digital"},
 435         {0x10, "3.1Khz audio"},
 436         {0x11, "Unrestricted digital w/ tones"},
 437         {0x18, "Video"},
 438         {-1, "reserved"},       
 439 };
 440 
 441 struct code2str dcodQ931BcInfTransferRateTable[] = {
 442         {0x00, "n/a"}, /* for packet-mode calls */
 443         {0x10, "64 Kbit/s"},
 444         {0x11, "2x64 Kbit/s"},
 445         {0x13, "384 Kbit/s"},
 446         {0x15, "1536 Kbit/s"},
 447         {0x17, "1920 Kbit/s"},
 448         {0x18, "Multirate"},
 449         {-1, "reserved"},
 450 };
 451 
 452 
 453 struct code2str dcodQ931BcusrL1ProtTable[] = {
 454         {0x01, "ITU-T rate/V.110/I.460/X.30"},  
 455         {0x02, "G.711 u-Law"},
 456         {0x03, "G.711 A-Law"},
 457         {0x04, "G.721/I.460"},
 458         {0x05, "H.221/H.242"},
 459         {0x06, "H.223/H.245"},
 460         {0x07, "Non-ITU-T rate"},       
 461         {0x08, "V.120"},
 462         {0x09, "X.31 HDLC"},
 463         {-1, "reserved"},
 464 };
 465 
 466 struct code2str dcodQ931UuiProtDiscrTable[] = {
 467         {0x00, "User-specific"},
 468         {0x01, "OSI high layer prot"},
 469         {0x02, "Recommendation X.244"},
 470         {0x03, "System management"},
 471         {0x04, "IA5 Chars"},
 472         {0x05, "X.208/X.209"},
 473         {0x07, "V.120"},
 474         {0x08, "Q.931/I.451"},
 475         {0x10, "X.25"},
 476         {-1,"reserved"},
 477 };
 478 
 479 struct code2str dcodQ931ChanTypeTable[] = {
 480         {0x3,"B-chans"},
 481         {0x6,"H0-chans"},
 482         {0x8,"H11-chans"},
 483         {0x9,"H12-chans"},
 484         {-1,"reserved"},
 485 };
 486 
 487 struct code2str dcodQ931RestartIndClassTable[] = {
 488         {0x0 ,"Indicated in channel IE"},
 489         {0x6 ,"Single interface"},
 490         {0x7 ,"All interfaces"},
 491         {-1, "reserved"},
 492 };
 493 
 494 struct code2str dcodQ931IelocationTable[] = {
 495         {0x0, "User"},
 496         {0x1, "Private network, local user"},
 497         {0x2, "Public network, local user"},
 498         {0x3, "Transit network"},
 499         {0x4, "Public network, remote user"},
 500         {0x5, "Private network, remote user"},
 501         {0xA, "Beyond interworking point"},
 502         {-1, "reserved"},
 503 };
 504 
 505 struct code2str dcodQ931IeprogressDescrTable[] = {
 506         {0x01, "Further info maybe available"},
 507         {0x02, "Destination is non-ISDN"},
 508         {0x03, "Origination address is non-ISDN"},
 509         {0x04, "Call returned to ISDN"},
 510         {0x08, "In-band data ready"},
 511         {-1, "reserved"},
 512 };
 513 
 514 struct code2str dcodQ931IeFacilityProtProfileTable[] = {
 515         {0x11, "Remote Operations Protocol"},
 516         {0x12, "CMIP Protocol"},
 517         {0x13, "ACSE Protocol"},
 518         {0x16, "GAT Protocol"},
 519         {0x1F, "Networking Extensions"},
 520         {-1, "reserved"},
 521 };
 522 
 523 //from www.voip-info.org/wiki/ANI2  - NANPA
 524 struct code2str dcodQ931LineInfoTable[] = {
 525         {0,  "Plain Old Telephone Service(POTS)" },
 526         {1,  "Multiparty line"},
 527         {2,  "ANI Failure"},
 528         {6,  "Station Level Rating"},
 529         {7,  "Special Operator Handling Required"},
 530         {20, "Automatic Identified Outward Dialing (AIOD)"},
 531         {23, "Coin or Non-coin"},
 532         {24, "Toll free service, POTS originated for non-pay station"},
 533         {25, "Toll free service, POTS originated for pay station"},
 534         {27, "Pay station with coin control"},
 535         {29, "Prison-Inmate service"},
 536         {30, "Intercept - blank"},
 537         {31, "Intercept - trouble"},
 538         {32, "Intercept - regular"},
 539         {34, "Telco operator handled call"},
 540         {52, "Outward Wide Area Telecommunications Service(OUTWATS)"},
 541         {60, "TRS call - from unrestricted line"},
 542         {61, "Cellular-Wireless PCS Type 1"},
 543         {62, "Cellular-Wireless PCS Type 2"},
 544         {63, "Cellular-Wireless PCS Type Roaming"},
 545         {66, "TRS call - from hotel/motel"},
 546         {67, "TRS call - from restricted line"},
 547         {70, "Line connected to pay station"},
 548         {93, "Private virtual network call"},
 549         {-1, "Unassigned"},
 550 };
 551 
 552 
 553 struct code2str dcodQ931GenDigitsEncodingTable[] = {
 554         {0, "BCD even"},
 555         {1, "BCD odd"},
 556         {2, "IA5"},
 557         {3, "Binary"},
 558         {-1, "Invalid"},
 559 };
 560 
 561 
 562 struct code2str dcodQ931GenDigitsTypeTable[] = {
 563         { 0, "Account Code"},
 564         { 1, "Auth Code"},
 565         { 2, "Customer ID" },
 566         { 3, "Universal Access"},
 567         { 4, "Info Digits"},
 568         { 5, "Callid"},
 569         { 6, "Opart"},
 570         { 7, "TCN"},
 571         { 9, "Adin"},
 572         {-1, "Invalid"},
 573 };
 574 
 575 struct code2str dcodQ931TypeOfSubaddressTable[] = {
 576         { 0x00, "NSAP"},
 577         { 0x02, "User-specified"},
 578         { -1,   "Invalid"},
 579 };
 580 
 581 #endif /* __FTMOD_SANGOMA_ISDN_TRACE_H__ */
 582 

/* [<][>][^][v][top][bottom][index][help] */