梦幻小丑灯 发表于 2018-3-27 13:33:11

电信SP短信业务接入测试-接口数据包格式

最近在做电信SP短信业务接入测试,目前还没完全完工,还有点问题需要找电信网关那边协调确认下,
今天闲着把这一阵的接入稍微写下,电信与移动的CMPP和联通的SGIP类似,
不过这三种协议在程序接口逻辑上也存在一些区别:
    I:CMPP和SMGP在接入后,SP端一直作为客户端,不管是下行短信还是用户上行或状态报告,
             都是短信网关通过SP作为客户端的连接中返回;
   II: 而SGIP协议中SP和短信网关互为客户端和服务器端,当下行信息的时候,短信网关作为服务器端,

而上行的消息的时候,短信网关作为客户端,以意味着SP端需要开启一个服务来监听是否有短信到达。





目前接入电信的短信业务有两种方式:   
      1.    ISMP+短信网关方式(ISMP+SE方式)
      2.    ISMP+ISAG模式




下行短信 SendSms 短信发送接口报文数据:

1. 请求(SP 发起):



<?xml version="1.0" encoding="UTF-8"?>

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

    <soapenv:Header>

      <ns1:RequestSOAPHeader

soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next"

soapenv:mustUnderstand="0"

xmlns:ns1="http://www.chinatelecom.com.cn/schema/ctcc/common/v2_1">

            <ns1:spId>spId</ns1:spId>

            <ns1:timeStamp>082812321</ns1:timeStamp>

            <ns1:spPassword>密钥</ns1:spPassword>
            <ns1:productId>112000000000000004079</ns1:productId>

            <ns1:OA>tel:+861333333333</ns1:OA>

            <ns1:FA>tel:+8613333333333</ns1:FA>

            <ns1:multicastMessaging>false</ns1:multicastMessaging>

      </ns1:RequestSOAPHeader>

    </soapenv:Header>

    <soapenv:Body>

      <sendSms

xmlns="http://www.chinatelecom.com.cn/schema/ctcc/sms/send/v2_1/local">

            <addresses>tel:+861333333333</addresses>

            <senderName>10628888</senderName>

            <charging>

                <description xmlns="">miaoshu</description>

                <currency xmlns="">0</currency>

                <amount xmlns="">1</amount>

                <code xmlns="">212100000000000002135</code>

            </charging>

            <message>短信内容</message>
            <receiptRequest>

                <endpoint

xmlns="">http://201.101.123.123:8080/isag/services/SmsNotification</endpoint>

                <interfaceName

xmlns="">notifySmsDeliveryReception</interfaceName>

                <correlator xmlns="">0828123229</correlator>

            </receiptRequest>

                                    </sendSms>

    </soapenv:Body>

</soapenv:Envelope>









2 应答(ISAG 应答)

<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

<env:Body>

<sendSmsResponse

xmlns="http://www.chinatelecom.com.cn/schema/ctcc/sms/send/v2_1/local">

<result>19120004a975e2d01121</result>

</sendSmsResponse>

</env:Body>

</env:Envelope>

页: [1]
查看完整版本: 电信SP短信业务接入测试-接口数据包格式