INVITE是基于SIP通信中发起会话(会话创建)进程的消息。SIP 通信也有不需要会话建立(如基于IMS的短消息或其他形式短消息) ,但大多数基于IMS/SIP的通信(例如Volte,Video,File transfer 等)也都是通过会话进行;何时需要建立会话,都是通过 INVITE(邀请)进程完成的。
INVITE过程关键部分是开头" INVITE”和结尾"200" ok。而INVITE和200 ok 之间有许多步骤,其间的详细信息根据建立的会话类型不同。
1.VoLTE会话主要流程

2.INVITE消息内容
(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(数据类型)
Max-Forwards: 69 (路由最大跳数)
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 (应答消息内容)
Supported: 100rel
Supported: precondition (预配置)
Accept-Contact: *;+g.3gpp.icsi-ref="urn%3Aurn-7%3A3gpp-application.ims.iari.gsma-vs";require;explicit
Privacy: id
Content-Type: application/sdp(报文类型:应用层/SDP)
Content-Length: 565(报文长度)
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”已在微信公众号"跟着老康学5G"中推出,敬请关注!
链接如下:https://mp.weixin.qq.com/s/AX3MCn1woaSRrDVd2nkrtA