Open unissoft-bj opened 8 years ago
230呼叫18833500052的情况: 230_18833500052_20160217-152922_32769_cg.mp3
客户电话识别正确
呼叫类型逻辑有问题:
上面这个电话,识别为内部呼叫,SAP类型为3;
2016-02-17 15:27:44.829 INFO 19437 --- [ Thread-36] n.w.d.s.primary.MP3FileHandlerImpl : internal call
正确的类型应该是2(呼出)
对于电话呼叫,类型有3个:‘1’-呼入,‘2’-呼出,‘-1’-常规
no user can be found for fax 230; so it is treated as type 3 (NOT_SET).
以长度<=4为界限,区分两个号码是否为分机号 如果主叫是分机号,被叫不是分机号,则类型为呼出 '2' 如果主叫不是分机号,被叫是分机号,则类型为呼入 '1' 否则类型为常规 '-1'
初始值:slpcode 值 ‘-1’,userid值 ‘NULL'
如果电话类型为-1,则退出
如果电话类型为1,则用主叫号码查询;如果电话类型为2,则用被叫号码查询:
根据 分机号码,在sap数据库中查询 userid 和 slpcode
select top 1 userid from ousr where locked='N' and fax='229' order by userid desc;
select top 1 slpcode from oslp where slpname = (select top 1 u_name from ousr where locked='N' and fax='229' order by userid desc);
如果查不到userid,则保持’NULL‘(空值)
如果查不到slpcode,则保持’-1‘(无销售人员)
1,根据号码长度识别分机号码;分机号码长度不大于4位,客户号码大于4位;并以此判断呼入、呼出类型
2,一个fax号码对应到多个userid的情况,取最大的那个userid 参考:
select top 1 userid from ousr where locked='N' and fax='229' order by userid desc;
select top 1 slpcode from oslp where slpname = (select top 1 u_name from ousr where locked='N' and fax='229' order by userid desc);
3,取fax number表时,排除Lokced='Y'的记录
SELECT [USERID] ,[USER_CODE],[Fax],[Locked] FROM [OUSR] where locked='N'
4,web server端口,从8080调整到1809,可以通过121.22.36.226:5006访问录音文件
主机10.0.5.4
TCP/UDP 121.22.36.226:5003 -> 10.0.5.4:5060 (为sip server预留)
TCP/UDP 121.22.36.226:5004 -> 10.0.5.4:80 (为web预留)
TCP/UDP 121.22.36.226:5005 -> 10.0.5.4:1311(录音服务端占用)
TCP/UDP 121.22.36.226:5006-> 10.0.5.4:1809 (预留)
TCP/UDP 121.22.36.226:5007 -> 10.0.5.4:8989(为接收电话事件消息预留)