You shouldn't change this in kannel.conf. You should change it in your PHP
client.

 

Like this:

 

<?php
define('SMPP_HOST_P', '1.1.1.1');
define('SMPP_LOGIN_P', 'test');
define('SMPP_PASSWORD_P', 'Qwe123');

define('SMPP_PORT', 13006);
define('SMPP_FROM', 'TestAddress');

class SMPP {

        // общие параметры SMPP
        public $system_type = "localhost";
        public $interface_version = 0x34;
....



== Rene

 

From: admin [mailto:ad...@platbox.ru] 
Sent: Wednesday, 08 August, 2012 14:35
To: Rene Kluwen
Cc: 'spameden'; us...@vm1.kannel.org
Subject: Re: Where I can download the previous version of opensmppbox

 


Changed system-type  from NULL to localhost in kannel.conf
The same error...

08.08.2012 16:15, Rene Kluwen пишет:

Specify "localhost" as system-type in your client.

 

== Rene

 

From: users-boun...@vm1.kannel.org [mailto:users-boun...@vm1.kannel.org] On
Behalf Of admin
Sent: Wednesday, 08 August, 2012 13:34
To: spameden; us...@vm1.kannel.org
Subject: Re: Where I can download the previous version of opensmppbox

 

07.08.2012 17:35, spameden пишет:

instead of rollbacking to previous revision, you can do what Rene said you
need to alter opensmppbox.conf configuration and it would work.

2012/8/7 admin <ad...@platbox.ru>

Good time of day!

I have installed the last version of opensmppbox and have the bug which is
talked about here

https://redmine.kannel.org/issues/649

Where I can download the .63 version? There is no this bug in this version
as they wrote here.

 


Thank you for help.
Yes, i did it. 
Now my opensmppbox can start.
But unfortunatelly I can't send sms by smpp, because get the errors:

 ERROR: opensmppbox: bearerbox_to_smpp: thread starts
 ERROR: opensmppbox: smpp_to_bearerbox: thread starts

Here are my config files:

kannel.conf

group = core
admin-port = 13000
admin-password = 
admin-deny-ip = "*.*.*.*"
admin-allow-ip = "127.0.0.1"
smsbox-port = 13001
log-file = "/var/log/kannel/bearerbox.log"
log-level = 0
access-log = "/var/log/kannel/kannel-access.log"
#box-deny-ip = "*.*.*.*"
box-allow-ip = "0.0.0.0"
dlr-storage = mysql
smsbox-max-pending = 100
sms-resend-retry = 20
sms-resend-freq = 180
#unified-prefix = ",+"
ssl-server-cert-file="/home/amst/commcert/cert.crt"
ssl-server-key-file="/home/amst/commcert/cert.key"

group = mysql-connection
id = dlr
host = 192.168.102.2
username = smsuser
password = 
database = smsbox
port = 3306
max-connections = 5

group = dlr-db
id = dlr
table = dlr
field-smsc = smsc
field-timestamp = ts
field-destination = destination
field-source = source
field-service = service
field-url = url
field-mask = mask
field-status = status
field-boxc-id = boxcid

group = smsbox
bearerbox-host = 1.1.1.1
bearerbox-port = 13005
sendsms-port = 13131
sendsms-port-ssl = false
mo-recode = 1
sendsms-chars = "0123456789"
reply-couldnotfetch = "Service unavailable"
log-file = "/var/log/kannel/smsbox.log"
log-level = 0
group = sendsms-user
username = user_test
password = 
default-sender = "test"
user-deny-ip = "1.1.1.2"
user-allow-ip = "*.*.*.*"
max-messages = 5
omit-empty = true
split-chars = "|"
concatenation = true
default-smsc = process

group = smsc
smsc = smpp
smsc-id = process
allowed-smsc-id = process
host = 2.2.2.2
port = 888
transceiver-mode = 1
smsc-username = "test"
smsc-password = 
system-type = NULL
source-addr-ton = 0x00
source-addr-npi = 0x00
dest-addr-ton = 0x00
dest-addr-npi = 0x00
reconnect-delay = 20
enquire-link-interval = 30
log-file = "/var/log/kannel/smsc-operator-process.log"
log-level = 0

group = sms-service
keyword = default
catch-all = true
accepted-smsc = "process"
text = Hello
max-messages = 5
concatenation = true
omit-empty = true
accept-x-kannel-headers = true


Here is smppbox.conf

group = core
#dlr-storage = mysql

# this group defines your opensmppbox
group = opensmppbox
box-dlr-storage = mysql
# our boxc type
opensmppbox-id = opensmppbox
# the port to listen on for smpp connections
opensmppbox-port = 13006
# we connect to the following host as a box
bearerbox-host = localhost
bearerbox-port = 13005
#bearerbox-dcs = utf-8
log-level = 1
log-file = /var/log/kannel/opensmppbox.log
our-system-id = platbox
route-to-smsc = process   # здесь надо указать smsc-id  , прописанного в
основном конфине kannel.conf
smpp-logins = "/etc/opensmppbox/clients"

# the following is just standard dlr configuration

group = mysql-connection
id = dlr
host = 192.168.2.2
username = smsuser
password = 
database = smsbox
port = 3306
# you can increase this upon a higher load
max-connections = 5

group = dlr-db
id = dlr
table = dlr
field-smsc = smsc
field-timestamp = ts
field-destination = destination
field-source = source
field-service = service
field-url = url
field-mask = mask
field-status = status
field-boxc-id = boxcid


Here is sqlbox.conf

group = sqlbox
id = sqlbox-db
smsbox-id = sqlbox
#global-sender = ""
bearerbox-host = localhost
bearerbox-port = 13001
smsbox-port = 13005
smsbox-port-ssl = false
sql-log-table = sent_sms
sql-insert-table = send_sms
check-balance = 1
log-file = "/var/log/kannel/kannel-sqlbox.log"
log-level = 0
#access-log = "/var/log/kannel/sqlaccess.log"
#ssl-client-certkey-file = ""
#ssl-server-cert-file = ""
#ssl-server-key-file = ""
#ssl-trusted-ca-file = ""

# Database connection examples. Please uncomment as needed

# Example MYSQL Connection
group = mysql-connection
id = sqlbox-db
host = 192.168.2.2
username = smsuser
password = 
database = smsbox
port = 3306
max-connections = 5


Here is the /etc/opensmppbox/clietnts
test Qwe123 localhost *.*.*.*
test2 Qwe1234 smpp2 *.*.*.*


Here is the peace of php check sms script
<?php
define('SMPP_HOST_P', '1.1.1.1');
define('SMPP_LOGIN_P', 'test');
define('SMPP_PASSWORD_P', 'Qwe123');

define('SMPP_PORT', 13006);
define('SMPP_FROM', 'TestAddress');

class SMPP {

        // общие параметры SMPP
        public $system_type = null;
        public $interface_version = 0x34;
....


And here is the debug log by opensmppbox:

2012-08-08 15:23:17 [6805] [0] INFO: Starting to log to file
/var/log/kannel/opensmppbox.l
og level 1
2012-08-08 15:23:17 [6805] [0] INFO: Added logfile
`/var/log/kannel/opensmppbox.log' with
level `1'.
2012-08-08 15:23:17 [6805] [0] WARNING: DLR: using default 'internal' for
storage type.
2012-08-08 15:23:17 [6805] [0] INFO: DLR using storage type: internal
2012-08-08 15:23:17 [6805] [0] INFO: MYSQL: Connected to server at
192.168.102.2.
2012-08-08 15:23:17 [6805] [0] INFO: MYSQL: server version
5.1.63-0+squeeze1-log, client v
ersion 5.1.61.
2012-08-08 15:23:17 [6805] [0] INFO: MYSQL: Connected to server at
192.168.102.2.
2012-08-08 15:23:17 [6805] [0] INFO: MYSQL: server version
5.1.63-0+squeeze1-log, client v
ersion 5.1.61.
2012-08-08 15:23:17 [6805] [0] INFO: MYSQL: Connected to server at
192.168.102.2.
2012-08-08 15:23:17 [6805] [0] INFO: MYSQL: server version
5.1.63-0+squeeze1-log, client v
ersion 5.1.61.
2012-08-08 15:23:17 [6805] [0] INFO: MYSQL: Connected to server at
192.168.102.2.
2012-08-08 15:23:17 [6805] [0] INFO: MYSQL: server version
5.1.63-0+squeeze1-log, client v
ersion 5.1.61.
2012-08-08 15:23:17 [6805] [0] INFO: MYSQL: Connected to server at
192.168.102.2.
2012-08-08 15:23:17 [6805] [0] INFO: MYSQL: server version
5.1.63-0+squeeze1-log, client v
ersion 5.1.61.
2012-08-08 15:23:17 [6805] [0] INFO: opensmppbox DLR storage using type:
mysql
2012-08-08 15:23:17 [6805] [0] INFO: Waiting for SMPP connections on port
13006.
2012-08-08 15:23:29 [6805] [0] DEBUG: Started thread 1
(opensmppbox.c:function)
2012-08-08 15:23:29 [6805] [1] DEBUG: Thread 1 (opensmppbox.c:function) maps
to pid 6805.
2012-08-08 15:23:29 [6805] [1] INFO: Client connected from <1.1.1.1>
2012-08-08 15:23:29 [6805] [1] DEBUG: Connecting to <127.0.0.1>
2012-08-08 15:23:29 [6805] [1] INFO: Connected to bearerbox at localhost
port 13005.
2012-08-08 15:23:29 [6805] [1] DEBUG: Started thread 2
(opensmppbox.c:smpp_to_bearerbox)
2012-08-08 15:23:29 [6805] [1] ERROR: opensmppbox: bearerbox_to_smpp: thread
starts
2012-08-08 15:23:29 [6805] [2] DEBUG: Thread 2
(opensmppbox.c:smpp_to_bearerbox) maps to p
id 6805.
2012-08-08 15:23:29 [6805] [2] ERROR: opensmppbox: smpp_to_bearerbox: thread
starts
2012-08-08 15:23:29 [6805] [2] DEBUG: SMPP[(null)]: Got PDU:
2012-08-08 15:23:29 [6805] [2] DEBUG: SMPP PDU 0x9223e68 dump:
2012-08-08 15:23:29 [6805] [2] DEBUG:   type_name: bind_transmitter
2012-08-08 15:23:29 [6805] [2] DEBUG:   command_id: 2 = 0x00000002
2012-08-08 15:23:29 [6805] [2] DEBUG:   command_status: 0 = 0x00000000
2012-08-08 15:23:29 [6805] [2] DEBUG:   sequence_number: 1 = 0x00000001
2012-08-08 15:23:29 [6805] [2] DEBUG:   system_id: "test"
2012-08-08 15:23:29 [6805] [2] DEBUG:   password: "Qwe123"
2012-08-08 15:23:29 [6805] [2] DEBUG:   system_type: NULL
2012-08-08 15:23:29 [6805] [2] DEBUG:   interface_version: 52 = 0x00000034
2012-08-08 15:23:29 [6805] [2] DEBUG:   addr_ton: 0 = 0x00000000
2012-08-08 15:23:29 [6805] [2] DEBUG:   addr_npi: 1 = 0x00000001
2012-08-08 15:23:29 [6805] [2] DEBUG:   address_range: NULL
2012-08-08 15:23:29 [6805] [2] DEBUG: SMPP PDU dump ends.
2012-08-08 15:23:29 [6805] [2] DEBUG: SMPP[(null)]: Sending PDU:
2012-08-08 15:23:29 [6805] [2] DEBUG: SMPP PDU 0x9223f88 dump:
2012-08-08 15:23:29 [6805] [2] DEBUG:   type_name: bind_transmitter_resp
2012-08-08 15:23:29 [6805] [2] DEBUG:   command_id: 2147483650 = 0x80000002
2012-08-08 15:23:29 [6805] [2] DEBUG:   command_status: 13 = 0x0000000d
2012-08-08 15:23:29 [6805] [2] DEBUG:   sequence_number: 1 = 0x00000001
2012-08-08 15:23:29 [6805] [2] DEBUG:   system_id: NULL
2012-08-08 15:23:29 [6805] [2] DEBUG: SMPP PDU dump ends.
2012-08-08 15:23:30 [6805] [2] DEBUG: SMPP[(null)]: Got PDU:
2012-08-08 15:23:30 [6805] [2] DEBUG: SMPP PDU 0x9223e40 dump:
2012-08-08 15:23:30 [6805] [2] DEBUG:   type_name: unbind
2012-08-08 15:23:30 [6805] [2] DEBUG:   command_id: 6 = 0x00000006
2012-08-08 15:23:30 [6805] [2] DEBUG:   command_status: 0 = 0x00000000
2012-08-08 15:23:30 [6805] [2] DEBUG:   sequence_number: 2 = 0x00000002
2012-08-08 15:23:30 [6805] [2] DEBUG: SMPP PDU dump ends.
2012-08-08 15:23:30 [6805] [2] DEBUG: SMPP[(null)]: Sending PDU:
2012-08-08 15:23:30 [6805] [2] DEBUG: SMPP PDU 0x9223f20 dump:
2012-08-08 15:23:30 [6805] [2] DEBUG:   type_name: generic_nack
2012-08-08 15:23:30 [6805] [2] DEBUG:   command_id: 2147483648 = 0x80000000
2012-08-08 15:23:30 [6805] [2] DEBUG:   command_status: 14 = 0x0000000e
2012-08-08 15:23:30 [6805] [2] DEBUG:   sequence_number: 2 = 0x00000002
2012-08-08 15:23:30 [6805] [2] DEBUG: SMPP PDU dump ends.
2012-08-08 15:24:30 [6805] [2] ERROR: Invalid SMPP PDU received.
2012-08-08 15:24:30 [6805] [2] ERROR: opensmppbox: smpp_to_bearerbox: thread
terminates
2012-08-08 15:24:30 [6805] [2] DEBUG: Thread 2
(opensmppbox.c:smpp_to_bearerbox) terminate
s.
2012-08-08 15:24:30 [6805] [1] ERROR: opensmppbox: bearerbox_to_smpp: thread
terminates
2012-08-08 15:24:30 [6805] [1] DEBUG: Thread 1 (opensmppbox.c:function)
terminates.
2012-08-08 15:24:31 [6805] [0] INFO: No more waiting for SMPP connections.
2012-08-08 15:24:31 [6805] [0] DEBUG: Immutable octet strings: 123.



The kannel works normally by http.

What can be the solution?

 

Reply via email to