|
|
|
@ -279,4 +279,67 @@ class MyLib { |
|
|
|
|
return $result; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
static public function phoneCenterStatus($cx){ |
|
|
|
|
if($cx=='ANSWERED') { |
|
|
|
|
$cn='通话成功'; |
|
|
|
|
}elseif($cx=='BUSY') { |
|
|
|
|
$cn = '被叫忙'; |
|
|
|
|
}elseif($cx=='NO_ANSWER') { |
|
|
|
|
$cn = '被叫无应答'; |
|
|
|
|
}elseif($cx=='REJECT') { |
|
|
|
|
$cn = '被叫拒接'; |
|
|
|
|
}elseif($cx=='HANGUP') { |
|
|
|
|
$cn = '主叫提前挂机'; |
|
|
|
|
}elseif($cx=='INVALID_NUMBER') { |
|
|
|
|
$cn = '空号'; |
|
|
|
|
}elseif($cx=='POWER_OFF') { |
|
|
|
|
$cn = '关机'; |
|
|
|
|
}elseif($cx=='UNAVAILABLE') { |
|
|
|
|
$cn = '暂时无法接听'; |
|
|
|
|
}elseif($cx=='SUSPEND') { |
|
|
|
|
$cn = '停机'; |
|
|
|
|
}elseif($cx=='TP_NO_BINDING') { |
|
|
|
|
$cn = '无绑定关系'; |
|
|
|
|
}elseif($cx=='TP_TIMEOUT') { |
|
|
|
|
$cn = '号码查询接口超时'; |
|
|
|
|
}elseif($cx=='BLACK') { |
|
|
|
|
$cn = '黑名单号码'; |
|
|
|
|
}elseif($cx=='TP_ERROR') { |
|
|
|
|
$cn = '号码查询接口解析错误'; |
|
|
|
|
|
|
|
|
|
}elseif($cx=='CALLED_BLACK') { |
|
|
|
|
$cn = '被叫不支持'; |
|
|
|
|
}elseif($cx=='CALL_FORWARD') { |
|
|
|
|
$cn = '呼叫转移'; |
|
|
|
|
}elseif($cx=='OTHER') { |
|
|
|
|
$cn = '其他失败情形'; |
|
|
|
|
} |
|
|
|
|
return $cn; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
static public function HMSByTime($time){ |
|
|
|
|
$h=$i=$s=0; |
|
|
|
|
if($time >= 3600){ |
|
|
|
|
$h = floor($time/3600); |
|
|
|
|
$time = ($time%3600); |
|
|
|
|
} |
|
|
|
|
if($time >= 60){ |
|
|
|
|
$i = floor($time/60); |
|
|
|
|
$time = ($time%60); |
|
|
|
|
} |
|
|
|
|
$s = floor($time); |
|
|
|
|
return $h.':'.$i.':'.$s; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
static public function HMSByTimeBuy($time) |
|
|
|
|
{ |
|
|
|
|
$i = 0; |
|
|
|
|
if($time > 0 && $time <60){ |
|
|
|
|
$i = 1; |
|
|
|
|
}elseif($time >= 60){ |
|
|
|
|
$i = ceil($time/60); |
|
|
|
|
} |
|
|
|
|
return $i; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|