|
|
@@ -281,6 +281,25 @@ public class PBXServiceImpl implements IPBXService {
|
|
|
}
|
|
|
if (dtmf.length() > 6) {
|
|
|
log.info("dtmf length > 6, dtmf : {}",dtmf);
|
|
|
+ // bugfix dtmf出现转接的电话号码
|
|
|
+ String toPhone = "";
|
|
|
+ if (dtmf.length() == 11) {
|
|
|
+ toPhone = dtmf;
|
|
|
+ }
|
|
|
+ if (dtmf.length() == 12) {
|
|
|
+ toPhone = dtmf.substring(1,12);
|
|
|
+ }
|
|
|
+ if (!StringUtils.isEmpty(toPhone)) {
|
|
|
+ String callId2Phone = redisCache.getCacheObject(PBXConstant.PBX_TRANSFER_CODE_KEY + toPhone);
|
|
|
+ if (StringUtils.isEmpty(callId2Phone)) {
|
|
|
+ log.info("callId2Phone no cache transferToValue,key : {}",PBXConstant.PBX_TRANSFER_CODE_KEY + toPhone);
|
|
|
+ }else {
|
|
|
+ if (callId.equals(callId2Phone)) {
|
|
|
+ log.info("dtmf is to phone number : {}",toPhone);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
log.info("dtmfEvent,callId:{}", callId);
|
|
|
/** 以#结束 通过info获取 begin */
|