• VoLTE端到端业务详解 | SDP协议


    书籍来源:艾怀丽《VoLTE端到端业务详解》

    一边学习一边整理书中的笔记,并与大家分享,侵权即删,谢谢支持!

    附上汇总贴:VoLTE端到端业务详解 | 汇总_COCOgsta的博客-CSDN博客


    4.2.1 基础知识

    会话描述协议(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)所有格式均为=。

    4.2.2 SIP电话中的应用

    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:给出消息体的字节数。

    4.2.3 VoLTE实例

    以下是典型VoLTE被叫用户振铃后主叫早释的呼叫流程。

    主叫UE1:178XXXXXXXX,被叫UE2:760(家庭亲情号)且签约了视频彩铃业务,主叫用户登记在NJPSBC15BHW上。

    呼叫过程:主叫拨号,被叫侧网络给主叫用户播放视频彩铃,主叫在收看视频彩铃过程中挂机、被叫未应答。

    整体流程如图4-78所示。

    1.主叫拨号

    1. Session Initiation Protocol (Invite)
    2. Request-Line: Invite tel:760;phone-context=ims.mnc007.mcc460.3gppnetwork.org SIP/2.0
    3. Method: Invite
    4. Request-URI: tel:760;phone-context=ims.mnc007.mcc460.3gppnetwork.org Message Header
    5. From: 8617*****8860@js.ims.mnc000.mcc460.3gppnetwork.org>;tag=aejcb9L
    6. To: "760"760;phone-context=ims.mnc007.mcc460.3gppnetwork.org>
    7. P-Preferred-Identity: @js.ims.mnc000.mcc460.3gppnetwork.org>
    8. 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
    9. Accept-Contact: *;+g.3gpp.icsi-ref="urn%3Aurn-7%3A3gpp-service.ims.icsi.mmtel"
    10. P-Access-Network-Info: 3GPP-E-UTRAN-TDD;utran-cell-id-3gpp=4600051A1D546B03
    11. P-Preferred-Service: urn:urn-7:3gpp-service.ims.icsi.mmtel
    12. P-Early-Media: supported
    13. Supported: 100rel,histinfo,join,norefersub,precondition,replaces, timer,sec-agree
    14. Allow: Invite,ACK,OPTIONS,BYE,CANCEL,UPDATE,INFO,PRACK,NOTIFY,MES SAGE,REFER
    15. Accept: application/sdp,application/3gpp-ims+xml
    16. Session-Expires: 1800
    17. Min-SE: 90
    18. Route:**********************************************************************************************************************
    19. Require: sec-agree
    20. Proxy-Require: sec-agree
    21. 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
    22. Call-ID: ddjcb9Lnj@[****:****:****:****:*:*:****:****]
    23. CSeq: 1 Invite
    24. Max-Forwards: 70
    25. User-Agent: IM-client/OMA1.0 HW-Rto/V1.0
    26. Via: SIP/2.0/UDP [****:****:****:****:*:*:****:****]:31825;branch=z9h G4bKbfjcb9LnjGLnjOfdamVm;rport
    27. Content-Type: application/sdp//表示是SDP会话描述、主叫用户侧媒体信息
    28. Content-Length: 814//消息体长度为814Byte Message Body
    29. Session Description Protocol
    30. Session Description Protocol Version (v): 0//版本为0
    31. Owner/Creator, Session Id (o): rue 3308 3308 IN IP6 ****:****:****:****:*:*:****:**** //会话源:用户名rue,会话标识3308,版本3308,网络类型internet,地址类型Ipv6,地址主叫ip****:****:****:****:*:*:****:****
    32. Session Name (s): -
    33. Connection Information (c): IN IP6 ****:****:****:****:*:*:****:****//连接数据:网络类型internet,地址类型Ipv6,连接地址****:****:****:****:*:*:****:***
    34. Bandwidth Information (b): AS:49//RTP流总带宽49Kbit/s
    35. Bandwidth Information (b): RR:1837//接收的RTCP流带宽1837bit/s
    36. Bandwidth Information (b): RS:612//发送的RTCP流带宽612bit/s
    37. Time Description, active time (t): 0 0//无开始和结束时间
    38. 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
    39. Bandwidth Information (b): AS:49
    40. Bandwidth Information (b): RR:1837
    41. Bandwidth Information (b): RS:612
    42. Media Attribute (a): rtpmap:107 AMR-WB/16000/1
    43. Media Attribute (a): fmtp:107 mode-change-capability=2;max-red=0 //净荷类型107,编码名AMR-WB,抽样速度为16kHz
    44. Media Attribute (a): rtpmap:105 AMR/8000/1
    45. Media Attribute (a): fmtp:105 mode-change-capability=2;max- red=0
    46. Media Attribute (a): rtpmap:101 telephone-event/16000
    47. Media Attribute (a): fmtp:101 0-15
    48. Media Attribute (a): rtpmap:102 telephone-event/8000
    49. Media Attribute (a): fmtp:102 0-15
    50. Media Attribute (a): ptime:20//媒体打包的时长为20ms
    51. Media Attribute (a): maxptime:240//媒体打包的时长最大为240ms
    52. Media Attribute (a): sendrecv//收发模式为发送接收
    53. Media Attribute (a): curr:qos local none
    54. Media Attribute (a): curr:qos remote none//当前的状态是本地和远端均为没有资源
    55. Media Attribute (a): des:qos mandatory local sendrecv
    56. Media Attribute (a): des:qos optional remote sendrecv//请求的状态是本地一定为发送接收、远端的发送接收是可选的
    57. 复制代码

    2.临时响应100 Trying消息

    1. Status-Line: SIP/2.0 100 Trying
    2. Message Header
    3. Via: SIP/2.0/UDP [****:****:****:****:****:****:****:****]:31825;branc h=z9hG4bKbfjcb9LnjGLnjOfdamVm;rport=31409
    4. Call-ID: ddjcb9Lnj@[****:****:****:****:*:*:****:****]
    5. From: <sip:+8617*****8860@js.ims.mnc000.mcc460.3gppnetwork.org>;tag=aejcb9L
    6. To: "760"<tel:760;phone-context=ims.mnc007.mcc460.3gppnetwork.org>
    7. CSeq: 1 Invite
    8. Content-Length: 0
    9. 复制代码

    3.针对Invite的响应183消息

    1. Status-Line: SIP/2.0 183 Session Progress
    2. Message Header
    3. Via: SIP/2.0/UDP [****:****:****:****:****:****:****:****]:31825;branch=z9hG4bKbfjcb9LnjGLnjOfdamVm;rport=31409
    4. Record-Route: 9900;lr;Hpt=8f52_116;CxtId=3;TRC=ffffffff-ffffffff;X-HwB2bUaCookie=4635>
    5. Record-Route URI: sip:[****:****:****:****:****:****:****:****]:9900;lr;Hpt=8f52_116;CxtId=3;TRC=ffffffff-ffffffff;X-HwB2bUaCookie=4635
    6. Call-ID: ddjcb9Lnj@[****:****:****:****:*:*:****:****]
    7. From: 8617*****8860@js.ims.mnc000.mcc460.3gppnetwork.org>;tag=aejcb9L
    8. To: "760"760;phone-context=ims.mnc007.mcc460.3gppnetwork.org>;tag=03k1lz2w
    9. SIP to tag: 03k1lz2w
    10. CSeq: 1 Invite
    11. Allow: Invite,UPDATE,BYE,PRACK,INFO,OPTIONS,CANCEL,SUBSCRIBE,A CK,REFER,NOTIFY,REGISTER,PUBLISH,MESSAGE
    12. 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"
    13. Require: precondition,100rel
    14. RSeq: 1
    15. P-Early-Media: gated
    16. Feature-Caps: *;+g.3gpp.srvcc;+g.3gpp.mid-call;+g.3gpp.srvcc-alerting;+g.3gpp.ps2cs-srvcc-orig-pre-alerting
    17. Recv-Info: g.3gpp.state-and-event-info
    18. Content-Length: 522
    19. Content-Type: application/sdp//被叫侧的媒体信息
    20. Message Body
    21. Session Description Protocol
    22. Session Description Protocol Version (v): 0
    23. Owner/Creator, Session Id (o):-125499876 125499876 IN IP6 2409:8095:0500:0000:0000:0000:0000:0131
    24. Session Name (s): SBC call
    25. Connection Information (c): IN IP6 2409:8095:0500:0000:0000:0000:0000:0131
    26. Time Description, active time (t): 0 0
    27. Media Description, name and address (m): audio 25158 RTP/AVP 107 101
    28. Bandwidth Information (b): AS:49
    29. Bandwidth Information (b): RS:612
    30. Bandwidth Information (b): RR:1837
    31. Media Attribute (a): rtpmap:107 AMR-WB/16000
    32. Media Attribute (a): fmtp:107 mode-change-capability=2;max-red=0
    33. Media Attribute (a): ptime:20
    34. Media Attribute (a): maxptime:240
    35. Media Attribute (a): sendrecv
    36. Media Attribute (a): des:qos mandatory local sendrecv
    37. Media Attribute (a): curr:qos local none
    38. Media Attribute (a): des:qos mandatory remote sendrecv
    39. Media Attribute (a): curr:qos remote none
    40. Media Attribute (a): conf:qos remote sendrecv
    41. Media Attribute (a): rtpmap:101 telephone-event/16000
    42. Media Attribute (a): fmtp:101 0-15
    43. 复制代码

    4.针对183的响应Prack消息

    1. Request-Line: PRACK sip:[2409:8095:500::12f]:9900;Hpt=8f52_16;CxtId=3;TRC=ffffffff-ffffffff SIP/2.0
    2. Message Header
    3. From: <sip:+8617*****8860@js.ims.mnc000.mcc460.3gppnetwork.org>;tag=aejcb9L
    4. To: "760"<tel:760;phone-context=ims.mnc007.mcc460.3gppnetwork.org>;tag=03k1lz2w
    5. SIP to tag: 03k1lz2w
    6. Route:*************************************************************************************************************
    7. Call-ID: ddjcb9Lnj@[****:****:****:****:*:*:****:****]
    8. CSeq: 2 PRACK
    9. Max-Forwards: 70
    10. User-Agent: IM-client/OMA1.0 HW-Rto/V1.0
    11. Supported: 100rel,histinfo,join,norefersub,precondition,repla ces,timer
    12. P-Access-Network-Info: 3GPP-E-UTRAN-TDD;utran-cell-id-3gpp=4600051A1D546B03
    13. Via: SIP/2.0/UDP [****:****:****:****:*:*:****:****]:31825;branch=z9h G4bKcgjcb9LnjGLnjOfda0wo;rport
    14. RAck: 1 1 Invite
    15. Content-Length: 0
    16. 复制代码

    5.Prack的应答消息

    1. Status-Line: SIP/2.0 200 OK
    2. Message Header
    3. Via: SIP/2.0/UDP [****:****:****:****:****:****:****:****]:31825;branc h=z9hG4bKcgjcb9LnjGLnjOfda0wo;rport=31409
    4. Call-ID: ddjcb9Lnj@[****:****:****:****:*:*:****:****]
    5. From: <sip:+8617*****8860@js.ims.mnc000.mcc460.3gppnetwork.org>;tag=aejcb9L
    6. To: "760"<tel:760;phone-context=ims.mnc007.mcc460.3gppnetwork.org>;tag=03k1lz2w
    7. SIP to tag: 03k1lz2w
    8. CSeq: 2 PRACK
    9. Content-Length: 0
    10. 复制代码

    6.主叫用户的Update消息

    1. Request-Line: UPDATE sip:[2409:8095:500::12f]:9900;Hpt=8f52_16;CxtId=3;TRC=ffffffff-ffffffff SIP/2.0
    2. From: 8617*****8860@js.ims.mnc000.mcc460.3gppnetwork.org>;tag=aejcb9L
    3. To: "760"760;phone-context=ims.mnc007.mcc460.3gppnetwork.org>;tag=03k1lz2w
    4. SIP to tag: 03k1lz2w
    5. 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
    6. P-Access-Network-Info: 3GPP-E-UTRAN-TDD;utran-cell-id-3gpp=4600051A1D546B03
    7. Supported: 100rel,histinfo,join,norefersub,precondition,repla ces,timer,sec-agree
    8. Require: precondition,sec-agree
    9. Allow: Invite,ACK,OPTIONS,BYE,CANCEL,UPDATE,INFO,PRACK,NOTIFY, MESSAGE,REFER
    10. Proxy-Require: sec-agree
    11. 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
    12. Route:***************************************************************************************************************
    13. Call-ID: ddjcb9Lnj@[****:****:****:****:*:*:****:****]
    14. CSeq: 3 UPDATE
    15. Max-Forwards: 70
    16. User-Agent: IM-client/OMA1.0 HW-Rto/V1.0
    17. Via: SIP/2.0/UDP [****:****:****:****:*:*:****:****]:31825;branch=z9h G4bKdhjcbDQ9IaQ9IwfdamUm;rport
    18. Transport: UDP
    19. Sent-by Address: ****:****:****:****:*:*:****:****
    20. Sent-by port: 31825
    21. Branch: z9hG4bKdhjcbDQ9IaQ9IwfdamUm
    22. RPort: rport
    23. Content-Type: application/sdp//更新主叫用户侧的媒体信息
    24. Content-Length: 503
    25. Message Body
    26. Session Description Protocol
    27. Session Description Protocol Version (v): 0
    28. Owner/Creator, Session Id (o): rue 3308 3309 IN IP6 2409:8805:3024:2f13:1:1:54b5:17f5
    29. Bandwidth Information (b): AS:49
    30. Bandwidth Information (b): RR:1837
    31. Bandwidth Information (b): RS:612
    32. Time Description, active time (t): 0 0
    33. Media Description, name and address (m): audio 31016 RTP/AVP 107 101
    34. Bandwidth Information (b): AS:49
    35. Bandwidth Information (b): RR:1837
    36. Bandwidth Information (b): RS:612
    37. Media Attribute (a): rtpmap:107 AMR-WB/16000/1
    38. Media Attribute (a): fmtp:107 mode-change-capability=2;max- red=0
    39. Media Attribute (a): rtpmap:101 telephone-event/16000
    40. Media Attribute (a): fmtp:101 0-15
    41. Media Attribute (a): ptime:20
    42. Media Attribute (a): maxptime:240
    43. Media Attribute (a): sendrecv
    44. Media Attribute (a): curr:qos local sendrecv
    45. Media Attribute (a): curr:qos remote none//远端目前状态未知
    46. Media Attribute (a): des:qos mandatory remote sendrecv//请求远端状态为发送接收
    47. 复制代码

    7.Update的应答消息

    1. Status-Line: SIP/2.0 200 OK
    2. Status-Code: 200
    3. Resent Packet: False
    4. Message Header
    5. Via: SIP/2.0/UDP [****:****:****:****:****:****:****:****]:31825;branc h=z9hG4bKdhjcbDQ9IaQ9IwfdamUm;rport=31409
    6. Transport: UDP
    7. Sent-by Address: ****:****:****:****:****:****:****:****
    8. Sent-by port: 31825
    9. Branch: z9hG4bKdhjcbDQ9IaQ9IwfdamUm
    10. RPort: 31409
    11. Call-ID: ddjcb9Lnj@[****:****:****:****:*:*:****:****]
    12. From: <sip:+8617*****8860@js.ims.mnc000.mcc460.3gppnetwork.org>;tag=aejcb9L SIP from address: sip:+8617*****8860@js.ims.mnc000.mcc460.3gppnetwork.org
    13. SIP from address User Part: +8617*****8860
    14. E.164 number (MSISDN): 8617*****8860
    15. Country Code: China (People’s Republic of) (86)
    16. 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
    17. Contact URI Host Part: [2409:8095:0500:0000:0000:0000:00 00:012F]
    18. Contact URI Host Port: 9900
    19. Contact URI parameter: Hpt=8f52_16
    20. Contact URI parameter: CxtId=3
    21. Contact URI parameter: TRC=ffffffff-ffffffff
    22. Contact parameter: +g.3gpp.icsi-ref="urn%3Aurn-7%3A3gpp-service.ims.icsi.mmtel"\r\n
    23. Require: precondition Supported: 100rel,replaces,precondition P-Early-Media: gated Content-Length: 530 Content-Type: application/sdp//被叫侧更新的媒体信息 Message Body Session Description Protocol
    24. Session Description Protocol Version (v): 0
    25. Owner/Creator, Session Id (o):-125499876 125499877 IN IP6 2409:8095:0500:0000:0000:0000:0000:0131
    26. Session Name (s): SBC call
    27. Connection Information (c): IN IP6 2409:8095:0500:0000:0000:0000:0000:0131
    28. Time Description, active time (t): 0 0
    29. Media Description, name and address (m): audio 25158 RTP/AVP 107 101
    30. Bandwidth Information (b): AS:49
    31. Bandwidth Information (b): RS:612
    32. Bandwidth Information (b): RR:1837
    33. Media Attribute (a): rtpmap:107 AMR-WB/16000
    34. Media Attribute (a): fmtp:107 mode-change-capability=2;max-red=0
    35. Media Attribute (a): ptime:20
    36. Media Attribute (a): maxptime:240
    37. Media Attribute (a): sendrecv
    38. Media Attribute (a): des:qos mandatory local sendrecv
    39. Media Attribute (a): curr:qos local sendrecv
    40. Media Attribute (a): des:qos mandatory remote sendrecv
    41. Media Attribute (a): curr:qos remote sendrecv
    42. Media Attribute (a): conf:qos remote sendrecv
    43. Media Attribute (a): rtpmap:101 telephone-event/16000
    44. Media Attribute (a): fmtp:101 0-15
    45. 复制代码

    8.被叫侧的Update消息

    1. Request-Line: UPDATE sip:+8617*****8860@[****:****:****:****:****:****:****:****]:31825 SIP/2.0 Message Header
    2. Via: SIP/2.0/UDP [****:****:****:****:****:****:****:****]:9900;bra nch=z9hG4bKefjhegs6fifgajsagkwg7eeid;Role=3;Hpt=8f52_ 36;TRC=ffffffff-ffffffff
    3. Call-ID: ddjcb9Lnj@[****:****:****:****:*:*:****:****]
    4. From: "760"760;phone-context=ims.mnc007.mcc460.3gppnetwork.org>;tag=03k1lz2w
    5. SIP from tag: 03k1lz2w
    6. To: 8617*****8860@js.ims.mnc000.mcc460.3gppnetwork.org>;tag=aejcb9L
    7. CSeq: 1 UPDATE
    8. Contact: 9900;Dpt=ed ca-200;Hpt=8f52_16;CxtId=3;TRC=ffffffff-ffffffff>
    9. Max-Forwards: 63
    10. Supported: timer,precondition
    11. P-Early-Media: sendrecv,gated
    12. P-Asserted-Identity: 760;phone-context=ims.mnc007.mcc460.3gppnetwork.org>
    13. Content-Length: 1355
    14. Content-Type: application/sdp//被叫侧更新的媒体信息 Message Body
    15. Session Description Protocol
    16. Session Description Protocol Version (v): 0
    17. Owner/Creator, Session Id (o): - 125499876 125499878 IN IP6 2409:8095:0500:0000:0000:0000:0000:0131
    18. Session Name (s): SBC call
    19. Connection Information (c): IN IP6 2409:8095:0500:0000:0000:0000:0000:0131
    20. Time Description, active time (t): 0 0
    21. Session Start Time: 0
    22. Session Stop Time: 0
    23. Media Description, name and address (m): audio 25158 RTP/AVP 107 101 111 112 113 18 8 0 97
    24. Media Attribute (a): content:g.3gpp.cat//3GPP协议规定的彩铃业务属性
    25. Media Attribute (a): rtpmap:107 AMR-WB/16000
    26. Media Attribute (a): rtpmap:101 telephone-event/16000
    27. Media Attribute (a): ptime:20
    28. Media Attribute (a): fmtp:101 0-15
    29. Media Attribute (a): maxptime:240
    30. Media Attribute (a): fmtp:107 mode-change-capability=2;max-red=0
    31. Media Attribute (a): curr:qos remote none
    32. Media Attribute (a): des:qos optional remote sendrecv
    33. Media Attribute (a): conf:qos remote sendrecv
    34. Media Attribute (a): curr:qos local sendrecv
    35. Media Attribute (a): des:qos optional local sendrecv
    36. Media Attribute (a): rtpmap:111 EVS/16000
    37. 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
    38. Media Attribute (a): rtpmap:112 EVS/16000
    39. 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
    40. Media Attribute (a): fmtp:113 mode-change-capability=2;max-red=0
    41. Media Attribute (a): rtpmap:18 G729/8000
    42. Media Attribute (a): fmtp:18 annexb=no
    43. Media Attribute (a): rtpmap:8 PCMA/8000
    44. Media Attribute (a): rtpmap:0 PCMU/8000
    45. Media Attribute (a): rtpmap:97 telephone-event/8000
    46. Media Attribute (a): fmtp:97 0-15
    47. Media Description, name and address (m): video 52784 RTP/AVP 114//被叫侧增加了视频媒体信息
    48. Media Attribute (a): content:g.3gpp.cat
    49. Media Attribute (a): rtpmap:114 H264/90000
    50. Media Attribute (a): fmtp:114 max-br=960;profile-level-id=42C01E;packetization-mode=1;sprop-parameter-sets=Z0LAHtkAoD2hAAADAA EAAAMAPA8WLkg=,aMuAjLI=
    51. Media Attribute (a): framerate:30
    52. Media Attribute (a): framesize:114 640-480
    53. Media Attribute (a): sendonly
    54. Media Attribute (a): curr:qos remote none
    55. Media Attribute (a): des:qos optional remote recv
    56. Media Attribute (a): conf:qos remote recv
    57. Media Attribute (a): curr:qos local send
    58. Media Attribute (a): des:qos optional local send
    59. 复制代码

    9.Update的响应200 OK消息

    1. Status-Line: SIP/2.0 200 OK Message Header From: "760"760;phone-context=ims.mnc007.mcc460.3gppnetwork.org>;tag=03k1lz2w
    2. 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
    3. Sequence Number: 1
    4. 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
    5. Transport: UDP
    6. Sent-by Address: ****:****:***::***
    7. Sent-by port: 9900
    8. Branch: z9hG4bKefjhegs6昀fgajsagkwg7eeid
    9. Role=3
    10. Hpt=8f52_36
    11. TRC=ffffffff-ffffffff Content-Type: application/sdp Content-Length: 862 Message Body Session Description Protocol
    12. Session Description Protocol Version (v): 0
    13. Owner/Creator, Session Id (o): rue 3308 3310 IN IP6 ****:****:****:****:*:*:****:****
    14. Session Name (s): -
    15. Connection Information (c): IN IP6 ****:****:****:****:*:*:****:****
    16. Bandwidth Information (b): AS:995//视频和音频媒体的总RTP带宽为995kbit/s
    17. Bandwidth Information (b): RR:7837//视频和音频媒体的总RTCP接收带宽为7837bit/s
    18. Bandwidth Information (b): RS:8612//视频和音频媒体的总RTCP发送带宽为8612bit/s
    19. Time Description, active time (t): 0 0
    20. Media Description, name and address (m): audio 31016 RTP/AVP 107 101
    21. Bandwidth Information (b): AS:49//音频媒体的RTP带宽为49kbit/s
    22. Bandwidth Information (b): RR:1837//音频媒体的RTCP接收带宽为1837bit/s
    23. Bandwidth Information (b): RS:612//音频媒体的RTCP发送带宽为612bit/s
    24. Media Attribute (a): rtpmap:107 AMR-WB/16000/1
    25. Media Attribute (a): fmtp:107 mode-change-capability=2;max-red=0
    26. Media Attribute (a): rtpmap:101 telephone-event/16000
    27. Media Attribute (a): fmtp:101 0-15
    28. Media Attribute (a): ptime:20
    29. Media Attribute (a): maxptime:240
    30. Media Attribute (a): sendrecv
    31. Media Attribute (a): curr:qos local none
    32. Media Attribute (a): curr:qos remote sendrecv
    33. Media Attribute (a): des:qos mandatory local sendrecv
    34. Media Attribute (a): des:qos optional remote sendrecv
    35. Media Description, name and address (m): video 37078 RTP/ AVP 114//主叫用户的视频媒体信息
    36. Bandwidth Information (b): AS:946//视频媒体的RTP带宽为946kbit/s
    37. Bandwidth Information (b): RR:6000//视频媒体的RTCP接收带宽为6000bit/s
    38. Bandwidth Information (b): RS:8000//视频媒体的RTCP发送带宽为8000bit/s
    39. Media Attribute (a): rtpmap:114 H264/90000
    40. Media Attribute (a): fmtp:114 pro昀le-level-id=42C01E; packetization-mode=1; max-br=960; sprop-parameter-sets=Z0LAHtsCgPRA, aMqPIA==
    41. Media Attribute (a): recvonly//模式修改为仅接收Media Attribute (a): curr:qos local none//本地目前的状态是无资源
    42. Media Attribute (a): curr:qos remote send
    43. Media Attribute (a): des:qos mandatory local sendrecv//请求本地的状态是一定要发送接收
    44. Media Attribute (a): des:qos optional remote send//请求远端的状态是可以发送
    45. Media Attribute (a): des:qos mandatory remote recv//请求远端的状态是一定要为接收
    46. 复制代码

    10.主叫用户的Update消息

    1. 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
    2. 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
    3. 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
    4. Session Description Protocol Version (v): 0
    5. Owner/Creator, Session Id (o): rue 3308 3311 IN IP6 2409:8805:3024:2f13:1:1:54b5:17f5
    6. Session Name (s): -
    7. Connection Information (c): IN IP6 ****:****:****:****:*:*:****:****
    8. Bandwidth Information (b): AS:995
    9. Bandwidth Information (b): RR:7837
    10. Bandwidth Information (b): RS:8612
    11. Time Description, active time (t): 0 0
    12. Media Description, name and address (m): audio 31016 RTP/AVP 107 101
    13. Bandwidth Information (b): AS:49
    14. Bandwidth Information (b): RR:1837
    15. Bandwidth Information (b): RS:612
    16. Media Attribute (a): rtpmap:107 AMR-WB/16000/1
    17. Media Attribute (a): fmtp:107 mode-change-capability=2;max-red=0
    18. Media Attribute (a): rtpmap:101 telephone-event/16000
    19. Media Attribute (a): fmtp:101 0-15
    20. Media Attribute (a): ptime:20
    21. Media Attribute (a): maxptime:240
    22. Media Attribute (a): sendrecv
    23. Media Attribute (a): curr:qos local sendrecv
    24. Media Attribute (a): curr:qos remote sendrecv
    25. Media Attribute (a): des:qos mandatory local sendrecv
    26. Media Attribute (a): des:qos optional remote sendrecv
    27. Media Description, name and address (m): video 37078 RTP/AVP 114
    28. Bandwidth Information (b): AS:946
    29. Bandwidth Information (b): RR:6000
    30. Bandwidth Information (b): RS:8000
    31. Media Attribute (a): rtpmap:114 H264/90000
    32. Media Attribute (a): fmtp:114 profile-level-id=42C01E;packetization-mode=1; max-br=960; sprop-parameter-sets=Z0LAHtsCgPRA, aMqPIA==
    33. Media Attribute (a): recvonly
    34. Media Attribute (a): curr:qos local sendrecv//目前本地的状态是发送接收
    35. Media Attribute (a): curr:qos remote send//目前远端的状态是发送
    36. Media Attribute (a): des:qos mandatory local sendrecv
    37. Media Attribute (a): des:qos optional remote send
    38. Media Attribute (a): des:qos mandatory remote recv
    39. 复制代码

    11.被叫侧针对主叫Update的响应200 OK消息

    1. 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
    2. 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
    3. Session Description Protocol Version (v): 0
    4. Owner/Creator, Session Id (o): - 125499876 125499879 IN IP6 2409:8095:0500:0000:0000:0000:0000:0131
    5. Session Name (s): SBC call
    6. Connection Information (c): IN IP6 ****:****:****:****:****:****:****:****
    7. Time Description, active time (t): 0 0
    8. Media Description, name and address (m): audio 25158 RTP/AVP 107 101
    9. Media Attribute (a): content:g.3gpp.cat
    10. Media Attribute (a): rtpmap:107 AMR-WB/16000
    11. Media Attribute (a): ptime:20
    12. Media Attribute (a): maxptime:240
    13. Media Attribute (a): fmtp:107 mode-change-capability=2;max-red=0
    14. Media Attribute (a): curr:qos remote sendrecv//目前远端的状态为发送接收
    15. Media Attribute (a): des:qos mandatory remote sendrecv//请求远端的状态是一定为发送接收
    16. Media Attribute (a): curr:qos local sendrecv//目前本地的状态为发送接收
    17. Media Attribute (a): des:qos optional local sendrecv//请求的本地状态为发送接收可选
    18. Media Attribute (a): rtpmap:101 telephone-event/16000
    19. Media Attribute (a): fmtp:101 0-15
    20. Media Description, name and address (m): video 52784 RTP/AVP 114
    21. Media Attribute (a): content:g.3gpp.cat
    22. Media Attribute (a): rtpmap:114 H264/90000
    23. Media Attribute (a): fmtp:114 max-br=960;profile-level-id=42C01E;packetization-mode=1;sprop-parameter-sets=Z0LAHtkAoD2hAAADAA EAAAMAPA8WLkg=,aMuAjLI=
    24. Media Attribute (a): framerate:30
    25. Media Attribute (a): framesize:114 640-480
    26. Media Attribute (a): sendonly
    27. 复制代码

    12.被叫侧的振铃消息180 Ringing

    1. Status-Line: SIP/2.0 180 Ringing Message Header
    2. Via: SIP/2.0/UDP [****:****:****:****:****:****:****:****]:31825;branc h=z9hG4bKbfjcb9LnjGLnjOfdamVm;rport=31409
    3. Record-Route: <sip:[****:****:****:****:****:****:****:****]:9900;lr;Hpt=8f52_116;CxtId=3;TRC=ffffffff-ffffffff;X-HwB2bUaCookie=4635>
    4. Record-Route URI: sip:[****:****:****:****:****:****:****:****]:99 00;lr;Hpt=8f52_116;CxtId=3;TRC=ffffffff-ffffffff;X-HwB2bUaCookie= 4635
    5. Call-ID: ddjcb9Lnj@[****:****:****:****:*:*:****:****]
    6. From: <sip:+8617*****8860@js.ims.mnc000.mcc460.3gppnetwork.org>;tag=aejcb9L
    7. To: "760"<tel:760;phone-context=ims.mnc007.mcc460.3gppnetwork.org>;tag=03k1lz2w
    8. SIP to tag: 03k1lz2w
    9. CSeq: 1 Invite
    10. Allow: Invite,UPDATE,BYE,PRACK,INFO,OPTIONS,CANCEL,SUBSCRIBE,A CK,REFER,NOTIFY,REGISTER,PUBLISH,MESSAGE
    11. Contact: <sip:[****:****:****:****:****:****:****:****]:9900;Hpt=8f52_16;CxtId=3;TRC=ffffffff-ffffffff>
    12. P-Early-Media: sendrecv
    13. Feature-Caps: *;+g.3gpp.srvcc;+g.3gpp.mid-call;+g.3gpp.srvcc-alerting;+g.3gpp.ps2cs-srvcc-orig-pre-alerting
    14. Recv-Info: g.3gpp.state-and-event-info
    15. Content-Length: 0
    16. 复制代码

    13.主叫用户收看视频彩铃8s后主动挂机

    1. Request-Line: CANCEL tel:760;phone-context=ims.mnc007.mcc460.3gppnetwork.org SIP/2.0 Message Header
    2. From: <sip:+8617*****8860@js.ims.mnc000.mcc460.3gppnetwork.org>;tag=aejcb9L
    3. To: "760"<tel:760;phone-context=ims.mnc007.mcc460.3gppnetwork.org>
    4. Route:*******************************************************************************************************
    5. Reason: SIP;cause=487;text="request terminated"
    6. Supported: 100rel,histinfo,join,norefersub,precondition,replac es,timer,sec-agree
    7. 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
    8. Call-ID: ddjcb9Lnj@[****:****:****:****:*:*:****:****]
    9. CSeq: 1 CANCEL
    10. Max-Forwards: 70
    11. User-Agent: IM-client/OMA1.0 HW-Rto/V1.0
    12. Via: SIP/2.0/UDP [****:****:****:****:*:*:****:****]:31825;branch= z9 hG4bKbfjcb9LnjGLnjOfdamVm;rport
    13. Content-Length: 0
    14. 复制代码

    14.Cancel的响应200 OK消息

    1. 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
    2. SIP to tag: c6ehgiha CSeq: 1 CANCEL Content-Length: 0
    3. 复制代码

    15.网络侧终止了本次通话

    1. Status-Line: SIP/2.0 487 Request Terminated Message Header
    2. Via: SIP/2.0/UDP [****:****:****:****:****:****:****:****]:31825;branc h=z9hG4bKbfjcb9LnjGLnjOfdamVm;rport=31409
    3. Call-ID: ddjcb9Lnj@[2409:8805:3024:2f13:1:1:54b5:17f5]
    4. From: <sip:+8617*****8860@js.ims.mnc000.mcc460.3gppnetwork.org>;tag=aejcb9L
    5. To: "760"<tel:760;phone-context=ims.mnc007.mcc460.3gppnetwork.org>;tag=03k1lz2w
    6. SIP to tag: 03k1lz2w
    7. CSeq: 1 Invite
    8. Warning: 399 [****:****:****:****:****:****:****:****] "SS250200F156L921 [00000] Cancel received on initial invite"
    9. Content-Length: 0
    10. 复制代码

    16.主叫用户确认终止通话

    1. Request-Line: ACK tel:760;phone-context=ims.mnc007.mcc460.3gppnetwork.org SIP/2.0 Message Header
    2. To: "760"<tel:760;phone-context=ims.mnc007.mcc460.3gppnetwork.org>;tag=03k1lz2w
    3. SIP to tag: 03k1lz2w
    4. From: <sip:+8617*****8860@js.ims.mnc000.mcc460.3gppnetwork.org>;tag=aejcb9L
    5. CSeq: 1 ACK
    6. Call-ID: ddjcb9Lnj@[****:****:****:****:*:*:****:****]
    7. Route:*******************************************************************************************************************
    8. Max-Forwards: 70
    9. Via: SIP/2.0/UDP [****:****:****:****:*:*:****:****]:31825;branch=z9h G4bKbfjcb9LnjGLnjOfdamVm;rport
    10. Supported: 100rel,histinfo,join,norefersub,precondition,repla ces,timer
    11. Content-Length: 0
    12. 复制代码

    4.2.4 现网案例

    SDP协议对于我们掌握VoLTE语音质量问题的处理有着至关重要的作用,理论知识是实践的前提,同时实践又会进一步加深我们对理论的理解。下面就用一个语音质量问题的案例来帮助我们更好地了解SDP协议。

    一用户通话过程中突然听不到对方的声音了,我们从他的信令流程可以看到,在被叫应答之后他给网络侧重新发起了一个Invite消息,流程如图4-79所示。

    第二条Invite消息都带了什么信息?如图4-80所示,这个参数是本次主叫用户听不到声音的根本原因。

    这条消息是告诉网络侧,现在将主叫侧的媒体修改为“只发送”模式,此时主叫用户的感知是听不到声音。

    我们可能第一次遇到这样的信令,也许看不到这样一个细节。随着经验的积累和理论学习,我们在SDP中的各个参数中可以立即锁定能解决问题的参数。

  • 相关阅读:
    动手学深度学习pytorch版练习解答-3.6softmax回归的从零开始实现
    计算机操作系统 第三章:处理机调度与死锁(3)
    简单工厂模式
    django建站过程(3)定义模型与管理页
    抖音小程序开发教学系列(8)- 抖音小程序的案例分析
    C++入门学习4-指针与内存分配,引用
    蓝桥杯每日一题2023.10.25
    《代码大全2》第14章 组织直线型代码
    基于混沌映射的自适应樽海鞘群算法-附代码
    华为云Stack的学习(四)
  • 原文地址:https://blog.csdn.net/guolianggsta/article/details/126367110