CMPP和SMPP协议比较[转-理解短信中心协议原理]

CMPPSMPP协议比较

并非同类型协议

CMPPSMPP都是短信协议中的一种,但它们不是同一类型的协议。SMPPESMESMC(短信中心)之间的协议,而CMPPSP和中国移动ISMG之间的通讯协议。

以下是CMPP 3.0文档中的图示。

<shapetype id="_x0000_t75" coordsize="21600,21600" o:spt="75" o:preferrelative="t" path="[email protected]@[email protected]@[email protected]@[email protected]@5xe" filled="f" stroked="f"><stroke joinstyle="miter"></stroke><formulas><f eqn="if lineDrawn pixelLineWidth 0"></f><f eqn="sum @0 1 0"></f><f eqn="sum 0 0 @1"></f><f eqn="prod @2 1 2"></f><f eqn="prod @3 21600 pixelWidth"></f><f eqn="prod @3 21600 pixelHeight"></f><f eqn="sum @0 0 1"></f><f eqn="prod @6 1 2"></f><f eqn="prod @7 21600 pixelWidth"></f><f eqn="sum @8 21600 0"></f><f eqn="prod @7 21600 pixelHeight"></f><f eqn="sum @10 21600 0"></f></formulas><path o:extrusionok="f" gradientshapeok="t" o:connecttype="rect"></path><lock v:ext="edit" aspectratio="t"></lock></shapetype><shape id="_x0000_i1026" style="WIDTH: 358.5pt; HEIGHT: 256.5pt" type="#_x0000_t75"><imagedata src="file:///C:/DOCUME~1/%E6%B8%A9%E5%B0%91/LOCALS~1/Temp/msohtml1/01/clip_image001.png" o:title=""></imagedata></shape><!--[if !vml]-->CMPP和SMPP协议比较[转-理解短信中心协议原理]
<!--[endif]-->

CMPP对应的协议有,联通的SGIP协议,中国电信的SMGP协议,网通的CNGP协议。

作为SP,只需要了解CMPP,不需要了解SMPP

最新版本和兼容

SMPP协议是一个国际标准,有SMS论坛制定,官方网址为smsforum.net,截至<chsdate isrocdate="False" islunardate="False" day="2" month="7" year="2006" w:st="on"><span lang="EN-US">2006</span><span style="FONT-FAMILY: 宋体">年</span><span lang="EN-US">7</span><span style="FONT-FAMILY: 宋体">月</span><span lang="EN-US">2</span><span style="FONT-FAMILY: 宋体">日</span></chsdate>,最新版本是5.0。曾经流行的版本是3.33.4SMPP协议向后兼容的。

CMPP最新版本似乎是3.0。现在(20067月),大多数还是使用CMPP 2.0CMPP协议没有做到向后兼容,3.0的文档本身也没有讲到兼容的问题,甚至认为,协议制定者压根没想过要兼容。CMPP 3.0没做到向后兼容导致了一个问题,就是SP无法平滑升级。

PDU格式

PDU是协议数据单元的缩写,SMPPCMPP都使用最先一个4位的长度标志整个PDU的长度。

<group id="_x0000_s1026" style="WIDTH: 315.8pt; HEIGHT: 195.8pt; mso-position-horizontal-relative: char; mso-position-vertical-relative: line" coordsize="6316,3916" editas="canvas" coordorigin="3232,4214"><lock v:ext="edit" aspectratio="t"></lock><shape id="_x0000_s1027" style="LEFT: 3232px; WIDTH: 6316px; POSITION: absolute; TOP: 4214px; HEIGHT: 3916px" o:preferrelative="f" type="#_x0000_t75"><fill o:detectmouseclick="t"></fill><path o:extrusionok="t" o:connecttype="none"></path><lock v:ext="edit" text="t"></lock></shape><group id="_x0000_s1028" style="LEFT: 3240px; WIDTH: 2340px; POSITION: absolute; TOP: 4222px; HEIGHT: 3900px" coordsize="2340,3900" coordorigin="4500,4066"><rect id="_x0000_s1029" style="LEFT: 4500px; WIDTH: 2340px; POSITION: absolute; TOP: 4066px; HEIGHT: 3900px"><textbox><table cellspacing="0" cellpadding="0" width="100%"><tbody><tr> <td> <div> <p class="MsoNormal"><span lang="EN-US">SMPP Packet</span></p> <p class="MsoNormal"><span lang="EN-US"><p></p></span></p> </div> </td> </tr></tbody></table></textbox></rect><group id="_x0000_s1030" style="LEFT: 4680px; WIDTH: 1980px; POSITION: absolute; TOP: 4534px; HEIGHT: 3276px" coordsize="1980,3276" coordorigin="2700,4534"><rect id="_x0000_s1031" style="LEFT: 2700px; WIDTH: 1980px; POSITION: absolute; TOP: 4534px; HEIGHT: 780px"><textbox><table cellspacing="0" cellpadding="0" width="100%"><tbody><tr> <td> <div> <p class="MsoNormal"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">消息头</span></p> </div> </td> </tr></tbody></table></textbox></rect><rect id="_x0000_s1032" style="LEFT: 2700px; WIDTH: 1980px; POSITION: absolute; TOP: 5314px; HEIGHT: 1248px"><textbox><table cellspacing="0" cellpadding="0" width="100%"><tbody><tr> <td> <div> <p class="MsoNormal"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">必填参数</span></p> </div> </td> </tr></tbody></table></textbox></rect><rect id="_x0000_s1033" style="LEFT: 2700px; WIDTH: 1980px; POSITION: absolute; TOP: 6562px; HEIGHT: 1248px"><textbox><table cellspacing="0" cellpadding="0" width="100%"><tbody><tr> <td> <div> <p class="MsoNormal"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">可选参数</span></p> </div> </td> </tr></tbody></table></textbox></rect></group></group><group id="_x0000_s1034" style="LEFT: 7200px; WIDTH: 2340px; POSITION: absolute; TOP: 4222px; HEIGHT: 3900px" coordsize="2340,3900" coordorigin="7200,4066"><rect id="_x0000_s1035" style="LEFT: 7200px; WIDTH: 2340px; POSITION: absolute; TOP: 4066px; HEIGHT: 3900px"><textbox><table cellspacing="0" cellpadding="0" width="100%"><tbody><tr> <td> <div> <p class="MsoNormal"><span lang="EN-US">CMPP Packet</span></p> <p class="MsoNormal"><span lang="EN-US"><p></p></span></p> </div> </td> </tr></tbody></table></textbox></rect><rect id="_x0000_s1036" style="LEFT: 7380px; WIDTH: 1980px; POSITION: absolute; TOP: 4534px; HEIGHT: 780px"><textbox><table cellspacing="0" cellpadding="0" width="100%"><tbody><tr> <td> <div> <p class="MsoNormal"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">消息头</span></p> </div> </td> </tr></tbody></table></textbox></rect><rect id="_x0000_s1037" style="LEFT: 7380px; WIDTH: 1980px; POSITION: absolute; TOP: 5314px; HEIGHT: 2496px"><textbox><table cellspacing="0" cellpadding="0" width="100%"><tbody><tr> <td> <div> <p class="MsoNormal"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">消息体</span></p> </div> </td> </tr></tbody></table></textbox></rect></group><wrap type="none"></wrap><anchorlock></anchorlock></group><!--[if !vml]-->CMPP和SMPP协议比较[转-理解短信中心协议原理]
<!--[endif]-->

SMPP是一个国际标准,不同的SMC的是实现可能要增加特定参数,为了具备更好的扩展性,SMPP 3.4以上版本,增加了可选参数,在5.0中,可选参数叫做TLVTable

CMPP是中国移动定义的其内部ISMG之间、ISMGSP之间的通讯标准,涉及一些具体的计费信息,但没有可选参数。

SMPP中,消息头包括4部分:PDU长度、Command_IdCommand_StatusSequence_Id。其中Command_Status字段,只在回应消息中使用,存在冗余。

CMPP中,消息头部包括3部分:PDU长度、Command_IdSequence_Id。个人认为,CMPP中的消息头,不包括Command_Status,似乎更好一些。

消息传输模式

SMPPCMPP都支持异步传输,CMPP中,建议异步传输的窗口大小为16

CMPP使用一个连接发送短信息和接收短信息。

SMPP支持多种的连接,其中TX类型的连接,只能发送短信息,RX类型的连接只能接收短信息,TRX类型的连接支持接收和发送短信息。

SMPP 3.4中,消息传输模式分三中:Store And ForwardDatagramForward。分别用在大吞吐量、可靠性保证等不同的应用场合。

CMPP没有规定其消息传输的模式,根据实际使用的情况看来,华为的网关的消息传输模式类似SMPP协议中规定的Datagram模式。

posted on 2006-07-02 18:14 温少 阅读(5556) 评论(2) 编辑 收藏 所属分类: 推荐阅读