惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

宝玉的分享
宝玉的分享
NISL@THU
NISL@THU
E
Exploit-DB.com RSS Feed
L
LINUX DO - 热门话题
L
Lohrmann on Cybersecurity
K
Kaspersky official blog
Project Zero
Project Zero
Cisco Talos Blog
Cisco Talos Blog
T
The Exploit Database - CXSecurity.com
P
Palo Alto Networks Blog
C
CXSECURITY Database RSS Feed - CXSecurity.com
T
Threatpost
S
Schneier on Security
G
GRAHAM CLULEY
The Hacker News
The Hacker News
T
Threat Research - Cisco Blogs
Scott Helme
Scott Helme
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
P
Privacy & Cybersecurity Law Blog
C
Cyber Attacks, Cyber Crime and Cyber Security
Cyberwarzone
Cyberwarzone
C
CERT Recently Published Vulnerability Notes
T
Tor Project blog
AWS News Blog
AWS News Blog
Simon Willison's Weblog
Simon Willison's Weblog
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
爱范儿
爱范儿
P
Privacy International News Feed
云风的 BLOG
云风的 BLOG
P
Proofpoint News Feed
S
Securelist
G
Google Developers Blog
The Last Watchdog
The Last Watchdog
Google Online Security Blog
Google Online Security Blog
美团技术团队
F
Fortinet All Blogs
小众软件
小众软件
Recorded Future
Recorded Future
V
Visual Studio Blog
B
Blog RSS Feed
H
Help Net Security
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Google DeepMind News
Google DeepMind News
Blog — PlanetScale
Blog — PlanetScale
博客园 - 聂微东
Stack Overflow Blog
Stack Overflow Blog
Martin Fowler
Martin Fowler
Latest news
Latest news
Spread Privacy
Spread Privacy
H
Heimdal Security Blog

博客园 - Sandy

外贸网站 Jmail邮件发送程序... - Sandy - 博客园 windows错误代码详解 VIVR 转人工函数 - Sandy - 博客园 VIVR 语音留言函数 - Sandy - 博客园 VIVR 发送传真函数 VIVR 接受传真函数 - Sandy - 博客园 VIVR 收听语音留言函数 - Sandy - 博客园 asp函数表 地道英国习语50条 Money can buy happiness, up to a point 得到星期的sql语句和得到月末的sql语句 C#版,冒泡排序-----C#,BubbleSort Who Is Going to Eat It? 建立一个传表名参数的存储过程 北京今天中午感觉到地震 相信自己... 服务器控件和客户端控件的区别 Ajax原理详细说明(转自ibm开发者网站)
VIVR 主源程...
Sandy · 2006-10-12 · via 博客园 - Sandy

#function main
#function AlarmTimeOff0
#function AlarmTimeOff1
#function AlarmTimeOff2
#iniparam string @vox_path   //相关的配置文件参考sports 流程的 .ini相应文件
#iniparam string @ServerID
#declare SR wsTopic //公司语音流程
#declare IR NETW       //传送端口号
#declare SR userID
#declare SR ServerID
#declare SR Calltelephone="********"
#declare SR Calltelephone1
#declare SR quhao
#declare SR T_AreaCode
#declare IR ifCallerMobile
#declare SR TempCallerID
#declare SR Jiedianhao
#declare SR Seatdataid//坐席和数据库表的ID号
#declare SR Callerid//转人工中,传送的电话号码
#declare SR CallerID//主叫号码


// SR29 语音路径存放  SR28用户按键存放 sr27,sr26,ir9用户按键临时变量  IR1 全播放时记数器
main
{
:stWait
     Connect->stAllocResource                                            //用户呼入

:stAllocResource
     [Assign ServerID,""]
     [Assign SR29,@ServerID]
     [StrCat ServerID,SR29]
     [Assign SR29,""]
     [Assign SR29,@vox_path ]                                            //语音变量存放在变量SR29中
     [AllocMediaDevice 1]                                                //分配媒体资源,资源类型为vox
     AllocResourceOK-> stGetGORParam//分配资源
     AllocResourceFail -> stExit

:stGetGORParam
 [ Assign SR0,"select reserve1,areacode from tbl_areacode" ]
       [ ExecSQL SR0 ]
 Passed -> stonstopflow
 Failed -> stExit
 TimeOut->stExit
 [ SToI FD0 ]
 [ Assign NETW,IR0 ]
 [Assign T_AreaCode,FD1]

:stonstopflow
 [Assign IR6,30]
       [Onstopflow &AlarmTimeOff2]
       [Onstopwatch &AlarmTimeOff2]
 [Oncallcleared &AlarmTimeOff2]
 -> stfuzhi


//************************************提取区号******************************
:stfuzhi
 [Assign CallerID,$CallerID]
 ->stEraseareacode

:stEraseareacode
  [StrLen CallerID]
 [Less IR0,10]
 Passed -> stGetAreaCode        //小于11为的号码为不带区号的裸号
 Failed -> stphoneWait               //大于11的号码再做判断
:stphoneWait
 [Assign IR22,1]
 [Assign SR10,CallerID]  //判断主叫电话号码第一位是不是0,如果是则去掉0
 [StrSub SR10,1,1]
 [Equal SR0,"0"]
 Passed -> stErasePhoneZero
 Failed -> stJudgePhoneLen
:stErasePhoneZero
 [StrSub SR10,2,30]
 [Assign SR10,SR0]
 ->stJudgePhoneLen
:stJudgePhoneLen
 [Assign CallerID,SR10]
 [StrLen SR10]
 [Great IR0,11]            //区别是手机或是市话
 Passed -> stJudgePhone
 Failed -> stIfMobile
:stJudgePhone
 [StrSub SR10,1,1]
 [SToI SR0]
 [Less IR0,3]
 Passed -> stEarsePhone2Bit
 Failed -> stEarsePhone3Bit
:stEarsePhone2Bit
 [StrSub SR10,3,30]
       [Assign SR14,SR0]
 [Assign CallerID,SR0]
 -> stEraseareacode  //剔除第一个区号后再返回开头处理主叫
:stEarsePhone3Bit
 [StrSub SR10,4,30]
 [Assign SR14,SR0]
 [Assign CallerID,SR0]
 -> stEraseareacode
:stGet2bitAreaCode
 [StrSub SR10,1,2]
 [Assign SR15,"0"]
 [StrCat SR15,SR0]
 [Assign quhao,SR15]
 [StrSub SR10,3,13]
       [Assign SR14,SR0]
 [Assign CallerID,SR0]
 ->stStartFlow                                                            
:stGet3bitAreaCode
 [StrSub SR10,1,3]
 [Assign SR15,"0"]
 [StrCat SR15,SR0]
 [Assign quhao,SR15]
 [StrSub SR10,4,13]
       [Assign SR14,SR0]
 [Assign CallerID,SR0]
 ->stStartFlow                                                            
:stIfMobile
 [StrSub SR10,1,2]
 [Equal SR0,"13"]
 Passed ->stChange
 Failed ->stGetAreaCode
:stGetAreaCode
 [StrLen SR10]
 [Great IR0,8]                   //判断是否不带区号的固话
 Passed ->stParseAreaCode
 Failed ->stAssignLocalCode
:stAssignLocalCode             //主叫没有区号信息,在号码前强加本地ips节点区号
 [Assign quhao,T_AreaCode]
 ->stStartFlow                                                            
:stParseAreaCode
 [StrSub SR10,1,1]
 [SToI SR0]
 [Less IR0,3]
 Passed ->stGet2bitAreaCode
 Failed ->stGet3bitAreaCode

:stChange
       [SwitchDBA 400]
       Passed->stParseMobileArea
       Failed->stExit

:stParseMobileArea
 [StrSub SR10,1,3]
 [Assign SR17,SR0]
 [StrSub SR10,4,7]
 [Assign SR18,SR0]
 [Assign SR1 ,"select disno from t_cellno where startchars='"]
 [StrCat SR1,SR17 ]
 [StrCat SR1,"' and startno ='"]
 [StrCat SR1 , SR18 ]
 [StrCat SR1 ,"'"]
 [ExecSQL SR1 ]
 Passed ->stGetMobileArea
 Failed ->stExit
       TimeOut  -> stExit
:stGetMobileArea
 [Assign ifCallerMobile,1]         //主叫是手机用户
 [Assign quhao,FD0]
 ->stStartFlow                                                            

//************************************************************************
:stStartFlow                
     Connect(0)->stExit

  //Add user's code

  :stExit
     [RETURN 0]
}


AlarmTimeOff2
{
#declare SR cmessage
:stWait
      Connect->stEndBill

:stEndBill
      [BillEnd]
      Verify(0)->stDirect4
      Verify(-1)->stDirect4

:stDirect4
    [Assign cmessage,""]
    [STRCAT cmessage,ServerID]
    [STRCAT cmessage,"&4&"]
    [STRCAT cmessage,Calltelephone1]
    [STRCAT cmessage,"$"]
    [STRCAT cmessage,quhao]
    [STRCAT cmessage,"$"]
    [STRCAT cmessage,CallerID] 
    [STRCAT cmessage,"$"]
    [STRCAT cmessage,Seatdataid]
    [ASSIGN SR1,cmessage]
    [directrequestdata NETW,1020,SR1]  
    DataReceived -> stExit
    TimeOut -> stExit
    GatewayNotExist->stExit//注意别丢了这一行
    Failed->stExit//注意别丢了这一行

:stExit
   [RETURN 0]
}