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

📄 checkline.xml

📁 这是一个完整的呼叫中心端口检测程序.是我自已亲手写的.也是因为工作需要.奉献出来.希望大家喜欢.
💻 XML
📖 第 1 页 / 共 2 页
字号:
<?xml version="1.0" encoding="GB2312" standalone="no"?>
<myvxml
  xmlns="http://myvxml.com/myvxml.xsd" 
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://myvxml.com/myvxml.xsd c:\winnt\myvxml.xsd"
  version="1.0" langue="english">

  <meta name="application" content="pabx0"/>
  <meta name="description" content="外线端口检查流程"/>
  <meta name="version" content="ver:0.90"/>
  <meta name="copyright" content="telefine.corp"/>
  <meta name="author" content="zb"/>
  <meta name="maintainer" content="zb"/>
  <meta name="editdate" content="2007-11-12"/>
  
  <public>
  <array name="statgroup" remark="端口号状态数组" type="string" size="30" init="0"/>
  <array name="portgroup" remark="端口号数组" type="string" size="30" init=""/>
  </public>
  
  <private>
  <var name="checkrouter" remark="检测路由号" type="string" init=""/>  
  <var name="temppos" remark="临时指针" type="string" init="0"/>
  <var name="parentport" remark="父端口" type="string" init=""/>
  <var name="temp" remark="常用临时变量" type="int" init="0"/>
  <var name="nlen" remark="字符串长度" type="string" init=""/>
  <var name="newsession" remark="测试产生的会话" type="string" init=""/>
  <var name="statid" remark="状态标识" type="string" init=""/>
  <var name="tempstring" remark="临时字符串" type="string" init=""/>
  <var name="portnum" remark="所有外呼端口数" type="string" init="0"/>
  <var name="pr0" remark="临时变量0" type="string" init=""/>
  <var name="pr1" remark="临时变量1" type="string" init=""/>
  <var name="pr2" remark="临时变量2" type="string" init=""/>
  <var name="pr3" remark="临时变量3" type="string" init="0"/>
  <var name="pr4" remark="临时变量4" type="string" init="0"/>
  <var name="pr5" remark="临时变量5" type="string" init="0"/>
  <var name="pr6" remark="临时变量6" type="string" init="0"/>
  <var name="chntype1" remark="端口类型" type="string" init=""/>
  <var name="chnno1" remark="端口号" type="string" init=""/>  
  <var name="callsession" remark="呼叫坐席产生的会话" type="string" init=""/>
  <var name="checkseatno" remark="指定呼叫坐席" type="string" init=""/>
  <var name="checkchnno" remark="检测的通道号" type="string" init=""/>
  <array name="oristring" remark="原始数组" type="string" size="40" init=""/>
  <array name="errorport" remark="错误端口号数组" type="string" size="30" init=""/>
  </private>

	<mainform id="MainForm" startid="m1000">
	
	<!-- 执行完一次后将变量回复至初始状态 -->
		<assign id="m1000" name="portgroup" expr="" next="m100001"/>
		<assign id="m100001" name="statgroup" expr="0" next="m100002"/>
		<assign id="m100002" name="tempstring" expr="" next="m100003"/>
		<assign id="m100003" name="portnum" expr="0" next="m100004"/>
		<assign id="m100004" name="checkrouter" expr="" next="m100005"/>
		<assign id="m100005" name="pr0" expr="" next="m100006"/>
		<assign id="m100006" name="pr1" expr="" next="m100007"/>
		<assign id="m100007" name="pr2" expr="" next="m100008"/>
		<assign id="m100008" name="pr3" expr="0" next="m100009"/>
		<assign id="m100009" name="pr4" expr="0" next="m100010"/>
		<assign id="m100010" name="pr5" expr="0" next="m100011"/>
		<assign id="m100011" name="pr6" expr="0" next="m100012"/>
		<assign id="m100012" name="temp" expr="0" next="m100013"/>
		<assign id="m100013" name="nlen" expr="" next="m100014"/>
		<assign id="m100014" name="temppos" expr="0" next="m100015"/>
		<assign id="m100015" name="parentport" expr="" next="m100016"/>
		<assign id="m100016" name="chntype1" expr="" next="m100017"/>
		<assign id="m100017" name="chnno1" expr="" next="m100018"/>
		<assign id="m100018" name="checkchnno" expr="" next="m100019"/>
		<assign id="m100019" name="statid" expr="" next="m100020"/>
		<assign id="m100020" name="checkseatno" expr="" next="m100021"/>
		<assign id="m100021" name="newsession" expr="" next="m100022"/>
		<assign id="m100022" name="callsession" expr="" next="m100023"/>
		<assign id="m100023" name="oristring" expr="" next="m100024"/>
		<assign id="m100024" name="errorport" expr="" next="m100025"/>
		
		<assign id="m100025" name="pr6" expr="30" next="m100026"/>
		<if id="m100026" cond="pr6>pr5" thengoto="m100027" elsegoto="m100032"/>
		<assign id="m100027" name="statgroup[pr5]" expr="0" next="m100028"/>
		<assign id="m100028" name="portgroup[pr5]" expr="" next="m100029"/>	
		<assign id="m100029" name="oristring[pr5]" expr="" next="m100030"/>
		<assign id="m100030" name="errorport[pr5]" expr="" next="m100031"/>
		<inc id="m100031" varname="pr5" next="m100026"/>
		
		<assign id="m100032" name="pr5" expr="0" next="m100033"/>
		<assign id="m100033" name="pr6" expr="0" next="m1001"/>
		
		<!-- 根据路由来查找有效中继通道号 -->
		<readinifile id="m1001" remark="查找设定的路由号" 
                 varname="checkrouter" 
                 inifile="ivr.ini" 
                 section="ROUTE"
                 paramer="TestRoute"
                 default=""
                 next="m10010"/>
		
		<readinifile id="m10010" remark="根据得到的路由来查找有效中继端口" 
                 varname="tempstring" 
                 inifile="ivr.ini" 
                 section="ROUTE"
                 paramer="'Route['+checkrouter+']'"
                 default=""
                 next="m1002"/>
		
		<!-- 得到原始字符串 -->
		<len id="m1002" varname="nlen" string="tempstring" next="m1003"/>
		
		<if id="m1003" cond="nlen=0" thengoto="m1155" elsegoto="m1004"/>
		
		<!-- 判断是否设置了有效中继通道号,如设置了,则将此字符串放入数组中 -->
		<if id="m1004" cond="nlen>temppos" thengoto="m1005" elsegoto="m1008"/>
		
		<substring id="m1005" varname="pr0" string="tempstring" startpos="temppos" length="1" next="m1006"/>
		
		<assign id="m1006" name="oristring[temppos]" expr="pr0" next="m1007"/>
		
		<inc id="m1007" varname="temppos" next="m1004"/>
		
		<!-- 字符数组分析 -->
		<assign id="m1008" name="temppos" expr="0" next="m1009"/>
		
		<if id="m1009" cond="nlen>temppos" thengoto="m1010" elsegoto="m1100"/>
		
		<assign id="m1010" name="pr0" expr="oristring[temppos]" next="m1011"/>
		
		<switch id="m1011" remark="判断字符类型">
      <case cond="pr0=','" goto="m1020"/>
      <case cond="pr0='-'" goto="m1030"/>
      <case cond="pr0=0" goto="m1012"/>
      <case cond="pr0=1" goto="m1012"/>
      <case cond="pr0=2" goto="m1012"/>
      <case cond="pr0=3" goto="m1012"/>
      <case cond="pr0=4" goto="m1012"/>
      <case cond="pr0=5" goto="m1012"/>
      <case cond="pr0=6" goto="m1012"/>
      <case cond="pr0=7" goto="m1012"/>
      <case cond="pr0=8" goto="m1012"/>
      <case cond="pr0=9" goto="m1012"/>
      <default goto="m1100"/>
    </switch>
    
    <!--========= 当得到的字符为数字时的处理 ==========-->
    <assign id="m1012" name="portgroup[temp]" expr="pr0" next="m1013"/>
    <inc id="m1013" varname="temppos" next="m1014"/>
    <assign id="m1014" name="pr1" expr="oristring[temppos]" next="m1015"/>
		<switch id="m1015" remark="判断字符类型">
      <case cond="pr1=0" goto="m1016"/>
      <case cond="pr1=1" goto="m1016"/>
      <case cond="pr1=2" goto="m1016"/>
      <case cond="pr1=3" goto="m1016"/>
      <case cond="pr1=4" goto="m1016"/>
      <case cond="pr1=5" goto="m1016"/>
      <case cond="pr1=6" goto="m1016"/>
      <case cond="pr1=7" goto="m1016"/>
      <case cond="pr1=8" goto="m1016"/>
      <case cond="pr1=9" goto="m1016"/>
      <case cond="pr1=','" goto="m1009"/>
      <case cond="pr1='-'" goto="m1009"/>
      <case cond="pr1=''" goto="m1100"/>
    </switch>

		<math id="m1016" varname="pr0" expr="pr1*10+pr0" next="m1012"/>
		
		<!--========== 当得到的字符为","号时的处理 ===========-->
		<inc id="m1020" varname="temppos" next="m1021"/>
		
		<inc id="m1021" varname="temp" next="m1009"/>
		
		<!--========== 当得到的字符为"-"号时的处理 ===========-->
		<inc id="m1030" varname="temppos" next="m1031"/>
		
		<inc id="m1031" varname="temp" next="m1032"/>
		
		<if id="m1032" cond="nlen>temppos" thengoto="m1033" elsegoto="m1100"/>
			
		<assign id="m1033" name="pr1" expr="oristring[temppos]" next="m1034"/>
		
		<inc id="m1034" varname="temppos" next="m1035"/>
		
		<if id="m1035" cond="nlen>temppos" thengoto="m1036" elsegoto="m1039"/>
		
		<assign id="m1036" name="pr0" expr="oristring[temppos]" next="m1037"/>
		
		<switch id="m1037" remark="判断字符类型">
      <case cond="pr0=0" goto="m1038"/>
      <case cond="pr0=1" goto="m1038"/>
      <case cond="pr0=2" goto="m1038"/>
      <case cond="pr0=3" goto="m1038"/>
      <case cond="pr0=4" goto="m1038"/>
      <case cond="pr0=5" goto="m1038"/>
      <case cond="pr0=6" goto="m1038"/>
      <case cond="pr0=7" goto="m1038"/>
      <case cond="pr0=8" goto="m1038"/>
      <case cond="pr0=9" goto="m1038"/>
   		<case cond="pr0=','" goto="m1039"/>
   		<case cond="pr0=''" goto="m1039"/>
    </switch>

		<!-- 当得到的字符为数字时的处理 -->
		<math id="m1038" varname="pr1" expr="pr1*10+pr0" next="m1034"/>
		
		<!-- 当得到的字符为","时的处理 -->
		<math id="m1039" varname="pr2" expr="temp-1" next="m1040"/>
		
		<assign id="m1040" name="parentport" expr="portgroup[pr2]" next="m1042"/>
		
		<inc id="m1042" varname="parentport" next="m1043"/>
		
		<if id="m1043" cond="pr1>=parentport" thengoto="m1044" elsegoto="m1050"/>
		
		<assign id="m1044" name="portgroup[temp]" expr="parentport" next="m1045"/>
		
		<inc id="m1045" varname="temp" next="m1042"/>

		<!-- 当一段端口处理完后 -->
		<inc id="m1050" varname="temppos" next="m1009"/>
		
		<math id="m1051" varname="temp" expr="temp-1" next="m1009"/>
	
		<!--================= 获得有效端口数组后 ==================-->
		<if id="m1100" cond="temp>=pr3" thengoto="m1101" elsegoto="m1110"/>
		
		<if id="m1101" cond="portgroup[pr3]=''" thengoto="m1110" elsegoto="m11010"/>
		
		<assign id="m11010" name="checkchnno" expr="portgroup[pr3]" next="m1102"/>
		
		<fork id="m1102"
          remark="新产生1个会话"
          returnsession="newsession"
          goto="m1300"
          next="m1103"/>

		<switch id="m1103" remark="判断克窿是否成功">
       <case cond="newsession>0" goto="m1104"/>
       <default goto="m9"/>
    </switch>
		
		<inc id="m1104" varname="pr3" next="m1100"/>
		<!--================= 所有有效端口呼完一遍后==================-->
		<inc id="m1110" varname="pr4" next="m1111"/>
		
		<if id="m1111" cond="pr4<4" thengoto="m1112" elsegoto="m1120"/>
		
		<starttimer id="m1112"
              remark="设置定时器0,定时延时十分钟再检测"
              timerid="timer0"
              timelen="600"
              next="m1113"/>
		
		<catch id="m1113" 
           remark="判断定时器结果">
           <onevent event="OnHangon" goto="m9"/>
           <onevent event="OnTimer0" goto="m1114"/>
    </catch>
		
		<assign id="m1114" name="pr3" expr="0" next="m1100"/>
		
		<!--=================  所有有效端口呼完四遍以后==================-->
		<!--对结果进行分析,并写入指定文件,并记下错误的端口号-->
    <starttimer id="m1120"
              remark="设置定时器1,定时延时二十秒再检测"
              timerid="timer1"
              timelen="10"
              next="m1121"/>
		
		<catch id="m1121" 
           remark="判断定时器结果">
           <onevent event="OnHangon" goto="m9"/>
           <onevent event="OnTimer1" goto="m1122"/>
    </catch>
    
    <assign id="m1122" name="pr3" expr="0" next="m1123"/>
    
    <if id="m1123" cond="temp>=pr3" thengoto="m1124" elsegoto="m1150"/>
    
    <assign id="m1124" name="statid" expr="statgroup[pr3]" next="m1125"/>
    
    <if id="m1125" cond="statid=4" thengoto="m1126" elsegoto="m1130"/>
		
		<fwrite id="m1126" filename="portstate.txt" txtline="'端口号:'+portgroup[pr3]+' 状态:连接失败 '" next="m1127"/>
		
		<assign id="m1127" name="errorport[pr5]" expr="portgroup[pr3]" next="m1128"/>
		
		<inc id="m1128" varname="pr5" next="m1131"/>
		
		<fwrite id="m1130" filename="portstate.txt" txtline="'端口号:'+portgroup[pr3]+' 状态:正常 '" next="m1131"/>
		
		<inc id="m1131" varname="pr3" next="m1123"/>
		
		<!--将错误的端口号报给指定的坐席-->

⌨️ 快捷键说明

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