获取送货报告kannel

时间:2016-03-11 07:15:50

标签: php sms-gateway smpp kannel opensmppbox

我正在使用kannel短信网关,发送短信

很抱歉,如果以前问过这个问题,但我试图找到解决办法,但我没有得到任何解决方案,不幸的是我必须发布这个问题。

我通过php脚本(smpp客户端)向smpp服务器发送消息,该服务器连接到承载盒并发送消息。

我面临多个问题:  1.无法获得送货报告  2.我在smsbox的日志中收到错误:ERROR:URL< 03b3423a>不以http://' nor https://'

开头

我尝试了不同的解决方案,但它们都没有工作。 我需要的是,如果数字是" A"发送消息到号码" B",然后号码" A"应该确认消息已经发送到号码" B"

以下是配置文件的详细信息:

kannel.conf

group = core
dlr-storage=internal
admin-port = 13000
smsbox-port = 13001
admin-password = bar
log-file = "/var/log//kannel/kannel.log"
box-deny-ip = "*.*.*.*"
box-allow-ip = "127.0.0.1"
access-log = "/var/log/kannel/access.log"

#---------------------------------------------
# SMSC CONNECTIONS

group = "smsc"
smsc = "http"
smsc-id = "http"
#system-type = "generic"
system-type = "kannel"
port = 13015
log-file = /var/log/kannel/smsc.log
status-success-regex = "success"
status-permfail-regex = "failure"
status-tempfail-regex = "retry later"
generic-status-sent = 200
generic-status-error = 404
#reroute-dlr = true
#transceiver-mode = 0
receive-port=13015
send-url = "http://192.168.1.124:8090"
smsc-username = "cust2"
smsc-password = "cust@123"
connect-allow-ip = "*.*.*.*"
#dlr-url="http://192.168.1.106/dlr.php?type=%d"

#---------------------------------------------
# SMSBOX SETUP

group = smsbox
bearerbox-host = 127.0.0.1
bearerbox-port = 13001
smsbox-id = cust2

#---------------------------------------------
# SEND-SMS USERS

group = sendsms-user
username = cust2
password = cust@123
#user-deny-ip = ""
#user-allow-ip = ""

#---------------------------------------------
# SERVICES

group = sms-service
keyword = default
text = "No service specified"

group = smsbox-route
smsbox-id = cust2
smsc-id = "http"

opensmppbox.conf

group = core
dlr-storage = internal

group = opensmppbox
opensmppbox-id = OPENSMPP
opensmppbox-port = 2775
bearerbox-host = 127.0.0.1
bearerbox-port = 13001
our-system-id = outbind
smpp-logins = /usr/local/kannel/smpplogins.txt
use-systemid-as-smsboxid = true
route-to-smsc = http 
log-file = /usr/local/kannel/smppbox.log

transmitter.php

<?php
//print "<pre>";
require_once "smpp.php";
$tx=new SMPP('192.168.1.81',2775);

$tx->debug=true;
$tx->system_type="http";
$tx->addr_npi=1;
$tx->sms_registered_delivery_flag=1;
$tx->sms_sm_default_msg_id=1;
//$tx->dlr_url="http://192.168.1.124/cgi-bim/drl";
//$tx->dlr_url="http://192.168.1.124:8090";
print_r($tx);
//print "open status: ".$tx->state."\n";
$tx->bindTransmitter("cust2","cust@123");
$tx->sms_source_addr_npi=1;
//$tx->sms_source_addr_ton=1;
$tx->sms_dest_addr_ton=1;
$tx->sms_dest_addr_npi=1;
$tx->sendSMS("2121","791400000","Hello world");
//$tx->sendSMS("2121","2121","Hello world!!!");
$tx->close();
unset($tx);

如果需要进一步的信息,请告诉我 提前感谢您的帮助

1 个答案:

答案 0 :(得分:1)

来电http://192.168.1.124:8090

的回复是什么?
send-url = "http://192.168.1.124:8090" 

回复必须与successfailureretry later

相似
status-success-regex = "success"
status-permfail-regex = "failure"
status-tempfail-regex = "retry later"

如果回答正确,您将获得正确的DLR