package com.usky.cdi.service.sip.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * GB28181 配置（与海康摄像机 Web 配置项对应）
 */
@Data
@Component
@ConfigurationProperties(prefix = "sip.client")
public class SipClientProperties {

    private boolean enabled = true;
    /** 启动时自动注册（默认关闭，改用手动 API） */
    private boolean autoStart = false;

    private String serverHost = "114.80.201.142";
    private int serverPort = 15060;
    private String domain = "3402000000";
    private String platformId = "34020000002000000001";
    /** 仅作兼容保留，实际设备 ID 由注册接口动态传入 */
    private String deviceId;
    private String password = "jkjj_wlgz";
    private String sipTransport = "tcp";
    private int registerExpires = 3600;
    /** 等待 REGISTER 最终响应超时（秒） */
    private int registerTimeout = 15;
    /**
     * REGISTER Request-URI 用户部分：platform=国标默认（平台编码），device=部分平台兼容模式（设备编码）
     */
    private String registerUriUser = "platform";

    private int inviteWaitSeconds = 300;
    private int defaultDurationSeconds = 60;
    private String rtspTransport = "tcp";
    /** 通道名称（Catalog 上报），默认 Channel-1 */
    private String channelName = "Channel-1";
}
