SMPP错误0xd绑定失败

时间:2013-06-01 13:53:08

标签: php smpp

我使用this 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();

错误,我得到了:

致命错误:第621行/home/roman/www/jobeet/php-smpp-master/smppclient.class.php中带有“绑定失败”消息的未捕获异常“SmppException”SmppException:绑定/ home / roman失败第621行/www/jobeet/php-smpp-master/smppclient.class.php调用堆栈:0.0007 345736 1. {main}()/home/roman/www/jobeet/index.php:0

我的代码中是否存在错误,或者只是SMPP服务器问题?

1 个答案:

答案 0 :(得分:0)

我的猜测是你的SMSC不支持连接作为发送器+接收器,只考虑收发器连接,遗憾的是,这个特定的库不支持。