语音广播功能实现用户通过语音输入设备向前端语音输出设备的语音广播。语音流发送者向语音流接收者发送通知消息,语音流接受者在收到通知消息后,进行判断处理。若能够接收广播,则向语音流发送者发起呼叫请求,获取广播媒体流。
设备如果具备语音输出能力,这在设备目录查询和订阅时,需要上报语音输出设备。如果不上报语音输出设备,这表示该设备没有语音输出能力。上报语音输出通道时,ParentID
填写其父设备的ID。
例如,IPC
具备语音输出能力,在IPC
上报设备目录时,需要上报语音输出设备,该语音输出设备ID的类型编码为137,其父设备为该IPC
。
监控中心与设备之间进行语音广播,可以直接对语音输出设备发送语音广播通知,也可以对语音输出设备所属的前端主设备发送语音广播通知。对前端主设备发送语音广播通知消息中仅需携带前端主设备编码,表示对该设备上所有的语音输出设备进行语音广播。例如,对IPC
发送语音广播通知,表示对该IPC
接入的所有语音输出设备进行广播;对NVR
发送语音广播通知,表示对NVR
下所有IPC
以及自身的语音输出设备进行广播。
测试设备:大华枪机
设备类型:IPC-HFW3233DM-I1
设备ip地址:10.1.7.77
版本号:V2.800.0000000.18.R, Build Date: 2020-12-01
设备序列号:7A02EA5PAG4AEFD
前端语音输出设备:摄像机IPC
音频输出接口连接的音响
配置摄像机GB28181
:音频通道编码ID
:34020000001370000001 (必须是137)
接收设备消息
REGISTER sip:44010200492000000001@10.1.7.118:5060 SIP/2.0
Call-ID: 10628d28f6b49a088ace7d8c89591f19
Contact: <sip:34020000001370000001@10.1.7.77:5060>
CSeq: 1 REGISTER
Expires: 3600
From: <sip:34020000001370000001@10.1.7.77:5060>;tag=022a448cc580c6b1c2c46a5c77730c90
Max-Forwards: 70
Route: <sip:34020000001370000001@10.1.7.118:5060;lr>
To: <sip:34020000001370000001@10.1.7.77:5060>
User-Agent: SIP UAS V3.0.0.954271
Via: SIP/2.0/UDP 10.1.7.77:5060;rport=5060;branch=z9hG4bK109ebdf8c33a41cf1e85459385af5fbd;received=10.1.7.77
Content-Length: 0
?响应消息
SIP/2.0 401 Unauthorized
CSeq: 1 REGISTER
Call-ID: 10628d28f6b49a088ace7d8c89591f19
From: <sip:34020000001370000001@10.1.7.77:5060>;tag=022a448cc580c6b1c2c46a5c77730c90
To: <sip:34020000001370000001@10.1.7.77:5060>
Via: SIP/2.0/UDP 10.1.7.77:5060;rport=5060;branch=z9hG4bK109ebdf8c33a41cf1e85459385af5fbd;received=10.1.7.77
WWW-Authenticate: Digest realm="4401020049",qop="auth",nonce="ed5f1509b528135c8c50e189d3a83b6d",algorithm=MD5
Content-Length: 0
接收设备消息
REGISTER sip:44010200492000000001@10.1.7.118:5060 SIP/2.0
Authorization: Digest username="34020000001370000001",realm="4401020049",nonce="4e56ebfb40cc2f22fcb87646d783c7db",uri="sip:44010200492000000001@10.1.7.118:5060",response="d898c776d51d609eb0aff724e20f0138",algorithm=MD5,cnonce="0a4f113b",qop=auth,nc=00000001
Call-ID: 58eef5f36fa9906b5d30d18e4c609154
Contact: <sip:34020000001370000001@10.1.7.77:5060>
CSeq: 2 REGISTER
Expires: 3600
From: <sip:34020000001370000001@10.1.7.77:5060>;tag=fad52fdcb8f6310d66c08bd3b34434a8
Max-Forwards: 70
Route: <sip:34020000001370000001@10.1.7.118:5060;lr>
To: <sip:34020000001370000001@10.1.7.77:5060>
User-Agent: SIP UAS V3.0.0.954271
Via: SIP/2.0/UDP 10.1.7.77:5060;rport=5060;branch=z9hG4bK0c028153c9ba09e49bc2fc6c3d1639fa;received=10.1.7.77
Content-Length: 0
?响应消息
SIP/2.0 200 OK
CSeq: 2 REGISTER
Call-ID: 58eef5f36fa9906b5d30d18e4c609154
From: <sip:34020000001370000001@10.1.7.77:5060>;tag=fad52fdcb8f6310d66c08bd3b34434a8
To: <sip:34020000001370000001@10.1.7.77:5060>
Via: SIP/2.0/UDP 10.1.7.77:5060;rport=5060;branch=z9hG4bK0c028153c9ba09e49bc2fc6c3d1639fa;received=10.1.7.77
Date: 2023-05-05T14:28:53.403
Contact: <sip:34020000001370000001@10.1.7.77:5060>
Expires: 3600
User-Agent: bw-register-success
Content-Length: 0
接收设备消息
MESSAGE sip:44010200492000000001@10.1.7.118:5060 SIP/2.0
Call-ID: d40ca2c167ee9d1622c1f08fe8c73751
Content-Type: Application/MANSCDP+xml
CSeq: 21838 MESSAGE
From: <sip:34020000001370000001@10.1.7.77:5060>;tag=f110b5b4909ee8c903342eaebed6cee9
Max-Forwards: 70
To: <sip:44010200492000000001@10.1.7.118:5060>
User-Agent: SIP UAS V3.0.0.954271
Via: SIP/2.0/UDP 10.1.7.77:5060;rport=5060;branch=z9hG4bK6acde52add8d524427d27509f6dad891;received=10.1.7.77
Content-Length: 176
<?xml version="1.0" encoding="GB2312" standalone="yes" ?>
<Notify>
<CmdType>Keepalive</CmdType>
<SN>21781</SN>
<DeviceID>34020000001370000001</DeviceID>
<Status>OK</Status>
</Notify>
?响应消息
SIP/2.0 200 OK
CSeq: 21838 MESSAGE
Call-ID: d40ca2c167ee9d1622c1f08fe8c73751
From: <sip:34020000001370000001@10.1.7.77:5060>;tag=f110b5b4909ee8c903342eaebed6cee9
To: <sip:44010200492000000001@10.1.7.118:5060>;tag=1683268259302
Via: SIP/2.0/UDP 10.1.7.77:5060;rport=5060;branch=z9hG4bK6acde52add8d524427d27509f6dad891;received=10.1.7.77
Content-Length: 0
发送消息内容
MESSAGE sip:10.1.7.77:5060 SIP/2.0
Call-ID: 63ba4264359bd8a803b88c4a0e533591@0.0.0.0
CSeq: 1 MESSAGE
From: <sip:44010200492000000001@10.1.7.118:5060>;tag=FromRecordInfoTag
To: <sip:4401020049>
Via: SIP/2.0/UDP 10.1.7.118:5060;branch=ViaRecordInfoBranch;rport
Max-Forwards: 70
Content-Type: APPLICATION/MANSCDP+xml
Content-Length: 177
<?xml version="1.0"?>
<Notify>
<CmdType>Broadcast</CmdType>
<SN>723262</SN>
<SourceID>44010200492000000001</SourceID>
<TargetID>34020000001370000001</TargetID>
</Notify>
接收响应消息
SIP/2.0 200 OK
接收消息内容
MESSAGE sip:44010200492000000001@10.1.7.118:5060 SIP/2.0
Call-ID: 1a10e43f2487c980cbd2616dcabf298b
Content-Type: Application/MANSCDP+xml
CSeq: 21847 MESSAGE
From: <sip:34020000001370000001@10.1.7.77:5060>;tag=8e2c4c32726d8f47e5a8aa3072709f6b
Max-Forwards: 70
To: <sip:44010200492000000001@10.1.7.118:5060>
User-Agent: SIP UAS V3.0.0.954271
Via: SIP/2.0/UDP 10.1.7.77:5060;rport=5060;branch=z9hG4bK59e7bb938816fe7d631360b933f27956;received=10.1.7.77
Content-Length: 181
<?xml version="1.0" encoding="GB2312" standalone="yes" ?>
<Response>
<CmdType>Broadcast</CmdType>
<SN>723262</SN>
<DeviceID>34020000001370000001</DeviceID>
<Result>OK</Result>
</Response>
响应消息
SIP/2.0 200 OK
CSeq: 21847 MESSAGE
Call-ID: 1a10e43f2487c980cbd2616dcabf298b
From: <sip:34020000001370000001@10.1.7.77:5060>;tag=8e2c4c32726d8f47e5a8aa3072709f6b
To: <sip:44010200492000000001@10.1.7.118:5060>
Via: SIP/2.0/UDP 10.1.7.77:5060;rport=5060;branch=z9hG4bK59e7bb938816fe7d631360b933f27956;received=10.1.7.77
Content-Length: 0
接收消息内容
INVITE sip:44010200492000000001@10.1.7.118:5060 SIP/2.0
Call-ID: 2023050514381413766140196
Contact: <sip:34020000001370000001@10.1.7.77:5060>
Content-Type: application/sdp
CSeq: 1 INVITE
Expires: 120
From: <sip:34020000001370000001@10.1.7.77:5060>;tag=65429fe156b71481631948bf4ac6e8cf
Max-Forwards: 70
Subject: 44010200492000000001:03d7a8ef3276a8ef327,34020000001370000001:0552354c54f3354c54f
To: <sip:44010200492000000001@10.1.7.118:5060>
User-Agent: SIP UAS V3.0.0.954271
Via: SIP/2.0/UDP 10.1.7.77:5060;rport=5060;branch=z9hG4bK48d5e0c7acf281ee416e2d116c118c4e;received=10.1.7.77
Content-Length: 233
v=0
o=34020000001370000001 0 0 IN IP4 10.1.7.77
s=Play
i=VCam BroadCast Session
c=IN IP4 10.1.7.77
t=0 0
m=audio 10016 RTP/AVP 8 96
a=recvonly
a=rtpmap:8 PCMA/8000/1
a=rtpmap:96 PS/90000
y=0914782430
f=v/0/0/0/0/0a/1/8/1
响应消息
SIP/2.0 200 OK
CSeq: 1 INVITE
Call-ID: 2023050514381413766140196
From: <sip:34020000001370000001@10.1.7.77:5060>;tag=65429fe156b71481631948bf4ac6e8cf
To: <sip:44010200492000000001@10.1.7.118:5060>
Via: SIP/2.0/UDP 10.1.7.77:5060;rport=5060;branch=z9hG4bK48d5e0c7acf281ee416e2d116c118c4e;received=10.1.7.77
Contact: <sip:44010200492000000001@10.1.7.118:5060>
Content-Type: application/SDP
Content-Length: 176
v=0
o=44010200492000000001 0 0 IN IP4 10.1.7.118
s=Play
c=IN IP4 10.1.7.118
t=0 0
m=audio 8000 RTP/AVP 8
a=rtpmap:8 PCMA/8000
a=sendonly
y=0914782430
f=v/a/1/8/1
ACK sip:44010200492000000001@10.1.7.118:5060 SIP/2.0
Call-ID: 2023050818554630145807416
Contact: <sip:34020000001370000001@10.1.7.77:5060>
CSeq: 1 ACK
From: <sip:34020000001370000001@10.1.7.77:5060>;tag=dceb1e1cb73f587da9db0997d21329aa
Max-Forwards: 70
To: <sip:44010200492000000001@10.1.7.118:5060>;tag=2023050818554630145807416
User-Agent: SIP UAS V3.0.0.954271
Via: SIP/2.0/UDP 10.1.7.77:5060;rport=5060;branch=z9hG4bK5c6bdbf9a60bee7d6d77eee12c2035b4;received=10.1.7.77
Content-Length: 0