Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GB28181: Does not support Registersip:SIP server encoding@ip address port SIP/2.0 registration method. #3549

Open
Bigflyingcrab opened this issue May 23, 2023 · 4 comments
Assignees
Labels
Bug It might be a bug. GB28181 For GB28181. TransByAI Translated by AI/GPT.

Comments

@Bigflyingcrab
Copy link

Bigflyingcrab commented May 23, 2023

Note: Please read FAQ before file an issue, see #2716

Description

Please description your issue here

  1. SRS Version: 6.0

  2. SRS Log:

2023-05-23 11:03:19.371][INFO][805727][3f7nssn4] SIP: Change device=34020000001320000001, state=Init->Bye
[2023-05-23 11:03:19.672][INFO][805727][3f7nssn4] GB: before dispose resource(GBS)(0x7f89640fcd20), conns=14, zombies=0, ign=0, inz=0, ind=0
[2023-05-23 11:03:19.672][INFO][805727][3f7nssn4] client finished.
[2023-05-23 11:03:19.672][ERROR][805727][3f7nssn4][4] SIP: Receive err code=1007(SocketRead)(Socket read data failed) : parse message : parse message : grow buffer : read bytes : read
thread [805727][3f7nssn4]: do_cycle() [./src/app/srs_app_gb28181.cpp:1077][errno=4]
thread [805727][3f7nssn4]: parse_message() [./src/protocol/srs_protocol_http_conn.cpp:103][errno=4]
thread [805727][3f7nssn4]: parse_message_imp() [./src/protocol/srs_protocol_http_conn.cpp:153][errno=4]
thread [805727][3f7nssn4]: grow() [./src/protocol/srs_protocol_stream.cpp:162][errno=4]
thread [805727][3f7nssn4]: read() [./src/protocol/srs_protocol_st.cpp:566][errno=4](Interrupted system call)
[2023-05-23 11:03:19.672][ERROR][805727][3f7nssn4][4] SIP: Send err code=1070(StThreadInterrupt)(ST thread is interrupted) : pull : interrupted
thread [805727][3f7nssn4]: do_cycle() [./src/app/srs_app_gb28181.cpp:1162][errno=4]
thread [805727][3f7nssn4]: interrupt() [./src/app/srs_app_st.cpp:257][errno=11](Interrupted system call)
[2023-05-23 11:03:19.672][INFO][805727][3f7nssn4] GB: before dispose resource(GB-SIP-TCP)(0x7f89641070e0), conns=14, zombies=1, ign=0, inz=0, ind=0
[2023-05-23 11:03:19.672][ERROR][805727][3f7nssn4][4] serve error code=1070(StThreadInterrupt)(ST thread is interrupted) : pull : interrupted
thread [805727][3f7nssn4]: do_cycle() [./src/app/srs_app_gb28181.cpp:951][errno=4]
thread [805727][3f7nssn4]: interrupt() [./src/app/srs_app_st.cpp:257][errno=11](Interrupted system call)
[2023-05-23 11:03:19.672][INFO][805727][9bgf922e] GB: clear zombies=2 resources, conns=14, removing=0, unsubs=0
[2023-05-23 11:03:19.672][INFO][805727][3f7nssn4] GB: disposing #0 resource(GBS)(0x7f89640fcd20), conns=14, disposing=2, zombies=0
[2023-05-23 11:03:19.672][INFO][805727][3f7nssn4] GB: disposing #1 resource(GB-SIP-TCP)(0x7f89641070e0), conns=13, disposing=2, zombies=0
  1. SRS Config:
# main config for srs.
# @see full.conf for detail config.

listen              1935;
max_connections     1000;
srs_log_tank        console;
#srs_log_file        ./objs/srs.log;
daemon              off;
http_api {
    enabled         on;
    listen          1985;
}
http_server {
    enabled         on;
    listen          8080;
    dir             ./objs/nginx/html;
}
stream_caster {
    enabled on;
    caster gb28181;
    output rtmp://127.0.0.1/live/[stream];
    listen 9000;
    sip {
        enabled on;
        listen 5060;
        # @see https://ossrs.net/lts/zh-cn/docs/v5/doc/gb28181#config-candidate
        candidate $CANDIDATE;
    }
}
stats {
    network 0;
}
rtc_server {
    enabled on;
    listen 8000; # UDP port
    # @see https://ossrs.net/lts/zh-cn/docs/v4/doc/webrtc#config-candidate
    candidate $CANDIDATE;
}
vhost __defaultVhost__ {
    hls {
        enabled         off;
    }
    http_remux {
        enabled     on;
        mount       [vhost]/[app]/[stream].flv;
    }
    rtc {
        enabled     on;
        # @see https://ossrs.net/lts/zh-cn/docs/v4/doc/webrtc#rtmp-to-rtc
        rtmp_to_rtc off;
        # @see https://ossrs.net/lts/zh-cn/docs/v4/doc/webrtc#rtc-to-rtmp
        rtc_to_rtmp off;
    }

    play{
        gop_cache_max_frames 2500;
    }
}

Replay

Please describe how to replay the bug?

Step 1: The device cannot be successfully registered to SRS.

According to the explanation in section J.1.1 of the national standard GB28181 2016 protocol, the data header requested during registration should be: "Registersip:SIP server code@destination domain name or IP address port SIP/2.0". However, currently SRS 6.0 only supports the format: "Registersip:SIP server code@destination domain name SIP/2.0". If the device connects to SRS using the format "Registersip:SIP server code@IP address port SIP/2.0", an error will occur.

Expect

We hope to add the registration method "Registersip:SIP server code@IP address port SIP/2.0" to improve the compatibility of SRS with GB28181.

TRANS_BY_GPT3

@winlinvip winlinvip changed the title srs6.0 GB28181注册问题 GB28181: 不支持 Registersip:SIP服务器编码@ip地址端口SIP/2.0 注册方式。 Jun 10, 2023
@winlinvip winlinvip added Bug It might be a bug. GB28181 For GB28181. labels Jun 10, 2023
@winlinvip
Copy link
Member

winlinvip commented Jun 10, 2023

Need to confirm if it is really caused by this formatting issue. I didn't see any error logs indicating this reason. I remember that the address problem with Register would print error logs.

TRANS_BY_GPT3

@Bigflyingcrab
Copy link
Author

Bigflyingcrab commented Jun 12, 2023 via email

@geiliwanghaichao
Copy link

geiliwanghaichao commented Jun 29, 2023

@winlinvip I also encountered the same problem. May I ask when will this issue be fixed?

TRANS_BY_GPT3

@winlinvip winlinvip changed the title GB28181: 不支持 Registersip:SIP服务器编码@ip地址端口SIP/2.0 注册方式。 GB28181: Does not support Registersip:SIP server encoding@ip address port SIP/2.0 registration method. Jul 28, 2023
@winlinvip winlinvip added the TransByAI Translated by AI/GPT. label Jul 28, 2023
@winlinvip
Copy link
Member

Do not ask me or anyone else when to fix this issue, ask yourself because it's an open source project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug It might be a bug. GB28181 For GB28181. TransByAI Translated by AI/GPT.
Projects
None yet
Development

No branches or pull requests

4 participants