1

I am using kannel sms gateway, to send sms

Sorry, if this question is asked before, but I tried to find solution, but I didn't get any, unfortunately I have to post this question.

I am sending message through php script(smpp client) to smpp server, which connects to bearer box and send message.

There are multiple issues am facing: 1. Am not able to get delivery report 2. Am getting an error in logs of smsbox : ERROR: URL <03b3423a> doesn't start with http://' norhttps://'

I tried different solutions, but none of them are working. I am in need that if number "A" sends message to number "B", then number "A" should get acknowledgement that message had been delivered to number "B"

Here are my details of configuration files:

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);

Please let me know, if any further information is needed Thanks for help in advance

gehlotparesh
  • 142
  • 3
  • 13

1 Answers1

1

What is the response of the call http://192.168.1.124:8090

send-url = "http://192.168.1.124:8090" 

Response must be like success, failure or retry later

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

If the response is correct you will get the correct DLR

Vinayak
  • 305
  • 2
  • 11