libisdn
|
00001 /****************************************************************************** 00002 00003 FileName: Q931ie.h 00004 00005 Contents: Header and definition for the ITU-T Q.931 ie 00006 structures and functions 00007 00008 License/Copyright: 00009 00010 Copyright (c) 2007, Jan Vidar Berger, Case Labs, Ltd. All rights reserved. 00011 email:janvb@caselaboratories.com 00012 00013 Redistribution and use in source and binary forms, with or without 00014 modification, are permitted provided that the following conditions are 00015 met: 00016 00017 * Redistributions of source code must retain the above copyright notice, 00018 this list of conditions and the following disclaimer. 00019 * Redistributions in binary form must reproduce the above copyright notice, 00020 this list of conditions and the following disclaimer in the documentation 00021 and/or other materials provided with the distribution. 00022 * Neither the name of the Case Labs, Ltd nor the names of its contributors 00023 may be used to endorse or promote products derived from this software 00024 without specific prior written permission. 00025 00026 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 00027 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 00028 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 00029 ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 00030 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 00031 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 00032 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 00033 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 00034 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 00035 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 00036 POSSIBILITY OF SUCH DAMAGE. 00037 ******************************************************************************/ 00038 00039 #ifndef _Q931_IE_H_ 00040 #define _Q931_IE_H_ 00041 00042 /* 00043 * Q.931 IEs 00044 */ 00045 /* Single octet information elements */ 00046 #define Q931ie_SHIFT 0x90 /* 1001 ---- */ 00047 #define Q931ie_MORE_DATA 0xa0 /* 1010 ---- */ 00048 #define Q931ie_SENDING_COMPLETE 0xa1 /* 1010 0001 */ 00049 #define Q931ie_CONGESTION_LEVEL 0xb0 /* 1011 ---- */ 00050 #define Q931ie_REPEAT_INDICATOR 0xd0 /* 1101 ---- */ 00051 00052 /* Variable Length Information Elements */ 00053 #define Q931ie_SEGMENTED_MESSAGE 0x00 /* 0000 0000 */ 00054 #define Q931ie_CHANGE_STATUS 0x01 /* 0000 0001 */ 00055 #define Q931ie_BEARER_CAPABILITY 0x04 /* 0000 0100 */ 00056 #define Q931ie_CAUSE 0x08 /* 0000 1000 */ 00057 #define Q931ie_CALL_IDENTITY 0x10 /* 0001 0000 */ 00058 #define Q931ie_CALL_STATE 0x14 /* 0001 0100 */ 00059 #define Q931ie_CHANNEL_IDENTIFICATION 0x18 /* 0001 1000 */ 00060 #define Q931ie_PROGRESS_INDICATOR 0x1e /* 0001 1110 */ 00061 #define Q931ie_NETWORK_SPECIFIC_FACILITIES 0x20 /* 0010 0000 */ 00062 #define Q931ie_NOTIFICATION_INDICATOR 0x27 /* 0010 0111 */ 00063 #define Q931ie_DISPLAY 0x28 /* 0010 1000 */ 00064 #define Q931ie_DATETIME 0x29 /* 0010 1001 */ 00065 #define Q931ie_KEYPAD_FACILITY 0x2c /* 0010 1100 */ 00066 #define Q931ie_SIGNAL 0x34 /* 0011 0100 */ 00067 #define Q931ie_INFORMATION_RATE 0x40 /* 0100 0000 */ 00068 #define Q931ie_END_TO_END_TRANSIT_DELAY 0x42 /* 0100 0010 */ 00069 #define Q931ie_TRANSIT_DELAY_SELECTION_AND_IND 0x43 /* 0100 0011 */ 00070 #define Q931ie_PACKED_LAYER_BINARY_PARAMETERS 0x44 /* 0100 0100 */ 00071 #define Q931ie_PACKED_LAYER_WINDOW_SIZE 0x45 /* 0100 0101 */ 00072 #define Q931ie_PACKED_SIZE 0x46 /* 0100 0110 */ 00073 #define Q931ie_CLOSED_USER_GROUP 0x47 /* 0100 0111 */ 00074 #define Q931ie_REVERSE_CHARGING_INDICATION 0x4a /* 0100 1010 */ 00075 #define Q931ie_CALLING_PARTY_NUMBER 0x6c /* 0110 1100 */ 00076 #define Q931ie_CALLING_PARTY_SUBADDRESS 0x6d /* 0110 1101 */ 00077 #define Q931ie_CALLED_PARTY_NUMBER 0x70 /* 0111 0000 */ 00078 #define Q931ie_CALLED_PARTY_SUBADDRESS 0x71 /* 0111 0001 */ 00079 #define Q931ie_REDIRECTING_NUMBER 0x74 /* 0111 0100 */ 00080 #define Q931ie_REDIRECTION_NUMBER 0x76 /* 0111 0110 */ 00081 #define Q931ie_TRANSIT_NETWORK_SELECTION 0x78 /* 0111 1000 */ 00082 #define Q931ie_RESTART_INDICATOR 0x79 /* 0111 1001 */ 00083 #define Q931ie_LOW_LAYER_COMPATIBILITY 0x7c /* 0111 1100 */ 00084 #define Q931ie_HIGH_LAYER_COMPATIBILITY 0x7d /* 0111 1101 */ 00085 #define Q931ie_USER_USER 0x7e /* 0111 1110 */ 00086 #define Q931ie_ESCAPE_FOR_EXTENSION 0x7f /* 0111 1111 */ 00087 00088 /* 00089 * ??? 00090 */ 00091 #define Q931ie_SWITCHOOK 0x36 /* 0011 0110 */ 00092 /* Variable Length Codeset 6 Information Elements */ 00093 #define Q931ie_GENERIC_DIGITS 0x37 /* 0011 0111 */ 00094 00095 00096 /* 00097 * Q.931 Annex M / Q.951 / EN 300 097-1 00098 */ 00099 #define Q931ie_CONNECTED_NUMBER 0x4c /* 0100 1100 */ 00100 #define Q931ie_CONNECTED_SUBADDRESS 0x4d /* 0100 1101 */ 00101 00102 /* 00103 * Q.932 / EN 300 196-1 00104 */ 00105 #define Q932ie_EXTENDED_FACILITY 0x0d /* 0000 1101 */ 00106 #define Q932ie_FACILITY 0x1c /* 0001 1100 */ 00107 #define Q932ie_FEATURE_ACTIVATION 0x38 /* 0011 1000 */ 00108 #define Q932ie_FEATURE_INDICATION 0x39 /* 0011 1001 */ 00109 #define Q932ie_SERVICE_PROFILE_IDENTIFICATION 0x3a /* 0011 1010 */ 00110 #define Q932ie_ENDPOINT_IDENTIFIER 0x3b /* 0011 1011 */ 00111 00112 00113 typedef struct { 00114 L3UCHAR IEId; 00115 L3UCHAR Size; 00116 } Q931ie_Generic; 00117 00118 /***************************************************************************** 00119 00120 Struct: Q931ie_BearerCap 00121 00122 Description: Bearer Capability Information Element. 00123 00124 *****************************************************************************/ 00125 00126 typedef struct { 00127 00128 L3UCHAR IEId; /* 00000100 for Bearer Capability */ 00129 L3UCHAR Size; /* Length of Information Element */ 00130 00131 L3UCHAR CodStand; /* Coding Standard. */ 00132 /* 00 - ITU-T */ 00133 /* 01 - ISO/IEC */ 00134 /* 10 - National standard */ 00135 /* 11 - Network side spesific */ 00136 00137 L3UCHAR ITC; /* Information Transfer Capability */ 00138 /* 00000 - Speech */ 00139 /* 01000 - Unrestricted digital info */ 00140 /* 01001 - Restricted digital info */ 00141 /* 10000 - 3.1 kHz audio */ 00142 /* 10001 - Unrestricted with tones */ 00143 /* 11000 - Video */ 00144 00145 L3UCHAR TransMode; /* Transfer Mode. */ 00146 /* 00 - Circuit mode */ 00147 /* 10 - Packet mode */ 00148 00149 L3UCHAR ITR; /* Information Transfer Rate. */ 00150 /* 00000 - Packed mode */ 00151 /* 10000 - 64 kbit/s */ 00152 /* 10001 - 2 x 64 kbit/s */ 00153 /* 10011 - 384 kbit/s */ 00154 /* 10101 - 1536 kbit/s */ 00155 /* 10111 - 1920 kbit/s */ 00156 /* 11000 - Multirat (64 kbit/s base) */ 00157 00158 L3UCHAR RateMul; /* Rate Multiplier */ 00159 00160 L3UCHAR Layer1Ident; /* Layer 1 Ident. */ 00161 00162 L3UCHAR UIL1Prot; /* User Information Layer 1 Protocol */ 00163 /* 00001 : ITU-T V.110, I.460 and X.30 */ 00164 /* 00010 : G.711 my-law */ 00165 /* 00011 : G.711 A-law */ 00166 /* 00100 : G.721 */ 00167 /* 00101 : H.221 and H.242 */ 00168 /* 00110 : H.223 and H.245 */ 00169 /* 00111 : Non ITU-T Standard */ 00170 /* 01000 : ITU-T V.120 */ 00171 /* 01001 : ITU-T X.31 HDLC flag stuff. */ 00172 00173 L3UCHAR SyncAsync; /* Sync/Async */ 00174 /* 0 : Syncronous data */ 00175 /* 1 : Asyncronous data */ 00176 00177 L3UCHAR Negot; /* Negotiation */ 00178 /* 0 : In-band negotiation not possib. */ 00179 /* 1 : In-band negotiation possible */ 00180 00181 L3UCHAR UserRate; /* User rate */ 00182 /* 00000 : I.460, V.110, X,30 */ 00183 /* 00001 : 0.6 kbit/s x.1 */ 00184 /* 00010 : 1.2 kbit/s */ 00185 /* 00011 : 2.4 kbit/s */ 00186 /* 00100 : 3.6 kbit/s */ 00187 /* 00101 : 4.8 kbit/s */ 00188 /* 00110 : 7.2 kbit/s */ 00189 /* 00111 : 8 kbit/s I.460 */ 00190 /* 01000 : 9.6 kbit/s */ 00191 /* 01001 : 14.4 kbit/s */ 00192 /* 01010 : 16 kbit/s */ 00193 /* 01011 : 19.2 kbit/s */ 00194 /* 01100 : 32 kbit/s */ 00195 /* 01101 : 38.4 kbit/s */ 00196 /* 01110 : 48 kbit/s */ 00197 /* 01111 : 56 kbit/s */ 00198 /* 10000 : 57.6 kbit/s */ 00199 /* 10010 : 28.8 kbit/s */ 00200 /* 10100 : 24 kbit/s */ 00201 /* 10101 : 0.1345 kbit/s */ 00202 /* 10110 : 0.100 kbit/s */ 00203 /* 10111 : 0.075/1.2 kbit/s */ 00204 /* 11000 : 1.2/0.075/kbit/s */ 00205 /* 11001 : 0.050 kbit/s */ 00206 /* 11010 : 0.075 kbit/s */ 00207 /* 11011 : 0.110 kbit/s */ 00208 /* 11100 : 0.150 kbit/s */ 00209 /* 11101 : 0.200 kbit/s */ 00210 /* 11110 : 0.300 kbit/s */ 00211 /* 11111 : 12 kbit/s */ 00212 00213 L3UCHAR InterRate; /* Intermediate Rate */ 00214 /* 00 : Not used */ 00215 /* 01 : 8 kbit/s */ 00216 /* 10 : 16 kbit/s */ 00217 /* 11 : 32 kbit/s */ 00218 00219 L3UCHAR NIConTx; /* Network Indepentend Clock on transmit*/ 00220 /* 0 : Not required to send data clc */ 00221 /* 1 : Send data w/NIC clc */ 00222 00223 L3UCHAR NIConRx; /* NIC on Rx */ 00224 /* 0 : Cannot accept indep. clc */ 00225 /* 1 : data with indep. clc accepted */ 00226 00227 L3UCHAR FlowCtlTx; /* Flow control on Tx */ 00228 /* 0 : Send Flow ctrl not required */ 00229 /* 1 : Send flow ctrl required */ 00230 00231 L3UCHAR FlowCtlRx; /* Flow control on Rx */ 00232 /* 0 : cannot use receive flow ctrl */ 00233 /* 1 : Receive flow ctrl accepted */ 00234 L3UCHAR HDR; /* HDR/No HDR */ 00235 L3UCHAR MultiFrame; /* Multi frame support */ 00236 /* 0 : multiframe not supported */ 00237 /* 1 : multiframe supported */ 00238 00239 L3UCHAR Mode; /* Mode of operation */ 00240 /* 0 : bit transparent mode of operat. */ 00241 /* 1 : protocol sesitive mode of op. */ 00242 00243 L3UCHAR LLInegot; /* Logical link id negotiation (oct. 5b)*/ 00244 /* 0 : default LLI=256 only */ 00245 /* 1 : Full protocol negotiation */ 00246 00247 L3UCHAR Assignor; /* Assignor/assignee */ 00248 /* 0 : Default Asignee */ 00249 /* 1 : Assignor only */ 00250 00251 L3UCHAR InBandNeg; /* In-band/out-band negot. */ 00252 /* 0 : negot done w/ USER INFO mes */ 00253 /* 1 : negot done in-band w/link zero */ 00254 00255 L3UCHAR NumStopBits; /* Number of stop bits */ 00256 /* 00 : Not used */ 00257 /* 01 : 1 bit */ 00258 /* 10 : 1.5 bits */ 00259 /* 11 : 2 bits */ 00260 00261 L3UCHAR NumDataBits; /* Number of data bits. */ 00262 /* 00 : not used */ 00263 /* 01 : 5 bits */ 00264 /* 10 : 7 bits */ 00265 /* 11 : 8 bits */ 00266 00267 L3UCHAR Parity; /* Parity Information */ 00268 /* 000 : Odd */ 00269 /* 010 : Even */ 00270 /* 011 : None */ 00271 /* 100 : Forced to 0 */ 00272 /* 101 : Forced to 1 */ 00273 00274 L3UCHAR DuplexMode; /* Mode duplex */ 00275 /* 0 : Half duplex */ 00276 /* 1 : Full duplex */ 00277 00278 L3UCHAR ModemType; /* Modem type, see Q.931 p 64 */ 00279 00280 L3UCHAR Layer2Ident; /* Layer 2 Ident */ 00281 00282 L3UCHAR UIL2Prot; /* User Information Layer 2 Protocol */ 00283 /* 00010 : Q.921/I.441 */ 00284 /* 00110 : X.25 */ 00285 /* 01100 : LAN logical link */ 00286 00287 L3UCHAR Layer3Ident; /* Layer 3 ident. */ 00288 00289 L3UCHAR UIL3Prot; /* User Information Layer 3 Protocol */ 00290 /* 00010 : Q.931 */ 00291 /* 00110 : X.25 */ 00292 /* 01011 : ISO/IEC TR 9577 */ 00293 00294 L3UCHAR AL3Info1; /* additional layer 3 info 1 */ 00295 00296 L3UCHAR AL3Info2; /* additional layer 3 info 2 */ 00297 00298 } Q931ie_BearerCap; 00299 00300 /***************************************************************************** 00301 00302 Struct: Q931ie_CallID 00303 00304 00305 *****************************************************************************/ 00306 00307 typedef struct { 00308 00309 L3UCHAR IEId; /* 00010000 */ 00310 L3UCHAR Size; /* Length of Information Element */ 00311 L3UCHAR CallId[1]; /* Call identity */ 00312 00313 } Q931ie_CallID; 00314 00315 /***************************************************************************** 00316 00317 Struct: Q931ie_CallState 00318 00319 00320 *****************************************************************************/ 00321 00322 typedef struct { 00323 00324 L3UCHAR IEId; /* 00010100 */ 00325 L3UCHAR Size; /* Length of Information Element */ 00326 L3UCHAR CodStand; /* Coding Standard */ 00327 L3UCHAR CallState; /* Call State Value */ 00328 00329 } Q931ie_CallState; 00330 00331 /***************************************************************************** 00332 00333 Struct: Q931ie_Cause 00334 00335 Description: Cause IE as described in Q.850 00336 00337 *****************************************************************************/ 00338 typedef struct { 00339 00340 L3UCHAR IEId; /* 00010100 */ 00341 L3UCHAR Size; /* Length of Information Element */ 00342 L3UCHAR CodStand; /* Coding Standard */ 00343 L3UCHAR Location; /* Location */ 00344 L3UCHAR Recom; /* Recommendation */ 00345 L3UCHAR Value; /* Cause Value */ 00346 L3UCHAR Diag[1]; /* Optional Diagnostics Field */ 00347 00348 } Q931ie_Cause; 00349 00350 /***************************************************************************** 00351 00352 Struct: Q931ie_CalledNum 00353 00354 *****************************************************************************/ 00355 typedef struct { 00356 00357 L3UCHAR IEId; /* 01110000 */ 00358 L3UCHAR Size; /* Length of Information Element */ 00359 L3UCHAR TypNum; /* Type of Number */ 00360 L3UCHAR NumPlanID; /* Numbering plan identification */ 00361 L3UCHAR Digit[1]; /* Digit (IA5) */ 00362 00363 } Q931ie_CalledNum; 00364 00365 /***************************************************************************** 00366 00367 Struct: Q931ie_CalledSub 00368 00369 Description: Called party subaddress 00370 00371 *****************************************************************************/ 00372 00373 typedef struct { 00374 00375 L3UCHAR IEId; /* 01110001 */ 00376 L3UCHAR Size; /* Length of Information Element */ 00377 L3UCHAR TypNum; /* Type of subaddress */ 00378 L3UCHAR OddEvenInd; /* Odd/Even indicator */ 00379 L3UCHAR Digit[1]; /* digits */ 00380 00381 } Q931ie_CalledSub; 00382 00383 /***************************************************************************** 00384 00385 Struct: Q931ie_CallingNum 00386 00387 Description: Calling party number 00388 00389 *****************************************************************************/ 00390 00391 typedef struct { 00392 00393 L3UCHAR IEId; /* 01101100 */ 00394 L3UCHAR Size; /* Length of Information Element */ 00395 L3UCHAR TypNum; /* Type of number */ 00396 L3UCHAR NumPlanID; /* Numbering plan identification */ 00397 L3UCHAR PresInd; /* Presentation indicator */ 00398 L3UCHAR ScreenInd; /* Screening indicator */ 00399 L3UCHAR Digit[1]; /* Number digits (IA5) */ 00400 00401 } Q931ie_CallingNum; 00402 00403 /***************************************************************************** 00404 00405 Struct: Q931ie_CallingSub 00406 00407 Description: Calling party subaddress 00408 00409 *****************************************************************************/ 00410 00411 typedef struct { 00412 00413 L3UCHAR IEId; /* 01101101 */ 00414 L3UCHAR Size; /* Length of Information Element */ 00415 L3UCHAR TypNum; /* Type of subaddress */ 00416 L3UCHAR OddEvenInd; /* Odd/Even indicator */ 00417 L3UCHAR Digit[1]; /* digits */ 00418 00419 } Q931ie_CallingSub; 00420 00421 /***************************************************************************** 00422 00423 Struct: Q931ie_ChanID 00424 00425 Description: Channel identification 00426 00427 Channel Identificationis one of the IE elements that differ 00428 between BRI and PRI. IntType = 1 = BRI and ChanSlot is used 00429 for channel number, while InfoChanSel is used for BRI. 00430 00431 ChanID is one of the most important IE as it is passed 00432 either though SETUP or CALL PROCEEDING to select the channel 00433 to be used. 00434 00435 *****************************************************************************/ 00436 00437 typedef struct { 00438 00439 L3UCHAR IEId; /* 00011000 */ 00440 L3UCHAR Size; /* Length of Information Element */ 00441 L3UCHAR IntIDPresent; /* Int. id. present */ 00442 L3UCHAR IntType; /* Interface Type */ 00443 /* 0 : Basic Interface (BRI) */ 00444 /* 1 : Other interfaces, PRI etc. */ 00445 00446 L3UCHAR PrefExcl; /* Pref./Excl. */ 00447 /* 0 : Indicated channel is preffered */ 00448 /* 1 : Exclusive, no other accepted */ 00449 00450 L3UCHAR DChanInd; /* D-channel ind. */ 00451 /* 0 : chan is NOT D chan. */ 00452 /* 1 : chan is D chan */ 00453 00454 L3UCHAR InfoChanSel; /* Info. channel selection */ 00455 /* 00 : No channel */ 00456 /* 01 : B1 channel */ 00457 /* 10 : B2 channel */ 00458 /* 11 : Any channel */ 00459 00460 L3UCHAR InterfaceID; /* Interface identifier */ 00461 00462 L3UCHAR CodStand; /* Code standard */ 00463 /* 00 : ITU-T standardization coding */ 00464 /* 01 : ISO/IEC Standard */ 00465 /* 10 : National Standard */ 00466 /* 11 : Standard def. by network. */ 00467 00468 L3UCHAR NumMap; /* Number/Map */ 00469 /* 0 : chan is in following octet */ 00470 /* 1 : chan is indicated by slot map */ 00471 00472 L3UCHAR ChanMapType; /* Channel type/Map element type */ 00473 /* 0011 : B Channel units */ 00474 /* 0110 : H0 channel units */ 00475 /* 1000 : H11 channel units */ 00476 /* 1001 : H12 channel units */ 00477 00478 L3UCHAR ChanSlot; /* Channel number */ 00479 00480 } Q931ie_ChanID; 00481 00482 /***************************************************************************** 00483 00484 Struct: Q931ie_DateTime 00485 00486 Description: Date/time 00487 00488 *****************************************************************************/ 00489 00490 typedef struct { 00491 00492 L3UCHAR IEId; /* 00101001 */ 00493 L3UCHAR Size; /* Length of Information Element */ 00494 L3UCHAR Year; /* Year */ 00495 L3UCHAR Month; /* Month */ 00496 L3UCHAR Day; /* Day */ 00497 L3UCHAR Hour; /* Hour */ 00498 L3UCHAR Minute; /* Minute */ 00499 L3UCHAR Second; /* Second */ 00500 L3UCHAR Format; /* Indicate presense of Hour, Min & sec */ 00501 /* 0 : Only Date */ 00502 /* 1 : Hour present */ 00503 /* 2 : Hour and Minute present */ 00504 /* 3 : Hour, Minute and Second present */ 00505 } Q931ie_DateTime; 00506 00507 /***************************************************************************** 00508 00509 Struct: Q931ie_Display 00510 00511 Description: Display 00512 00513 *****************************************************************************/ 00514 00515 typedef struct { 00516 00517 L3UCHAR IEId; /* 00101000 */ 00518 L3UCHAR Size; /* Length of Information Element */ 00519 L3UCHAR Display[1]; /* Display information (IA5) */ 00520 00521 } Q931ie_Display; 00522 00523 /***************************************************************************** 00524 00525 Struct: Q931ie_HLComp 00526 00527 Description: High layer compatibility 00528 00529 *****************************************************************************/ 00530 00531 typedef struct { 00532 00533 L3UCHAR IEId; /* 01111101 */ 00534 L3UCHAR Size; /* Length of Information Element */ 00535 L3UCHAR CodStand; /* Coding standard */ 00536 L3UCHAR Interpret; /* Interpretation */ 00537 L3UCHAR PresMeth; /* Presentation methor of prot. profile */ 00538 L3UCHAR HLCharID; /* High layer characteristics id. */ 00539 L3UCHAR EHLCharID; /* Extended high layer character. id. */ 00540 L3UCHAR EVideoTlfCharID; /* Ext. videotelephony char. id. */ 00541 00542 } Q931ie_HLComp; 00543 00544 /***************************************************************************** 00545 00546 Struct: Q931ie_KeypadFac 00547 00548 Description: Keypad facility 00549 00550 *****************************************************************************/ 00551 00552 typedef struct { 00553 L3UCHAR IEId; /* 00101100 */ 00554 L3UCHAR Size; /* Length of Information Element */ 00555 L3UCHAR KeypadFac[1]; /* dynamic buffer */ 00556 00557 } Q931ie_KeypadFac; 00558 00559 /***************************************************************************** 00560 00561 Struct: Q931ie_LLComp 00562 00563 Description: Low layer compatibility 00564 00565 *****************************************************************************/ 00566 00567 typedef struct { 00568 00569 L3UCHAR IEId; /* 01111100 */ 00570 L3UCHAR Size; /* Length of Information Element */ 00571 L3UCHAR CodStand; /* Coding standard */ 00572 /* 00 - ITU-T */ 00573 /* 01 - ISO/IEC */ 00574 /* 10 - National standard */ 00575 /* 11 - Network side spesific */ 00576 00577 L3UCHAR ITransCap; /* Information transfer capability */ 00578 /* 00000 - Speech */ 00579 /* 01000 - Unrestricted digital info */ 00580 /* 01001 - Restricted digital info */ 00581 /* 10000 - 3.1 kHz audio */ 00582 /* 10001 - Unrestricted with tones */ 00583 /* 11000 - Video */ 00584 00585 L3UCHAR NegotInd; /* Negot indic. */ 00586 /* 0 : Out-band neg. not possib. */ 00587 /* 1 : Out-band neg. possible */ 00588 00589 L3UCHAR TransMode; /* Transfer Mode */ 00590 /* 00 : Circuit Mode */ 00591 /* 10 : Packed Mode */ 00592 00593 L3UCHAR InfoRate; /* Information transfer rate */ 00594 /* 00000 - Packed mode */ 00595 /* 10000 - 64 kbit/s */ 00596 /* 10001 - 2 x 64 kbit/s */ 00597 /* 10011 - 384 kbit/s */ 00598 /* 10101 - 1536 kbit/s */ 00599 /* 10111 - 1920 kbit/s */ 00600 /* 11000 - Multirat (64 kbit/s base) */ 00601 00602 L3UCHAR RateMul; /* Rate multiplier */ 00603 L3UCHAR Layer1Ident; /* Layer 1 ident. */ 00604 L3UCHAR UIL1Prot; /* User information layer 1 protocol */ 00605 /* 00001 : ITU-T V.110, I.460 and X.30 */ 00606 /* 00010 : G.711 my-law */ 00607 /* 00011 : G.711 A-law */ 00608 /* 00100 : G.721 */ 00609 /* 00101 : H.221 and H.242 */ 00610 /* 00110 : H.223 and H.245 */ 00611 /* 00111 : Non ITU-T Standard */ 00612 /* 01000 : ITU-T V.120 */ 00613 /* 01001 : ITU-T X.31 HDLC flag stuff. */ 00614 00615 L3UCHAR SyncAsync; /* Synch/asynch */ 00616 /* 0 : Syncronous data */ 00617 /* 1 : Asyncronous data */ 00618 00619 L3UCHAR Negot; /* Negot */ 00620 /* 0 : In-band negotiation not possib. */ 00621 /* 1 : In-band negotiation possible */ 00622 00623 L3UCHAR UserRate; /* User rate */ 00624 /* 00000 : I.460, V.110, X,30 */ 00625 /* 00001 : 0.6 kbit/s x.1 */ 00626 /* 00010 : 1.2 kbit/s */ 00627 /* 00011 : 2.4 kbit/s */ 00628 /* 00100 : 3.6 kbit/s */ 00629 /* 00101 : 4.8 kbit/s */ 00630 /* 00110 : 7.2 kbit/s */ 00631 /* 00111 : 8 kbit/s I.460 */ 00632 /* 01000 : 9.6 kbit/s */ 00633 /* 01001 : 14.4 kbit/s */ 00634 /* 01010 : 16 kbit/s */ 00635 /* 01011 : 19.2 kbit/s */ 00636 /* 01100 : 32 kbit/s */ 00637 /* 01101 : 38.4 kbit/s */ 00638 /* 01110 : 48 kbit/s */ 00639 /* 01111 : 56 kbit/s */ 00640 /* 10000 : 57.6 kbit/s */ 00641 /* 10010 : 28.8 kbit/s */ 00642 /* 10100 : 24 kbit/s */ 00643 /* 10101 : 0.1345 kbit/s */ 00644 /* 10110 : 0.100 kbit/s */ 00645 /* 10111 : 0.075/1.2 kbit/s */ 00646 /* 11000 : 1.2/0.075/kbit/s */ 00647 /* 11001 : 0.050 kbit/s */ 00648 /* 11010 : 0.075 kbit/s */ 00649 /* 11011 : 0.110 kbit/s */ 00650 /* 11100 : 0.150 kbit/s */ 00651 /* 11101 : 0.200 kbit/s */ 00652 /* 11110 : 0.300 kbit/s */ 00653 /* 11111 : 12 kbit/s */ 00654 00655 L3UCHAR InterRate; /* Intermediate rate */ 00656 /* 00 : Not used */ 00657 /* 01 : 8 kbit/s */ 00658 /* 10 : 16 kbit/s */ 00659 /* 11 : 32 kbit/s */ 00660 00661 L3UCHAR NIConTx; /* Network Indepentend Clock on transmit*/ 00662 /* 0 : Not required to send data clc */ 00663 /* 1 : Send data w/NIC clc */ 00664 00665 L3UCHAR NIConRx; /* NIC on Rx */ 00666 /* 0 : Cannot accept indep. clc */ 00667 /* 1 : data with indep. clc accepted */ 00668 00669 L3UCHAR FlowCtlTx; /* Flow control on Tx */ 00670 /* 0 : Send Flow ctrl not required */ 00671 /* 1 : Send flow ctrl required */ 00672 00673 L3UCHAR FlowCtlRx; /* Flow control on Rx */ 00674 /* 0 : cannot use receive flow ctrl */ 00675 /* 1 : Receive flow ctrl accepted */ 00676 L3UCHAR HDR; /* HDR/No HDR */ 00677 L3UCHAR MultiFrame; /* Multi frame support */ 00678 /* 0 : multiframe not supported */ 00679 /* 1 : multiframe supported */ 00680 00681 L3UCHAR ModeL1; /* Mode L1 */ 00682 /* 0 : bit transparent mode of operat. */ 00683 /* 1 : protocol sesitive mode of op. */ 00684 00685 L3UCHAR NegotLLI; /* Negot. LLI */ 00686 /* 0 : default LLI=256 only */ 00687 /* 1 : Full protocol negotiation */ 00688 00689 L3UCHAR Assignor; /* Assignor/Assignor ee */ 00690 /* 0 : Default Asignee */ 00691 /* 1 : Assignor only */ 00692 00693 L3UCHAR InBandNeg; /* In-band negot. */ 00694 /* 0 : negot done w/ USER INFO mes */ 00695 /* 1 : negot done in-band w/link zero */ 00696 00697 L3UCHAR NumStopBits; /* Number of stop bits */ 00698 /* 00 : Not used */ 00699 /* 01 : 1 bit */ 00700 /* 10 : 1.5 bits */ 00701 /* 11 : 2 bits */ 00702 00703 L3UCHAR NumDataBits; /* Number of data bits. */ 00704 /* 00 : not used */ 00705 /* 01 : 5 bits */ 00706 /* 10 : 7 bits */ 00707 /* 11 : 8 bits */ 00708 00709 L3UCHAR Parity; /* Parity Information */ 00710 /* 000 : Odd */ 00711 /* 010 : Even */ 00712 /* 011 : None */ 00713 /* 100 : Forced to 0 */ 00714 /* 101 : Forced to 1 */ 00715 00716 L3UCHAR DuplexMode; /* Mode duplex */ 00717 /* 0 : Half duplex */ 00718 /* 1 : Full duplex */ 00719 00720 L3UCHAR ModemType; /* Modem type, see Q.931 p 89 */ 00721 00722 L3UCHAR Layer2Ident; /* Layer 2 ident. */ 00723 00724 L3UCHAR UIL2Prot; /* User information layer 2 protocol */ 00725 /* 00001 : Basic mode ISO 1745 */ 00726 /* 00010 : Q.921/I.441 */ 00727 /* 00110 : X.25 single link */ 00728 /* 00111 : X.25 multilink */ 00729 /* 01000 : Extended LAPB T.71 */ 00730 /* 01001 : HDLC ARM */ 00731 /* 01010 : HDLC NRM */ 00732 /* 01011 : HDLC ABM */ 00733 /* 01100 : LAN logical link */ 00734 /* 01101 : X.75 SLP */ 00735 /* 01110 : Q.922 */ 00736 /* 01111 : Q.922 core aspect */ 00737 /* 10000 : User specified */ 00738 /* 10001 : ISO/IEC 7776 DTE-DCE */ 00739 00740 L3UCHAR ModeL2; /* Mode */ 00741 /* 01 : Normal Mode of operation */ 00742 /* 10 : Extended mode of operation */ 00743 00744 L3UCHAR Q933use; /* Q.9333 use */ 00745 00746 L3UCHAR UsrSpcL2Prot; /* User specified layer 2 protocol info */ 00747 00748 L3UCHAR WindowSize; /* Window size (k) */ 00749 00750 L3UCHAR Layer3Ident; /* Layer 3 ident */ 00751 00752 L3UCHAR UIL3Prot; /* User Information Layer 3 protocol */ 00753 /* 00010 : Q.931 */ 00754 /* 00110 : X.25 */ 00755 /* 00111 : 8208 */ 00756 /* 01000 : X.233 ... */ 00757 /* 01001 : 6473 */ 00758 /* 01010 : T.70 */ 00759 /* 01011 : ISO/IEC TR 9577 */ 00760 /* 10000 : User specified */ 00761 L3UCHAR OptL3Info; /* Optional Leyer 3 info */ 00762 00763 L3UCHAR ModeL3; /* Mode of operation */ 00764 /* 01 : Normal packed seq. numbering */ 00765 /* 10 : Extended packed seq. numbering */ 00766 00767 L3UCHAR DefPackSize; /* Default packet size */ 00768 00769 L3UCHAR PackWinSize; /* Packet window size */ 00770 00771 L3UCHAR AddL3Info; /* Additional Layer 3 protocol info */ 00772 00773 } Q931ie_LLComp; 00774 00775 /***************************************************************************** 00776 00777 Struct: Q931ie_NetFac; 00778 00779 Description: Network-specific facilities 00780 00781 *****************************************************************************/ 00782 00783 typedef struct { 00784 00785 L3UCHAR IEId; /* 00100000 */ 00786 L3UCHAR Size; /* Length of Information Element */ 00787 L3UCHAR LenNetID; /* Length of network facilities id. */ 00788 L3UCHAR TypeNetID; /* Type of network identification */ 00789 L3UCHAR NetIDPlan; /* Network identification plan. */ 00790 L3UCHAR NetFac; /* Network specific facility spec. */ 00791 L3UCHAR NetID[1]; /* Network id. (IA5) */ 00792 00793 } Q931ie_NetFac; 00794 00795 /***************************************************************************** 00796 00797 Struct: Q931ie_NotifInd; 00798 00799 Description: Notification Indicator 00800 00801 *****************************************************************************/ 00802 00803 typedef struct { 00804 00805 L3UCHAR IEId; /* 00100000 */ 00806 L3UCHAR Size; /* Length of Information Element */ 00807 L3UCHAR Notification; /* Notification descriptor */ 00808 00809 } Q931ie_NotifInd; 00810 00811 /***************************************************************************** 00812 00813 Struct: Q931ie_ProgInd 00814 00815 Description: Progress indicator 00816 00817 *****************************************************************************/ 00818 00819 typedef struct { 00820 00821 L3UCHAR IEId; /* 00011110 */ 00822 L3UCHAR Size; /* Length of Information Element */ 00823 L3UCHAR CodStand; /* Coding standard */ 00824 L3UCHAR Location; /* Location */ 00825 L3UCHAR ProgDesc; /* Progress description */ 00826 00827 } Q931ie_ProgInd; 00828 00829 /***************************************************************************** 00830 00831 Struct; Q931ie_Segment 00832 00833 Description: Segmented message 00834 00835 *****************************************************************************/ 00836 00837 typedef struct { 00838 00839 L3UCHAR IEId; /* 00000000 */ 00840 L3UCHAR Size; /* Length of Information Element */ 00841 L3UCHAR FSI; /* First segment indicator */ 00842 L3UCHAR NumSegRem; /* Number of segments remaining */ 00843 L3UCHAR SegType; /* Segment message type */ 00844 00845 } Q931ie_Segment; 00846 00847 00848 typedef struct { 00849 00850 L3UCHAR IEId; /* 00000000 */ 00851 L3UCHAR Size; /* Length of Information Element */ 00852 00853 } Q931ie_SendComplete; 00854 00855 /***************************************************************************** 00856 00857 Struct: Q931ie_Signal 00858 00859 Description: Signal 00860 00861 *****************************************************************************/ 00862 00863 typedef struct { 00864 00865 L3UCHAR IEId; /* 00000000 */ 00866 L3UCHAR Size; /* Length of Information Element */ 00867 L3UCHAR Signal; /* Signal value */ 00868 /* 00000000 Dial tone on */ 00869 /* 00000001 Ring back tone on */ 00870 /* 00000010 Intercept tone on */ 00871 /* 00000011 Network congestion on */ 00872 /* 00000100 Busy tone on */ 00873 /* 00000101 Confirm tone on */ 00874 /* 00000110 Answer tone on */ 00875 /* 00000111 Call waiting tone */ 00876 /* 00001000 Off-hook warning tone */ 00877 /* 00001001 Pre-emption tone on */ 00878 /* 00111111 Tones off */ 00879 /* 01000000 Alerting on - pattern 0 */ 00880 /* 01000001 Alerting on - pattern 1 */ 00881 /* 01000010 Alerting on - pattern 2 */ 00882 /* 01000011 Alerting on - pattern 3 */ 00883 /* 01000100 Alerting on - pattern 4 */ 00884 /* 01000101 Alerting on - pattern 5 */ 00885 /* 01000110 Alerting on - pattern 6 */ 00886 /* 01000111 Alerting on - pattern 7 */ 00887 /* 01001111 Alerting off */ 00888 } Q931ie_Signal; 00889 00890 00891 /***************************************************************************** 00892 00893 Struct: Q931ie_TransNetSel 00894 00895 Description: Transit network selection 00896 00897 *****************************************************************************/ 00898 00899 typedef struct { 00900 00901 L3UCHAR IEId; /* 01111000 */ 00902 L3UCHAR Size; /* Length of Information Element */ 00903 L3UCHAR Type; /* Type of network identifier */ 00904 L3UCHAR NetIDPlan; /* Network idetification plan */ 00905 L3UCHAR NetID[1]; /* Network identification(IA5) */ 00906 00907 } Q931ie_TransNetSel; 00908 00909 /***************************************************************************** 00910 00911 Struct: Q931ie_UserUser 00912 00913 Description: User-user 00914 00915 *****************************************************************************/ 00916 00917 typedef struct { 00918 00919 L3UCHAR IEId; /* 01111110 */ 00920 L3UCHAR Size; /* Length of Information Element */ 00921 L3UCHAR ProtDisc; /* Protocol discriminator */ 00922 L3UCHAR User[1]; /* User information */ 00923 00924 } Q931ie_UserUser; 00925 00926 00927 /***************************************************************************** 00928 00929 Struct: Q931ie_CongLevel 00930 00931 Description: Congestion Level 00932 00933 *****************************************************************************/ 00934 typedef struct { 00935 00936 L3UCHAR IEId; /* 01000111 */ 00937 L3UCHAR Size; /* Length of Information Element */ 00938 L3UCHAR CongLevel; /* Conguestion Level */ 00939 00940 } Q931ie_CongLevel; 00941 00942 typedef struct { 00943 00944 L3UCHAR IEId; /* 01110100 */ 00945 L3UCHAR Size; /* Length of Information Element */ 00946 L3UCHAR RepeatInd; /* 0010 Prioritized list for selecting */ 00947 /* one possible. */ 00948 } Q931ie_RepeatInd; 00949 00950 typedef struct { 00951 00952 L3UCHAR IEId; /* 01110100 */ 00953 L3UCHAR Size; /* Length of Information Element */ 00954 L3UCHAR Spare; /* Spare */ 00955 L3UCHAR Class; /* Class */ 00956 /* 000 Indicate channels */ 00957 /* 110 Single interface */ 00958 /* 111 All interfaces */ 00959 } Q931ie_RestartInd; 00960 00961 typedef struct { 00962 00963 L3UCHAR IEId; /* 01110100 */ 00964 L3UCHAR Size; /* Length of Information Element */ 00965 L3UCHAR Preference; /* Preference 0 = reserved, 1 = channel */ 00966 L3UCHAR Spare; /* Spare */ 00967 L3UCHAR NewStatus; /* NewStatus */ 00968 /* 000 In service */ 00969 /* 001 Maintenance */ 00970 /* 010 Out of service */ 00971 } Q931ie_ChangeStatus; 00972 00973 /***************************************************************************** 00974 00975 Struct: Q931ie_GenericDigits 00976 00977 00978 *****************************************************************************/ 00979 00980 typedef struct { 00981 00982 L3UCHAR IEId; /* 00110111 */ 00983 L3UCHAR Size; /* Length of Information Element */ 00984 L3UCHAR Type; /* Type of number */ 00985 L3UCHAR Encoding; /* Encoding of number */ 00986 L3UCHAR Digit[1]; /* Number digits (IA5) */ 00987 00988 } Q931ie_GenericDigits; 00989 00990 #endif /* _Q931_IE_H_ */