📄 isupptl.hpp
字号:
/* ======================================================================== *\ | | | JOYIT Communication Technology | Copyright (C) 2003~2006, All Right Reserved. | | System: Programmable Signaling Gateway | Sub-system: ISUP | Filename: isupptl.cpp | Environment: Red Hat Linux 7.2 & GNU C/C++ Compiler 2.96 | Function description: ISUP Protocol class |\* ======================================================================== */#ifndef _ISUPPTL_HPP#define _ISUPPTL_HPP#ifndef _PUBDEF_HPP#include "pubdef.hpp"#endif#ifndef _PTLBASE_HPP#include "ptlbase.hpp"#endifclass CIsupPdu : public CPduBase{public: CIsupPdu( ); CIsupPdu(CIsupPdu& s); CIsupPdu(UINT8 pt, UINT8 pv, UINT8 pcf, UINT16 mt); ~CIsupPdu( );public: static UINT8 IsupIe2JoyitIe[MAX_IE]; // Index means ISUP IE value, array element value means Joyit ISUP IE value. static UINT8 JoyitIe2IsupIe[MAX_IE]; // Index means Joyit ISUP IE value, array element value means ISUP IE value. static UINT16 IsupMsg2JoyitMsg[MAX_MSG]; // Index means ISUP message value, array element value means Joyit ISUP message value. static UINT8 JoyitMsg2IsupMsg[MAX_MSG]; // Index means Joyit ISUP message value, array element value means ISUP message value. static void InitStaticData( ); // Initialize static data member. static void InitIsupIe( ); // Initialize IsupIe2JoyitIe array. static void InitJoyitIe( ); // Initialize JoyitIe2IsupIe array. static void InitIsupMsg( ); // Initialize IsupMsg2JoyitMsg array. static void InitJoyitMsg( ); // Initialize JoyitMsg2IsupMsg array. static uchar ToJoyitIe(UINT8 id); // ISUP's IE to ISUP API's IE index. static uchar ToIsupIe(UINT8 id); // ISUP API's IE index to ISUP's IE. static UINT16 ToJoyitMsg(UINT8 id); // ISUP message type to ISUP API message index. static uchar ToIsupMsg(UINT16 id); // ISUP API message index to ISUP message type.public: virtual int Unpacked(char * ptr, UINT16 len, UINT8 mod=MOD_JOYIT); virtual char * OutPut(UINT16& len, UINT8 mod=MOD_JOYIT);public: virtual int DecomposeIsupPdu(char * ptr, UINT16 len); virtual char * ComposeIsupPdu(UINT16& len); char * ComposeJoyitApi(UINT16 & len); // Add 2005-11-20, by Wu jianjin.public: unsigned short UnwrapCalledPartyNumber(unsigned char *src, unsigned short len, unsigned char *dst); unsigned short UnwrapSubsequentNumber(unsigned char *src, unsigned short len, unsigned char *dst); unsigned short UnwrapCallingPartyNumber(unsigned char *src, unsigned short len, unsigned char *dst); unsigned short UnwrapGenericNumber(unsigned char *src, unsigned short len, unsigned char *dst); // Add 2005-05-10, by Wujianjin. /* Unwrap others number can handle the following numbers. * 1. Original called number * 2. Redirection number * 3. Redirecting number * 4. Location number * 5. Connected number */ unsigned short UnwrapOthersNumber(unsigned char *src, unsigned short len, unsigned char *dst);public: unsigned short WrapCalledPartyNumber(unsigned char *src, unsigned short len, unsigned char *dst); unsigned short WrapSubsequentNumber(unsigned char *src, unsigned short len, unsigned char *dst); unsigned short WrapCallingPartyNumber(unsigned char *src, unsigned short len, unsigned char *dst); unsigned short WrapGenericNumber(unsigned char *src, unsigned short len, unsigned char *dst); // Add 2005-05-10, by Wujianjin. /* Wrap others number can handle the following numbers. * 1. Original called number * 2. Redirection number * 3. Redirecting number * 4. Location number * 5. Connected number */ unsigned short WrapOthersNumber(unsigned char *src, unsigned short len, unsigned char *dst);private: // Add 2005-11-19, by Wujianjin. UINT16 ownedPcmId; // This message owned to which Global PCM ID. UINT8 ownedTsId; // This message owned to which time slot. UINT8 rlcType; // RLC respoonse for ? 0: for REL; 1: for RSC.public: // Add 2005-11-19, by Wujianjin. UINT16 WhatPrimitive(UINT16 mType, UINT8 ri=0); // Input Joyit API message type, return what Joyit API primitive type belong to. void OwnedPcm(UINT16 pcm) { ownedPcmId = pcm; } void OwnedTs(UINT8 ts) { ownedTsId = ts; } void WhoOwned(UINT16& pcm, UINT8& ts) { pcm = ownedPcmId; ts = ownedTsId; } UINT16 GetPcm( ) { return ownedPcmId; } UINT8 GetTs( ) { return ownedTsId; } void SetRLC4RSC( ) { rlcType = 1; }};//// Declare ISUP IE//#define ISUP_IE_ACCDLVINF 0x2e // Access Delivery Information#define ISUP_IE_ACCTRN 0x03 // Access Transport#define ISUP_IE_AUTOCNGLVL 0x27 // Automatic Congestion#define ISUP_IE_BCKCALLIND 0x11 // Backward Call Indicator#define ISUP_IE_CALLDVSINF 0x36 // Call Diversion Information#define ISUP_IE_CALLHSTINF 0x2d // Call History Information#define ISUP_IE_CALLRFR 0x01 // Call Reference#define ISUP_IE_CLDPRTNUM 0x04 // Called Party Number#define ISUP_IE_CLNPRTNUM 0x0a // Calling Party Number#define ISUP_IE_CLNPRTCTG 0x09 // Calling Party Category#define ISUP_IE_CAUSEIND 0x12 // Cause Indicator#define ISUP_IE_CGPSPVIND 0xe5 // Circuit group supervision message type indicator#define ISUP_IE_CCTSTATEIND 0x26 // Circuit State Indicator#define ISUP_IE_CLSUSRGRP 0x1a // Closed User Group Interlock Code#define ISUP_IE_CONNUM 0x21 // Connected Number#define ISUP_IE_CONREQ 0x0d // Connection request#define ISUP_IE_COTIND 0x10 // Continuity Indicator#define ISUP_IE_ECHOINF 0x37 // Echo Control Information #define ISUP_IE_ENDOPT 0x00 // Eed of Optional Parameters#define ISUP_IE_EVENTINF 0x24 // Event Information#define ISUP_IE_FACIND 0x18 // Facility Indicator#define ISUP_IE_FWDCALLIND 0x07 // Forward Call Indicator#define ISUP_IE_FREECALLIND 0x41 // Freecall Indicator#define ISUP_IE_GNRDGT 0xc1 // Generic Digit#define ISUP_IE_GNRIND 0x2c // Generic Information#define ISUP_IE_GNRNUM 0xc0 // Generic Number#define ISUP_IE_GNRRFR 0xc2 // Generic Reference#define ISUP_IE_HOPCNT 0x3d // Hop Counter#define ISUP_IE_INFIND 0x0f // Information Indicator#define ISUP_IE_INFRQSIND 0x0e // Information Request Indicator#define ISUP_IE_LCTNUM 0x3f // Location Number#define ISUP_IE_MCIDRQSIND 0x3b // MCID Request Indicator#define ISUP_IE_MCIDRSPIND 0x3c // MCID response Indicator#define ISUP_IE_MSGCMPIND 0x38 // Message Compatibility Indicator#define ISUP_IE_MLPPPRC 0x3a // MLPP Precedence#define ISUP_IE_NTRCONIND 0x06 // Nature of Connection Indicator #define ISUP_IE_NTWSPCFCL 0x2f // Network Specific Facility#define ISUP_IE_OPTBCKCALLIND 0x29 // Optional backward call indicators#define ISUP_IE_OPTFWDCALLIND 0x08 // Optional forward call indicators#define ISUP_IE_ORGCLDNUM 0x28 // Original Call Number#define ISUP_IE_ORGISCPC 0x2b // Origination ISC Point Code#define ISUP_IE_PARACOMPINFO 0x39 // Parameter compatibility Information#define ISUP_IE_PRPDELAYCNT 0x31 // Propagation Delay Counter#define ISUP_IE_RNGSTATUS 0x26 // Range and Status #define ISUP_IE_REDNGNUM 0x0b // Redirecting Number#define ISUP_IE_REDIRINF 0x13 // Redirection Information#define ISUP_IE_REDIRNUM 0x0c // Redirection Number#define ISUP_IE_REDIRNUMRSTR 0x40 // Redirection Number Restriction#define ISUP_IE_RMTOPR 0x32 // Remote Operation#define ISUP_IE_SRVACT 0x33 // Service Activation#define ISUP_IE_SPC 0x1e // Signaling Point Code#define ISUP_IE_SUBNUM 0x05 // Subsequent Number#define ISUP_IE_RESSUSIND 0x22 // Resume and Suspend Indication#define ISUP_IE_TRNNTWSLC 0x23 // Transit Network Selection#define ISUP_IE_TRNMDMRQR 0x02 // Transmission Medium Requirement#define ISUP_IE_TRNMDMRQRP 0x2e // Transmission medium requirement prime#define ISUP_IE_TRNMDMUSE 0x35 // Transmission medium used#define ISUP_IE_USRSRVINF 0x1d // User Services Information#define ISUP_IE_USRSRVINFP 0x30 // User Services Information Prime#define ISUP_IE_USRTELSRVINF 0x34 // User Teleservices Information#define ISUP_IE_USRTOUSRIND 0x2a // User-to-user Indication#define ISUP_IE_USRTOUSRINF 0x20 // User-to-user Information#define ISUP_IE_CRGINF 0xfe // Charge Information//// Declare ISUP signal message type.//#define ISUP_ACM 0x06#define ISUP_ANM 0x09#define ISUP_BLO 0x13#define ISUP_BLA 0x15#define ISUP_CPG 0x2c#define ISUP_CGB 0x18#define ISUP_CGBA 0x1a#define ISUP_CQM 0x2a#define ISUP_CQR 0x2b#define ISUP_GRS 0x17#define ISUP_GRA 0x29#define ISUP_CGU 0x19#define ISUP_CGUA 0x1b#define ISUP_CRG 0x31#define ISUP_CFN 0x2f#define ISUP_CON 0x07#define ISUP_COT 0x05#define ISUP_CCR 0x11#define ISUP_FAC 0x33#define ISUP_FAA 0x20#define ISUP_FRJ 0x21#define ISUP_FAR 0x1f#define ISUP_FOT 0x08#define ISUP_IDR 0x36#define ISUP_IRS 0x37#define ISUP_INF 0x04#define ISUP_INR 0x03#define ISUP_IAM 0x01#define ISUP_LPA 0x24#define ISUP_NRM 0x32#define ISUP_OLM 0x30#define ISUP_PAM 0x28#define ISUP_REL 0x0c#define ISUP_RLC 0x10#define ISUP_RSC 0x12#define ISUP_RES 0x0e#define ISUP_SGM 0x38#define ISUP_SAM 0x02#define ISUP_SUS 0x0d#define ISUP_UBL 0x14#define ISUP_UBA 0x16#define ISUP_UCIC 0x2e#define ISUP_UPA 0x35#define ISUP_UPT 0x34#define ISUP_USR 0x2d// The follow three message only for CHINA ISUP.#define ISUP_OPR 0xfe#define ISUP_MPM 0xfd#define ISUP_CCL 0xfc#endif// ------------------------------------------------------------------------//// Revision list.// ==============//// 1.0, 2005-08-20, Wu jianjin// Initial version.//// ------------------------------------------------------------------------
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -