gpt4 book ai didi

java - 在 SMSLib JSMPPGateway 中指定 "numbering plan indicator"

转载 作者:太空宇宙 更新时间:2023-11-04 07:07:39 25 4
gpt4 key购买 nike

使用 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 服务器的所有者)告诉我,我没有使用正确的编号计划指示器。 如何设置该参数?

最佳答案

Set the values of NPI,TON values specified by SMSC in Address params.

例如:

gateway=new JSMPPGateway(systemId, ip, port, new BindAttributes(用户名, 密码, "smpp_1", BindType.TRANSCEIVER,new Address(Address.TypeOfNumber.INTERNATIONAL, Address.NumberingPlanIndicator.NATIONAL)));

关于java - 在 SMSLib JSMPPGateway 中指定 "numbering plan indicator",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21099335/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com