书籍来源:艾怀丽《VoLTE端到端业务详解》
一边学习一边整理书中的笔记,并与大家分享,侵权即删,谢谢支持!
附上汇总贴:VoLTE端到端业务详解 | 汇总_COCOgsta的博客-CSDN博客
会话描述协议(SDP,Session Description Protocol)是由IETF(Internet工程任务组)作为RFC4566颁布,描述流媒体初始化参数的格式。其目的就是在媒体会话中传递媒体流信息,允许会话描述的接收者去参与会话。该协议定义了会话描述的统一格式,但并不定义多播地址的分配和SDP消息的传输,也不支持媒体编码方案的协商,这些功能均由下层传送协议完成。
会话描述协议(SDP)为会话通知、会话邀请和其他形式的多媒体会话初始化等提供了多媒体会话描述。
SDP文本信息包括:
· 会话名称和意图;
· 会话持续时间;
· 构成会话的媒体;
· 有关接收媒体的信息(地址等)。
SDP协议字段
SDP信息是文本信息,采用UTF-8编码中的ISO 10646字符集。SDP会话描述如表4-5所示(标注*符号的表示可选字段)。
(1)V、o、s、t、m为必需的,其他项为可选;
(2)如果SDP语法分析器不能识别某一类型(Type),则整个描述丢失;
(3)如果“a=”的某属性值不理解,则予以丢失;
(4)整个协议区分大小写;
(5)“=”两侧不允许有空格;
(6)会话级的描述就是媒体级描述的默认值;
(7)所有格式均为=。
SDP用于构建Invite和200 OK响应消息的消息体,供主/被叫用户交换媒体信息。
1.媒体流的配置
(1)主/被叫的媒体描述必须完全与主/被叫的第m个媒体流(“m=”)对应,都包含“a=rtpmap”,目的是易于适应静态净荷类型到动态净荷类型的转换。
(2)如果被叫不想接收主叫提出的某个媒体流,则在响应中设置该媒体流的端口号为0,并且必须返回对应的媒体流行。
2.单播SDP值的设定
(1)若只发媒体流,端口号无意义,应设为0。
(2)每个媒体流的净载荷类型列表应传送两个信息:能接收/发送的编译码和用以标识这些编译码的RTP净载荷类型号。
(3)若某一媒体流,主/被叫没有公共的媒体格式,被叫仍然要求返回媒体流的“m=”行,端口号为0,同时,不列净载荷类型。
(4)如果所有媒体流均无公共的媒体格式,则被叫回送400响应(坏请求),并加入304警告头字段(无媒体类型)。
3.多播操作
(1)接收和发送的多播地址是相同的。
(2)被叫不允许改变媒体流的只发、只收或收/发特性。
(3)如果被叫不支持多播,则回送400响应和330警告(多播不可用)。
4.延时媒体流
由于主叫可能实际上是一个和其他协议(如H.323)互通的协议网关,与S要求呼叫建立后进行媒体协商,这样,主叫可以先发不带SDP的Invite,通过ACK或重新发一个Invite请求修改被叫的会话描述(SDP)。
5.媒体流保持
如果要求对方进入保持状态,即暂时停止发送一个或多个媒体流,则可以用Re-Invite,会话描述与原来的请求或响应中的描述相同,只是“c=”为“0.0.0.0”,并且Re_Invite中的Cseq需要递增。
6.对应于SIP中有三个实体字段
(1)Content-Type:指明消息体类型,有两种:①Application/SDP表示是SDP会话描述;②Text/HTML表示是普通文本或HTML格式的描述。
(2)Content-Encoding:补充说明消息体类型,使用户可以采用压缩编码编辑消息体。
(3)Content-Length:给出消息体的字节数。
以下是典型VoLTE被叫用户振铃后主叫早释的呼叫流程。
主叫UE1:178XXXXXXXX,被叫UE2:760(家庭亲情号)且签约了视频彩铃业务,主叫用户登记在NJPSBC15BHW上。
呼叫过程:主叫拨号,被叫侧网络给主叫用户播放视频彩铃,主叫在收看视频彩铃过程中挂机、被叫未应答。
整体流程如图4-78所示。
1.主叫拨号
- Session Initiation Protocol (Invite)
- Request-Line: Invite tel:760;phone-context=ims.mnc007.mcc460.3gppnetwork.org SIP/2.0
- Method: Invite
- Request-URI: tel:760;phone-context=ims.mnc007.mcc460.3gppnetwork.org Message Header
- From:
8617*****8860@js.ims.mnc000.mcc460.3gppnetwork.org>;tag=aejcb9L - To: "760"
760;phone-context=ims.mnc007.mcc460.3gppnetwork.org> - P-Preferred-Identity:
@js.ims.mnc000.mcc460.3gppnetwork.org> - Contact:
8617*****8860@[****:****:****:****:*:*:****:****]:31825>;+sip.instance="" ;+g.3gpp.icsi-ref="urn%3Aurn-7%3A3gpp-service.ims.icsi.mmtel";audio;video;+g.3gpp.mid-call;+g.3gpp.srvcc-alerting;+g.3gpp.ps2cs-srvcc-orig-pre-alerting - Accept-Contact: *;+g.3gpp.icsi-ref="urn%3Aurn-7%3A3gpp-service.ims.icsi.mmtel"
- P-Access-Network-Info: 3GPP-E-UTRAN-TDD;utran-cell-id-3gpp=4600051A1D546B03
- P-Preferred-Service: urn:urn-7:3gpp-service.ims.icsi.mmtel
- P-Early-Media: supported
- Supported: 100rel,histinfo,join,norefersub,precondition,replaces, timer,sec-agree
- Allow: Invite,ACK,OPTIONS,BYE,CANCEL,UPDATE,INFO,PRACK,NOTIFY,MES SAGE,REFER
- Accept: application/sdp,application/3gpp-ims+xml
- Session-Expires: 1800
- Min-SE: 90
- Route:**********************************************************************************************************************
- Require: sec-agree
- Proxy-Require: sec-agree
- Security-Verify: ipsec-3gpp;alg=hmac-sha-1-96;prot=esp;mod= trans;ealg=null;spi-c=2545605770;spi-s=4136901965;port-c=9950; port-s=9900
- Call-ID: ddjcb9Lnj@[****:****:****:****:*:*:****:****]
- CSeq: 1 Invite
- Max-Forwards: 70
- User-Agent: IM-client/OMA1.0 HW-Rto/V1.0
- Via: SIP/2.0/UDP [****:****:****:****:*:*:****:****]:31825;branch=z9h G4bKbfjcb9LnjGLnjOfdamVm;rport
- Content-Type: application/sdp//表示是SDP会话描述、主叫用户侧媒体信息
- Content-Length: 814//消息体长度为814Byte Message Body
- Session Description Protocol
- Session Description Protocol Version (v): 0//版本为0
- Owner/Creator, Session Id (o): rue 3308 3308 IN IP6 ****:****:****:****:*:*:****:**** //会话源:用户名rue,会话标识3308,版本3308,网络类型internet,地址类型Ipv6,地址主叫ip****:****:****:****:*:*:****:****
- Session Name (s): -
- Connection Information (c): IN IP6 ****:****:****:****:*:*:****:****//连接数据:网络类型internet,地址类型Ipv6,连接地址****:****:****:****:*:*:****:***
- Bandwidth Information (b): AS:49//RTP流总带宽49Kbit/s
- Bandwidth Information (b): RR:1837//接收的RTCP流带宽1837bit/s
- Bandwidth Information (b): RS:612//发送的RTCP流带宽612bit/s
- Time Description, active time (t): 0 0//无开始和结束时间
- Media Description, name and address (m): audio 31016 RTP/AVP 107 106 105 104 101 102//媒体格式:媒体类型audio,端口号31016,传送层协议RTP/AVP,格式列表为 107 106 105 104 101 102
- Bandwidth Information (b): AS:49
- Bandwidth Information (b): RR:1837
- Bandwidth Information (b): RS:612
- Media Attribute (a): rtpmap:107 AMR-WB/16000/1
- Media Attribute (a): fmtp:107 mode-change-capability=2;max-red=0 //净荷类型107,编码名AMR-WB,抽样速度为16kHz
- Media Attribute (a): rtpmap:105 AMR/8000/1
- Media Attribute (a): fmtp:105 mode-change-capability=2;max- red=0
- Media Attribute (a): rtpmap:101 telephone-event/16000
- Media Attribute (a): fmtp:101 0-15
- Media Attribute (a): rtpmap:102 telephone-event/8000
- Media Attribute (a): fmtp:102 0-15
- Media Attribute (a): ptime:20//媒体打包的时长为20ms
- Media Attribute (a): maxptime:240//媒体打包的时长最大为240ms
- Media Attribute (a): sendrecv//收发模式为发送接收
- Media Attribute (a): curr:qos local none
- Media Attribute (a): curr:qos remote none//当前的状态是本地和远端均为没有资源
- Media Attribute (a): des:qos mandatory local sendrecv
- Media Attribute (a): des:qos optional remote sendrecv//请求的状态是本地一定为发送接收、远端的发送接收是可选的
- 复制代码
2.临时响应100 Trying消息
- Status-Line: SIP/2.0 100 Trying
- Message Header
- Via: SIP/2.0/UDP [****:****:****:****:****:****:****:****]:31825;branc h=z9hG4bKbfjcb9LnjGLnjOfdamVm;rport=31409
- Call-ID: ddjcb9Lnj@[****:****:****:****:*:*:****:****]
- From: <sip:+8617*****8860@js.ims.mnc000.mcc460.3gppnetwork.org>;tag=aejcb9L
- To: "760"<tel:760;phone-context=ims.mnc007.mcc460.3gppnetwork.org>
- CSeq: 1 Invite
- Content-Length: 0
- 复制代码
3.针对Invite的响应183消息
- Status-Line: SIP/2.0 183 Session Progress
- Message Header
- Via: SIP/2.0/UDP [****:****:****:****:****:****:****:****]:31825;branch=z9hG4bKbfjcb9LnjGLnjOfdamVm;rport=31409
- Record-Route:
9900;lr;Hpt=8f52_116;CxtId=3;TRC=ffffffff-ffffffff;X-HwB2bUaCookie=4635> - Record-Route URI: sip:[****:****:****:****:****:****:****:****]:9900;lr;Hpt=8f52_116;CxtId=3;TRC=ffffffff-ffffffff;X-HwB2bUaCookie=4635
- Call-ID: ddjcb9Lnj@[****:****:****:****:*:*:****:****]
- From:
8617*****8860@js.ims.mnc000.mcc460.3gppnetwork.org>;tag=aejcb9L - To: "760"
760;phone-context=ims.mnc007.mcc460.3gppnetwork.org>;tag=03k1lz2w - SIP to tag: 03k1lz2w
- CSeq: 1 Invite
- Allow: Invite,UPDATE,BYE,PRACK,INFO,OPTIONS,CANCEL,SUBSCRIBE,A CK,REFER,NOTIFY,REGISTER,PUBLISH,MESSAGE
- Contact:
2409:8095:0500:0000:0000:0000:0000:012F]:9900;H pt=8f52_16;CxtId=3;TRC=ffffffff-ffffffff>;+g.3gpp.icsi-ref="urn%3Aurn-7%3A3gpp-service.ims.icsi.mmtel" - Require: precondition,100rel
- RSeq: 1
- P-Early-Media: gated
- Feature-Caps: *;+g.3gpp.srvcc;+g.3gpp.mid-call;+g.3gpp.srvcc-alerting;+g.3gpp.ps2cs-srvcc-orig-pre-alerting
- Recv-Info: g.3gpp.state-and-event-info
- Content-Length: 522
- Content-Type: application/sdp//被叫侧的媒体信息
- Message Body
- Session Description Protocol
- Session Description Protocol Version (v): 0
- Owner/Creator, Session Id (o):-125499876 125499876 IN IP6 2409:8095:0500:0000:0000:0000:0000:0131
- Session Name (s): SBC call
- Connection Information (c): IN IP6 2409:8095:0500:0000:0000:0000:0000:0131
- Time Description, active time (t): 0 0
- Media Description, name and address (m): audio 25158 RTP/AVP 107 101
- Bandwidth Information (b): AS:49
- Bandwidth Information (b): RS:612
- Bandwidth Information (b): RR:1837
- Media Attribute (a): rtpmap:107 AMR-WB/16000
- Media Attribute (a): fmtp:107 mode-change-capability=2;max-red=0
- Media Attribute (a): ptime:20
- Media Attribute (a): maxptime:240
- Media Attribute (a): sendrecv
- Media Attribute (a): des:qos mandatory local sendrecv
- Media Attribute (a): curr:qos local none
- Media Attribute (a): des:qos mandatory remote sendrecv
- Media Attribute (a): curr:qos remote none
- Media Attribute (a): conf:qos remote sendrecv
- Media Attribute (a): rtpmap:101 telephone-event/16000
- Media Attribute (a): fmtp:101 0-15
- 复制代码
4.针对183的响应Prack消息
- Request-Line: PRACK sip:[2409:8095:500::12f]:9900;Hpt=8f52_16;CxtId=3;TRC=ffffffff-ffffffff SIP/2.0
- Message Header
- From: <sip:+8617*****8860@js.ims.mnc000.mcc460.3gppnetwork.org>;tag=aejcb9L
- To: "760"<tel:760;phone-context=ims.mnc007.mcc460.3gppnetwork.org>;tag=03k1lz2w
- SIP to tag: 03k1lz2w
- Route:*************************************************************************************************************
- Call-ID: ddjcb9Lnj@[****:****:****:****:*:*:****:****]
- CSeq: 2 PRACK
- Max-Forwards: 70
- User-Agent: IM-client/OMA1.0 HW-Rto/V1.0
- Supported: 100rel,histinfo,join,norefersub,precondition,repla ces,timer
- P-Access-Network-Info: 3GPP-E-UTRAN-TDD;utran-cell-id-3gpp=4600051A1D546B03
- Via: SIP/2.0/UDP [****:****:****:****:*:*:****:****]:31825;branch=z9h G4bKcgjcb9LnjGLnjOfda0wo;rport
- RAck: 1 1 Invite
- Content-Length: 0
- 复制代码
5.Prack的应答消息
- Status-Line: SIP/2.0 200 OK
- Message Header
- Via: SIP/2.0/UDP [****:****:****:****:****:****:****:****]:31825;branc h=z9hG4bKcgjcb9LnjGLnjOfda0wo;rport=31409
- Call-ID: ddjcb9Lnj@[****:****:****:****:*:*:****:****]
- From: <sip:+8617*****8860@js.ims.mnc000.mcc460.3gppnetwork.org>;tag=aejcb9L
- To: "760"<tel:760;phone-context=ims.mnc007.mcc460.3gppnetwork.org>;tag=03k1lz2w
- SIP to tag: 03k1lz2w
- CSeq: 2 PRACK
- Content-Length: 0
- 复制代码
6.主叫用户的Update消息
- Request-Line: UPDATE sip:[2409:8095:500::12f]:9900;Hpt=8f52_16;CxtId=3;TRC=ffffffff-ffffffff SIP/2.0
- From:
8617*****8860@js.ims.mnc000.mcc460.3gppnetwork.org>;tag=aejcb9L - To: "760"
760;phone-context=ims.mnc007.mcc460.3gppnetwork.org>;tag=03k1lz2w - SIP to tag: 03k1lz2w
- Contact:
8617*****8860@[****:****:****:****:*:*:****:****]:31825>;+sip.instance="" ;+g.3gpp.icsi-ref="urn%3Aurn-7%3A3gpp-service.ims.icsi.mmtel";audio;video;+g.3gpp.mid-call;+g.3gpp.srvcc-alerting;+g.3gpp.ps2cs-srvcc-orig-pre-alerting - P-Access-Network-Info: 3GPP-E-UTRAN-TDD;utran-cell-id-3gpp=4600051A1D546B03
- Supported: 100rel,histinfo,join,norefersub,precondition,repla ces,timer,sec-agree
- Require: precondition,sec-agree
- Allow: Invite,ACK,OPTIONS,BYE,CANCEL,UPDATE,INFO,PRACK,NOTIFY, MESSAGE,REFER
- Proxy-Require: sec-agree
- Security-Verify: ipsec-3gpp;alg=hmac-sha-1-96;prot=esp;mod=trans;ealg=null;spi-c=2545605770;spi-s=4136901965;port-c=9950;port-s=9900
- Route:***************************************************************************************************************
- Call-ID: ddjcb9Lnj@[****:****:****:****:*:*:****:****]
- CSeq: 3 UPDATE
- Max-Forwards: 70
- User-Agent: IM-client/OMA1.0 HW-Rto/V1.0
- Via: SIP/2.0/UDP [****:****:****:****:*:*:****:****]:31825;branch=z9h G4bKdhjcbDQ9IaQ9IwfdamUm;rport
- Transport: UDP
- Sent-by Address: ****:****:****:****:*:*:****:****
- Sent-by port: 31825
- Branch: z9hG4bKdhjcbDQ9IaQ9IwfdamUm
- RPort: rport
- Content-Type: application/sdp//更新主叫用户侧的媒体信息
- Content-Length: 503
- Message Body
- Session Description Protocol
- Session Description Protocol Version (v): 0
- Owner/Creator, Session Id (o): rue 3308 3309 IN IP6 2409:8805:3024:2f13:1:1:54b5:17f5
- Bandwidth Information (b): AS:49
- Bandwidth Information (b): RR:1837
- Bandwidth Information (b): RS:612
- Time Description, active time (t): 0 0
- Media Description, name and address (m): audio 31016 RTP/AVP 107 101
- Bandwidth Information (b): AS:49
- Bandwidth Information (b): RR:1837
- Bandwidth Information (b): RS:612
- Media Attribute (a): rtpmap:107 AMR-WB/16000/1
- Media Attribute (a): fmtp:107 mode-change-capability=2;max- red=0
- Media Attribute (a): rtpmap:101 telephone-event/16000
- Media Attribute (a): fmtp:101 0-15
- Media Attribute (a): ptime:20
- Media Attribute (a): maxptime:240
- Media Attribute (a): sendrecv
- Media Attribute (a): curr:qos local sendrecv
- Media Attribute (a): curr:qos remote none//远端目前状态未知
- Media Attribute (a): des:qos mandatory remote sendrecv//请求远端状态为发送接收
- 复制代码
7.Update的应答消息
- Status-Line: SIP/2.0 200 OK
- Status-Code: 200
- Resent Packet: False
- Message Header
- Via: SIP/2.0/UDP [****:****:****:****:****:****:****:****]:31825;branc h=z9hG4bKdhjcbDQ9IaQ9IwfdamUm;rport=31409
- Transport: UDP
- Sent-by Address: ****:****:****:****:****:****:****:****
- Sent-by port: 31825
- Branch: z9hG4bKdhjcbDQ9IaQ9IwfdamUm
- RPort: 31409
- Call-ID: ddjcb9Lnj@[****:****:****:****:*:*:****:****]
- From: <sip:+8617*****8860@js.ims.mnc000.mcc460.3gppnetwork.org>;tag=aejcb9L SIP from address: sip:+8617*****8860@js.ims.mnc000.mcc460.3gppnetwork.org
- SIP from address User Part: +8617*****8860
- E.164 number (MSISDN): 8617*****8860
- Country Code: China (People’s Republic of) (86)
- SIP from address Host Part: js.ims.mnc000.mcc460.3gppnetwork.org SIP from tag: aejcb9L To: "760"<tel:760;phone-context=ims.mnc007.mcc460.3gppnetwork.org>;tag=03k1lz2w SIP to tag: 03k1lz2w CSeq: 3 UPDATE Sequence Number: 3 Method: UPDATE Contact: <sip:[****:****:****:****:****:****:****:****]:9900;Hpt=8f52_16;CxtId=3;TRC=ffffffff-ffffffff>;+g.3gpp.icsi-ref="urn%3Aurn-7%3A3gpp-service.ims.icsi.mmtel" Contact URI: sip:[2409:8095:0500:0000:0000:0000:0000:012F]:99 00;Hpt=8f52_16;CxtId=3;TRC=ffffffff-ffffffff
- Contact URI Host Part: [2409:8095:0500:0000:0000:0000:00 00:012F]
- Contact URI Host Port: 9900
- Contact URI parameter: Hpt=8f52_16
- Contact URI parameter: CxtId=3
- Contact URI parameter: TRC=ffffffff-ffffffff
- Contact parameter: +g.3gpp.icsi-ref="urn%3Aurn-7%3A3gpp-service.ims.icsi.mmtel"\r\n
- Require: precondition Supported: 100rel,replaces,precondition P-Early-Media: gated Content-Length: 530 Content-Type: application/sdp//被叫侧更新的媒体信息 Message Body Session Description Protocol
- Session Description Protocol Version (v): 0
- Owner/Creator, Session Id (o):-125499876 125499877 IN IP6 2409:8095:0500:0000:0000:0000:0000:0131
- Session Name (s): SBC call
- Connection Information (c): IN IP6 2409:8095:0500:0000:0000:0000:0000:0131
- Time Description, active time (t): 0 0
- Media Description, name and address (m): audio 25158 RTP/AVP 107 101
- Bandwidth Information (b): AS:49
- Bandwidth Information (b): RS:612
- Bandwidth Information (b): RR:1837
- Media Attribute (a): rtpmap:107 AMR-WB/16000
- Media Attribute (a): fmtp:107 mode-change-capability=2;max-red=0
- Media Attribute (a): ptime:20
- Media Attribute (a): maxptime:240
- Media Attribute (a): sendrecv
- Media Attribute (a): des:qos mandatory local sendrecv
- Media Attribute (a): curr:qos local sendrecv
- Media Attribute (a): des:qos mandatory remote sendrecv
- Media Attribute (a): curr:qos remote sendrecv
- Media Attribute (a): conf:qos remote sendrecv
- Media Attribute (a): rtpmap:101 telephone-event/16000
- Media Attribute (a): fmtp:101 0-15
- 复制代码
8.被叫侧的Update消息
- Request-Line: UPDATE sip:+8617*****8860@[****:****:****:****:****:****:****:****]:31825 SIP/2.0 Message Header
- Via: SIP/2.0/UDP [****:****:****:****:****:****:****:****]:9900;bra nch=z9hG4bKefjhegs6fifgajsagkwg7eeid;Role=3;Hpt=8f52_ 36;TRC=ffffffff-ffffffff
- Call-ID: ddjcb9Lnj@[****:****:****:****:*:*:****:****]
- From: "760"
760;phone-context=ims.mnc007.mcc460.3gppnetwork.org>;tag=03k1lz2w - SIP from tag: 03k1lz2w
- To:
8617*****8860@js.ims.mnc000.mcc460.3gppnetwork.org>;tag=aejcb9L - CSeq: 1 UPDATE
- Contact:
9900;Dpt=ed ca-200;Hpt=8f52_16;CxtId=3;TRC=ffffffff-ffffffff> - Max-Forwards: 63
- Supported: timer,precondition
- P-Early-Media: sendrecv,gated
- P-Asserted-Identity:
760;phone-context=ims.mnc007.mcc460.3gppnetwork.org> - Content-Length: 1355
- Content-Type: application/sdp//被叫侧更新的媒体信息 Message Body
- Session Description Protocol
- Session Description Protocol Version (v): 0
- Owner/Creator, Session Id (o): - 125499876 125499878 IN IP6 2409:8095:0500:0000:0000:0000:0000:0131
- Session Name (s): SBC call
- Connection Information (c): IN IP6 2409:8095:0500:0000:0000:0000:0000:0131
- Time Description, active time (t): 0 0
- Session Start Time: 0
- Session Stop Time: 0
- Media Description, name and address (m): audio 25158 RTP/AVP 107 101 111 112 113 18 8 0 97
- Media Attribute (a): content:g.3gpp.cat//3GPP协议规定的彩铃业务属性
- Media Attribute (a): rtpmap:107 AMR-WB/16000
- Media Attribute (a): rtpmap:101 telephone-event/16000
- Media Attribute (a): ptime:20
- Media Attribute (a): fmtp:101 0-15
- Media Attribute (a): maxptime:240
- Media Attribute (a): fmtp:107 mode-change-capability=2;max-red=0
- Media Attribute (a): curr:qos remote none
- Media Attribute (a): des:qos optional remote sendrecv
- Media Attribute (a): conf:qos remote sendrecv
- Media Attribute (a): curr:qos local sendrecv
- Media Attribute (a): des:qos optional local sendrecv
- Media Attribute (a): rtpmap:111 EVS/16000
- Media Attribute (a): fmtp:111 br=9.6-128;bw=swb;mode-change-capability=2;cmr=0;dtx=0;ch-aw-recv=-1;max-red=0
- Media Attribute (a): rtpmap:112 EVS/16000
- Media Attribute (a): fmtp:112 br=5.9-128;bw=wb;mode-change-capability=2;cmr=0;dtx=0;ch-aw-recv=-1;max-red=0
- Media Attribute (a): fmtp:113 mode-change-capability=2;max-red=0
- Media Attribute (a): rtpmap:18 G729/8000
- Media Attribute (a): fmtp:18 annexb=no
- Media Attribute (a): rtpmap:8 PCMA/8000
- Media Attribute (a): rtpmap:0 PCMU/8000
- Media Attribute (a): rtpmap:97 telephone-event/8000
- Media Attribute (a): fmtp:97 0-15
- Media Description, name and address (m): video 52784 RTP/AVP 114//被叫侧增加了视频媒体信息
- Media Attribute (a): content:g.3gpp.cat
- Media Attribute (a): rtpmap:114 H264/90000
- Media Attribute (a): fmtp:114 max-br=960;profile-level-id=42C01E;packetization-mode=1;sprop-parameter-sets=Z0LAHtkAoD2hAAADAA EAAAMAPA8WLkg=,aMuAjLI=
- Media Attribute (a): framerate:30
- Media Attribute (a): framesize:114 640-480
- Media Attribute (a): sendonly
- Media Attribute (a): curr:qos remote none
- Media Attribute (a): des:qos optional remote recv
- Media Attribute (a): conf:qos remote recv
- Media Attribute (a): curr:qos local send
- Media Attribute (a): des:qos optional local send
- 复制代码
9.Update的响应200 OK消息
- Status-Line: SIP/2.0 200 OK Message Header From: "760"
760;phone-context=ims.mnc007.mcc460.3gppnetwork.org>;tag=03k1lz2w - SIP from tag: 03k1lz2w To:
8617*****8860@js.ims.mnc000.mcc460.3gppnetwork.org>;tag=aejcb9L Contact: 8617*****8860@[****:****:****:****:*:*:****:****]:31825>;+g.3gpp.icsi-ref="urn%3Aurn-7%3A3gpp-service.ims.icsi.mmtel";audio;video;+g.3gpp.mid-call;+g.3gpp.srvcc-alerting;+g.3gpp.ps2cs-srvcc-orig-pre-alerting P-Access-Network-Info: 3GPP-E-UTRAN-TDD;utran-cell-id-3gpp=4600051A1D546B03 Supported: 100rel,histinfo,join,norefersub,precondition,repla ces,timer Allow: Invite,ACK,OPTIONS,BYE,CANCEL,UPDATE,INFO,PRACK,NOTIFY, MESSAGE,REFER Require: precondition Call-ID: ddjcb9Lnj@[****:****:****:****:*:*:****:****] CSeq: 1 UPDATE - Sequence Number: 1
- Method: UPDATE User-Agent: IM-client/OMA1.0 HW-Rto/V1.0 Via: SIP/2.0/UDP [****:****:***::***]:9900;branch=z9hG4bKefjhegs6昀fgajsagkwg7eeid;Role=3;Hpt=8f52_36;TRC=ffffffff-ffffffff
- Transport: UDP
- Sent-by Address: ****:****:***::***
- Sent-by port: 9900
- Branch: z9hG4bKefjhegs6昀fgajsagkwg7eeid
- Role=3
- Hpt=8f52_36
- TRC=ffffffff-ffffffff Content-Type: application/sdp Content-Length: 862 Message Body Session Description Protocol
- Session Description Protocol Version (v): 0
- Owner/Creator, Session Id (o): rue 3308 3310 IN IP6 ****:****:****:****:*:*:****:****
- Session Name (s): -
- Connection Information (c): IN IP6 ****:****:****:****:*:*:****:****
- Bandwidth Information (b): AS:995//视频和音频媒体的总RTP带宽为995kbit/s
- Bandwidth Information (b): RR:7837//视频和音频媒体的总RTCP接收带宽为7837bit/s
- Bandwidth Information (b): RS:8612//视频和音频媒体的总RTCP发送带宽为8612bit/s
- Time Description, active time (t): 0 0
- Media Description, name and address (m): audio 31016 RTP/AVP 107 101
- Bandwidth Information (b): AS:49//音频媒体的RTP带宽为49kbit/s
- Bandwidth Information (b): RR:1837//音频媒体的RTCP接收带宽为1837bit/s
- Bandwidth Information (b): RS:612//音频媒体的RTCP发送带宽为612bit/s
- Media Attribute (a): rtpmap:107 AMR-WB/16000/1
- Media Attribute (a): fmtp:107 mode-change-capability=2;max-red=0
- Media Attribute (a): rtpmap:101 telephone-event/16000
- Media Attribute (a): fmtp:101 0-15
- Media Attribute (a): ptime:20
- Media Attribute (a): maxptime:240
- Media Attribute (a): sendrecv
- Media Attribute (a): curr:qos local none
- Media Attribute (a): curr:qos remote sendrecv
- Media Attribute (a): des:qos mandatory local sendrecv
- Media Attribute (a): des:qos optional remote sendrecv
- Media Description, name and address (m): video 37078 RTP/ AVP 114//主叫用户的视频媒体信息
- Bandwidth Information (b): AS:946//视频媒体的RTP带宽为946kbit/s
- Bandwidth Information (b): RR:6000//视频媒体的RTCP接收带宽为6000bit/s
- Bandwidth Information (b): RS:8000//视频媒体的RTCP发送带宽为8000bit/s
- Media Attribute (a): rtpmap:114 H264/90000
- Media Attribute (a): fmtp:114 pro昀le-level-id=42C01E; packetization-mode=1; max-br=960; sprop-parameter-sets=Z0LAHtsCgPRA, aMqPIA==
- Media Attribute (a): recvonly//模式修改为仅接收Media Attribute (a): curr:qos local none//本地目前的状态是无资源
- Media Attribute (a): curr:qos remote send
- Media Attribute (a): des:qos mandatory local sendrecv//请求本地的状态是一定要发送接收
- Media Attribute (a): des:qos optional remote send//请求远端的状态是可以发送
- Media Attribute (a): des:qos mandatory remote recv//请求远端的状态是一定要为接收
- 复制代码
10.主叫用户的Update消息
- Request-Line: UPDATE sip:[****:****:****::***]:9900;Dpt=edca-200;Hpt=8f52_16;CxtId=3;TRC=ffffffff-ffffffff SIP/2.0 Message Header From:
8617*****8860@js.ims.mnc000.mcc460.3gppnetwork.org>;tag=aejcb9L To: "760"760;phone-context=ims.mnc007.mcc460.3gppnetwork.org>;tag=03k1lz2w - SIP to tag: 03k1lz2w Contact:
8617*****8860@[****:****:****:****:*:*:****:****]:31825>;+sip.instance="" ;+g.3gpp.icsi-ref="urn%3Aurn-7%3A3gpp-service.ims.icsi.mmtel";audio;video;+g.3gpp.mid-call;+g.3gpp.srvcc-alerting;+g.3gpp.ps2cs-srvcc-orig-pre-alerting P-Access-Network-Info: 3GPP-E-UTRAN-TDD;utran-cell-id-3gpp=4600051A1D546B03 Supported: 100rel,histinfo,join,norefersub,precondition,repla ces,timer,sec-agree Allow: Invite,ACK,OPTIONS,BYE,CANCEL,UPDATE,INFO,PRACK,NOTIFY, MESSAGE,REFER Require: sec-agree Proxy-Require: sec-agree - Security-Verify: ipsec-3gpp;alg=hmac-sha-1-96;prot=esp;mod=trans;ealg=null;spi-c=2545605770;spi-s=4136901965;port-c=9950;port-s=9900 Route:********************************************************* ************************************************************** Call-ID: ddjcb9Lnj@[****:****:****:****:*:*:****:****] CSeq: 4 UPDATE Max-Forwards: 70 User-Agent: IM-client/OMA1.0 HW-Rto/V1.0 Via: SIP/2.0/UDP [****:****:****:****:*:*:****:****]:31825;branch=z9h G4bKaijcbDQ9IaQ9IwfdaeMo;rport Content-Type: application/sdp//主叫用户再次更新自己的媒体信息 Content-Length: 870 Message Body Session Description Protocol
- Session Description Protocol Version (v): 0
- Owner/Creator, Session Id (o): rue 3308 3311 IN IP6 2409:8805:3024:2f13:1:1:54b5:17f5
- Session Name (s): -
- Connection Information (c): IN IP6 ****:****:****:****:*:*:****:****
- Bandwidth Information (b): AS:995
- Bandwidth Information (b): RR:7837
- Bandwidth Information (b): RS:8612
- Time Description, active time (t): 0 0
- Media Description, name and address (m): audio 31016 RTP/AVP 107 101
- Bandwidth Information (b): AS:49
- Bandwidth Information (b): RR:1837
- Bandwidth Information (b): RS:612
- Media Attribute (a): rtpmap:107 AMR-WB/16000/1
- Media Attribute (a): fmtp:107 mode-change-capability=2;max-red=0
- Media Attribute (a): rtpmap:101 telephone-event/16000
- Media Attribute (a): fmtp:101 0-15
- Media Attribute (a): ptime:20
- Media Attribute (a): maxptime:240
- Media Attribute (a): sendrecv
- Media Attribute (a): curr:qos local sendrecv
- Media Attribute (a): curr:qos remote sendrecv
- Media Attribute (a): des:qos mandatory local sendrecv
- Media Attribute (a): des:qos optional remote sendrecv
- Media Description, name and address (m): video 37078 RTP/AVP 114
- Bandwidth Information (b): AS:946
- Bandwidth Information (b): RR:6000
- Bandwidth Information (b): RS:8000
- Media Attribute (a): rtpmap:114 H264/90000
- Media Attribute (a): fmtp:114 profile-level-id=42C01E;packetization-mode=1; max-br=960; sprop-parameter-sets=Z0LAHtsCgPRA, aMqPIA==
- Media Attribute (a): recvonly
- Media Attribute (a): curr:qos local sendrecv//目前本地的状态是发送接收
- Media Attribute (a): curr:qos remote send//目前远端的状态是发送
- Media Attribute (a): des:qos mandatory local sendrecv
- Media Attribute (a): des:qos optional remote send
- Media Attribute (a): des:qos mandatory remote recv
- 复制代码
11.被叫侧针对主叫Update的响应200 OK消息
- Status-Line: SIP/2.0 200 OK Message Header Via: SIP/2.0/UDP [****:****:****:****:****:****:****:****]:31825; Call-ID: ddjcb9Lnj@[****:****:****:****:*:*:****:****] From:
8617*****8860@js.ims.mnc000.mcc460.3gppnetwork. org>;tag=aejcb9L To: "760"760;phone-context=ims.mnc007.mcc460.3gppnetwork.org>;tag=03k1lz2w - SIP to tag: 03k1lz2w CSeq: 4 UPDATE Contact:
9900;Hpt=8f52_16;CxtId=3;TRC=ffffffff-ffffffff> Supported: 100rel,replaces,precondition,histinfo P-Early-Media: sendrecv,gated Content-Length: 739 Content-Type: application/sdp//被叫侧更新后的媒体信息 Message Body Session Description Protocol - Session Description Protocol Version (v): 0
- Owner/Creator, Session Id (o): - 125499876 125499879 IN IP6 2409:8095:0500:0000:0000:0000:0000:0131
- Session Name (s): SBC call
- Connection Information (c): IN IP6 ****:****:****:****:****:****:****:****
- Time Description, active time (t): 0 0
- Media Description, name and address (m): audio 25158 RTP/AVP 107 101
- Media Attribute (a): content:g.3gpp.cat
- Media Attribute (a): rtpmap:107 AMR-WB/16000
- Media Attribute (a): ptime:20
- Media Attribute (a): maxptime:240
- Media Attribute (a): fmtp:107 mode-change-capability=2;max-red=0
- Media Attribute (a): curr:qos remote sendrecv//目前远端的状态为发送接收
- Media Attribute (a): des:qos mandatory remote sendrecv//请求远端的状态是一定为发送接收
- Media Attribute (a): curr:qos local sendrecv//目前本地的状态为发送接收
- Media Attribute (a): des:qos optional local sendrecv//请求的本地状态为发送接收可选
- Media Attribute (a): rtpmap:101 telephone-event/16000
- Media Attribute (a): fmtp:101 0-15
- Media Description, name and address (m): video 52784 RTP/AVP 114
- Media Attribute (a): content:g.3gpp.cat
- Media Attribute (a): rtpmap:114 H264/90000
- Media Attribute (a): fmtp:114 max-br=960;profile-level-id=42C01E;packetization-mode=1;sprop-parameter-sets=Z0LAHtkAoD2hAAADAA EAAAMAPA8WLkg=,aMuAjLI=
- Media Attribute (a): framerate:30
- Media Attribute (a): framesize:114 640-480
- Media Attribute (a): sendonly
- 复制代码
12.被叫侧的振铃消息180 Ringing
- Status-Line: SIP/2.0 180 Ringing Message Header
- Via: SIP/2.0/UDP [****:****:****:****:****:****:****:****]:31825;branc h=z9hG4bKbfjcb9LnjGLnjOfdamVm;rport=31409
- Record-Route: <sip:[****:****:****:****:****:****:****:****]:9900;lr;Hpt=8f52_116;CxtId=3;TRC=ffffffff-ffffffff;X-HwB2bUaCookie=4635>
- Record-Route URI: sip:[****:****:****:****:****:****:****:****]:99 00;lr;Hpt=8f52_116;CxtId=3;TRC=ffffffff-ffffffff;X-HwB2bUaCookie= 4635
- Call-ID: ddjcb9Lnj@[****:****:****:****:*:*:****:****]
- From: <sip:+8617*****8860@js.ims.mnc000.mcc460.3gppnetwork.org>;tag=aejcb9L
- To: "760"<tel:760;phone-context=ims.mnc007.mcc460.3gppnetwork.org>;tag=03k1lz2w
- SIP to tag: 03k1lz2w
- CSeq: 1 Invite
- Allow: Invite,UPDATE,BYE,PRACK,INFO,OPTIONS,CANCEL,SUBSCRIBE,A CK,REFER,NOTIFY,REGISTER,PUBLISH,MESSAGE
- Contact: <sip:[****:****:****:****:****:****:****:****]:9900;Hpt=8f52_16;CxtId=3;TRC=ffffffff-ffffffff>
- P-Early-Media: sendrecv
- Feature-Caps: *;+g.3gpp.srvcc;+g.3gpp.mid-call;+g.3gpp.srvcc-alerting;+g.3gpp.ps2cs-srvcc-orig-pre-alerting
- Recv-Info: g.3gpp.state-and-event-info
- Content-Length: 0
- 复制代码
13.主叫用户收看视频彩铃8s后主动挂机
- Request-Line: CANCEL tel:760;phone-context=ims.mnc007.mcc460.3gppnetwork.org SIP/2.0 Message Header
- From: <sip:+8617*****8860@js.ims.mnc000.mcc460.3gppnetwork.org>;tag=aejcb9L
- To: "760"<tel:760;phone-context=ims.mnc007.mcc460.3gppnetwork.org>
- Route:*******************************************************************************************************
- Reason: SIP;cause=487;text="request terminated"
- Supported: 100rel,histinfo,join,norefersub,precondition,replac es,timer,sec-agree
- Security-Verify: ipsec-3gpp;alg=hmac-sha-1-96;prot=esp; mod=trans;ealg=null;spi-c=2545605770;spi-s=4136901965;port-c=9950;port-s=9900
- Call-ID: ddjcb9Lnj@[****:****:****:****:*:*:****:****]
- CSeq: 1 CANCEL
- Max-Forwards: 70
- User-Agent: IM-client/OMA1.0 HW-Rto/V1.0
- Via: SIP/2.0/UDP [****:****:****:****:*:*:****:****]:31825;branch= z9 hG4bKbfjcb9LnjGLnjOfdamVm;rport
- Content-Length: 0
- 复制代码
14.Cancel的响应200 OK消息
- Status-Line: SIP/2.0 200 OK Message Header Via: SIP/2.0/UDP [****:****:****:****:****:****:****:****]:31825;branc h=z9hG4bKbfjcb9LnjGLnjOfdamVm;rport=31409 Call-ID: ddjcb9Lnj@[2409:8805:3024:2f13:1:1:54b5:17f5] From: <sip:+8617*****8860@js.ims.mnc000.mcc460.3gppnetwork.org>;tag=aejcb9L To: "760"<tel:760;phone-context=ims.mnc007.mcc460.3gppnetwork.org>;tag=c6ehgiha
- SIP to tag: c6ehgiha CSeq: 1 CANCEL Content-Length: 0
- 复制代码
15.网络侧终止了本次通话
- Status-Line: SIP/2.0 487 Request Terminated Message Header
- Via: SIP/2.0/UDP [****:****:****:****:****:****:****:****]:31825;branc h=z9hG4bKbfjcb9LnjGLnjOfdamVm;rport=31409
- Call-ID: ddjcb9Lnj@[2409:8805:3024:2f13:1:1:54b5:17f5]
- From: <sip:+8617*****8860@js.ims.mnc000.mcc460.3gppnetwork.org>;tag=aejcb9L
- To: "760"<tel:760;phone-context=ims.mnc007.mcc460.3gppnetwork.org>;tag=03k1lz2w
- SIP to tag: 03k1lz2w
- CSeq: 1 Invite
- Warning: 399 [****:****:****:****:****:****:****:****] "SS250200F156L921 [00000] Cancel received on initial invite"
- Content-Length: 0
- 复制代码
16.主叫用户确认终止通话
- Request-Line: ACK tel:760;phone-context=ims.mnc007.mcc460.3gppnetwork.org SIP/2.0 Message Header
- To: "760"<tel:760;phone-context=ims.mnc007.mcc460.3gppnetwork.org>;tag=03k1lz2w
- SIP to tag: 03k1lz2w
- From: <sip:+8617*****8860@js.ims.mnc000.mcc460.3gppnetwork.org>;tag=aejcb9L
- CSeq: 1 ACK
- Call-ID: ddjcb9Lnj@[****:****:****:****:*:*:****:****]
- Route:*******************************************************************************************************************
- Max-Forwards: 70
- Via: SIP/2.0/UDP [****:****:****:****:*:*:****:****]:31825;branch=z9h G4bKbfjcb9LnjGLnjOfdamVm;rport
- Supported: 100rel,histinfo,join,norefersub,precondition,repla ces,timer
- Content-Length: 0
- 复制代码
SDP协议对于我们掌握VoLTE语音质量问题的处理有着至关重要的作用,理论知识是实践的前提,同时实践又会进一步加深我们对理论的理解。下面就用一个语音质量问题的案例来帮助我们更好地了解SDP协议。
一用户通话过程中突然听不到对方的声音了,我们从他的信令流程可以看到,在被叫应答之后他给网络侧重新发起了一个Invite消息,流程如图4-79所示。
第二条Invite消息都带了什么信息?如图4-80所示,这个参数是本次主叫用户听不到声音的根本原因。
这条消息是告诉网络侧,现在将主叫侧的媒体修改为“只发送”模式,此时主叫用户的感知是听不到声音。
我们可能第一次遇到这样的信令,也许看不到这样一个细节。随着经验的积累和理论学习,我们在SDP中的各个参数中可以立即锁定能解决问题的参数。