sip报文

sip client向sip server发起注册

----------REGISTER---------

REGISTER sip:[email protected]:15060 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.180:6000;rport;branch=z9hG4bK937501034
From: ;tag=70042270
To: 
Call-ID: 260824922
CSeq: 1 REGISTER
Contact: 
Max-Forwards: 70
User-Agent: eXosip/5.2.0
Expires: 3600
Content-Length: 0

SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.1.180:6000;rport=6000;received=192.168.1.180;branch=z9hG4bK937501034
From: ;tag=70042270
To: ;tag=367747502
CSeq: 1 REGISTER
Call-ID: 260824922
User-Agent: EasyGBS v200511
Content-Length: 0
Contact: 
WWW-Authenticate: Digest realm="3402000000",nonce="17cdd3182fd1fa60cc84dae13bac3479"

REGISTER sip:[email protected]:15060 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.180:6000;rport;branch=z9hG4bK1518378860
From: ;tag=70042270
To: 
Call-ID: 260824922
CSeq: 2 REGISTER
Contact: 
Authorization: Digest username="34020000002000000002admin1234", realm="3402000000", nonce="17cdd3182fd1fa60cc84dae13bac3479", uri="sip:[email protected]:15060", response="3944556c038d665040b0fc7636c254f7", algorithm=MD5
Max-Forwards: 70
User-Agent: eXosip/5.2.0
Expires: 3600
Content-Length: 0

SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.1.180:6000;rport=6000;received=192.168.1.180;branch=z9hG4bK1518378860
From: ;tag=70042270
To: ;tag=493747677
CSeq: 2 REGISTER
Call-ID: 260824922
User-Agent: Easy SIP Server
Content-Length: 0
Date: 2023-12-21T13:49:56.893
Expires: 3600
Contact: 

----------REGISTER---------

sip server查询sip client的catlog(下挂节点信息)

----------MESSAGE Catalog--------

MESSAGE sip:[email protected]:6000;transport=udp SIP/2.0
Via: SIP/2.0/UDP 192.168.1.124:15060;rport=15060;branch=z9hG4bK954747859
From: ;tag=676747859
To: 
Call-ID: 901747859
CSeq: 8195 MESSAGE
Max-Forwards: 70
User-Agent: Easy SIP Server
Content-Length: 156
Content-Type: Application/MANSCDP+xml



    Catalog
    810747859
    34020000002000000002



SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.1.124:15060;rport=15060;branch=z9hG4bK954747859
From: ;tag=676747859
To: ;tag=1604545985
Call-ID: 901747859
CSeq: 8195 MESSAGE
User-Agent: eXosip/5.2.0
Content-Length: 0

MESSAGE sip:[email protected]:15060 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.180:6000;rport;branch=z9hG4bK970991255
From: ;tag=1185204743
To: 
Call-ID: 366052037
CSeq: 20 MESSAGE
Content-Type: Application/MANSCDP+xml
Max-Forwards: 70
User-Agent: eXosip/5.2.0
Content-Length:   660



Catalog
810747859
34020000002000000002
2


34020000002000000003
1
new3s
v1
0
340200
axy
0
34020000002000000002
1
0
1
192.168.1.108
80

ON




MESSAGE sip:[email protected]:15060 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.180:6000;rport;branch=z9hG4bK613098759
From: ;tag=1831177921
To: 
Call-ID: 639706657
CSeq: 20 MESSAGE
Content-Type: Application/MANSCDP+xml
Max-Forwards: 70
User-Agent: eXosip/5.2.0
Content-Length:   667



Catalog
810747859
34020000002000000002
2


34020000002000000004
1_test
new3s
v1
0
340200
axy
0
34020000002000000002
1
0
1
192.168.1.180
6000

ON




SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.1.180:6000;rport=6000;received=192.168.1.180;branch=z9hG4bK970991255
From: ;tag=1185204743
To: ;tag=403747866
CSeq: 20 MESSAGE
Call-ID: 366052037
User-Agent: Easy SIP Server
Content-Length: 0

SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.1.180:6000;rport=6000;received=192.168.1.180;branch=z9hG4bK613098759
From: ;tag=1831177921
To: ;tag=417747933
CSeq: 20 MESSAGE
Call-ID: 639706657
User-Agent: Easy SIP Server
Content-Length: 0

----------MESSAGE Catalog--------

sip client向sip server主动发送心跳

----------MESSAGE Keepalive--------

MESSAGE sip:[email protected]:15060 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.180:6000;rport;branch=z9hG4bK1574567822
From: ;tag=203406897
To: 
Call-ID: 987679136
CSeq: 20 MESSAGE
Content-Type: Application/MANSCDP+xml
Max-Forwards: 70
User-Agent: eXosip/5.2.0
Content-Length:   150



Keepalive
1
34020000002000000002
OK


SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.1.180:6000;rport=6000;received=192.168.1.180;branch=z9hG4bK1574567822
From: ;tag=203406897
To: ;tag=169747783
CSeq: 20 MESSAGE
Call-ID: 987679136
User-Agent: Easy SIP Server
Content-Length: 0

----------MESSAGE Keepalive--------

sip server向sip client请求媒体流

----------INVITE----------

INVITE sip:[email protected]:6000;transport=udp SIP/2.0
Via: SIP/2.0/UDP 192.168.1.124:15060;rport=15060;branch=z9hG4bK782753578
From: ;tag=217753578
To: 
Call-ID: 891753055
CSeq: 8198 INVITE
Max-Forwards: 70
User-Agent: Easy SIP Server
Content-Length: 222
Content-Type: application/sdp
Contact: 
Subject: 34020000002000000003:0200000003,34020000002000000001:0

v=0
o=34020000002000000001 0 0 IN IP4 192.168.1.124
s=Play
c=IN IP4 192.168.1.124
t=0 0
m=video 56246 RTP/AVP 96 98 97
a=recvonly
a=rtpmap:96 PS/90000
a=rtpmap:98 H264/90000
a=rtpmap:97 MPEG4/90000
y=0200000003
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 192.168.1.124:15060;rport=15060;branch=z9hG4bK782753578
From: ;tag=217753578
To: 
Call-ID: 891753055
CSeq: 8198 INVITE
User-Agent: eXosip/5.2.0
Content-Length: 0

SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.1.124:15060;rport=15060;branch=z9hG4bK782753578
From: ;tag=217753578
To: ;tag=1610248655
Call-ID: 891753055
CSeq: 8198 INVITE
Contact: 
Content-Type: APPLICATION/SDP
User-Agent: eXosip/5.2.0
Content-Length:   165

v=0
o=34020000002000000003 0 0 IN IP4 192.168.1.180
s=Play
c=IN IP4 192.168.1.180
t=0 0
m=video 3333 RTP/AVP 96
a=sendonly
a=rtpmap:96 PS/90000
y=200000003

ACK sip:[email protected]:6000;transport=udp SIP/2.0
Via: SIP/2.0/UDP 192.168.1.124:15060;rport=15060;branch=z9hG4bK788753684
From: ;tag=217753578
To: ;tag=1610248655
Call-ID: 891753055
CSeq: 8198 ACK
Max-Forwards: 70
User-Agent: Easy SIP Server
Content-Length: 0

----------INVITE----------

你可能感兴趣的:(协议,c++,ip)