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----------
相关推荐
Hical6123 分钟前
C++17 实战心得:那些真正改变我写代码方式的特性
c++
Hical611 小时前
实测:C++20 协程 vs Go Gin vs Rust Actix,谁的 Web 性能更强?
c++
草莓熊Lotso1 小时前
《告别 “会用不会讲”:C++ string 底层原理拆解 + 手撕实现,面试 / 开发都适用》
开发语言·c++·面试
会编程的土豆1 小时前
【数据结构与算法】空间复杂度从入门到面试:不仅会算,还要会解释
数据结构·c++·算法·面试·职场和发展
张槊哲2 小时前
C++ 进阶指南:如何丝滑地理解与实践多线程与多进程
开发语言·c++·算法
雪度娃娃2 小时前
Effective Modern C++——型别推导
开发语言·c++
Hello eveybody2 小时前
介绍一下背包DP(C++)
开发语言·c++·动态规划·dp·背包dp
charlie1145141912 小时前
AwesomeQt:最小的Qt6系列迷你版本教程发布!
linux·c++·qt·c
小小de风呀3 小时前
de风——【从零开始学C++】(四):类和对象(下)
开发语言·c++·算法
CSCN新手听安3 小时前
【Qt】系统相关(一)内容简介,事件概念,事件的处理
开发语言·c++·qt