MMS协议解析.docx

上传人:b****3 文档编号:10209465 上传时间:2023-05-24 格式:DOCX 页数:15 大小:176.98KB
下载 相关 举报
MMS协议解析.docx_第1页
第1页 / 共15页
MMS协议解析.docx_第2页
第2页 / 共15页
MMS协议解析.docx_第3页
第3页 / 共15页
MMS协议解析.docx_第4页
第4页 / 共15页
MMS协议解析.docx_第5页
第5页 / 共15页
MMS协议解析.docx_第6页
第6页 / 共15页
MMS协议解析.docx_第7页
第7页 / 共15页
MMS协议解析.docx_第8页
第8页 / 共15页
MMS协议解析.docx_第9页
第9页 / 共15页
MMS协议解析.docx_第10页
第10页 / 共15页
MMS协议解析.docx_第11页
第11页 / 共15页
MMS协议解析.docx_第12页
第12页 / 共15页
MMS协议解析.docx_第13页
第13页 / 共15页
MMS协议解析.docx_第14页
第14页 / 共15页
MMS协议解析.docx_第15页
第15页 / 共15页
亲,该文档总共15页,全部预览完了,如果喜欢就下载吧!
下载资源
资源描述

MMS协议解析.docx

《MMS协议解析.docx》由会员分享,可在线阅读,更多相关《MMS协议解析.docx(15页珍藏版)》请在冰点文库上搜索。

MMS协议解析.docx

MMS协议解析

MMS协议解析

MMS(MultimediaMessagingService)就是我们俗称的彩信,它能提供比SMS(短信)更加丰富的信息,能提供包括图片、视频、声音、各种格式的文字等内容。

目前的应用主要有以下几个方面:

▪便利性实用性娱乐性互动性个人化

▪端到端通信

自拍照片自编贺卡/图片

带有图片照片和语音片断等表达感情内容的增强型聊天

电子邮件附件在移动终端上的增强型应用

▪娱乐

手机铃声/屏保下载

节日贺卡明星贺卡

多媒体交友利用手机察看自己心仪的对象并通过信息向她表达心意

原创基地:

利用多媒体短信传播自己的原创动漫和音乐

▪新闻/金融服务

体育比赛集锦和得分镜头视频剪辑

通过移动终端获取多媒体新闻和金融信息分析等

▪其他

定位业务

移动广告

一、数据流程

MMS系统大致网络拓扑图如下:

先介绍一下网络中的节点设备:

MMSClient:

MMS客户端,就是平常用的手机等移动设备;

MMSProxyRelay:

MMS代理中继,用于转发MMS;

MMSServer:

MMS服务器,用于存储MMS,一般与MMS代理集成在一台设备上;

LegacyWirelessMessagingSystems:

传统的无线消息系统,比如SMS系统;

EmailServer:

邮件服务器,Ineternet上的邮件服务器,比如139邮件服务器;

OtherMMSSystems:

其他地方或其他运营商的MMS系统;

MMS承载于WAP之上,在WAP1.x系统里采用WSP协议,在WAP2.0系统里采用HTTP协议,如下图所示:

详细网络图如下:

MMS的发送接收实体包括如下几种方式:

1、终端<——>同一系统内终端

2、终端<——>不同系统内终端

3、终端<——>Emailserver

4、终端<——>SP

我们以第一种情况进行MMS收发流程说明,大致有以下几步:

1、发送终端发送MMS到MMS代理;

2、MMS代理发送通知到接收终端;

3、接收终端发送提取MMS命令到MMS代理;

4、MMS代理返回MMS到接收终端;

5、MMS代理发送回执给发送终端,表示对方已收到MMS;

其中第2步的通知是通过WAPPUSH实现的,目前中国移动实现的方式是通过SMS(短信)通知对方。

二、消息解析

前面提到MMS可以通过wsp和http两种方式传输,无论哪种方式,其Content-Type都必须为application/vnd.wap.mms-message(0x3E)。

MMS可以分为4类:

发送、通知、提取、回执。

每一类消息都包含消息头,有的还包含正文。

如下:

2.1发送

发送是指发送者发送MMS到MMS中心,包括两条消息:

MMS发送请求、MMS发送确认。

2.1.1MMS发送请求

MMS发送请求消息由发送者到MMS中心,包含消息头和正文,正文紧跟消息头。

消息头包含内容如下:

Name

Content

Comments

X-Mms-Message-Type

Message-type-value=

m-send-req

Mandatory.

Specifiesthetransactiontype.

X-Mms-Transaction-ID

Transaction-id-value

Mandatory.

Auniqueidentifierforthemessage.ThistransactionIDidentifiestheM-Send.reqandthecorrespondingreplyonly.

X-Mms-MMS-Version

MMS-version-value

Mandatory.

TheMMSversionnumber.Accordingtothisspecification,theversionis1.0

Date

Date-value

Optional.

ArrivaltimeofthemessageatMMSProxy-Relay.MMSProxy-Relaywillgeneratethisfieldwhennotsuppliedbyterminal.

From

From-value

Mandatory.

Addressofthemessagesender.ThisfieldMUSTbepresentinamessagedeliveredtoarecipient.ThesendingclientMUSTsendeitheritsaddressorinsert-an-addresstoken.Incaseoftoken,theMMSProxy-RelayMUSTinsertthecorrectaddressofthesender.

To

To-value

Optional1.

Addressoftherecipient.

Cc

Cc-value

Optional1.

Addressoftherecipient.Addressingishandledin

Chapter8.

Anynumberofaddressfieldsallowed.

Bcc

Bcc-value

Optional1.

Addressoftherecipient.Addressingishandledin

Chapter8.

Anynumberofaddressfieldsallowed.

Subject

Subject-value

Optional.

Subjectofthemessage.

X-Mms-Message-Class

Message-class-value

Optional.

Classofthemessage.ValueAutoindicatesamessagethatisautomaticallygeneratedbytheclient.IftheMessage-ClassisAuto,theoriginatingterminalSHALLNOTrequestDelivery-ReportorRead-Report.

Iffieldisnotpresent,thereceiverintepretsthemessageaspersonal.

X-Mms-Expiry

Expiry-value

Optional,default:

maximum.

LengthoftimethemessagewillbestoredinMMS

Proxy-Relayortimetodeletethemessage.Thefieldhastwoformats,eitherabsoluteorinterval.

X-Mms-Delivery-Time

Delivery-time-value

Optional:

default:

immediate.

Timeofdesireddelivery.Indicatestheearliestpossibledeliveryofthemessagetotherecipient.Thefieldhastwoformats,eitherabsoluteorinterval.

X-Mms-Priority

Priority-value

Optional.Default:

Normal.

Priorityofthemessagefortherecipient.

X-Mms-Sender-Visibility

Sender-visibility-value

Optional.Default:

showaddress/phonenumberofthesendertotherecipientunlessthesenderhasasecretnumber/address.

Hide=don'tshowanyaddress.Show=showevensecretaddress.

X-Mms-Delivery-Report

Delivery-report-value

Optional.Defaultdeterminedwhenserviceisordered.Specifieswhethertheuserwantsadeliveryreportfromeachrecipient.WhenMessage-ClassisAuto,thefieldSHALLalwaysbepresentandthevalueSHALLbeNo.

X-Mms-Read-Reply

Read-reply-value

Optional.

Specifieswhethertheuserwantsareadreportfromeachrecipientasanewmessage.WhenMessage-ClassisAuto,thefieldSHALLalwaysbepresentandthevalueSHALLbeNo.

Content-Type

Content-type-value

Mandatory.

Thecontenttypeofthemessage.

以上字段除了开头的Message-Type、Transaction-ID、MMS-Version和末尾的Content-Type之外,其他字段没有顺序要求,以下消息也是一样。

2.1.2MMS发送确认

MMS发送确认由MMS中心到发送者,只包含消息头,没有正文。

消息头格式如下:

Name

Content

Comments

X-Mms-Message-Type

Message-type-value=m-send-conf

Mandatory.

Identifiesthemessagetype.

X-Mms-Transaction-ID

Transaction-id-value

Mandatory.

ThistransactionIDidentifiestheM-Send.confandthecorrespondingrequestonly.

X-Mms-MMS-Version

MMS-version-value

Mandatory.

TheMMSversionnumber.Accordingtothisspecification,theversionis1.0

X-Mms-Response-Status

Response-status-value

Mandatory.

MMSspecificstatus.

X-Mms-Response-Text

Response-text-value

Optional.

Descriptionwhichqualifiestheresponsestatusvalue.

Message-ID

Message-ID-value

Optional.

Thisisauniquereferenceassignedtomessage.ThisIDSHALLalwaysbepresentwhentheMMSProxy-Relayacceptedthemessage.

TheIDenablesaclienttomatchdeliveryreportswithpreviouslysentmessages.

2.2通知

通知是指MMS中心发送通知到接收者,包括两条消息:

请求和响应。

目前是通过SMS进行通知,Gb接口上不存在该类数据包,所以在这里不做分析。

2.3提取

提取是指MMS接收者从MMS中心提取MMS的过程,包括三个步骤:

提取请求、提取响应、响应确认。

2.3.1MMS提取请求

MMS提取请求消息是由接收者到MMS中心,没有真正的消息头和正文,完全由WSP或HTTP的请求头实现,也就是WSP或HTTP一个普通的GET请求,其uri是通知消息里指定的地址。

2.3.2MMS提取响应

MMS提取响应消息是由MMS中心到接收者,包括消息头和正文,消息头包含内容如下:

Name

Content

Comments

X-Mms-Message-Type

Message-type-value=

m-retrieve-conf

Mandatory.

Specifiesthemessagetype.

X-Mms-Transaction-ID

Transaction-id-value

Optional.

IdentifieseitherthetransactionthathasbeenstartedbyM-NotificationwithoutM-NotifRespornewtransactionwhendeferreddeliverywasrequested.ThenewtransactionIDisoptional.

X-Mms-MMS-Version

MMS-version-value

Mandatory.

TheMMSversionnumber.Accordingtothisspecification,theversionis1.0.

Message-ID

Message-ID-value

Optional.

Thisisanuniquereferenceassignedtomessage.ThisIDSHALLalwaysbepresentwhentheoriginatorclientrequestedareadreply.

TheIDenablesaclienttomatchreadreportswith

previouslysentmessages.

Date

Date-value

Mandatory.

Sendingdateandtime.

From

From-value

Optional.

Addressofthesender.Ifhidingtheaddressofthesenderfromtherecipientissupported,theMMSProxy-Relaywillnotaddthisfieldtoamessageheader.

To

To-value

Optional.

Addressoftherecipient.

Anynumberofaddressfieldsallowed.

Cc

Cc-value

Optional.

Addressoftherecipient.

Anynumberofaddressfieldsallowed.

Subject

Subject-value

Optional.

Messagesubject

X-Mms-Message-Class

Message-class-value

Optional.

Messageclass.Iffieldisnotpresent,thereceiverintepretsthemessageaspersonal.

X-Mms-Priority

Priority-value

Optional.Default:

Normal

Priorityofthemessage.

X-Mms-Delivery-Report

Delivery-report-value

Optional.Default:

No.

Specifieswhethertheuserwantsadeliveryreportfromeachrecipient.

X-Mms-Read-Reply

Read-reply-value

Optional.Default:

No.

Specifieswhethertheuserwantsareadreportfromeachrecipientasanewmessage.

Content-Type

Content-type-value

Mandatory.

Thecontenttypeofthemessage.

2.3.3MMS提取响应确认

MMS提取响应确认消息由接收者到MMS中心,包括消息头,不包含正文,消息头包含内容如下:

Name

Content

Comments

X-Mms-Message-Type

Message-type-value=m-acknowledge-ind

Mandatory.

Identifiesthetransactiontype.

X-Mms-Transaction-ID

Transaction-id-value

Mandatory.

ThisisthetransactionnumberthatoriginatesfromimmediatelypreviousM-Retrieveoperation.

X-Mms-MMS-Version

MMS-version-value

Mandatory.

TheMMSversionnumber.Accordingtothisspecification,theversionis1.0

X-Mms-Report-Allowed

Report-allowed-value

Optional.Default:

Yes.

Sendingofdeliveryreportallowedtotheuser.

2.4回执

包括两种回执:

提取回执和阅读回执,是可选的。

2.4.1MMS提取回执

当接收者从MMS中心取得MMS后,MMS中心会向发送者发送提取回执。

MMS提取回执消息只有消息头,没有正文。

消息头格式如下:

 

Name

Content

Comments

X-Mms-Message-Type

Message-type-value=m-delivery-ind

Mandatory.

IdentifiesthePDUtype.

X-Mms-MMS-Version

MMS-version-value

Mandatory.

TheMMSversionnumber.Accordingtothisspecification,theversionis1.0

Message-ID

Message-ID-value

Mandatory.

Identifierofthemessage.FromSendrequest,connectsdeliveryreporttosentmessageinMS.

To

To-value

Mandatory.

Neededforreportingincaseofpoint-to-multipointmessage.

Date

Date-value

Mandatory.

Dateandtimethemessagewashandled(fetched,expired,etc.)bytherecipientorMMSProxy-Relay.

X-Mms-Status

Status-value

Mandatory.

Thestatusofthemessage.

2.4.2MMS阅读回执

当接收者阅读完MMS后,MMS中心会向发送者发送提取回执。

该回执是在发送者发送MMS时要求有阅读回执时才会产生,该消息格式不清楚,我们暂不做分析。

2.5字段说明

以上消息头每一个字段都是KV结构,前面是字段名称,后面是字段值。

字段名称是一个字节,对应编码如下:

Name

Assigned

Number

Value

Bcc

0x01

用户地址,是以\0结尾的字符串

Cc

0x02

用户地址,是以\0结尾的字符串

Content-Location

0x03

Uri地址,是以\0结尾的字符串

Content-Type

0x04

与WSP的Content-Type一样

Date

0x05

4字节的长整形值,自1970-01-01,00:

00:

00GMT到现在的秒数

Delivery-Report

0x06

Yes:

0x80,No:

0x81

Delivery-Time

0x07

5字节,第一个字节代表时间类型,后4个字节是时间值,时间类型:

绝对时间——0x80,相对时间——0x81

Expiry

0x08

5字节,第一个字节代表时间类型,后4个字节是时间值,时间类型:

绝对时间——0x80,相对时间——0x81

From

0x09

第一个字节代表地址类型,后面字符串代表地址,地址以\0结尾,地址类型:

Address-present-token——0x80,Insert-address–token——0x81

Message-Class

0x0A

Personal——0x80

Advertisement——0x81

Informational——0x82

Auto——0x83

Message-ID

0x0B

以\0结尾的字符串

Message-Type

0x0C

m-send-req——0x80

m-send-conf——0x81

m-notification-ind——0x82

m-notifyresp-ind——0x83

m-retrieve-conf——0x84

m-acknowledge-ind——0x85

m-delivery–ind——0x86

MMS-Version

0x0D

2字节的短整形

Message-Size

0x0E

4字节的长整形

Priority

0x0F

Low——0x80

Normal——0x81

High——0x82

Read-Reply

0x10

Yes:

0x80,No:

0x81

Report-Allowed

0x11

Yes:

0x80,No:

0x81

Response-Status

0x12

Ok——0x80

Error-unspecified——0x81

Error-

展开阅读全文
相关资源
猜你喜欢
相关搜索
资源标签

当前位置:首页 > 总结汇报 > 学习总结

copyright@ 2008-2023 冰点文库 网站版权所有

经营许可证编号:鄂ICP备19020893号-2