📄 isup_codec.c
字号:
// ==========================================================================// // @(#) $Id: ISUP_Codec.C,v 1.3 2000/10/13 15:45:51 brian Exp $// // --------------------------------------------------------------------------// // Copyright (C) 1997-2000 Brian Bidulock <bidulock@dallas.net>// // All Rights Reserved.// // This library is free software; you can redistribute it and/or modify it// under the terms of the GNU Lesser General Public License as published by// the Free Software Foundation; either version 2.1 of the License, or (at// your option) any later version.// // This library is distributed in the hope that it will be useful, but// WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License// for more details.// // You should have received a copy of the GNU Lesser General Public License// along with this library; if not, write to the Free Software Foundation,// Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA// // Last Modified $Date: 2000/10/13 15:45:51 $ by $Author: brian $// // --------------------------------------------------------------------------// // $Log: ISUP_Codec.C,v $// Revision 1.3 2000/10/13 15:45:51 brian// First public release.//// ==========================================================================static char const ident[] = "$Id: ISUP_Codec.C,v 1.3 2000/10/13 15:45:51 brian Exp $";#pragma implementation#include "head.h"#ifndef __HEAD_H__#define __HEAD_H__#pragma interface#endif __HEAD_H__#include "ISUP_Codec.H"// ***********************************************************// ****// **** Common Field and Set Definitions// ****// ***********************************************************Codec_INN::Codec_INN() : Set("INN","Internal Number Ind",1,0, "YES", 0, "Routing to internal number allowed", "NO", 1, "Routing to internal number not allowed", NULL) {};Codec_SCR::Codec_SCR() : Set("SCR","Screening Indicator",2,0, "UPNV", 0, "User provided, not verified", "UPVP", 1, "User provided, verified and passed", "UPVF", 2, "User provided, verified and failed", "NP", 3, "Network provided", NULL) {};Codec_PRES::Codec_PRES() : Set("PRES","Presentation Ind",2,0, "YES", 0, "Presentation allowed", "NO", 1, "Presentation not allowed", NULL) {};Codec_CPNI::Codec_CPNI() : Set("CPNI","Number Incomplete Ind",1,0, "COM", 0, "Complete", "INCOM",1, "Incomplete", NULL) {};Codec_EEM::Codec_EEM() : Set("EEM","End to End Method",2,0, "NONE", 0, "No end-to-end method available", "PASS", 1, "Pass along method available", "SCCP", 2, "SCCP method available", "BOTH", 3, "Both Pass along and SCCP available", NULL) {};Codec_IW::Codec_IW() : Set("IW","Interworking Ind",1,0, "NO", 0, "No interworking encountered", "YES", 1, "Interworking encountered", NULL) {};Codec_EEI::Codec_EEI() : Set("EEI","End to end info",1,0, "NO", 0, "No end to end information available", "YES", 1, "End to end information available", NULL) {};Codec_ISUPI::Codec_ISUPI() : Set("ISUPI","ISDN User Part Ind",1,0, "NO", 0, "ISUP not used all the way", "YES", 1, "ISUP used all the way", NULL) {};Codec_NETPLAN::Codec_NETPLAN() : Set("NETPLAN","Network ID Plan",4,0, "UNK", 0, "Unknown", "CIC3", 1, "3 digit CIC with circuit code", "CIC4", 2, "4 digit CIC with circuit code", "DNIC", 3, "Public Data Network (DNIC)", "MNIC", 6, "Public Land Mobile Network (MNIC)", NULL) {};Codec_NETTYPE::Codec_NETTYPE() : Set("NETTYPE","Network ID Type",3,0, "CCITT", 0, "CCITT Standard Id", "NAT", 2, "National Standard Id", NULL) {};// ***********************************************************// ****// **** Parameter Definitions// ****// ***********************************************************Codec_CLRF ::Codec_CLRF () : Parameter("CLRF","Call Reference",40,2,0,(Codec**)&CLID) { CLID = new Field("CLID","Call Identity",24,0); PCODE = new Codec_PC("PCODE","Point Code",4,6,4,2);};Codec_ATP ::Codec_ATP () : Parameter("ATP","Access Transport",-1,1,0,(Codec**)&DATA) { DATA = new OctetString("DATA","Data",-1);};Codec_CDPN ::Codec_CDPN () : Parameter("CDPN","Called Party Number",-1,7,0,(Codec**)&NAI) { NAI = new Codec_NAI(); OE = new Codec_OE(); SCR = new Codec_SPAR2(); PRES = new Codec_SPAR2(); NPLAN = new Codec_NPLAN(); INN = new Codec_INN(); ADDI = new Codec_ADDI();};Codec_NCI ::Codec_NCI () : Parameter("NCI","Nat of Connection Inds",8,4,0,(Codec**)&SATI) { SATI = new Set("SATI","Satellite Indicator",2,0, "0", 0, "No satellite circuit", "1", 1, "One satellite circuit", "2", 2, "Two satellite circuits", "3", 3, "Three or more satellite circuits", NULL); CCI = new Set("CCI","Continuity Check Ind",2,0, "NO", 0, "Check not required", "YES", 1, "Check required on this circuit", "PREV", 2, "Check performed on a previous circuit", NULL); OECHO = new Set("OECHO","Echo Control Ind",1,0, "NO", 0, "No outgoing half echo control device", "YES", 1, "Outgoing half echo control device", NULL); SPARE = new Codec_SPAR3();};Codec_FCI ::Codec_FCI () : Parameter("FCI","Forward Call Inds",16,8,0,(Codec**)&NIC) { NIC = new Set("NIC","Nat'l/Int'l Call Ind",1,0, "NAT", 0, "Call treated as national call", "INT", 1, "Call treated as international call", NULL); EEM = new Codec_EEM(); IW = new Codec_IW(); EEI = new Codec_EEI(); ISUPI = new Codec_ISUPI(); ISUPPREF = new Set("ISUPPREF","ISUP Preference Ind",2,0, "YES", 0, "ISUP preferred all the way", "NO", 1, "ISUP not required all the way", "REQ", 2, "ISUP required all the way", NULL); ISDNOA = new Set("ISDNOA","Originating Access",1,0, "NO", 0, "Non-ISDN", "YES", 1, "ISDN", NULL); SPARE = new Codec_SPAR7();};Codec_OFCI ::Codec_OFCI () : Parameter("OFCI","Opt Forward Call Inds",8,6,0,(Codec**)&CUGCI) { CUGCI = new Set("CUGCI","CUG Call Ind",2,0, "CUG", 0, "CUG check successful", "NONE", 1, "Non-CUG call", "OGA", 2, "CUG call with outgoing access", "NOGA", 3, "CUG call without outgoing access", NULL); SPARE1 = new Codec_SPAR2(); CCBS = new Set("CCBS","CCBS Call Ind",1,0, "NO", 0, "Not a CCBS call", "YES", 1, "CCBS call", NULL); SPARE2 = new Codec_SPAR1(); CNI = new Set("CNI","Calling Party Number",1,0, "NO", 0, "Complete", "YES", 1, "Incomplete", NULL); CNAR = new Set("CNAR","Connected Address",1,0, "NO", 0, "Not requested", "YES", 1, "Requested", NULL);};Codec_CPC ::Codec_CPC () : Parameter("CPC","Calling Party Category",8,1,0,(Codec**)&CPC) { CPC = new Set("CPC","Calling Party Category",8,0, "UNK", 0, "Unknown", "FR", 1, "Operator - French", "ENG", 2, "Operator - English", "GER", 3, "Operator - German", "RUS", 4, "Operator - Russian", "SPA", 5, "Operator - Spanish", "ORD", 10, "Ordinary calling subscriber", "PRIO", 11, "Calling subscriber with priority", "DATA", 12, "Data call", "TEST", 13, "Test call", "NVT", 14, "Non-voice terminal", "PAY", 15, "Payphone", "P2", 250, "Subscriber with precedence level 2", "P3", 251, "Subscriber with precedence level 3", "P4", 252, "Subscriber with precedence level 4", "P5", 253, "Subscriber with precedence level 5", NULL);};Codec_CGPN ::Codec_CGPN () : Parameter("CGPN","Calling Party Number",-1,7,0,(Codec**)&NAI) { NAI = new Codec_NAI(); OE = new Codec_OE(); SCR = new Codec_SCR(); PRES = new Codec_PRES(); NPLAN = new Codec_NPLAN(); CPNI = new Codec_CPNI(); ADDI = new Codec_ADDI();};Codec_RDGN ::Codec_RDGN () : Parameter("RDGN","Redirecting Number",-1,7,0,(Codec**)&NAI) { NAI = new Codec_NAI(); OE = new Codec_OE(); SCR = new Codec_SCR(); PRES = new Codec_PRES(); NPLAN = new Codec_NPLAN(); INN = new Codec_SPAR1(); ADDI = new Codec_ADDI();};Codec_RDNN ::Codec_RDNN () : Parameter("RDNN","Redirection Number",-1,7,0,(Codec**)&NAI) { NAI = new Codec_NAI(); OE = new Codec_OE(); SCR = new Codec_SPAR2(); PRES = new Codec_PRES(); NPLAN = new Codec_NPLAN(); INN = new Codec_INN(); ADDI = new Codec_ADDI();};Codec_CONR ::Codec_CONR () : Parameter("CONR","Connection Request",56,4,0,(Codec**)&LREF) { LREF = new Field("LREF","Local Reference",24,0); PCODE = new Codec_PC("PCODE","Point Code"); PCLASS = new Field("PLCASS","Protocol Class",8,0); CREDIT = new Field("CREDIT","Credit",8,0);};Codec_INRI ::Codec_INRI () : Parameter("INRI","Info Request Inds",16,11,0,(Codec**)&CPA) { CPA = new Set("CPA","Calling Party Address",1,0, "NO", 0, "Not requested", "YES", 1, "Requested", NULL); CPAH = new Set("CPAH","CPA Holding",1,0, "NO", 0, "Hold not requested", "YES", 1, "Hold requested", NULL); CNA = new Set("CNA","Connected Address",1,0, "NO", 0, "Not requested", "YES", 1, "Requested", NULL); CPC = new Set("CPC","Calling Party Category",1,0, "NO", 0, "Not requested", "YES", 1, "Requested", NULL); CRG = new Set("CRG","Charge Information",1,0, "NO", 0, "Not requested", "YES", 1, "Requested", NULL); RDA = new Set("RDA","Redirecting Address",1,0, "NO", 0, "Not requested", "YES", 1, "Requested", NULL); INX = new Set("INX","Index",1,0, "NO", 0, "Not requested", "YES", 1, "Requested", NULL); MCI = new Set("MCI","Malicious Call ID",1,0, "NO", 0, "Not requested", "YES", 1, "Requested", NULL); MCIH = new Set("MCIH","MCI Holding",1,0, "NO", 0, "Hold not requested", "YES", 1, "Hold requested", NULL); SPARE = new Codec_SPAR6(); MLBG = new Set("MLBG","Business Group Info",1,0, "NO", 0, "Not requested", "YES", 1, "Requested", NULL);};Codec_INFI ::Codec_INFI () : Parameter("INFI","Info Indicators",16,10,0,(Codec**)&CPA) { CPA = new Set("CPA","Calling Party Address",2,0, "NOTI", 0, "Not included", "NOTA", 1, "Not available", "INCL", 3, "Included", NULL); CPAH = new Set("CPAH","CPA Hold",1,0, "NO", 0, "Hold not provided", "YES", 1, "Hold provided", NULL); CNA = new Set("CNA","Connected Address",2,0, "NOTI", 0, "Not included", "NOTA", 1, "Not available", "INCL", 3, "Included", NULL); CPC = new Set("CPC","Calling Party Category",1,0, "NO", 0, "Not included", "YES", 1, "Included", NULL); CRG = new Set("CRG","Charge Information",1,0, "NO", 0, "Not included", "YES", 1, "Included", NULL); RDA = new Set("RDA","Redirecting Address",2,0, "NOTI", 0, "Not included", "NOTA", 1, "Not available", "INCL", 3, "Included", NULL); INX = new Set("INX","Index",1,0, "NO", 0, "Not included", "YES", 1, "Included", NULL); SOLINF = new Set("SOLINF","Solicited Information",1,0, "NO", 0, "Solicited", "YES", 1, "Unsolicited", NULL); SPARE = new Codec_SPAR4(); MLBG = new Set("MLBG","Business Group Info",1,0, "NO", 0, "Not included", "YES", 1, "Included", NULL);};Codec_COTI ::Codec_COTI () : Parameter("COTI","Continuity Indicators",8,1,0,(Codec**)&COTI) { COTI = new Set("COTI","Continuity Indicator",1,7, "FAIL", 0, "Continuity check failed", "PASS", 1, "Continuity check passed", NULL);};Codec_BCI ::Codec_BCI () : Parameter("BCI","Backward Call Inds",16,11,0,(Codec**)&CRGI) { CRGI = new Set("CRGI","Charge Indicator",2,0, "NIND", 0, "No indication", "NO", 1, "No charge", "YES", 2, "Charge", NULL); CPS = new Set("CPS","Called Party Status",2,0, "NIND", 0, "No indication", "FREE", 1, "Subscriber free", "CON", 2, "Connect when free", NULL); CPCI = new Set("CPCI","Called Party Category",2,0, "NIND", 0, "No indication", "ORD", 1, "Ordinary subscriber", "PAY", 2, "Payphone", NULL); EEM = new Codec_EEM(); IW = new Codec_IW(); EEI = new Codec_EEI(); ISUPI = new Codec_ISUPI(); HOLDR = new Set("HOLDR","Holding",1,0, "NO", 0, "Hold not required", "YES", 1, "Hold required", NULL); ISDNTA = new Set("ISDNTA","Terminating Access",1,0, "NO", 0, "Non-ISDN", "YES", 1, "ISDN", NULL); IECHO = new Set("IECHO","Echo Control Ind",1,0, "NO", 0, "No incoming half echo control device", "YES", 1, "Incoming half echo control device", NULL); SCCPMD = new Set("SCCPMD","SCCP Method Ind",2,0, "NIND", 0, "No indication", "CL", 1, "Connectionless method available", "CO", 2, "Connection oriented method available", "BOTH", 3, "Both SCCP methods available", NULL);};Codec_CAUS ::Codec_CAUS () : Parameter("CAUS","Cause Indicators",16,5,2,(Codec**)&LOC) { LOC = new Set("LOC","Location",4,1, "USER", 0, "User", "PRIVL", 1, "Private network serving the local user", "PUBL", 2, "Public network serving the local user", "TRANS", 3, "Transit network",
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -