如何使用SMSLib(JSMPPGateway)连接到SMPP服务器时,如何指定“编号计划指示符”。
这是我当前的JSMPPGateway初始化:
gateway = new JSMPPGateway(systemId, ip, port, new BindAttributes(username, password, "smpp_1", BindType.TRANSCEIVER));
问题是我无法连接到网关:
IOException: java.io.IOException:
Receive negative bind response: Negative response 0000000f found
我的提供商(SMPP服务器的所有者)告诉我,我没有使用正确的编号方案指标。 如何设置该参数?
答案 0 :(得分:1)
Set the values of NPI,TON values specified by SMSC in Address params.
例如:
gateway = new JSMPPGateway(systemId,ip,port,new BindAttributes(username,password,“smpp_1”,BindType.TRANSCEIVER,new Address(Address.TypeOfNumber.INTERNATIONAL,Address.NumberingPlanIndicator.NATIONAL)));