SIP MESSAGE消息中的Content-Type

The Content-Type header field indicates the media type of the message-body sent to the recipient.

SIP消息中<Content-Type> 消息头表示发送的消息体的媒体类型。如果消息体不为空,则必须存在 Content-Type 消息头。如果消息体为空且 Content-Type 消息头存在,则表示此类型的消息体长度为 0 (如一个空的声音文件)。

SIP协议扩展请求消息中引入了MESSAGE这种方法(Method),用于 IM(Instant Messaging)。按照RFC3428所述,有两种模式:session model(会话模式)和pager model(寻呼模式)。其中session model是指建立dialog,目前很少应用;RFC3428只关注pager model的应用。

在VOLTE网络中,MESSAGE请求有这些应用场景:

  • 短消息SMS over IP,即SMS 封装在 SIP 中并通过 IMS 核心网络发送。
  • SRVCC中SCC AS发送MESSAGE,把相关信息传给ATCF。
  • 基于SIP MESSAGE的P-CSCF Restoration(SBC故障恢复):P-CSCF发送SBC故障信息给S-CSCF。

这些不同场景的MESSAGE可以通过SIP消息中<Content-Type>来区分:

> 下图为SMS over IP:

> SRVCC时其Content-Type如下:

Content-Type: application/vnd.3gpp.SRVCC-info+xml

>下图为P-CSCF Restoration:

 

Note:

Content-Type的分类是基于MIME类型的,MIME类型通常由两部分组成,一部分是媒体类型(media type),另一部分是子类型(subtype),用斜杠分隔。例如Content-Type: application/sdp。

常见的类型有:

text:表示纯文本,子类型表示文本格式,如 text/plain,  text/xml 等。

image:表示图像,子类型表示图像格式,如 image/jpeg, image/png 等。

audio:表示音频,子类型表示音频格式,如 audio/mpeg, audio/wav等。

video:表示视频,子类型表示视频格式,如 video/mp4 等。

application:表示其他类型,通常是特定应用程序来处理的数据,如 application/pdf, application/zip, application/json 等。

multipart:允许在一个会话中传输多种类型的数据,每个部分可以有自己的 MIME 类型,如 multipart/form-data, multipart/mixed 等。

message:表示电子邮件或者其他消息格式的数据

 详细可参见该链接:Media Types 

posted @ 2025-01-19 23:07  bjtime  阅读(136)  评论(0)    收藏  举报