B接口协议调试
移动视频类设备&平台国标GB28181输入/输出GB28181平台对接、RTSP/RTMP输入&输出, https://www.besovideo.com/detail?t=1&i=229
B接口本质上就是国标GB28181的变种,其实smarteye协议也类似国标,都是SIP+RTP负载的构架。所有的视频流媒体协议的构架基本都差不多。
平台侧需要的端口
10800、10801、10443、(TCP+UDP)
RTSP: 10554/TCP
tcp 10554 udp:48500-49997 这个范围,这个是rtsp协助用到的。
redis服务的端口是9779
不支持tcp连接udp推流,国网检测也没有这样检,一般就是tcp信令,tcp流;UDP信令UDP流。
https://61.191.27.18:10443/webrtc/index.html
通道id 130000000113270001
/api/sg/play?channelID=130000000113270001&rate=sub&streamTransportProtocol=udp&tcpConnectionMode=active&verifySsrc=false&streamType=video
虽然国网送检时候ssrc这一块不校验,但生产的环境这个就会有问题
ffmpeg -re -i 源文件.mp4 \
-c:v copy \
-c:a pcm_alaw -ar 8000 -ac 1 \
-rtsp_transport udp \
-f rtsp rtsp://服务器:10554/live/test
报文
Frame 5: Packet, 718 bytes on wire (5744 bits), 718 bytes captured (5744 bits) on interface \Device\NPF_{91507A6A-0383-40CA-B005-1C1DADD6286C}, id 0
Ethernet II, Src: HuaweiTechno_e2:33:01 (44:c3:46:e2:33:01), Dst: c2:47:40:d0:91:ba (c2:47:40:d0:91:ba)
Internet Protocol Version 4, Src: 192.168.137.139, Dst: 192.168.88.32
User Datagram Protocol, Src Port: 5060, Dst Port: 25060
Session Initiation Protocol (REGISTER)
Request-Line: REGISTER sip:130000000101040001@192.168.88.32:25060 SIP/2.0
Message Header
Via: SIP/2.0/UDP 192.168.137.139:5060;rport;branch=z9hG4bK600950704
From: <sip:130000000101040001@192.168.88.32:25060>;tag=1259956823
SIP from address: sip:130000000101040001@192.168.88.32:25060
SIP from tag: 1259956823
To: <sip:130000000101040001@192.168.88.32:25060>
SIP to address: sip:130000000101040001@192.168.88.32:25060
Call-ID: 2038627530
[Generated Call-ID: 2038627530]
CSeq: 2 REGISTER
Contact: <sip:130000000101040001@192.168.137.139:5060;line=436f2c1765e35ea>
Contact URI: sip:130000000101040001@192.168.137.139:5060;line=436f2c1765e35ea
Authorization: Digest username="130000000101040001", realm="192.168.88.32", nonce="1791537448:bb18b45d458b035b027110c14721e485", uri="sip:130000000101040001@192.168.88.32:25060", response="80a4cacbcc677e454c1edbccb9cf9714", algorithm=MD5
Authentication Scheme: Digest
Username: "130000000101040001"
Realm: "192.168.88.32"
Nonce Value: "1791537448:bb18b45d458b035b027110c14721e485"
Authentication URI: "sip:130000000101040001@192.168.88.32:25060"
Digest Authentication Response: "80a4cacbcc677e454c1edbccb9cf9714"
Algorithm: MD5
Max-Forwards: 70
User-Agent: media-b
Expires: 300
Content-Length: 0
喊话&对讲
/api/sg/voiceTalk?channelID=130000000113270001&streamTransportProtocol=udp&tcpConnectionMode=active&rtcpBeforeFirstRtpOnTcp=0&verifySsrc=false
192.168.88.32:20800/api/sg/voiceTalk?channelID=130000000113270001&streamTransportProtocol=udp&tcpConnectionMode=active&rtcpBeforeFirstRtpOnTcp=0&verifySsrc=false
curl "http://192.168.88.32:20800/api/sg/play?channelID=130000000113270001&rate=sub&streamTransportProtocol=udp&tcplse&streamType=mixed&secret=035c73f7-bb6b-4889-a715-d9eb2d1925cc0"
http://192.168.88.32:20800/api/sg/playback?channelID=130000000113270001&url=rtsp://192.168.137.123/Playback/PU_22939944_00_20260923_142702.mp4&beginTime=2026-09-23T01:00:00Z&endTime=2026-09-23T13:00:00Z&streamTransportProtocol=udp&tcpConnectionMode=active&verifySsrc=false&streamType=mixed&secret=035c73f7-bb6b-4889-a715-d9eb2d1925cc0
对讲的URL,
webrtc": "https://192.168.88.32:10443/index/api/webrtc?app-rtp&stream-130000000113270001 Talk&type=voiceTalk"
