SMPP错误0xd绑定失败



我使用这个SMPP库。下面是我的代码:

$transport = new SocketTransport(array($smpphost),$smppport,false,'printDebug'); // hostname/ip (ie. localhost) and port (ie. 2775)
$transport->setRecvTimeout(10000);
$transport->setSendTimeout(10000);
$smpp = new SmppClient($transport,'printDebug');
// Activate debug of server interaction
$smpp->debug = true;        // binary hex-output
$transport->debug = true; // also get TSocket debug
// Open the connection
$transport->open();
$smpp->bindTransmitter($systemid,$password);
  // Prepare message
$message = 'H€llo world';
$encodedMessage = GsmEncoder::utf8_to_gsm0338($message);
$from = new SmppAddress(GsmEncoder::utf8_to_gsm0338('SMPP Tést'),SMPP::TON_ALPHANUMERIC);
$to = new SmppAddress($too,SMPP::TON_INTERNATIONAL,SMPP::NPI_E164);
// Send
$smpp->sendSMS($from,$to,$encodedMessage);
// Close connection
$smpp->close();

错误,我得到:

致命错误:未捕获异常'SmppException'与消息'绑定失败'在/home/罗曼/www/jo甜菜/php-smpp-master/smppclient.class.php在621行SmppException:绑定失败在/home/罗曼/www/jo甜菜/php-smpp-master/smppclient.class.php在621行调用Stack: 0.0007 345736{主要}()/home/roman/www/jobeet/index.php: 0

可能有错误在我的代码或它只是SMPP服务器的问题?

我的猜测是您的SMSC不支持作为发送器+接收器连接,只期望收发器连接,不幸的是,该特定库不支持。

最新更新