SIP协议
SIP协议主要包括 SIP头 SIP内容 和附加内容三个部分
SIP头 | 一行,以\r\n结尾 | | REGISTER sip:172.30.2.35 SIP/2.0\r\n |
SIP内容 | 很多行,每行为Key,Value的形式 | | CSeq: 1 REGISTER\r\n |
附加内容 | 很多行 | | |
1 SIP头
INVITE | | | INVITE sip:miyanhui_t1@172.30.11.79:11870;transport=tcp SIP/2.0 |
REGISTER | | | REGISTER sip:172.30.2.35 SIP/2.0\r\n |
ACK | | | ACK sip:miyanhui_t1@172.30.11.79:11870;transport=tcp SIP/2.0 |
BYE | | | BYE sip:miyanhui_t1@172.30.11.79:11870;transport=tcp SIP/2.0 |
OPTIONS | |
PRACK | |
UPDATE | |
REFER | |
MESSAGE | |
2 SIP内容
Via | | | Via: SIP/2.0/TCP 172.30.2.35:5060;branch=z9hG4bKe0203a229263-30-2ea3ea\r\n |
To | | | sip:miyanhui_t1@172.30.2.35;tag=AFCAF511D8F\r\n |
From | | | sip:miyanhui_t3@172.30.2.35;tag=869388A8114\r\n |
Call-ID | | | 76ea44b5eb44080AE90--4080AE90-1-44b5eb4--4080AE90@172.30.11.89\r\n |
CSeq | | | 4 INVITE\r\n |
Contact | | | sip:miyanhui_t1@172.30.11.79:11870;transport=tcp\r\n |
Record-Route | | | sip:172.30.2.35:5060;transport=tcp;ftag=869388A8114;lr\r\n |
User-Agent | | | "User-Agent: Vixtel APMVista Agent\r\n |
Content-Length | | 指明SIP附加数据的长度 | 0\r\n |
3 SIP附加数据
SIP/2.0 100 Trying
Via: SIP/2.0/TCP 172.30.11.76:6726;branch=z9hG4bK.B6X6CR18X;rport=6726
From: <sip:miyanhui_t2@172.30.2.35>;tag=YVwiGtgHV
To: sip:miyanhui_t1@172.30.2.35
Call-ID: 1YYJ-rBnlJ
CSeq: 20 INVITE
Server: Brekeke SIP Server rev.477 Evaluation
Content-Length: 0