sip报文

sip client向sip server发起注册

复制代码
----------REGISTER---------

REGISTER sip:34020000002000000001@192.168.1.124:15060 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.180:6000;rport;branch=z9hG4bK937501034
From: <sip:34020000002000000002@192.168.1.180:6000>;tag=70042270
To: <sip:34020000002000000002@192.168.1.180:6000>
Call-ID: 260824922
CSeq: 1 REGISTER
Contact: <sip:34020000002000000002@192.168.1.180:6000>
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: <sip:34020000002000000002@192.168.1.180:6000>;tag=70042270
To: <sip:34020000002000000002@192.168.1.180:6000>;tag=367747502
CSeq: 1 REGISTER
Call-ID: 260824922
User-Agent: EasyGBS v200511
Content-Length: 0
Contact: <sip:34020000002000000001@192.168.1.124:15060>
WWW-Authenticate: Digest realm="3402000000",nonce="17cdd3182fd1fa60cc84dae13bac3479"

REGISTER sip:34020000002000000001@192.168.1.124:15060 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.180:6000;rport;branch=z9hG4bK1518378860
From: <sip:34020000002000000002@192.168.1.180:6000>;tag=70042270
To: <sip:34020000002000000002@192.168.1.180:6000>
Call-ID: 260824922
CSeq: 2 REGISTER
Contact: <sip:34020000002000000002@192.168.1.180:6000>
Authorization: Digest username="34020000002000000002admin1234", realm="3402000000", nonce="17cdd3182fd1fa60cc84dae13bac3479", uri="sip:34020000002000000001@192.168.1.124: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: <sip:34020000002000000002@192.168.1.180:6000>;tag=70042270
To: <sip:34020000002000000002@192.168.1.180:6000>;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: <sip:34020000002000000001@192.168.1.124:15060>

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

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

复制代码
----------MESSAGE Catalog--------

MESSAGE sip:34020000002000000002@192.168.1.180:6000;transport=udp SIP/2.0
Via: SIP/2.0/UDP 192.168.1.124:15060;rport=15060;branch=z9hG4bK954747859
From: <sip:34020000002000000001@3402000000>;tag=676747859
To: <sip:34020000002000000002@3402000000>
Call-ID: 901747859
CSeq: 8195 MESSAGE
Max-Forwards: 70
User-Agent: Easy SIP Server
Content-Length: 156
Content-Type: Application/MANSCDP+xml

<?xml version="1.0" encoding="UTF-8"?>
<Query>
    <CmdType>Catalog</CmdType>
    <SN>810747859</SN>
    <DeviceID>34020000002000000002</DeviceID>
</Query>


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

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

<?xml version="1.0" encoding="GB2312"?>
<Response>
<CmdType>Catalog</CmdType>
<SN>810747859</SN>
<DeviceID>34020000002000000002</DeviceID>
<SumNum>2</SumNum>
<DeviceList Num="1">
<Item>
<DeviceID>34020000002000000003</DeviceID>
<Name>1</Name>
<Manufacturer>new3s</Manufacturer>
<Model>v1</Model>
<Owner>0</Owner>
<CivilCode>340200</CivilCode>
<Adress>axy</Adress>
<Parental>0</Parental>
<ParentID>34020000002000000002</ParentID>
<RegisterWay>1</RegisterWay>
<Secrecy>0</Secrecy>
<StreamNum>1</StreamNum>
<IPAddress>192.168.1.108</IPAddress>
<Port>80</Port>
<Password></Password>
<Status>ON</Status>
</Item>
</DeviceList>
</Response>

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

<?xml version="1.0" encoding="GB2312"?>
<Response>
<CmdType>Catalog</CmdType>
<SN>810747859</SN>
<DeviceID>34020000002000000002</DeviceID>
<SumNum>2</SumNum>
<DeviceList Num="1">
<Item>
<DeviceID>34020000002000000004</DeviceID>
<Name>1_test</Name>
<Manufacturer>new3s</Manufacturer>
<Model>v1</Model>
<Owner>0</Owner>
<CivilCode>340200</CivilCode>
<Adress>axy</Adress>
<Parental>0</Parental>
<ParentID>34020000002000000002</ParentID>
<RegisterWay>1</RegisterWay>
<Secrecy>0</Secrecy>
<StreamNum>1</StreamNum>
<IPAddress>192.168.1.180</IPAddress>
<Port>6000</Port>
<Password></Password>
<Status>ON</Status>
</Item>
</DeviceList>
</Response>

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: <sip:34020000002000000002@192.168.1.180:6000>;tag=1185204743
To: <sip:34020000002000000001@192.168.1.124:15060>;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: <sip:34020000002000000002@192.168.1.180:6000>;tag=1831177921
To: <sip:34020000002000000001@192.168.1.124:15060>;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:34020000002000000001@192.168.1.124:15060 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.180:6000;rport;branch=z9hG4bK1574567822
From: <sip:34020000002000000002@192.168.1.180:6000>;tag=203406897
To: <sip:34020000002000000001@192.168.1.124:15060>
Call-ID: 987679136
CSeq: 20 MESSAGE
Content-Type: Application/MANSCDP+xml
Max-Forwards: 70
User-Agent: eXosip/5.2.0
Content-Length:   150

<?xml version="1.0"?>
<Notify>
<CmdType>Keepalive</CmdType>
<SN>1</SN>
<DeviceID>34020000002000000002</DeviceID>
<Status>OK</Status>
</Notify>

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: <sip:34020000002000000002@192.168.1.180:6000>;tag=203406897
To: <sip:34020000002000000001@192.168.1.124:15060>;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:34020000002000000003@192.168.1.180:6000;transport=udp SIP/2.0
Via: SIP/2.0/UDP 192.168.1.124:15060;rport=15060;branch=z9hG4bK782753578
From: <sip:34020000002000000001@3402000000>;tag=217753578
To: <sip:34020000002000000003@192.168.1.180:6000>
Call-ID: 891753055
CSeq: 8198 INVITE
Max-Forwards: 70
User-Agent: Easy SIP Server
Content-Length: 222
Content-Type: application/sdp
Contact: <sip:34020000002000000001@192.168.1.124:15060>
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: <sip:34020000002000000001@3402000000>;tag=217753578
To: <sip:34020000002000000003@192.168.1.180:6000>
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: <sip:34020000002000000001@3402000000>;tag=217753578
To: <sip:34020000002000000003@192.168.1.180:6000>;tag=1610248655
Call-ID: 891753055
CSeq: 8198 INVITE
Contact: <sip:34020000002000000003@192.168.1.180:6000>
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:34020000002000000003@192.168.1.180:6000;transport=udp SIP/2.0
Via: SIP/2.0/UDP 192.168.1.124:15060;rport=15060;branch=z9hG4bK788753684
From: <sip:34020000002000000001@3402000000>;tag=217753578
To: <sip:34020000002000000003@192.168.1.180:6000>;tag=1610248655
Call-ID: 891753055
CSeq: 8198 ACK
Max-Forwards: 70
User-Agent: Easy SIP Server
Content-Length: 0

----------INVITE----------
相关推荐
努力努力再努力wz34 分钟前
【Lua 进阶系列】从 C++ 对象到 Lua 变量:一文理解 userdata、Lua 栈与元表绑定机制
c++·junit·lua
慧都产品智能化1 小时前
Qt 表格升级攻略:复用已有编辑器,减少重复开发
c++·qt·编辑器·qt6.3
ShineWinsu1 小时前
对于Qt:QTableWidget常见属性以及QTableWidgetItem类的解析
开发语言·c++·qt·gui·客户端·表格·qtablewidget
ShineWinsu3 小时前
对于Qt:QListWidget常见属性以及QListWidgetItem类的解析
开发语言·c++·qt·客户端·列表·qlistwidget·qlistwidgetitem
坤坤子吖3 小时前
Linux网络编程:自定义应用层协议与 JSON 序列化
linux·服务器·网络·c++·笔记·json
沫璃染墨4 小时前
从零入门计算机网络系列(十八):TCP连接管理详解——从三次握手与四次挥手到TIME_WAIT机制
运维·服务器·网络·c++·网络协议·tcp/ip·tcp
自信150413057596 小时前
重生之从0开始学习c++之——vector-中篇
c++·学习·算法
ShineWinsu9 小时前
对于Qt:QDial常见属性以及信号的解析
开发语言·c++·qt·gui·客户端·旋钮·qdial
科技苑16 小时前
C++ CAS与ABA问题详解,无锁编程的经典陷阱怎么解决?
c++·人工智能
BaiPeter21 小时前
ZPL文件预览
开发语言·c++