重启服务时上级平台直接注销再注册

This commit is contained in:
648540858 2022-09-08 10:50:44 +08:00
parent ac5db7eb2c
commit ce40fd9a88

View File

@ -46,17 +46,12 @@ public class SipPlatformRunner implements CommandLineRunner {
parentPlatformCatch.setParentPlatform(parentPlatform); parentPlatformCatch.setParentPlatform(parentPlatform);
parentPlatformCatch.setId(parentPlatform.getServerGBId()); parentPlatformCatch.setId(parentPlatform.getServerGBId());
redisCatchStorage.updatePlatformCatchInfo(parentPlatformCatch); redisCatchStorage.updatePlatformCatchInfo(parentPlatformCatch);
if (parentPlatform.isStatus()) { // 设置所有平台离线
// 设置所有平台离线 platformService.offline(parentPlatform);
platformService.offline(parentPlatform); // 取消订阅
// 取消订阅 sipCommanderForPlatform.unregister(parentPlatform, null, (eventResult)->{
sipCommanderForPlatform.unregister(parentPlatform, null, (eventResult)->{
platformService.login(parentPlatform);
});
}else {
platformService.login(parentPlatform); platformService.login(parentPlatform);
} });
} }
} }
} }