⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 capdisp.cpp

📁 七号信令解码器
💻 CPP
📖 第 1 页 / 共 2 页
字号:
		  if((*recbuf&0x7f)==57)
			procCAPNAInfo(0x2f);//NA信息

		  if(indeffmt!=0) {recbuf+=2;UDTlen-=2;}
		  break;


	 case 19:  //连接到资源:19
		  indeffmt=procsequencetag(0x01);
//“资源地址”选择“IP路由地址”“两个都不要”
		  if((*recbuf&0x3f)==0) procCAPADDR(0x03);  //IP路由地址
		  else if((*recbuf&0x3f)==3) procNULL(0x07);  //None(NULL)
//“扩展”
		  if((*recbuf&0x3f)==0x24) ProcCAPExpand(0x09);
//业务相互作用表示语2
		  if((*recbuf&0x3f)==0x27)
		  {indeffmt2=procsequencetag(0x16);  //业务相互作用表示语2 sequence
		   if((*recbuf&0x3f)==2) procsbasicpara(0x18);  //通过连接指示的两种方法(BothwayThroughConnectInd)
		   if(indeffmt2!=0) {recbuf+=2;UDTlen-=2;}
		  }//业务相互作用表示语2

		  if(indeffmt!=0) {recbuf+=2;UDTlen-=2;}
		  break;


	 case 17:  //建立临时连接:17
		  indeffmt=procsequencetag(0x01);
//辅助SSPIP路由地址
		  procCAPADDR(0x03);
//相关ID
		  if((*recbuf&0x3f)==1) procsbasicpara(0x07);
//SCFID
		  if((*recbuf&0x3f)==3) procsbasicpara(0x0a);
//“扩展”
		  if((*recbuf&0x3f)==0x24) ProcCAPExpand(0x0d);
//NA信息
		  if((*recbuf&0x1f)==0x1f) {recbuf++,UDTlen--;}
		  if((*recbuf&0x7f)==50) procCAPNAInfo(0x1f);

		  if(indeffmt!=0) {recbuf+=2;UDTlen-=2;}
		  break;


	 case 24:  //BCSM事件报告:24
		  indeffmt=procsequencetag(0x01);
//BCSM事件类型(枚举)
		  procsbasicpara(0x03);
//“BCSM事件规定的信息”选择  //P60
		  if((*recbuf&0x3f)==0x22)//BCSM事件规定的信息
		  {indeffmt2=procsequencetag(0x06);  //BCSM收集的信息规定的信息 sequence
		   
		   if((*recbuf&0x3f)==0x22)//路由选择故障规定的信息
		   {indeffmt3=procsequencetag(0x08);//路由选择故障规定的信息 sequence
		    if((*recbuf&0x3f)==0) procCase(0x0a); //失败原因
		    if(indeffmt3!=0) {recbuf+=2;UDTlen-=2;}
		   }//路由选择故障规定的信息
		   else if((*recbuf&0x3f)==0x23)//O-被叫忙规定的信息
		   {indeffmt3=procsequencetag(0x0d);//O-被叫忙规定的信息 sequence
		    if((*recbuf&0x3f)==0) procCase(0x0f); //忙原因
		    if(indeffmt3!=0) {recbuf+=2;UDTlen-=2;}
		   }//O-被叫忙规定的信息
		   else if((*recbuf&0x3f)==0x24)//O-无应答规定的信息
		   {
		   }//O-无应答规定的信息
		   else if((*recbuf&0x3f)==0x25)//O-应答规定的信息
		   {
		   }//O-应答规定的信息
		   else if((*recbuf&0x3f)==0x27)//O-拆线规定的信息
		   {indeffmt3=procsequencetag(0x16);//O-拆线规定的信息 sequence
		    if((*recbuf&0x3f)==0) procCase(0x18); //释放原因
		    if(indeffmt3!=0) {recbuf+=2;UDTlen-=2;}
		   }//O-拆线规定的信息
		   else if((*recbuf&0x3f)==0x28)//T-被叫忙规定的信息
		   {indeffmt3=procsequencetag(0x1b);//T-被叫忙规定的信息 sequence
		    if((*recbuf&0x3f)==0) procCase(0x1d); //忙原因
		    if(indeffmt3!=0) {recbuf+=2;UDTlen-=2;}
		   }//T-被叫忙规定的信息
		   else if((*recbuf&0x3f)==0x29)//T-无应答规定的信息
		   {
		   }//T-无应答规定的信息
		   else if((*recbuf&0x3f)==0x2a)//T-应答规定的信息
		   {
		   }//T-应答规定的信息
		   else if((*recbuf&0x3f)==0x2c)//T-拆线规定的信息
		   {indeffmt3=procsequencetag(0x24);//T-拆线规定的信息 sequence
		    if((*recbuf&0x3f)==0) procCase(0x18); //释放原因
		    if(indeffmt3!=0) {recbuf+=2;UDTlen-=2;}
		   }//O-拆线规定的信息
		   if(indeffmt2!=0) {recbuf+=2;UDTlen-=2;}
		  }//BCSM事件规定的信息
//legID
		  if((*recbuf&0x3f)==0x23) procCAPLegID(0x26);
//杂项呼叫信息
		  if((*recbuf&0x3f)==0x24)//杂项呼叫信息
		  {indeffmt2=procsequencetag(0x2b);//杂项呼叫信息 sequence
		   procsbasicpara(0x2d); //信息类型(枚举)
		   if(indeffmt2!=0) {recbuf+=2;UDTlen-=2;}
		  }//杂项呼叫信息
//“扩展”
		  if((*recbuf&0x3f)==0x25) ProcCAPExpand(0x33);

		  if(indeffmt!=0) {recbuf+=2;UDTlen-=2;}
		  break;

	 case 34:  //提供计费信息:34
//CAMEL-FCI帐单计费特性
		  if((*recbuf&0x3f)==0x20)
		  {indeffmt=procsequencetag(0x01); //FCI帐单计费特性 sequence
		   if((*recbuf&0x3f)==0) procsbasicpara(0x03); //FreeFormatData
		   if((*recbuf&0x3f)==0x21)//计费方
		   {indeffmt2=procsequencetag(0x06); //计费方 sequence
		    if((*recbuf&0x3f)==0) procsbasicpara(0x08);  //发方Id
			if(indeffmt2!=0) {recbuf+=2;UDTlen-=2;}
		   }//计费方
		   if(indeffmt!=0) {recbuf+=2;UDTlen-=2;}
		  }
	  
		  break;


	 case 0:  //启动DP:0
		  indeffmt=procsequencetag(0x01); //FCI帐单计费特性 sequence
//业务键
		  if((*recbuf&0x3f)==0) procsbasicpara(0x03);
//被叫用户号码
		  if((*recbuf&0x3f)==2) procCAPADDR(0x06);
//主叫用户号码
		  if((*recbuf&0x3f)==3) procCAPADDR(0x0a);
//主叫用户类别
		  if((*recbuf&0x3f)==5) procsbasicpara(0x0e);
//IPSSP能力
		  if((*recbuf&0x3f)==8) procsbasicpara(0x11);
//位置号码
		  if((*recbuf&0x3f)==10) procCAPADDR(0x14);
//原被叫用户ID
		  if((*recbuf&0x3f)==12) procCAPADDR(0x18);
//“扩展”
		  if((*recbuf&0x3f)==0x2f) ProcCAPExpand(0x1c);
//高层一致性
		  if((*recbuf&0x3f)==23) procsbasicpara(0x29);
//附加主叫用户号码
		  if((*recbuf&0x3f)==25) procCAPADDR(0x2c);
//“承载能力”选择“承载能力1”“传输媒介要求”
		  if((*recbuf&0x3f)==0x3b)//承载能力:27
		  {indeffmt2=procsequencetag(0x30);//承载能力 sequence
		   if((*recbuf&0x1f)==0) procsbasicpara(0x32); //承载能力1
		   else if((*recbuf&0x1f)==1) procsbasicpara(0x35); //传输媒介要求
		   if(indeffmt2!=0) {recbuf+=2;UDTlen-=2;}
		  }//承载能力
//BCSM事件类型(枚举)
		  if((*recbuf&0x3f)==28) procsbasicpara(0x38);
		  if((*recbuf&0x1f)==0x1f) {recbuf++;UDTlen--;} //2001.08.28
//改向用户ID
		  if((*recbuf&0x3f)==29) procCAPADDR(0x3b);
		  if((*recbuf&0x1f)==0x1f) {recbuf++;UDTlen--;} //2001.08.28
//改向信息
		  if((*recbuf&0x3f)==30) procsbasicpara(0x3f);
//说明,当标签只大于30时,应格式为  |类别(2bits)|构成(1bit)|11111|  +  |扩展(1bit)|标签值(7bits)|+...(31~127)
//so, have: if((*recbuf&0x1f)==0x1f) {recbuf++;UDTlen--;}
//tag>30 have:if((*recbuf&0x7f)==tag) 
		  if((*recbuf&0x1f)==0x1f) {recbuf++;UDTlen--;} //2001.08.28
//IMSI
		  if((*recbuf&0x7f)==50) procIMSI(0x42);
//用户状态(枚举)
		  if((*recbuf&0x1f)==0x1f) {recbuf++;UDTlen--;} //2001.08.28
		  if((*recbuf&0x7f)==51) procsbasicpara(0x45);
//“位置信息”选择“漫游号码”“MSC号码”
		  if((*recbuf&0x1f)==0x1f) {recbuf++;UDTlen--;} //2001.08.28
		  if((*recbuf&0x7f)==52)
		  {indeffmt2=procsequencetag(0x48);//位置信息 sequence
			 if(*recbuf==2) procsbasicpara(0x75);//ageofLocationInformation
			 if((*recbuf&0x1f)==0) procGeographInfo(0x78);//geographicalInformation zxf add function
			 if((*recbuf&0x1f)==1) procsISDNADDR(0x7e);//vlr-number
			 if((*recbuf&0x1f)==2) procsbasicpara(0x82);//locationNumber
			 if((*recbuf&0x1f)==3) //cillIdOrLAI
			 {
				 BYTE indeffmt1=procsequencetag(0x85);//cellidorlai tag
				 if((*recbuf&0x1f)==0) procCCILA(0x87,0x8b,1);//cellIdFixedLength zxf add function
				 else if((*recbuf&0x1f)==1) procCCILA(0x89,0x8b,0);//laiFixedLength zxf add function
				 if(indeffmt1!=0) {recbuf+=2;UDTlen-=2;}
			 }
			 if((*recbuf&0x1f)==4) procExtension(0x1c);//extensionContainer
			 if(indeffmt2!=0) {recbuf+=2;UDTlen-=2;}
		  }
//“外部基本业务码”选择“承载业务码”“电信业务码”
		  if((*recbuf&0x1f)==0x1f) {recbuf++;UDTlen--;} //2001.08.28
		  if((*recbuf&0x7f)==53)
		  {indeffmt2=procsequencetag(0x52);//外部基本业务码 sequence
		   if((*recbuf&0x3f)==2) procsbasicpara(0x54);  //承载业务码
		   else if((*recbuf&0x3f)==3) procsbasicpara(0x57);  //电信业务码
		  }
//呼叫参考号码
		  if((*recbuf&0x1f)==0x1f) {recbuf++;UDTlen--;} //2001.08.28
		  if((*recbuf&0x7f)==54) procsbasicpara(0x5a);
//MSC号码
		  if((*recbuf&0x1f)==0x1f) {recbuf++;UDTlen--;} //2001.08.28
		  if((*recbuf&0x7f)==55) procsISDNADDR(0x4e);
//被叫BCD号码
		  if((*recbuf&0x1f)==0x1f) {recbuf++;UDTlen--;} //2001.08.28
		  if((*recbuf&0x7f)==56) procsISDNADDR(0x5d);
//时间和时区
		  if((*recbuf&0x1f)==0x1f) {recbuf++;UDTlen--;} //2001.08.28
		  if((*recbuf&0x7f)==57)
		  {
			*dispbuf++=0x61;  //时间和时区tag
			*dispbuf++=8;
			*dispbuf++=*recbuf++;
			*dispbuf++=0xcc;
//时间和时区 LI
			*dispbuf++=0x62;
			*dispbuf++=8;
			li=*dispbuf++=*recbuf++;
			*dispbuf++=0xcc;
			UDTlen-=li+2;
//时间
			*dispbuf++=0x63;
			*dispbuf++=56;
			for(i=0;i<7;i++) {*dispbuf++ = (*recbuf>>4) | (*recbuf<<4);recbuf++;}
			*dispbuf++=0xcc;
//时区
			*dispbuf++=0x64;
			*dispbuf++=8;
			*dispbuf++=*recbuf++;
			*dispbuf++=0xcc;

			displen += 22;
		  }//时间和时区
//gsm前转挂起(NULL)
		  if((*recbuf&0x1f)==0x1f) {recbuf++;UDTlen--;} //2001.08.28
		  if((*recbuf&0x7f)==58) procNULL(0x65);
//启动DP扩展
		  if((*recbuf&0x1f)==0x1f) {recbuf++;UDTlen--;} //2001.08.28
		  if((*recbuf&0x7f)==59)
		  {indeffmt2=procsequencetag(0x67); //启动DP扩展 sequence
//NA承载信息
		   if((*recbuf&0x3f)==0x20)
		   {indeffmt3=procsequencetag(0x69); //NA承载信息 sequence
		    if((*recbuf&0x3f)==0) procsbasicpara(0x6b);  //NA承载Id
		    if((*recbuf&0x3f)==1) procsbasicpara(0x6e);  //NA CIC选择类型
			if(indeffmt3!=0) {recbuf+=2;UDTlen-=2;}
		   }//NA承载信息
		   if((*recbuf&0x3f)==1) procsISDNADDR(0x71); //GMSC addr
		   if(indeffmt2!=0) {recbuf+=2;UDTlen-=2;}
		  }//启动DP扩展

		  if(indeffmt!=0) {recbuf+=2;UDTlen-=2;}
		  break;



	 case 47:  //播送通知:47
		  indeffmt=procsequencetag(0x01); //sequence
//要发送的信息
		  if((*recbuf&0x3f)==0x20) ProcCAPSendingInfo(0x03); //要发送的信息
//禁止由IP启动拆线(BOOL)
		  if((*recbuf&0x3f)==0x01) procsbasicpara(0x3b);
//请求通知完成(BOOL)
		  if((*recbuf&0x3f)==0x02) procsbasicpara(0x3e);
//“扩展”
		  if((*recbuf&0x3f)==0x23) ProcCAPExpand(0x41);

		  if(indeffmt!=0) {recbuf+=2;UDTlen-=2;}
		  break;

	 case 48:  //提示并收集用户信息:48
		  if(compt==1)//operate
		  {indeffmt=procsequencetag(0x01); //sequence
//收集的信息选择“收集的数字”
		   indeffmt2=procsequencetag(0x03); //收集的信息 sequence
		   if((*recbuf&0x3f)==0x20)//收集的数字
		   {indeffmt3=procsequencetag(0x05); //收集的数字 sequence
			if((*recbuf&0x3f)==0) procsbasicpara(0x07);  //最小数字个数
			if((*recbuf&0x3f)==1) procsbasicpara(0x0a);  //最大数字个数
			if((*recbuf&0x3f)==2) procsbasicpara(0x0d);  //应答结束数字
			if((*recbuf&0x3f)==3) procsbasicpara(0x10);  //取消数字
			if((*recbuf&0x3f)==4) procsbasicpara(0x13);  //开始数字
			if((*recbuf&0x3f)==5) procsbasicpara(0x16);  //首位超时
			if((*recbuf&0x3f)==6) procsbasicpara(0x19);  //位间超时
			if((*recbuf&0x3f)==7) procsbasicpara(0x1c);  //差错处理(枚举)
			if((*recbuf&0x3f)==8) procsbasicpara(0x1f);  //中断通知表示语(BOOL)
			if((*recbuf&0x3f)==9) procsbasicpara(0x22);  //语音信息(BOOL)
			if((*recbuf&0x3f)==10) procsbasicpara(0x25);  //语音反馈(BOOL)
		    if(indeffmt3!=0) {recbuf+=2;UDTlen-=2;}
		   }//收集的数字

		   if(indeffmt2!=0) {recbuf+=2;UDTlen-=2;}
//禁止由IP启动拆线(BOOL)
		   procsbasicpara(0x28);
//要发送的信息
		   if((*recbuf&0x3f)==0x22) ProcCAPSendingInfo(0x2b);
//“扩展”
		   if((*recbuf&0x3f)==0x23) ProcCAPExpand(0x5f);

		   if(indeffmt!=0) {recbuf+=2;UDTlen-=2;}
		  }//operate
		  else//result
		  {if((*recbuf&0x3f)==0) procsbasicpara(0x6c); //数字响应
		  }//result
		  break;

	 case 22:  //释放呼叫:22
		  procCase(0x01);
		  break;


	 case 23:  //请求报告BCSM事件:23
		  indeffmt=procsequencetag(0x01);  //sequence
//BCSM事件组
		  indeffmt2=procsequencetag(0x03);  //BCSM事件组 sequence
		  i=0;
		  while(*recbuf==0x30 && i<numOfBCSMEvents)//BCSM事件
		  {i++;
		   indeffmt3=procsequencetag(0x05);  //BCSM事件 sequence
		   procsbasicpara(0x07);  //BCSM事件类型(枚举)
		   procsbasicpara(0x0a);  //监视方式(枚举)
		   if((*recbuf&0x3f)==0x22) procCAPLegID(0x0d); //LEGID
		   if((*recbuf&0x3f)==0x3e)//DP规定准则:30
		   {indeffmt4=procsequencetag(0x12);//DP规定准则 sequence
		    if((*recbuf&0x3f)==1) procsbasicpara(0x14);  //应用定时器
		    if(indeffmt4!=0) {recbuf+=2;UDTlen-=2;}
		   }//DP规定准则
		   if(indeffmt3!=0) {recbuf+=2;UDTlen-=2;}
		  }//BCSM事件
		  if(indeffmt2!=0) {recbuf+=2;UDTlen-=2;}
//“扩展”
		  if((*recbuf&0x3f)==0x22) ProcCAPExpand(0x17);

		  if(indeffmt!=0) {recbuf+=2;UDTlen-=2;}
		  break;

	 case 33:  //重设定时器:33
		  indeffmt=procsequencetag(0x01);  //sequence
//定时器ID(枚举)
		  if((*recbuf&0x3f)==0) procsbasicpara(0x03);
//定时器值
		  if((*recbuf&0x3f)==1) procsbasicpara(0x06);
//“扩展”
		  if((*recbuf&0x3f)==0x22) ProcCAPExpand(0x09);

		  if(indeffmt!=0) {recbuf+=2;UDTlen-=2;}
		  break;



	 case 46:  //发送计费信息
		  indeffmt=procsequencetag(0x01);  //sequence
//CAMEL-SCI帐单计费特性
		  if((*recbuf&0x3f)==0x20)//CAMEL-SCI帐单计费特性
		  {indeffmt2=procsequencetag(0x03);  //CAMEL-SCI帐单计费特性 sequence
		   if((*recbuf&0x3f)==0x20)//应答前AOC
		   {indeffmt3=procsequencetag(0x05);  //应答前AOC sequence
		    if((*recbuf&0x3f)==0x20)//初始化AOC
			{indeffmt4=procsequencetag(0x07);  //初始化AOC sequence
			 if((*recbuf&0x3f)==0) procsbasicpara(0x09); //e1
			 if((*recbuf&0x3f)==1) procsbasicpara(0x0c); //e2
			 if((*recbuf&0x3f)==2) procsbasicpara(0x0f); //e3
			 if((*recbuf&0x3f)==3) procsbasicpara(0x12); //e4
			 if((*recbuf&0x3f)==4) procsbasicpara(0x15); //e5
			 if((*recbuf&0x3f)==5) procsbasicpara(0x18); //e6
			 if((*recbuf&0x3f)==6) procsbasicpara(0x1b); //e7
			 if(indeffmt4!=0) {recbuf+=2;UDTlen-=2;}
			}//初始化AOC
		    if((*recbuf&0x3f)==0x21)//后续AOC
			{indeffmt4=procsequencetag(0x1e);  //后续AOC sequence
			 if((*recbuf&0x3f)==0x20)//cAI-GSM0224
			 {indeffmt5=procsequencetag(0x25);  //cAI-GSM0224 sequence

				 if((*recbuf&0x3f)==0) procsbasicpara(0x09); //e1
				 if((*recbuf&0x3f)==1) procsbasicpara(0x0c); //e2
				 if((*recbuf&0x3f)==2) procsbasicpara(0x0f); //e3
				 if((*recbuf&0x3f)==3) procsbasicpara(0x12); //e4
				 if((*recbuf&0x3f)==4) procsbasicpara(0x15); //e5
				 if((*recbuf&0x3f)==5) procsbasicpara(0x18); //e6
				 if((*recbuf&0x3f)==6) procsbasicpara(0x1b); //e7

			  if(indeffmt5!=0) {recbuf+=2;UDTlen-=2;}
			 }//cAI-GSM0224
			 if((*recbuf&0x3f)==1) procsbasicpara(0x22); //费率变换间隔
			 if(indeffmt4!=0) {recbuf+=2;UDTlen-=2;}
			}//后续AOC
			if(indeffmt3!=0) {recbuf+=2;UDTlen-=2;}
		   }//应答前AOC
		   else if((*recbuf&0x3f)==0x21)//应答后AOC
		   {indeffmt4=procsequencetag(0x1e);  //后续AOC sequence
			if((*recbuf&0x3f)==0x20)//cAI-GSM0224
			{indeffmt5=procsequencetag(0x20);  //cAI-GSM0224 sequence

			 if((*recbuf&0x3f)==0) procsbasicpara(0x09); //e1
			 if((*recbuf&0x3f)==1) procsbasicpara(0x0c); //e2
			 if((*recbuf&0x3f)==2) procsbasicpara(0x0f); //e3
			 if((*recbuf&0x3f)==3) procsbasicpara(0x12); //e4
			 if((*recbuf&0x3f)==4) procsbasicpara(0x15); //e5
			 if((*recbuf&0x3f)==5) procsbasicpara(0x18); //e6
			 if((*recbuf&0x3f)==6) procsbasicpara(0x1b); //e7

			 if(indeffmt5!=0) {recbuf+=2;UDTlen-=2;}
			}//cAI-GSM0224
			if((*recbuf&0x3f)==1) procsbasicpara(0x1e); //费率变换间隔
			if(indeffmt4!=0) {recbuf+=2;UDTlen-=2;}
		   }//应答后AOC
		   if(indeffmt2!=0) {recbuf+=2;UDTlen-=2;}
		  }//CAMEL-SCI帐单计费特性
//计费方
		  if((*recbuf&0x3f)==0x21)//计费方
		  {indeffmt3=procsequencetag(0x27);//计费方 sequence
		   if((*recbuf&0x3f)==0)  procsbasicpara(0x29); //发方Id
		   if(indeffmt3!=0) {recbuf+=2;UDTlen-=2;}
		  }//计费方
//“扩展”
		  if((*recbuf&0x3f)==0x22) ProcCAPExpand(0x2c);

		  if(indeffmt != 0) {recbuf+=2;UDTlen-=2;}

		  break;


	 case 49:  //专用资源报告:49
		  procNULL(0x01);
		  break;


	 default:break;
	}//switch
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -