合并主线

This commit is contained in:
648540858
2022-11-18 21:52:02 +08:00
parent f223aad705
commit ecf84bb0f1
28 changed files with 231 additions and 350 deletions

View File

@@ -122,4 +122,21 @@ public class SipUtils {
public static String getNewCallId() {
return (int) Math.floor(Math.random() * 10000) + "";
}
public static int getTypeCodeFromGbCode(String deviceId) {
if (ObjectUtils.isEmpty(deviceId)) {
return 0;
}
return Integer.parseInt(deviceId.substring(10, 13));
}
/**
* 判断是否是前端外围设备
* @param deviceId
* @return
*/
public static boolean isFrontEnd(String deviceId) {
int typeCodeFromGbCode = getTypeCodeFromGbCode(deviceId);
return typeCodeFromGbCode > 130 && typeCodeFromGbCode < 199;
}
}