INVITE是基于SIP通信中發(fā)起會話(會話創(chuàng)建)進(jìn)程的消息。SIP 通信也有不需要會話建立(如基于IMS的短消息或其他形式短消息) ,但大多數(shù)基于IMS/SIP的通信(例如Volte,Video,File transfer 等)也都是通過會話進(jìn)行;何時需要建立會話,都是通過 INVITE(邀請)進(jìn)程完成的。
INVITE過程關(guān)鍵部分是開頭" INVITE”和結(jié)尾"200" ok。而INVITE和200 ok 之間有許多步驟,其間的詳細(xì)信息根據(jù)建立的會話類型不同。
1.VoLTE會話主要流程
2.INVITE消息內(nèi)容
(1) INVITE -----------------------------------
INVITE sip:user1@192.168.1.11:35057 SIP/2.0(用戶/SIP版本)
Via: SIP/2.0/UDP 192.168.1.12:64701;branch=z9hG4bK635101086453090273;rport;transport=UDP(數(shù)據(jù)類型)
Max-Forwards: 69 (路由最大跳數(shù))
Call-ID: [email]635101086453000268@192.168.1.2[/email] (呼叫ID)
CSeq: 7 INVITE
Via: SIP/2.0/UDP 192.168.1.2:64627;branch=z9hG4bK635101086453000268;transport=UDP
To: <sip:user1@anritsu-cscf.com>(被叫)
From: <sip:0123456789@anritsu-cscf.com>;tag=1111111111(主叫)
Contact: <sip:0123456789@anritsu-cscf.com:64627;transport=udp>
Allow: INVITE, UPDATE, ACK, CANCEL, BYE, PRACK, MESSAGE (應(yīng)答消息內(nèi)容)
Supported: 100rel
Supported: precondition (預(yù)配置)
Accept-Contact: *;+g.3gpp.icsi-ref="urn%3Aurn-7%3A3gpp-application.ims.iari.gsma-vs";require;explicit
Privacy: id
Content-Type: application/sdp(報(bào)文類型:應(yīng)用層/SDP)
Content-Length: 565(報(bào)文長度)
Record-Route: <sip:192.168.1.2;lr>
(8) 200 OK -----------------------------------
Via: SIP/2.0/UDP 192.168.1.12:64701;rport=64701;branch=z9hG4bK635101086453090273;transport=UDP
From: <sip:0123456789@anritsu-cscf.com>;tag=1111111111
To: <sip:user1@anritsu-cscf.com>;tag=1076437947
Contact: <sip:user1@192.168.1.11:35057;transport=udp>
Call-ID: [email]635101086453000268@192.168.1.2[/email]
CSeq: 7 INVITE
Content-Type: application/sdp
Content-Length: 527
Via: SIP/2.0/UDP 192.168.1.2:64627;branch=z9hG4bK635101086453000268;transport=UDP
Record-Route: <sip:192.168.1.2;lr>
Allow: ACK, BYE, CANCEL, INVITE, MESSAGE, NOTIFY, OPTIONS, PRACK, REFER, UPDATE
(9) ACK -----------------------------------
ACK sip:user1@192.168.1.11:35057 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.12:64703;branch=z9hG4bK635101086492402521;rport;transport=UDP
Max-Forwards: 69
Call-ID: [email]635101086453000268@192.168.1.2[/email]
CSeq: 7 ACK
To: <sip:user1@anritsu-cscf.com>;tag=1076437947
From: <sip:0123456789@anritsu-cscf.com>;tag=1111111111
Via: SIP/2.0/UDP 192.168.1.2:64627;branch=z9hG4bK635101086453000268;transport=UDP
Content-Length: 0
原文來自:http://www.sharetechnote.com/
整理:kangguoying20200926
"無會話,非5G”已在微信公眾號"跟著老康學(xué)5G"中推出,敬請關(guān)注!
鏈接如下:https://mp.weixin.qq.com/s/AX3MCn1woaSRrDVd2nkrtA