MMS协议解析

上传人:最*** 文档编号:11116855 上传时间:2020-04-19 格式:DOC 页数:14 大小:675.13KB
返回 下载 相关 举报
MMS协议解析_第1页
第1页 / 共14页
MMS协议解析_第2页
第2页 / 共14页
MMS协议解析_第3页
第3页 / 共14页
点击查看更多>>
资源描述
。MMS协议解析MMS(Multimedia Messaging Service)就是我们俗称的彩信,它能提供比SMS(短信)更加丰富的信息,能提供包括图片、视频、声音、各种格式的文字等内容。目前的应用主要有以下几个方面: 便利性实用性娱乐性互动性个人化 端到端通信 自拍照片自编贺卡/图片 带有图片照片和语音片断等表达感情内容的增强型聊天 电子邮件附件在移动终端上的增强型应用 娱乐 手机铃声/屏保下载 节日贺卡明星贺卡 多媒体交友利用手机察看自己心仪的对象并通过信息向她表达心意 原创基地:利用多媒体短信传播自己的原创动漫和音乐 新闻/金融服务 体育比赛集锦和得分镜头视频剪辑 通过移动终端获取多媒体新闻和金融信息分析等 其他 定位业务 移动广告一、 数据流程MMS系统大致网络拓扑图如下:先介绍一下网络中的节点设备:MMS Client:MMS客户端,就是平常用的手机等移动设备;MMS Proxy Relay:MMS代理中继,用于转发MMS;MMS Server:MMS服务器,用于存储MMS,一般与MMS代理集成在一台设备上;Legacy Wireless Messaging Systems:传统的无线消息系统,比如SMS系统;Email Server:邮件服务器,Ineternet上的邮件服务器,比如139邮件服务器;Other MMS Systems:其他地方或其他运营商的MMS系统;MMS承载于WAP之上,在WAP1.x系统里采用WSP协议,在WAP2.0系统里采用HTTP协议,如下图所示:详细网络图如下:MMS的发送接收实体包括如下几种方式:1、 终端同一系统内终端2、 终端不同系统内终端3、 终端Email server4、 终端SP我们以第一种情况进行MMS收发流程说明,大致有以下几步:1、 发送终端发送MMS到MMS代理;2、 MMS代理发送通知到接收终端;3、 接收终端发送提取MMS命令到MMS代理;4、 MMS代理返回MMS到接收终端;5、 MMS代理发送回执给发送终端,表示对方已收到MMS;其中第2步的通知是通过WAP PUSH实现的,目前中国移动实现的方式是通过SMS(短信)通知对方。二、 消息解析前面提到MMS可以通过wsp和http两种方式传输,无论哪种方式,其Content-Type都必须为application/vnd.wap.mms-message(0x3E)。MMS可以分为4类:发送、通知、提取、回执。每一类消息都包含消息头,有的还包含正文。如下:2.1 发送发送是指发送者发送MMS到MMS中心,包括两条消息:MMS发送请求、MMS发送确认。2.1.1 MMS发送请求MMS发送请求消息由发送者到MMS中心,包含消息头和正文,正文紧跟消息头。消息头包含内容如下:NameContentCommentsX-Mms -Message-TypeMessage-type-value =m-send-reqMandatory.Specifies the transaction type.X-Mms -Transactio n-IDTransaction-id-valueMandatory.A unique identifier for the message. This transaction ID identifies the M -Send.req and the corresponding reply only.X-Mms -MMS-VersionMMS-version-valueMandatory.The MMS version number. According to this specificatio n, the version is 1.0DateDate-valueOptional.Arrival time of the message at MMSProxy -Relay. MMS Proxy -Relaywill generate this field when not supplied by terminal.FromFrom-valueMandatory.Address of the message sender. This field MUST be present in a message delivered to a recipient. The sending client MUST send either its address or insert -an- address token. In case of token, the MMS Proxy -Relay MUST insert the correct address of the sender.ToTo-valueOptional1.Address of the recipient.CcCc-valueOptional1.Address of the recipient. Addressing is handled inChapter 8.Any number of address fields allowed.BccBcc-valueOptional1.Address of the recipient. Addressing is handled inChapter 8.Any number of address fields allowed.SubjectSubject-valueOptional.Subject of the message.X-Mms -Message-ClassMessage-class -valueOptional.Class of the message. Value Auto indicates a message that is automatically generated by the client. If the Message-Class is Auto, the originating terminal SHALL NOT request Delivery -Report or Read-Report.If field is not present, the receiver inteprets the message as personal.X-Mms -ExpiryExpiry -valueOptional, default: maximum.Length of time the message will be stored in MMSProxy -Relayor time to delete the message. The field has two formats, either absolute or interval.X-Mms -Delivery -TimeDelivery -time -valueOptional: default: immedia te.Time of desired delivery. Indicates the earliest possible delivery of the message to the recipient. The field has two formats, either absolute or interval.X-Mms -PriorityPriority-valueOptional. Default: Normal.Priority of the message for the recip ient.X-Mms -Sender- VisibilitySender-visibility-valueOptional. Default: show address/phone number of the sender to the recipient unless the sender has a secret number/address.Hide = dont show any address. Show = show even secret address.X-Mms -Delivery- ReportDelivery -report -valueOptional. Default determined when service is ordered. Specifies whether the user wants a delivery report from each recipient. When Message-Class is Auto, the field SHALL always be present and the value SHALL be No.X-Mms -Read-ReplyRead-reply -valueOptional.Specifies whether the user wants a read report from each recipient as a new message. When Message-Class is Auto, the field SHALL always be present and the value SHALL be No.Content-TypeContent-type-valueMandatory.The content type of the message.以上字段除了开头的Message-Type、Transaction-ID、MMS-Version和末尾的Content-Type之外,其他字段没有顺序要求,以下消息也是一样。2.1.2 MMS发送确认MMS发送确认由MMS中心到发送者,只包含消息头,没有正文。消息头格式如下:NameContentCommentsX-Mms -Message-TypeMessage-type-value = m- send -confMandatory.Identifies the message type.X-Mms -Transaction-IDTransaction-id-valueMandatory.This transaction ID identifies the M -Send.conf and the corresponding request only.X-Mms -MMS-VersionMMS-version-valueMandatory.The MMS version number. According to this specification, the version is 1.0X-Mms -Response-StatusResponse-status -valueMandatory.MMS specific status.X-Mms -Response-TextResponse-text -valueOptional.Description which qualifies the response status value.Message-IDMessage-ID-valueOptional.This is a unique reference assigned to message. This ID SHALL always be present when the MMS Proxy - Relayaccepted the message.The ID enables a client to match delivery reports with previously sent messages.2.2 通知通知是指MMS中心发送通知到接收者,包括两条消息:请求和响应。目前是通过SMS进行通知,Gb接口上不存在该类数据包,所以在这里不做分析。2.3 提取提取是指MMS接收者从MMS中心提取MMS的过程,包括三个步骤:提取请求、提取响应、响应确认。2.3.1 MMS提取请求MMS提取请求消息是由接收者到MMS中心,没有真正的消息头和正文,完全由WSP或HTTP的请求头实现,也就是WSP或HTTP一个普通的GET请求,其uri是通知消息里指定的地址。2.3.2 MMS提取响应MMS提取响应消息是由MMS中心到接收者,包括消息头和正文,消息头包含内容如下:NameContentCommentsX-Mms -Message-TypeMessage-type-value =m-retrieve-confMandatory.Specifies the message type.X-Mms -Transaction-IDTransaction-id-valueOptional.Identifies either the transaction that has been started by M-Notification without M -NotifResp or new transaction when deferred delivery was requested. The new transaction ID is optional.X-Mms -MMS-VersionMMS-version-valueMandatory.The MMS version number. According to this specification, the version is 1.0.Message-IDMessage-ID-valueOptional.This is an unique reference assigned to message. This ID SHALL always be present when the originator client requested a read reply.The ID enables a client to match read reports withpreviously sent messages.DateDate-valueMandatory.Sending date and time.FromFrom-valueOptional.Address of the sender. If hiding the address of the sender from the recipient is supported, the MMS Proxy -Relay will not add this field to a message header.ToTo-valueOptional.Address of the recipient. Any number of address fields allowed.CcCc-valueOptional.Address of the recipient. Any number of address fields allowed.SubjectSubject-valueOptional.Message subjectX-Mms -Message-ClassMessage-class -valueOptional.Message class. If field is not present, the receiver inteprets the message as personal.X-Mms -PriorityPriority-valueOptional. Default: NormalPriority of the message.X-Mms -Delivery - ReportDelivery -report -valueOptional. Default: No.Specifies whether the user wants a delivery report from each recipient.X-Mms -Read-ReplyRead-reply -valueOptional. Default: No.Specifies whether the user wants a read report from each recipient as a new message.Content-TypeContent-type-valueMandatory.The content type of the message.2.3.3 MMS提取响应确认MMS提取响应确认消息由接收者到MMS中心,包括消息头,不包含正文,消息头包含内容如下:NameContentCommentsX-Mms -Message-TypeMessage-type-value = m- acknowledge-indMandatory.Identifies the transaction type.X-Mms -Transaction-IDTransaction-id-valueMandatory.This is the transaction number that originates from immediately previous M -Retrieve operation.X-Mms -MMS-VersionMMS-version-valueMandatory.The MMS version number. According to this specification, the version is 1.0X-Mms -Report -AllowedReport -allowed-valueOptional. Default: Yes.Sending of delivery report allowed to the user.2.4 回执包括两种回执:提取回执和阅读回执,是可选的。2.4.1 MMS提取回执当接收者从MMS中心取得MMS后,MMS中心会向发送者发送提取回执。MMS提取回执消息只有消息头,没有正文。消息头格式如下:NameContentCommentsX-Mms -Message-TypeMessage-type-value = m- delivery -indMandatory.Identifies the PDU type.X-Mms -MMS-VersionMMS-version-valueMandatory.The MMS version number. According to this specification, the version is 1.0Message-IDMessage-ID-valueMandatory.Identifier of the message. From Send request, connects delivery report to sent message in MS.ToTo-valueMandatory.Needed for reporting in case of point-to-multipoint message.DateDate-valueMandatory.Date and time the message was handled (fetched, expired, etc.) by the recipient or MMSProxy -Relay.X-Mms -StatusStatus-valueMandatory.The status of the message.2.4.2 MMS阅读回执当接收者阅读完MMS后,MMS中心会向发送者发送提取回执。该回执是在发送者发送MMS时要求有阅读回执时才会产生,该消息格式不清楚,我们暂不做分析。2.5 字段说明以上消息头每一个字段都是KV结构,前面是字段名称,后面是字段值。字段名称是一个字节,对应编码如下:NameAssignedNumberValueBcc0x01用户地址,是以0结尾的字符串Cc0x02用户地址,是以0结尾的字符串Content-Location0x0 3Uri地址,是以0结尾的字符串Content-Type0x04与WSP的Content-Type一样Date0x054字节的长整形值,自1970 -01-01, 00:00:00 GMT到现在的秒数Delivery -Report0x06Yes:0x80,No:0x81Delivery -Time0x075字节,第一个字节代表时间类型,后4个字节是时间值,时间类型:绝对时间0x80,相对时间0x81Expiry0x085字节,第一个字节代表时间类型,后4个字节是时间值,时间类型:绝对时间0x80,相对时间0x81From0x09第一个字节代表地址类型,后面字符串代表地址,地址以0结尾,地址类型:Address -present-token0x80,Insert -address token0x81Message-Class0x0APersonal0x80Advertisement0x81Informational0x82Auto0x83Message-ID0x0B以0结尾的字符串Message-Type0x0Cm-send-req0x80m-send-conf0x81m-notification-ind0x82m-notifyresp-ind0x83m-retrieve-conf0x84m-acknowledge-ind0x85m-delivery ind0x86MMS-Version0x0D2字节的短整形Message-Size0x0E4字节的长整形Priority0x0FLow0x80Normal0x81High0x82Read-Reply0x10Yes:0x80,No:0x81Report -Allowed0x1 1Yes:0x80,No:0x81Response-Status0x12Ok0x80Error-unspecified0x81Error- service-denied0x82Error-message-format-corrupt0x83Error-sending-address-unresolved0x84Error-message-not -found0x85Error-network -problem0x86Error- content-not-accepted0x87Error-unsupported-message0x88Response-Text0x13以0结尾的字符串Sender-Visibility0x14Hide:0x80,Show:0x81Status0x15Expired0x80 Retrieved 0x81Rejected 0x82Deferred 0x83Unrecognised 0x84Subject0x16以0结尾的字符串To0x17用户地址,是以0结尾的字符串Transaction-Id0x18以0结尾的字符串实际数据包中字段名的最高位都被置1了。欢迎您的下载,资料仅供参考!致力为企业和个人提供合同协议,策划案计划书,学习资料等等打造全网一站式需求14。
展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 办公文档 > 模板表格


copyright@ 2023-2025  zhuangpeitu.com 装配图网版权所有   联系电话:18123376007

备案号:ICP2024067431-1 川公网安备51140202000466号


本站为文档C2C交易模式,即用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。装配图网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知装配图网,我们立即给予删除!