Skip to content

Commit

Permalink
luna-common 升级2.5.2
Browse files Browse the repository at this point in the history
去掉sipId验证
  • Loading branch information
chenzhangyue committed Dec 7, 2023
1 parent a768184 commit edf9d94
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
*/
@Getter
@Setter
@Component("serverRegisterRequestProcessor")
@Component
@Slf4j
public class ServerRegisterRequestProcessor extends SipRequestProcessorAbstract {

Expand All @@ -63,10 +63,9 @@ public void process(RequestEvent evt) {
boolean registerFlag = expires > 0;

String userId = SipUtils.getUserIdFromFromHeader(request);
String sipUserId = SipUtils.getUser(request);

FromDevice fromDevice = (FromDevice)registerProcessorServer.getFromDevice();
if (fromDevice == null || !sipUserId.equals(fromDevice.getUserId())) {
if (fromDevice == null) {
return;
}
// 设备接收到的IP地址,有可能是Nat之后的, 本地回复直接使用这个地址即可
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

import com.luna.common.os.SystemInfoUtil;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
Expand All @@ -12,6 +13,7 @@
import io.github.lunasaw.sip.common.entity.Device;
import io.github.lunasaw.sip.common.entity.FromDevice;
import io.github.lunasaw.sip.common.entity.ToDevice;
import oshi.SystemInfo;

/**
* @author luna
Expand All @@ -20,7 +22,7 @@
@Configuration
public class DeviceConfig {

public static final String LOOP_IP = "10.143.118.70";
public static final String LOOP_IP = SystemInfoUtil.getIpv4();

public static final String LOOP_IP_LOCAL = "0.0.0.0";

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
<spring-boot.version>2.7.10</spring-boot.version>
<luna-common.version>2.4.8</luna-common.version>
<luna-common.version>2.5.2</luna-common.version>
<github.username>lunasaw</github.username>
<app.profiles>${project.name}</app.profiles>
<sip.version>1.3.0-91</sip.version>
Expand Down

0 comments on commit edf9d94

Please sign in to comment.