彩信协议接口包括MM1~MM10共10个接口协议,涉及到不同实体之间的交互。当然对于应用开发,一般只需要关注MM7协议,即MMSC和SP之间交互协议。
接口名称 | 连接实体 | 说明 |
MM1 | MMSC-WAP GW | 3GPP和OMA有很明确的定义,infoX MMSC是查考了两种协议来实现的,可以兼容支持,其中阅读报告就是很好的例子。 |
MM2 | Relay -Server | 3GPP等国际规范没有明确定义,各个厂家都是私有协议。infoX MMSC将MM2接口扩充为软件总线的接口和功能。 |
MM3 | MMSC-E-mail Server | 基于SMTP的接口。3GPP等国际规范有明确定义,对于E-mail Server来讲,MMSC就是一个邮件服务器。 |
MM4 | MMSC-MMSC | 用于MMSC之间的互连,大多数厂家都遵循“归属地服务”的原则,在不同网络和不同运营商互连上,建议使用MMSIG实现,MMSCIG左右两边都是MM4接口。 |
MM5 | MMSC-HLR | 3GPP等国际规范没有明确定义,仅仅提到: 1、用于MMSC获取终端用户状态;2、如果使用SMS承载通知消息,可以不使用MM5接口。 |
MM6 | MMSC-DB | 3GPP等国际规范没有明确定义,各个厂家都是私有协议。 |
MM7 | MMSC-SP | 3GPP等国际规范有明确定义,用于实现MMSC和SP之间的交互。 |
MM8 | MMSC-OSS | 3GPP等国际规范没有明确定义,仅仅给出了一些CDR的建议和传输协议--FTP。 |
Enum接口 | MMSC-Enum Server | 3GPP等国际规范没有明确定义,各个厂家都是私有协议。 |
DSMP接口 | MMSC-DSMP | 这个接口有好多版本,从功能上主要有两类: 1、鉴权 2、鉴权计费(Sunday项目) |
MM7协议通过HTTP协议承载,采用SOAP协议封装传送。
MM7请求应在一个HTTP POST请求中传输,MM7响应应在一个HTTP响应消息中传输。
MM7的消息控制信息在SOAP中封装。
MM7的消息内容在MIME格式中封装。
MM7消息主要使用如下4种消息:
MM7_submit 用于下行MT消息
MM7_deliver 用于上行MO消息
MM7_delivery_report 用于上行MT消息对应的递送报告
MM7_read_reply 用于上行MT消息对应的读报告
MM7请求示例:
POST / HTTP/1.1
Host:127.0.0.1:9077
Content-Type:multipart/related; boundary="--NextPart_0_2817_24856";type="text/xml";start="</tnn-200102/mm7-vasp>"
Content-Transfer-Encoding:8bit
Authorization:Basic bW1zOm1tcw==
SOAPAction:""
MM7APIVersion:V1.5.3_20040621
Connection: Keep-Alive
Content-Length:6985
Mime-Version:1.0
this is a multi-part message in MIME format
----NextPart_0_2817_24856
Content-Type:text/xml;charset="UTF-8"
Content-Transfer-Encoding:8bit
Content-ID:</tnn-200102/mm7-vasp>
<?xml version="1.0" encoding="UTF-8"?><env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"><env:Header><mm7:TransactionID xmlns:mm7="http://www.3gpp.org/ftp/Specs/archive/23_series/23.140/schema/REL-6-MM7-1-0" env:mustUnderstand="1">SUNTEK1-00259E534DD67D41F5125</mm7:TransactionID></env:Header><env:Body><SubmitReq xmlns="http://www.3gpp.org/ftp/Specs/archive/23_series/23.140/schema/REL-6-MM7-1-0"><MM7Version>6.3.0</MM7Version><SenderIdentification><VASPID>100009</VASPID><VASID>8809</VASID><SenderAddress>100020</SenderAddress></SenderIdentification><Recipients><To><Number>15627400428</Number></To></Recipients><ServiceCode>209</ServiceCode><DeliveryReport>true</DeliveryReport><Subject>this is a test mms</Subject><ChargedParty>ThirdParty</ChargedParty><ChargedPartyID>15627400428</ChargedPartyID></SubmitReq></env:Body></env:Envelope>
----NextPart_0_2817_24856
Content-Type:multipart/mixed;boundary="SubPart_7452684322002_77645"
Content-ID:conentId
Content-Transfer-Encoding:8bit
--SubPart_7452684322002_77645
Content-Type:image/gif
Content-Transfer-Encoding:8bit
Content-ID:dog-pic
GIF89a===========================
MM7响应示例:
HTTP/1.1 200 OK
Connection: Keep-Alive
Content-Type: text/xml;charset=GB2312
Content-Length: 535
<?xml version="1.0"?><env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"><env:Header><mm7:TransactionID xmlns:mm7="http://www.3gpp.org/ftp/Specs/archive/23_series/23.140/schema/REL-6-MM7-1-0">SUNTEK1-00259E534DD67D41F5125</mm7:TransactionID></env:Header><env:Body><SubmitRsp xmlns="http://www.3gpp.org/ftp/Specs/archive/23_series/23.140/schema/REL-6-MM7-1-0"><MM7Version>6.3.0</MM7Version><Status><StatusCode>1000</StatusCode></Status><MessageID>061503554008542090000</MessageID></SubmitRsp></env:Body></env:Envelope>