mediaStatus byeRequest 修复

This commit is contained in:
shikong 2023-10-10 14:13:30 +08:00
parent 5a35e37687
commit 765b1f6fe8

View File

@ -31,8 +31,6 @@ import org.bytedeco.javacv.FFmpegFrameRecorder;
import org.bytedeco.javacv.FrameGrabber;
import org.springframework.stereotype.Service;
import javax.sip.SipProvider;
import javax.sip.message.Request;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.OutputStream;
@ -118,11 +116,9 @@ public class VideoService {
WvpProxyDocking wvpProxyDocking = deviceByGbDeviceId.get();
String ip = wvpProxyDocking.getIp();
int port = Integer.parseInt(wvpProxyDocking.getPort());
String transport = proxySipConfig.getTransport();
SipProvider provider = sender.getProvider(transport, ip);
Request byeRequest = SipRequestBuilder.createByeRequest(ip, port, device.getGbDeviceChannelId(), SipUtil.generateFromTag(), null, callId);
try{
provider.sendRequest(byeRequest);
sender.sendRequest((provider,localIp,localPort)->
SipRequestBuilder.createByeRequest(ip, port, device.getGbDeviceChannelId(), SipUtil.generateFromTag(), null, callId));
}catch (Exception e){
log.error("bye 请求发送失败 {}",e.getMessage());
}