1、发起端发送sip请求
MESSAGE sip:34020000001320000074@192.168.3.123:5100 SIP/2.0
Via: SIP/2.0/UDP 192.168.3.10:5090;rport;branch=z9hG4bK755065984
From: <sip:34020000002000000065@192.168.3.10:5090>;tag=141992068
To: <sip:34020000001320000074@192.168.3.123:5100>
Call-ID: 970796440
CSeq: 20 MESSAGE
Content-Type: Application/MANSCDP+xml
Max-Forwards: 70
User-Agent: JUNTAI SIP UAS/1.0
Content-Length: 159
<?xml version="1.0"?><Notify><CmdType>Broadcast</CmdType><SN>12</SN><SourceID>34020000001360000065</SourceID><TargetID>34020000001370000074</TargetID></Notify>
接受端响应:
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.3.10:5090;rport=5090;branch=z9hG4bK755065984
From: <sip:34020000002000000065@192.168.3.10:5090>;tag=141992068
To: <sip:34020000001320000074@192.168.3.123:5100>;tag=1205858790
Call-ID: 970796440
CSeq: 20 MESSAGE
User-agent: IP Camera
Content-Length: 0
2、接受端发送Response
MESSAGE sip:34020000002000000065@3402000000 SIP/2.0
Via: SIP/2.0/UDP 192.168.3.123:5100;rport=5100;branch=z9hG4bK1693666253
From: <sip:34020000001320000074@3402000000>;tag=630894241
To: <sip:34020000002000000065@3402000000>
Call-ID: 950626075
CSeq: 20 MESSAGE
Content-Type: Application/MANSCDP+xml
Max-forwards: 70
User-agent: IP Camera
Content-Length: 166
<?xml version="1.0" encoding="GB2312"?>
<Response>
<CmdType>Broadcast</CmdType>
<SN>12</SN>
<DeviceID>34020000001370000074</DeviceID>
<Result>OK</Result>
</Response>
3、接受端发送带sdp的invite
INVITE sip:34020000001360000065@192.168.3.10:5090 SIP/2.0
Via: SIP/2.0/UDP 192.168.3.123:5100;rport=5100;branch=z9hG4bK2145781957
From: <sip:34020000001320000074@192.168.3.123:5100>;tag=1263238741
To: <sip:34020000001360000065@192.168.3.10:5090>
Call-ID: 393121623
CSeq: 20 INVITE
Contact: <sip:34020000001320000074@192.168.3.123:5100>
Content-Type: application/sdp
Max-forwards: 70
User-agent: IP Camera
Subject: 34020000001360000065:1,34020000001320000074:2
Content-Length: 213
v=0
o=34020000001320000074 1575297968291966 1575297968291966 IN IP4 192.168.3.123
s=Play
c=IN IP4 192.168.3.123
t=0 0
m=audio 25069 RTP/AVP 8
a=recvonly
a=rtpmap:8 PCMA/8000
y=0200000002
f=v/a/1/8/1
4、发起端响应改invite,发送ANSWERED
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.3.123:5100;rport=5100;branch=z9hG4bK2145781957
From: <sip:34020000001320000074@192.168.3.123:5100>;tag=1263238741
To: <sip:34020000001360000065@192.168.3.10:5090>;tag=2048197322
Call-ID: 393121623
CSeq: 20 INVITE
Contact: <sip:34020000001360000065@192.168.3.10:5090>
Content-Type: application/sdp
User-Agent: JUNTAI SIP UAS/1.0
Content-Length: 181
v=0
o=34020000002000000065 0 0 IN IP4 192.168.3.10
s=Play
c=IN IP4 192.168.3.10
t=0 0
m=audio 6002 RTP/AVP 8
a=sendonly
a=rtpmap:8 PCMA/8000
y=0200000002
f=v/ a/1/8/1
5、接收端发送ACK确认invite
ACK sip:34020000001360000065@192.168.3.10:5090 SIP/2.0
Via: SIP/2.0/UDP 192.168.3.123:5100;rport=5100;branch=z9hG4bK539005821
From: <sip:34020000001320000074@192.168.3.123:5100>;tag=1263238741
To: <sip:34020000001360000065@192.168.3.10:5090>;tag=2048197322
Call-ID: 393121623
CSeq: 20 ACK
Contact: <sip:34020000001320000074@192.168.3.123:5100>
Max-forwards: 70
User-agent: IP Camera
Content-Length: 0
6、发起端收到ack后通过上面的端口,协议信息发送语音数据
更多推荐
gb28181语音对讲的一个例子
发布评论