设计企业短信网关的方法
企业短信网关设计
CMPP协议栈
端口号 |
应用 |
7890 |
长连接(SP与网关间) |
7900 |
短连接(SP与网关间) |
7930 |
长连接(网关之间) |
9168 |
短连接(短信网关与汇接网关之间) |














































企业短信网关API必须实现CMPP3.0中业务提供商(SP)与互联网短信网关(ISMG)间的消息定义所规定的七个操作。
⑴ SP请求连接到ISMG(CMPP_CONNECT)操作
CMPP_CONNECT操作的目的是SP向ISMG注册作为一个合法SP身份,若注册成功后即建立了应用层的连接,此后SP可以通过此ISMG接收和发送短信。ISMG以CMPP_CONNECT_RESP消息响应SP的请求。
⑵ SP或ISMG请求拆除连接(CMPP_TERMINATE)操作
CMPP_TERMINATE操作的目的是SP或ISMG基于某些原因决定拆除当前的应用层连接而发起的操作。此操作完成后SP与ISMG之间的应用层连接被释放,此后SP若再要与ISMG通信时应发起CMPP_CONNECT操作。
ISMG或SP以CMPP_TERMINATE_RESP消息响应请求。
⑶ SP向ISMG提交短信(CMPP_SUBMIT)操作
CMPP_SUBMIT操作的目的是SP在与ISMG建立应用层连接后向ISMG提交短信。
ISMG以CMPP_SUBMIT_RESP消息响应。
⑷ SP向ISMG查询发送短信状态(CMPP_QUERY)操作
CMPP_QUERY操作的目的是SP向ISMG查询某时间的业务统计情况,可以按总数或按业务代码查询。ISMG以CMPP_QUERY_RESP应答。
⑸ ISMG向SP送交短信(CMPP_DELIVER)操作
CMPP_DELIVER操作的目的是ISMG把从短信中心或其它ISMG转发来的短信送交SP,SP以CMPP_DELIVER_RESP消息回应。
⑹ SP向ISMG发起删除短信(CMPP_CANCEL)操作
CMPP_CANCEL操作的目的是SP通过此操作可以将已经提交给ISMG的短信删除,ISMG将以CMPP_CANCEL_RESP回应删除操作的结果。
⑺ 链路检测(CMPP_ACTIVE_TEST)操作
本文地址:http://www.45fan.com/a/question/70594.html