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: <sip:[email protected]:6000>;tag=70042270
To: <sip:[email protected]:6000>
Call-ID: 260824922
CSeq: 1 REGISTER
Contact: <sip:[email protected]: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:[email protected]:6000>;tag=70042270
To: <sip:[email protected]:6000>;tag=367747502
CSeq: 1 REGISTER
Call-ID: 260824922
User-Agent: EasyGBS v200511
Content-Length: 0
Contact: <sip:[email protected]:15060>
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: <sip:[email protected]:6000>;tag=70042270
To: <sip:[email protected]:6000>
Call-ID: 260824922
CSeq: 2 REGISTER
Contact: <sip:[email protected]:6000>
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: <sip:[email protected]:6000>;tag=70042270
To: <sip:[email protected]: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:[email protected]:15060>

----------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: <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:[email protected]:15060 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.180:6000;rport;branch=z9hG4bK970991255
From: <sip:[email protected]:6000>;tag=1185204743
To: <sip:[email protected]: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:[email protected]:15060 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.180:6000;rport;branch=z9hG4bK613098759
From: <sip:[email protected]:6000>;tag=1831177921
To: <sip:[email protected]: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:[email protected]:6000>;tag=1185204743
To: <sip:[email protected]: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:[email protected]:6000>;tag=1831177921
To: <sip:[email protected]: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:[email protected]:15060 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.180:6000;rport;branch=z9hG4bK1574567822
From: <sip:[email protected]:6000>;tag=203406897
To: <sip:[email protected]: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:[email protected]:6000>;tag=203406897
To: <sip:[email protected]: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:[email protected]: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:[email protected]:6000>
Call-ID: 891753055
CSeq: 8198 INVITE
Max-Forwards: 70
User-Agent: Easy SIP Server
Content-Length: 222
Content-Type: application/sdp
Contact: <sip:[email protected]: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:[email protected]: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:[email protected]:6000>;tag=1610248655
Call-ID: 891753055
CSeq: 8198 INVITE
Contact: <sip:[email protected]: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:[email protected]: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:[email protected]:6000>;tag=1610248655
Call-ID: 891753055
CSeq: 8198 ACK
Max-Forwards: 70
User-Agent: Easy SIP Server
Content-Length: 0

----------INVITE----------
相关推荐
牵牛老人1 小时前
NI的LABVIEW工具安装及卸载步骤说明
c++·labview
LuckyRich11 小时前
【仿Mudou库one thread per loop式并发服务器实现】项目介绍+前置技术知识点
服务器·c++
大锦终1 小时前
【C++】模板进阶
c语言·开发语言·数据结构·c++
Tinatal2 小时前
map映射到二维数组
开发语言·c++·算法
岁ovo寒2 小时前
c++day7
开发语言·c++·算法
被AI抢饭碗的人3 小时前
c++11新内容补充
开发语言·c++
倔强的石头1064 小时前
【C++经典例题】字符串转整数(atoi)的实现与解析
开发语言·c++
ALex_zry4 小时前
构建高可靠C++服务框架:从日志系统到任务调度器的完整实现
开发语言·c++·wpf
_zwy4 小时前
【Linux 进程控制】—— 进程亦生生不息:起于鸿蒙,守若空谷,归于太虚
linux·运维·服务器·c++
rigidwill6664 小时前
LeetCode hot 100—最长回文子串
数据结构·c++·算法·leetcode·职场和发展