Re: SQLBOX working - LIFO or FIFO

2013-11-12 Thread ha...@aeon.pk
Hi,

Many thanks. I tried and tested it. It works fine for small chunks of data
(I can see SMS going out of bbox in a sequence they were entered in
send_sms table). However, for large amount of data (e.g. I sent a bulk of
20k SMS via SQLBOX), it does not follow the same rule. Is it bearerbox
which shuffles the order of the SMS present in its buffer (not SQLBOX)? Any
thoughts/experiences?

Is there any parameter tweak in send_sms by which I could raise the
priority of some SMS higher than others?

Regards,



On Mon, Nov 11, 2013 at 9:23 PM, spameden spame...@gmail.com wrote:

 Yes you can do this.

 Just alter gw/mysql_sqlbox.h and edit

 #define SQLBOX_MYSQL_SELECT_QUERY

 add there ORDER by sql_id ASC :)

 2013/11/11 ha...@aeon.pk ha...@aeon.pk:
  Hi,
 
  Does SQLBOX work in LIFO or FIFO order? For me, it's working as LIFO
 which
  is bad if I intend to send sequential message (message 1 needs to go
 first,
  but since message 2 comes later, it goes out first).
 
  Is there a way to make it operate in FIFO sequence, like ID'ing the
 messages
  or something?
 
  Regards,
  Hamza



Re: SQLBOX working - LIFO or FIFO

2013-11-12 Thread spameden
For priority I'd suggest adding a column called priority (typically
int(3) integer between 0 and 999) and doing ORDER by that column.

Do not forget to add an index as well or it might slow things down!

2013/11/12 ha...@aeon.pk ha...@aeon.pk:
 Hi,

 Many thanks. I tried and tested it. It works fine for small chunks of data
 (I can see SMS going out of bbox in a sequence they were entered in send_sms
 table). However, for large amount of data (e.g. I sent a bulk of 20k SMS via
 SQLBOX), it does not follow the same rule. Is it bearerbox which shuffles
 the order of the SMS present in its buffer (not SQLBOX)? Any
 thoughts/experiences?

 Is there any parameter tweak in send_sms by which I could raise the priority
 of some SMS higher than others?

 Regards,



 On Mon, Nov 11, 2013 at 9:23 PM, spameden spame...@gmail.com wrote:

 Yes you can do this.

 Just alter gw/mysql_sqlbox.h and edit

 #define SQLBOX_MYSQL_SELECT_QUERY

 add there ORDER by sql_id ASC :)

 2013/11/11 ha...@aeon.pk ha...@aeon.pk:
  Hi,
 
  Does SQLBOX work in LIFO or FIFO order? For me, it's working as LIFO
  which
  is bad if I intend to send sequential message (message 1 needs to go
  first,
  but since message 2 comes later, it goes out first).
 
  Is there a way to make it operate in FIFO sequence, like ID'ing the
  messages
  or something?
 
  Regards,
  Hamza





RE: DLR NOT UPDATED

2013-11-12 Thread Rene Kluwen
Dear Khan,

 

I just tried your insert query and it worked for me.

I got both the dlr-status = 8 and the dlr-status = 1.

 

Maybe your Trans001 smsc doesn’t support delivery reports to that destination.

 

=+= Rene

 

 

From: users [mailto:users-boun...@kannel.org] On Behalf Of Willy Mularto
Sent: maandag 11 november 2013 13:56
To: خان ابو زید
Cc: kannel users@kannel.org
Subject: Re: DLR NOT UPDATED

 

Read the user guide about dlr-mask.  

 

1=DLVRD

2=FAILED

4=BUFFERED

8=ACK

16=REJECTED

 

If you want to get update for DLVRD, FAILED, ACK then it means 1+2+8=11

 

 

 

Willy Mularto

SMS Gateway, Content Provider, Mobile Solution Specialist

M: +62811923464, +62818923464

PIN BBM: 74924429

 

 

 

On Nov 11, 2013, at 6:24 PM, خان ابو زید khan.abuz...@gmail.com wrote:





Dear Team,

 

I installed successfully kannel 1.5.0,sqlbox in my centos 6.4 VPS system.

I successfully start kannel in this sequence,  

1)/usr/local/kannel/sbin/bearerbox -v 0 /etc/kannel/kannel.conf

2)/usr/local/sbin/sqlbox -v 0 /etc/kannel/sqlbox.conf

3)/usr/local/kannel/sbin/smsbox -v 0 /etc/kannel/kannel.conf

 

Problem is that only ACK/ is received dlr_mask =8 getting.

message is delivered but dlr not updated.

 

My insert query :

 

INSERT INTO send_sms (  momt, sender, receiver, msgdata, sms_type, 
smsc_id,dlr_mask,dlr_url,boxc_id,coding) 

VALUES (  'MT', 'MOBLGI', '+919594092200 tel:%2B919594092200 ', 'TEST SMS', 
2,'Trans001',31,'uinque msg id','sqlbox',0);

 

 

 

My config file.

kannel.conf

group = core

admin-port = 13003

smsbox-port = 13016

admin-password = *

status-password = *

log-file = /var/log/kannel/kannel.log

log-level = 0

access-log = /var/log/kannel/access.log

store-type = spool

store-location = /var/log/kannel/spool

sms-resend-retry = 3

dlr-storage = mysql

smsbox-max-pending = 5

 

group = smsbox

bearerbox-host = localhost

bearerbox-port = 13020

sendsms-port = 13013

log-file = /var/log/kannel/smsbox.log

access-log = /var/log/kannel/access.log

log-level = 3

#mo-recode=true

#max-pending-requests = 2

 

group = smsbox-route

smsbox-id = sqlbox

smsc-id = Trans001

 

group = sendsms-user

username = abuzaid

password = 

#max-messages = 5

#concatenation = true

 

group=smsc

smsc=smpp

smsc-id=Trans001

allowed-smsc-id = Trans001

host = 121.241.242.121

port = 2351

transceiver-mode = 1

receive-port = 2351 

log-file = /var/log/kannel/Trans001.log

log-level = 0

smsc-username = *

smsc-password = *

msg-id-type = 0x00

source-addr-ton = 5

source-addr-npi = 9

dest-addr-ton = 1

dest-addr-npi = 1

enquire-link-interval = 60

system-type = default

reconnect-delay = 60

 

#Mysql Connection

group = mysql-connection

id = mydlr

host = localhost

username = root

password = mob@123

database = websms

max-connections = 10

 

#DLR Table Structure

group = dlr-db

id = mydlr

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 = boxc

 

sqlbox.conf

group = sqlbox

id = sqlbox-db

smsbox-id = sqlbox

bearerbox-host = localhost

bearerbox-port = 13016

smsbox-port = 13020

smsbox-port-ssl = false

sql-log-table = sent_sms

sql-insert-table = send_sms

log-file = /var/log/kannel/kannel-sqlbox.log

log-level = 0

 

group = mysql-connection

id = sqlbox-db

host = localhost

username = root

password = 

database = testsms

 

-- 

Regards

Khan Abuzaid
Mob# :09664541886/9594092200
Mumbai

 



RE: opensmpp

2013-11-12 Thread Rene Kluwen
Get a copy of the user guide in the doc directory of opensmppbox.

Maybe you need to do a make docs first.

 

== Rene

 

From: users [mailto:users-boun...@kannel.org] On Behalf Of Alok Srivastava
Sent: donderdag 31 oktober 2013 7:00
To: users@kannel.org
Subject: opensmpp

 

dear list

plz help, will i have to configure opensmpp for configuring kannel as a smpp
server.

plz share a tutorial for opensmpp.

thanks 

 

abhi 



RE: Manipulating service-type

2013-11-12 Thread Rene Kluwen
Yes, it is binfo.

For incoming messages, use %B in your get-url.

 

From: users [mailto:users-boun...@kannel.org] On Behalf Of Mohammed Saleem
Sent: dinsdag 29 oktober 2013 20:44
To: Manuel García Cabrera
Cc: kannel-users MailingList
Subject: Re: Manipulating service-type

 

Sorry it is binfo not bill-info.

I am not sure about the the service type in the MO. Maybe someone else can help 
here.you can check a sample mo from the log and check what exactly they pass to 
you as tge service ie type.

Best Regards
Mohammed Sleem

On Oct 29, 2013 9:24 PM, Manuel García Cabrera mcabr...@contentamobile.com 
wrote:

What do you mean by bill-info? I can't seem to find it on the Kannel 
documentation.

And about the field in the deliver_sm, they just told me ServiceType. I 
assumed that was some kind of standard, isn't it?

On 10/29/2013 04:18 PM, Mohammed Saleem wrote:

Check bill-info in sending mt. Remove the service_type from the conf. What 
field in the deliver_sm do you want exactly? 

Best Regards
Mohammed Sleem

On Oct 29, 2013 9:11 PM, Manuel García Cabrera mcabr...@contentamobile.com 
wrote:

Hi, I need to be able to set the service-type for outgoing messages and to be 
able to get it on incoming messages.

I've seen that it is possible to set it with a variable on the group = smsc 
configuration, but that would globally affect every message I send. I need to 
make it variable on my application side: every SMS I send could have any 
service-type. Is that even possible without having multiple group = smsc 
configurations?

And what about incoming messages? How can I know which service-type was used? 
Does it have to be a static configuration?

 



RE: Routing DLR to ESME using OpenSMPPBox

2013-11-12 Thread Rene Kluwen
It should route automatically.

Could you share your logs?

 

From: users [mailto:users-boun...@kannel.org] On Behalf Of Amir Mahmoud
Sent: maandag 28 oktober 2013 20:38
To: users
Subject: Routing DLR to ESME using OpenSMPPBox

 

Dears,

 

I have configured my servers to send from ESME to SMSC through OpenSMPPBox,
i have applied the below flow

ESME -- OpenSMPPBox -- SQLBox --Bearerbox -- SMSC

 

I have succeeded in sending the sms from ESME to the SMSC but my problem is
related to the DLR.

The Bearerbox actually received the DLR from the SMSC but it didn't route it
to the ESME.

 

What is the required configurations that could resolve the above issue. i
need to route the DLR to the ESME

 

Your help in this regard is highly appreciated and thanks in advance.

 

Below are my config files,

 

*** Kannel.conf 

#-

# core setup

 

group = core

admin-port = 13000

smsbox-port = 13001

wapbox-port = 13002

admin-password = admin123

status-password = status123

wdp-interface-name = *

log-file = /usr/local/kannel/bearerbox.log

log-level = 3

access-log = /usr/local/kannel/bearerboxaccess.log

store-type = spool

store-location = /usr/local/kannel/store

store-dump-freq = 60

#-

# smsc setup

 

group = smsc

smsc = smpp

smsc-id = VFSMPP1

host = x.x.x.x

port = 

smsc-username = egypt321

smsc-password = egypt321

system-type = egypt321

address-range = 

dest-addr-ton=1

dest-addr-npi=1

interface-version = 34

enquire-link-interval = 25

reconnect-delay = 15

transceiver-mode = 1

#max-pending-submits = 8

throughput = 6

#-

# smsbox setup

 

group = smsbox

smsbox-id = smsbox1

bearerbox-host = 127.0.0.1

sendsms-port = 13013

sendsms-chars = 0123456789 +-

log-file = /usr/local/kannel/smsbox.log

log-level = 3

access-log = /usr/local/kannel/smsboxaccess.log

mo-recode = true

http-request-retry = 1000

max-pending-requests = 33000

#-

# smsbox-route setup

 

group = smsbox-route

smsbox-id = smsc1

smsc-id = VFSMPP1

###

 

*** OpenSMPPBox.conf **

group = core

dlr-storage = internal

 

group = opensmppbox

bearerbox-host = 127.0.0.1

bearerbox-port = 13005

opensmppbox-id = opensmppbox1

opensmppbox-port = 13003

log-file = /usr/local/kannel/smppbox.log

#log-level = 3

our-system-id = Inaccess

#route-to-smsc = cardboard

smpp-logins = /usr/local/kannel/smpplogins.txt

###

 

*** smpplogins.txt***

test testpw smsc1 *.*.*.*

###

 

*** SQLBox.conf ***

group = sqlbox

id = sqlbox-db

smsbox-id = sqlbox

global-sender = 

bearerbox-host = 127.0.0.1

bearerbox-port = 13001

smsbox-port = 13005

smsbox-port-ssl = false

sql-log-table = sent_sms

sql-insert-table = send_sms

log-file = /usr/local/kannel/kannel-sqlbox.log

 

# MYSQL Connection

group = mysql-connection

id = sqlbox-db

host = localhost

username = root

password = root

database = mysqlbox

###

 

 

 

Regards,

Amir



RE: Help Routing from Bearerbox to OpenSMPPBox

2013-11-12 Thread Rene Kluwen
On server 1, use group = smsbox-route with smsbox id set to the system-id
(or system-type) of the 1 = 2 connection.l

 

From: users [mailto:users-boun...@kannel.org] On Behalf Of michael osakede
Sent: woensdag 23 oktober 2013 15:18
To: users@kannel.org
Subject: Help Routing from Bearerbox to OpenSMPPBox

 

Hi,

 

I have setup 2 servers:

Server 1: Bearerbox | SMSbox | SQLBox | OpenSMPPBox

Server 2: Bearerbox | SMSBox | SQLBox

 

How do I route all sms coming into an SMSC on Server one to server 2m and
how do I route the response from Server 2 back to Server 1?

 

Bearerbox 1 = Opensmppbox1 = Bearerbox 2 =SMSBox 2 = and return the
response back to Bearerbox 1.

 

How can I achieve this?

 

Michael

 

 



RE: OPENSMPP LOGIN ISSUE

2013-11-12 Thread Rene Kluwen
The system type is case sensitive.

 

From: users [mailto:users-boun...@kannel.org] On Behalf Of michael osakede
Sent: woensdag 23 oktober 2013 13:41
To: users@kannel.org
Subject: OPENSMPP LOGIN ISSUE

 

Hi,

 

I am having issues login into my opensmppbox from a remote kannel gateway.

 

This is my smpplogin.txt

precin4 precin4 vma 208.109.186.98

 

 

Kannel Config(Remote Server)

# SMSC SMPP

group = smsc

smsc-id =  precin4

smsc = smpp

host = xx.xxx.xx.xxx

port = 2346

receive-port = 2346

smsc-username = precin4

smsc-password = precin4

system-type = VMA

interface-version = 52

keepalive = 50

allowed-smsc-id = precin4

transceiver-mode = true

msg-id-type =  0x00

throughput = 12

max-pending-submits = 10

wait-ack = 600

 

OPENSMPP LOG

2013-04-10 13:05:14 [20962] [2] DEBUG: SMPP[abcd]: Got PDU:

2013-04-10 13:05:14 [20962] [2] DEBUG: SMPP PDU 0x7fe1dd50 dump:

2013-04-10 13:05:14 [20962] [2] DEBUG:   type_name: bind_transceiver

2013-04-10 13:05:14 [20962] [2] DEBUG:   command_id: 9 = 0x0009

2013-04-10 13:05:14 [20962] [2] DEBUG:   command_status: 0 = 0x

2013-04-10 13:05:14 [20962] [2] DEBUG:   sequence_number: 1 = 0x0001

2013-04-10 13:05:14 [20962] [2] DEBUG:   system_id: precin4

2013-04-10 13:05:14 [20962] [2] DEBUG:   password: precin4

2013-04-10 13:05:14 [20962] [2] DEBUG:   system_type: VMA

2013-04-10 13:05:14 [20962] [2] DEBUG:   interface_version: 82 = 0x0052

2013-04-10 13:05:14 [20962] [2] DEBUG:   addr_ton: 0 = 0x

2013-04-10 13:05:14 [20962] [2] DEBUG:   addr_npi: 0 = 0x

2013-04-10 13:05:14 [20962] [2] DEBUG:   address_range: NULL

2013-04-10 13:05:14 [20962] [2] DEBUG: SMPP PDU dump ends.

2013-04-10 13:05:14 [20962] [2] DEBUG: SMPP[abcd]: Sending PDU:

2013-04-10 13:05:14 [20962] [2] DEBUG: SMPP PDU 0x7fe1d0001050 dump:

2013-04-10 13:05:14 [20962] [2] DEBUG:   type_name: bind_transceiver_resp

2013-04-10 13:05:14 [20962] [2] DEBUG:   command_id: 2147483657 = 0x8009

2013-04-10 13:05:14 [20962] [2] DEBUG:   command_status: 13 = 0x000d

2013-04-10 13:05:14 [20962] [2] DEBUG:   sequence_number: 1 = 0x0001

2013-04-10 13:05:14 [20962] [2] DEBUG:   system_id: NULL

2013-04-10 13:05:14 [20962] [2] DEBUG: SMPP PDU dump ends.

2013-04-10 13:05:15 [20962] [2] ERROR: Invalid SMPP PDU received.

2013-04-10 13:05:15 [20962] [2] DEBUG: Thread 2
(opensmppbox.c:smpp_to_bearerbox) terminates.

2013-04-10 13:05:16 [20962] [1] DEBUG: Thread 1 (opensmppbox.c:function)
terminates.

 

 

BEARERBOX LOG(remote server)

2013-10-23 12:15:31 [1433] [6] DEBUG: Connecting to xx.xx.xx.xxx

2013-10-23 12:15:31 [1433] [6] DEBUG: SMPP[precin4]: Sending PDU:

2013-10-23 12:15:31 [1433] [6] DEBUG: SMPP PDU 0x7f0f2c000a10 dump:

2013-10-23 12:15:31 [1433] [6] DEBUG:   type_name: bind_transceiver

2013-10-23 12:15:31 [1433] [6] DEBUG:   command_id: 9 = 0x0009

2013-10-23 12:15:31 [1433] [6] DEBUG:   command_status: 0 = 0x

2013-10-23 12:15:31 [1433] [6] DEBUG:   sequence_number: 36 = 0x0024

2013-10-23 12:15:31 [1433] [6] DEBUG:   system_id: precin4

2013-10-23 12:15:31 [1433] [6] DEBUG:   password: precin4

2013-10-23 12:15:31 [1433] [6] DEBUG:   system_type: 

2013-10-23 12:15:31 [1433] [6] DEBUG:   interface_version: 82 = 0x0052

2013-10-23 12:15:31 [1433] [6] DEBUG:   addr_ton: 0 = 0x

2013-10-23 12:15:31 [1433] [6] DEBUG:   addr_npi: 0 = 0x

2013-10-23 12:15:31 [1433] [6] DEBUG:   address_range: NULL

2013-10-23 12:15:31 [1433] [6] DEBUG: SMPP PDU dump ends.

2013-10-23 12:15:31 [1433] [6] DEBUG: SMPP[precin4]: Got PDU:

2013-10-23 12:15:31 [1433] [6] DEBUG: SMPP PDU 0x7f0f2c000a10 dump:

2013-10-23 12:15:31 [1433] [6] DEBUG:   type_name: bind_transceiver_resp

2013-10-23 12:15:31 [1433] [6] DEBUG:   command_id: 2147483657 = 0x8009

2013-10-23 12:15:31 [1433] [6] DEBUG:   command_status: 13 = 0x000d

2013-10-23 12:15:31 [1433] [6] DEBUG:   sequence_number: 36 = 0x0024

2013-10-23 12:15:31 [1433] [6] DEBUG:   system_id: NULL

2013-10-23 12:15:31 [1433] [6] DEBUG: SMPP PDU dump ends.

2013-10-23 12:15:31 [1433] [6] ERROR: SMPP[precin4]: SMSC rejected login to
transmit, code 0x000d (Bind Failed).

2013-10-23 12:15:31 [1433] [6] ERROR: SMPP[precin4]: Couldn't connect to SMS
center (retrying in 10 seconds).

 

What am I doing wrong?

 

Michael

 

 



RE: Sms reply.

2013-11-12 Thread Rene Kluwen
Please share your logs.

 

From: users [mailto:users-boun...@kannel.org] On Behalf Of Kelechi Micheals
Sent: woensdag 16 oktober 2013 13:00
To: users@kannel.org
Subject: Sms reply.

 

Dear friends,
I have a working system. It recieves sms and processes well. However I
noticed for every sms the server receives it sends a corresponding reply
with the following message data could not fetch content, sorry. What could
be responsible for this?



RE: Service type parameter on URL

2013-11-12 Thread Rene Kluwen
Use binfo=CTEST

 

From: users [mailto:users-boun...@kannel.org] On Behalf Of Luis Cavazos
Sent: donderdag 3 oktober 2013 18:26
To: users@kannel.org
Subject: Service type parameter on URL

 

Hello,

 

Im already working with kannel, but a new Operator has requested to send the
service-type parameter acording to the message type, for instance something
like

 

CTEST

C represents the message type (in this case, Content delivery).

S Subscription

 

ect

 

im trying to set the service-type on a URL but is not working, the only way
it worked is to set it at the kannel.conf

like:

 

service-type=CTEST

 

But it makes me create a bind for every message type.

 

This is the example URL

 

http://localhost/cgi-bin/sendsms?username=bar
http://localhost/cgi-bin/sendsms?username=barpassword=foofrom=12345smsc=
smsc_testto=1234567890text=Testservice-type=CTEST
password=foofrom=12345smsc=smsc_testto=1234567890text=Testservice-type
=CTEST

 

But i don't know if its possible.

 

I hope someone can help me.

 

Regards

 



RE: opensmppbox consume a lot of MEM

2013-11-12 Thread Rene Kluwen
Sounds like a memory leak somewhere to me. And/or maybe a race condition.

Maybe you can run one time with valgrind running?

 

== Rene

 

 

From: users [mailto:users-boun...@kannel.org] On Behalf Of Minh Tuan
Sent: zaterdag 28 september 2013 5:22
To: users@kannel.org
Subject: opensmppbox consume a lot of MEM

 

Dear all,

I need help as opensmppbox is consuming a lot of my server's memory. After
occupied 80% of RAM (total RAM is 2G), it's also eating 50% of swap memory
(total 3G) and increasing.

My configuration is:

Client - opensmppbox(mysql dlr) - sqlbox - bearerbox(mysql dlr) -
operator SMSC

Opensmppbox has 1 Client only, but he is binding 6 connections (via
Internet), with 50 short codes and ~30 TPS of throughput, connections are
lost few times per day (automatic re-connect).

 

Of course, i'm going to plug more RAM sticks in to server but i'm afraid of
it will not help in this situation.

Appreciate you guy can give me some advise and experience. Many thanks.

Nguyen Minh Tuan from Vietnamobile.



RE: smsbox-id

2013-11-12 Thread Rene Kluwen
See group = smsbox-route in the user manual.

-Original Message-
From: users [mailto:users-boun...@kannel.org] On Behalf Of iqbal
Sent: maandag 23 september 2013 11:02
To: 'Kannel Users'
Subject: smsbox-id


Hi All,

i got sqlbox that running well, it can return dlr-url by putting
smsbox-id in the smsbox group and put its name to the boxc_id

this is the sql query :
INSERT INTO send_sms ( momt, sender, receiver, msgdata, sms_type,
smsc_id,dlr_url,dlr_mask, boxc_id ) VALUES ( MT, 085225834573,
085225834573, test, 2,
Huawei-E220-00,http://127.0.01/dlr.php?dlr.php?dlr=%ddest=%preport=%AL
ogID=test,31,
dlr-box)

my dlr.php can record the dlr status
but when there is an incoming sms, the get-url isnt working, but i can
see the incoming sms at kannel logs.

when i check the store-status, this incoming sms is stored with type as MO.

if i comment the smsbox-id in the smsbox, the get-url will work and
record previous incoming sms...but the dlr-url at sqlbox doesnt working
again..

can someone help me


kannel.conf


group = core
admin-port = 13000
smsbox-port = 13001
smsbox-port-ssl = false
admin-password = admin
log-level = 0
log-file = /var/log/kannel/kannel.log
access-log = /var/log/kannel/access.log
store-type = file
store-file = /var/log/kannel/kannel.store
store-dump-freq = 10
access-log-clean = true
sms-resend-retry = 0

group = smsc
smsc = at
smsc-id = Huawei-E220-00
modemtype = huawei_e220_00
device = /dev/ttyUSB0
#sms-center = +628964401
#my-number = +6289659631261
sms-center = +628110
my-number = +6285225834573
connect-allow-ip = 127.0.0.1;192.168.n.m
sim-buffering = true
keepalive = 5

group = modems
id = huawei_e220_00
name = Huawei E153
detect-string = huawei
#init-string = ATQ0 V1 E1 S0=0 C1 D2 +FCLASS=0
init-string = AT S7=45 S0=0 L1 V1 X4 c1 E1 Q0
message-storage = SM
need-sleep = true
speed = 460800

group = smsbox
smsbox-id = dlr-box
bearerbox-host = localhost
sendsms-port = 13015
bearerbox-port = 13001
sendsms-chars = 0123456789+
global-sender = +628964401
log-level = 0
log-file = /var/log/kannel/smsbox.log
access-log = /var/log/kannel/access.log
http-request-retry = 3

group = sendsms-user
username = iqbal
password = iqbal
#concatenation=1
#dlr-url = http://localhost/dlr.php?dlr=%ddest=%preport=%Atime=%tmsg=%a
max-messages = 5

#SMS SERVICES
group = sms-service
keyword = default
max-messages = 5
catch-all = yes
#text = ahh ngelu default
get-url =
http://localhost/rcvd.php?dlr=%ddest=%preport=%Atime=%tmsg=%a;
omit-empty = true




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
log-file = /var/log/kannel/kannel-sqlbox.log
log-level = 0
#ssl-client-certkey-file = 
#ssl-server-cert-file = 
#ssl-server-key-file = 
#ssl-trusted-ca-file = 

# Database connection examples. Please uncomment as needed

#MYSQL Connection
group = mysql-connection
id = sqlbox-db
host = localhost
username = root
password = dewiku
database = kannel
max-connections = 2

# Example SDB Connection with some database URL examples
# *** Note: Uncomment only _one_ url line ***
group = sdb-connection
id = sqlbox-db
url = mysql:host=localhost:db=kannel:uid=myuser:pwd=mypass
#url = sqlite:db=/opt/lampp/var/mysql/kannel/db.opt
#url = sqlite3:db=/path/to/kannel3.db









Re: SQLBOX working - LIFO or FIFO

2013-11-12 Thread ha...@aeon.pk
Actually, if my understanding is correct (i.e. SQLBOX is already doing the
right thing by giving messages in FIFO order to bbox, but bbox is shuffling
the outgoing messages from within its buffer), then there is no point of
adding priority column.

What do you say?


On Tue, Nov 12, 2013 at 6:28 PM, spameden spame...@gmail.com wrote:

 For priority I'd suggest adding a column called priority (typically
 int(3) integer between 0 and 999) and doing ORDER by that column.

 Do not forget to add an index as well or it might slow things down!

 2013/11/12 ha...@aeon.pk ha...@aeon.pk:
  Hi,
 
  Many thanks. I tried and tested it. It works fine for small chunks of
 data
  (I can see SMS going out of bbox in a sequence they were entered in
 send_sms
  table). However, for large amount of data (e.g. I sent a bulk of 20k SMS
 via
  SQLBOX), it does not follow the same rule. Is it bearerbox which shuffles
  the order of the SMS present in its buffer (not SQLBOX)? Any
  thoughts/experiences?
 
  Is there any parameter tweak in send_sms by which I could raise the
 priority
  of some SMS higher than others?
 
  Regards,
 
 
 
  On Mon, Nov 11, 2013 at 9:23 PM, spameden spame...@gmail.com wrote:
 
  Yes you can do this.
 
  Just alter gw/mysql_sqlbox.h and edit
 
  #define SQLBOX_MYSQL_SELECT_QUERY
 
  add there ORDER by sql_id ASC :)
 
  2013/11/11 ha...@aeon.pk ha...@aeon.pk:
   Hi,
  
   Does SQLBOX work in LIFO or FIFO order? For me, it's working as LIFO
   which
   is bad if I intend to send sequential message (message 1 needs to go
   first,
   but since message 2 comes later, it goes out first).
  
   Is there a way to make it operate in FIFO sequence, like ID'ing the
   messages
   or something?
  
   Regards,
   Hamza
 
 



RE: SQLBOX working - LIFO or FIFO

2013-11-12 Thread Rene Kluwen
There's a 'priority' field in the Msg structure.

I think it serves for the purpose that you want to.

Just it's you cannot set it in the send_sms table. Not sure why, but
probably the field was added later.

It shouldn't be difficult to add though if anyone wants to send in a patch.

 

== Rene

 

From: users [mailto:users-boun...@kannel.org] On Behalf Of ha...@aeon.pk
Sent: dinsdag 12 november 2013 15:28
To: spameden
Cc: kannel users
Subject: Re: SQLBOX working - LIFO or FIFO

 

Actually, if my understanding is correct (i.e. SQLBOX is already doing the
right thing by giving messages in FIFO order to bbox, but bbox is shuffling
the outgoing messages from within its buffer), then there is no point of
adding priority column.

 

What do you say?

 

On Tue, Nov 12, 2013 at 6:28 PM, spameden spame...@gmail.com wrote:

For priority I'd suggest adding a column called priority (typically
int(3) integer between 0 and 999) and doing ORDER by that column.

Do not forget to add an index as well or it might slow things down!

2013/11/12 ha...@aeon.pk ha...@aeon.pk:

 Hi,

 Many thanks. I tried and tested it. It works fine for small chunks of data
 (I can see SMS going out of bbox in a sequence they were entered in
send_sms
 table). However, for large amount of data (e.g. I sent a bulk of 20k SMS
via
 SQLBOX), it does not follow the same rule. Is it bearerbox which shuffles
 the order of the SMS present in its buffer (not SQLBOX)? Any
 thoughts/experiences?

 Is there any parameter tweak in send_sms by which I could raise the
priority
 of some SMS higher than others?

 Regards,



 On Mon, Nov 11, 2013 at 9:23 PM, spameden spame...@gmail.com wrote:

 Yes you can do this.

 Just alter gw/mysql_sqlbox.h and edit

 #define SQLBOX_MYSQL_SELECT_QUERY

 add there ORDER by sql_id ASC :)

 2013/11/11 ha...@aeon.pk ha...@aeon.pk:
  Hi,
 
  Does SQLBOX work in LIFO or FIFO order? For me, it's working as LIFO
  which
  is bad if I intend to send sequential message (message 1 needs to go
  first,
  but since message 2 comes later, it goes out first).
 
  Is there a way to make it operate in FIFO sequence, like ID'ing the
  messages
  or something?
 
  Regards,
  Hamza



 



RE: SQLBOX working - LIFO or FIFO

2013-11-12 Thread Rene Kluwen
But having said the below, sms messages are not guaranteed to arrive in a
particular order.

The remote smsc may still send out message 2 first, even when they received
message 1 first.

 

From: users [mailto:users-boun...@kannel.org] On Behalf Of Rene Kluwen
Sent: dinsdag 12 november 2013 15:35
To: ha...@aeon.pk; 'spameden'
Cc: 'kannel users'
Subject: RE: SQLBOX working - LIFO or FIFO

 

There's a 'priority' field in the Msg structure.

I think it serves for the purpose that you want to.

Just it's you cannot set it in the send_sms table. Not sure why, but
probably the field was added later.

It shouldn't be difficult to add though if anyone wants to send in a patch.

 

== Rene

 

From: users [mailto:users-boun...@kannel.org] On Behalf Of ha...@aeon.pk
Sent: dinsdag 12 november 2013 15:28
To: spameden
Cc: kannel users
Subject: Re: SQLBOX working - LIFO or FIFO

 

Actually, if my understanding is correct (i.e. SQLBOX is already doing the
right thing by giving messages in FIFO order to bbox, but bbox is shuffling
the outgoing messages from within its buffer), then there is no point of
adding priority column.

 

What do you say?

 

On Tue, Nov 12, 2013 at 6:28 PM, spameden spame...@gmail.com wrote:

For priority I'd suggest adding a column called priority (typically
int(3) integer between 0 and 999) and doing ORDER by that column.

Do not forget to add an index as well or it might slow things down!

2013/11/12 ha...@aeon.pk ha...@aeon.pk:

 Hi,

 Many thanks. I tried and tested it. It works fine for small chunks of data
 (I can see SMS going out of bbox in a sequence they were entered in
send_sms
 table). However, for large amount of data (e.g. I sent a bulk of 20k SMS
via
 SQLBOX), it does not follow the same rule. Is it bearerbox which shuffles
 the order of the SMS present in its buffer (not SQLBOX)? Any
 thoughts/experiences?

 Is there any parameter tweak in send_sms by which I could raise the
priority
 of some SMS higher than others?

 Regards,



 On Mon, Nov 11, 2013 at 9:23 PM, spameden spame...@gmail.com wrote:

 Yes you can do this.

 Just alter gw/mysql_sqlbox.h and edit

 #define SQLBOX_MYSQL_SELECT_QUERY

 add there ORDER by sql_id ASC :)

 2013/11/11 ha...@aeon.pk ha...@aeon.pk:
  Hi,
 
  Does SQLBOX work in LIFO or FIFO order? For me, it's working as LIFO
  which
  is bad if I intend to send sequential message (message 1 needs to go
  first,
  but since message 2 comes later, it goes out first).
 
  Is there a way to make it operate in FIFO sequence, like ID'ing the
  messages
  or something?
 
  Regards,
  Hamza



 



Re: SQLBOX working - LIFO or FIFO

2013-11-12 Thread ha...@aeon.pk
This is OK if SMSC does the re-ordering for congestion or some other
reasons. But my concern is that messages should at least leave bbox in the
same order by which they left the application.

Since kannel is not giving me a proper method to sequence the messages, I
am forced to use SLEEP method in PHP programming. It is hanging my server
horribly in the presence of big traffic, choking both HTTP web server
connections as well as backend database. I would be happy to find some/any
method to maintain the sequence of msgs in kannel in FIFO order.


On Tue, Nov 12, 2013 at 7:38 PM, Rene Kluwen rene.klu...@chimit.nl wrote:

 But having said the below, sms messages are not guaranteed to arrive in a
 particular order.

 The remote smsc may still send out message 2 first, even when they
 received message 1 first.



 *From:* users [mailto:users-boun...@kannel.org] *On Behalf Of *Rene Kluwen
 *Sent:* dinsdag 12 november 2013 15:35
 *To:* ha...@aeon.pk; 'spameden'
 *Cc:* 'kannel users'
 *Subject:* RE: SQLBOX working - LIFO or FIFO



 There’s a ‘priority’ field in the Msg structure.

 I think it serves for the purpose that you want to.

 Just it’s you cannot set it in the send_sms table. Not sure why, but
 probably the field was added later.

 It shouldn’t be difficult to add though if anyone wants to send in a patch.



 == Rene



 *From:* users [mailto:users-boun...@kannel.org users-boun...@kannel.org]
 *On Behalf Of *ha...@aeon.pk
 *Sent:* dinsdag 12 november 2013 15:28
 *To:* spameden
 *Cc:* kannel users
 *Subject:* Re: SQLBOX working - LIFO or FIFO



 Actually, if my understanding is correct (i.e. SQLBOX is already doing the
 right thing by giving messages in FIFO order to bbox, but bbox is shuffling
 the outgoing messages from within its buffer), then there is no point of
 adding priority column.



 What do you say?



 On Tue, Nov 12, 2013 at 6:28 PM, spameden spame...@gmail.com wrote:

 For priority I'd suggest adding a column called priority (typically
 int(3) integer between 0 and 999) and doing ORDER by that column.

 Do not forget to add an index as well or it might slow things down!

 2013/11/12 ha...@aeon.pk ha...@aeon.pk:

  Hi,
 
  Many thanks. I tried and tested it. It works fine for small chunks of
 data
  (I can see SMS going out of bbox in a sequence they were entered in
 send_sms
  table). However, for large amount of data (e.g. I sent a bulk of 20k SMS
 via
  SQLBOX), it does not follow the same rule. Is it bearerbox which shuffles
  the order of the SMS present in its buffer (not SQLBOX)? Any
  thoughts/experiences?
 
  Is there any parameter tweak in send_sms by which I could raise the
 priority
  of some SMS higher than others?
 
  Regards,
 
 
 
  On Mon, Nov 11, 2013 at 9:23 PM, spameden spame...@gmail.com wrote:
 
  Yes you can do this.
 
  Just alter gw/mysql_sqlbox.h and edit
 
  #define SQLBOX_MYSQL_SELECT_QUERY
 
  add there ORDER by sql_id ASC :)
 
  2013/11/11 ha...@aeon.pk ha...@aeon.pk:
   Hi,
  
   Does SQLBOX work in LIFO or FIFO order? For me, it's working as LIFO
   which
   is bad if I intend to send sequential message (message 1 needs to go
   first,
   but since message 2 comes later, it goes out first).
  
   Is there a way to make it operate in FIFO sequence, like ID'ing the
   messages
   or something?
  
   Regards,
   Hamza
 
 





RE: DLR NOT UPDATED

2013-11-12 Thread Rene Kluwen
Do you see the dlr coming in, in your bearerbox logs?

 

From: users [mailto:users-boun...@kannel.org] On Behalf Of Rene Kluwen
Sent: dinsdag 12 november 2013 14:58
To: 'Willy Mularto'; 'خان ابو زید'
Cc: users@kannel.org
Subject: RE: DLR NOT UPDATED

 

Dear Khan,

 

I just tried your insert query and it worked for me.

I got both the dlr-status = 8 and the dlr-status = 1.

 

Maybe your Trans001 smsc doesn’t support delivery reports to that destination.

 

=+= Rene

 

 

From: users [mailto:users-boun...@kannel.org] On Behalf Of Willy Mularto
Sent: maandag 11 november 2013 13:56
To: خان ابو زید
Cc: kannel users@kannel.org
Subject: Re: DLR NOT UPDATED

 

Read the user guide about dlr-mask.  

 

1=DLVRD

2=FAILED

4=BUFFERED

8=ACK

16=REJECTED

 

If you want to get update for DLVRD, FAILED, ACK then it means 1+2+8=11

 

 

 

Willy Mularto

SMS Gateway, Content Provider, Mobile Solution Specialist

M: +62811923464, +62818923464

PIN BBM: 74924429

 

 

 

On Nov 11, 2013, at 6:24 PM, خان ابو زید khan.abuz...@gmail.com wrote:

 

Dear Team,

 

I installed successfully kannel 1.5.0,sqlbox in my centos 6.4 VPS system.

I successfully start kannel in this sequence,  

1)/usr/local/kannel/sbin/bearerbox -v 0 /etc/kannel/kannel.conf

2)/usr/local/sbin/sqlbox -v 0 /etc/kannel/sqlbox.conf

3)/usr/local/kannel/sbin/smsbox -v 0 /etc/kannel/kannel.conf

 

Problem is that only ACK/ is received dlr_mask =8 getting.

message is delivered but dlr not updated.

 

My insert query :

 

INSERT INTO send_sms (  momt, sender, receiver, msgdata, sms_type, 
smsc_id,dlr_mask,dlr_url,boxc_id,coding) 

VALUES (  'MT', 'MOBLGI', '+919594092200 tel:%2B919594092200 ', 'TEST SMS', 
2,'Trans001',31,'uinque msg id','sqlbox',0);

 

 

 

My config file.

kannel.conf

group = core

admin-port = 13003

smsbox-port = 13016

admin-password = *

status-password = *

log-file = /var/log/kannel/kannel.log

log-level = 0

access-log = /var/log/kannel/access.log

store-type = spool

store-location = /var/log/kannel/spool

sms-resend-retry = 3

dlr-storage = mysql

smsbox-max-pending = 5

 

group = smsbox

bearerbox-host = localhost

bearerbox-port = 13020

sendsms-port = 13013

log-file = /var/log/kannel/smsbox.log

access-log = /var/log/kannel/access.log

log-level = 3

#mo-recode=true

#max-pending-requests = 2

 

group = smsbox-route

smsbox-id = sqlbox

smsc-id = Trans001

 

group = sendsms-user

username = abuzaid

password = 

#max-messages = 5

#concatenation = true

 

group=smsc

smsc=smpp

smsc-id=Trans001

allowed-smsc-id = Trans001

host = 121.241.242.121

port = 2351

transceiver-mode = 1

receive-port = 2351 

log-file = /var/log/kannel/Trans001.log

log-level = 0

smsc-username = *

smsc-password = *

msg-id-type = 0x00

source-addr-ton = 5

source-addr-npi = 9

dest-addr-ton = 1

dest-addr-npi = 1

enquire-link-interval = 60

system-type = default

reconnect-delay = 60

 

#Mysql Connection

group = mysql-connection

id = mydlr

host = localhost

username = root

password = mob@123

database = websms

max-connections = 10

 

#DLR Table Structure

group = dlr-db

id = mydlr

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 = boxc

 

sqlbox.conf

group = sqlbox

id = sqlbox-db

smsbox-id = sqlbox

bearerbox-host = localhost

bearerbox-port = 13016

smsbox-port = 13020

smsbox-port-ssl = false

sql-log-table = sent_sms

sql-insert-table = send_sms

log-file = /var/log/kannel/kannel-sqlbox.log

log-level = 0

 

group = mysql-connection

id = sqlbox-db

host = localhost

username = root

password = 

database = testsms

 

-- 

Regards

Khan Abuzaid
Mob# :09664541886/9594092200
Mumbai

 



RE: SQLBOX working - LIFO or FIFO

2013-11-12 Thread Rene Kluwen
If you are going to fiddle with your php code anyhow.

A possible solution is to send message 2 whenever the dlr with status = 8
arrives.

You don't need a sleep then and you will be sure that the message has been
sent out before sending the next one.

 

Just an idea.

 

== Rene

 

 

From: ha...@aeon.pk [mailto:ha...@aeon.pk] 
Sent: dinsdag 12 november 2013 15:51
To: Rene Kluwen
Cc: spameden; kannel users
Subject: Re: SQLBOX working - LIFO or FIFO

 

This is OK if SMSC does the re-ordering for congestion or some other
reasons. But my concern is that messages should at least leave bbox in the
same order by which they left the application.

 

Since kannel is not giving me a proper method to sequence the messages, I am
forced to use SLEEP method in PHP programming. It is hanging my server
horribly in the presence of big traffic, choking both HTTP web server
connections as well as backend database. I would be happy to find some/any
method to maintain the sequence of msgs in kannel in FIFO order.

 

On Tue, Nov 12, 2013 at 7:38 PM, Rene Kluwen rene.klu...@chimit.nl wrote:

But having said the below, sms messages are not guaranteed to arrive in a
particular order.

The remote smsc may still send out message 2 first, even when they received
message 1 first.

 

From: users [mailto:users-boun...@kannel.org] On Behalf Of Rene Kluwen
Sent: dinsdag 12 november 2013 15:35
To: ha...@aeon.pk; 'spameden'
Cc: 'kannel users'
Subject: RE: SQLBOX working - LIFO or FIFO

 

There's a 'priority' field in the Msg structure.

I think it serves for the purpose that you want to.

Just it's you cannot set it in the send_sms table. Not sure why, but
probably the field was added later.

It shouldn't be difficult to add though if anyone wants to send in a patch.

 

== Rene

 

From: users [mailto:users-boun...@kannel.org] On Behalf Of ha...@aeon.pk
Sent: dinsdag 12 november 2013 15:28
To: spameden
Cc: kannel users
Subject: Re: SQLBOX working - LIFO or FIFO

 

Actually, if my understanding is correct (i.e. SQLBOX is already doing the
right thing by giving messages in FIFO order to bbox, but bbox is shuffling
the outgoing messages from within its buffer), then there is no point of
adding priority column.

 

What do you say?

 

On Tue, Nov 12, 2013 at 6:28 PM, spameden spame...@gmail.com wrote:

For priority I'd suggest adding a column called priority (typically
int(3) integer between 0 and 999) and doing ORDER by that column.

Do not forget to add an index as well or it might slow things down!

2013/11/12 ha...@aeon.pk ha...@aeon.pk:

 Hi,

 Many thanks. I tried and tested it. It works fine for small chunks of data
 (I can see SMS going out of bbox in a sequence they were entered in
send_sms
 table). However, for large amount of data (e.g. I sent a bulk of 20k SMS
via
 SQLBOX), it does not follow the same rule. Is it bearerbox which shuffles
 the order of the SMS present in its buffer (not SQLBOX)? Any
 thoughts/experiences?

 Is there any parameter tweak in send_sms by which I could raise the
priority
 of some SMS higher than others?

 Regards,



 On Mon, Nov 11, 2013 at 9:23 PM, spameden spame...@gmail.com wrote:

 Yes you can do this.

 Just alter gw/mysql_sqlbox.h and edit

 #define SQLBOX_MYSQL_SELECT_QUERY

 add there ORDER by sql_id ASC :)

 2013/11/11 ha...@aeon.pk ha...@aeon.pk:
  Hi,
 
  Does SQLBOX work in LIFO or FIFO order? For me, it's working as LIFO
  which
  is bad if I intend to send sequential message (message 1 needs to go
  first,
  but since message 2 comes later, it goes out first).
 
  Is there a way to make it operate in FIFO sequence, like ID'ing the
  messages
  or something?
 
  Regards,
  Hamza



 

 



Re: SQLBOX working - LIFO or FIFO

2013-11-12 Thread ha...@aeon.pk
Yup, I have tried this already. But enabling DLR with remote SMSC comes at
the cost of reducing the overall SMS sending speed by half. Meaning, if I
have a bandwidth of 100 SMS/sec, enabling DLR will actually give me 50
SMS/sec effective speed, with remaining speed being taken by DLRs.
Additionally, DLR handling will put more load on my DB, as well as
additional application DB reads (for checking status 8). On paper, it seems
like more performance sacrifice than the gain.


On Tue, Nov 12, 2013 at 7:57 PM, Rene Kluwen rene.klu...@chimit.nl wrote:

 If you are going to fiddle with your php code anyhow.

 A possible solution is to send message 2 whenever the dlr with status = 8
 arrives.

 You don’t need a sleep then and you will be sure that the message has been
 sent out before sending the next one.



 Just an idea.



 == Rene





 *From:* ha...@aeon.pk [mailto:ha...@aeon.pk]
 *Sent:* dinsdag 12 november 2013 15:51
 *To:* Rene Kluwen
 *Cc:* spameden; kannel users

 *Subject:* Re: SQLBOX working - LIFO or FIFO



 This is OK if SMSC does the re-ordering for congestion or some other
 reasons. But my concern is that messages should at least leave bbox in the
 same order by which they left the application.



 Since kannel is not giving me a proper method to sequence the messages, I
 am forced to use SLEEP method in PHP programming. It is hanging my server
 horribly in the presence of big traffic, choking both HTTP web server
 connections as well as backend database. I would be happy to find some/any
 method to maintain the sequence of msgs in kannel in FIFO order.



 On Tue, Nov 12, 2013 at 7:38 PM, Rene Kluwen rene.klu...@chimit.nl
 wrote:

 But having said the below, sms messages are not guaranteed to arrive in a
 particular order.

 The remote smsc may still send out message 2 first, even when they
 received message 1 first.



 *From:* users [mailto:users-boun...@kannel.org] *On Behalf Of *Rene Kluwen
 *Sent:* dinsdag 12 november 2013 15:35
 *To:* ha...@aeon.pk; 'spameden'
 *Cc:* 'kannel users'
 *Subject:* RE: SQLBOX working - LIFO or FIFO



 There’s a ‘priority’ field in the Msg structure.

 I think it serves for the purpose that you want to.

 Just it’s you cannot set it in the send_sms table. Not sure why, but
 probably the field was added later.

 It shouldn’t be difficult to add though if anyone wants to send in a patch.



 == Rene



 *From:* users [mailto:users-boun...@kannel.org users-boun...@kannel.org]
 *On Behalf Of *ha...@aeon.pk
 *Sent:* dinsdag 12 november 2013 15:28
 *To:* spameden
 *Cc:* kannel users
 *Subject:* Re: SQLBOX working - LIFO or FIFO



 Actually, if my understanding is correct (i.e. SQLBOX is already doing the
 right thing by giving messages in FIFO order to bbox, but bbox is shuffling
 the outgoing messages from within its buffer), then there is no point of
 adding priority column.



 What do you say?



 On Tue, Nov 12, 2013 at 6:28 PM, spameden spame...@gmail.com wrote:

 For priority I'd suggest adding a column called priority (typically
 int(3) integer between 0 and 999) and doing ORDER by that column.

 Do not forget to add an index as well or it might slow things down!

 2013/11/12 ha...@aeon.pk ha...@aeon.pk:

  Hi,
 
  Many thanks. I tried and tested it. It works fine for small chunks of
 data
  (I can see SMS going out of bbox in a sequence they were entered in
 send_sms
  table). However, for large amount of data (e.g. I sent a bulk of 20k SMS
 via
  SQLBOX), it does not follow the same rule. Is it bearerbox which shuffles
  the order of the SMS present in its buffer (not SQLBOX)? Any
  thoughts/experiences?
 
  Is there any parameter tweak in send_sms by which I could raise the
 priority
  of some SMS higher than others?
 
  Regards,
 
 
 
  On Mon, Nov 11, 2013 at 9:23 PM, spameden spame...@gmail.com wrote:
 
  Yes you can do this.
 
  Just alter gw/mysql_sqlbox.h and edit
 
  #define SQLBOX_MYSQL_SELECT_QUERY
 
  add there ORDER by sql_id ASC :)
 
  2013/11/11 ha...@aeon.pk ha...@aeon.pk:
   Hi,
  
   Does SQLBOX work in LIFO or FIFO order? For me, it's working as LIFO
   which
   is bad if I intend to send sequential message (message 1 needs to go
   first,
   but since message 2 comes later, it goes out first).
  
   Is there a way to make it operate in FIFO sequence, like ID'ing the
   messages
   or something?
  
   Regards,
   Hamza
 
 







'Service not found' issue in smsbox logs

2013-11-12 Thread ha...@aeon.pk
Hi,

In high traffic conditions, I am often getting this error in smsbox logs:

2013-11-12 20:03:18 SMS HTTP-request sender:+X request: 'Service
not found.' url: '' reply: -1 ''

While the service is very much in place and working for small traffic
loads, I need to understand what's going wrong. Am I running out of HTTP
connections on the web server when this message comes?

Regards,
Hamza


Re: SQLBOX working - LIFO or FIFO

2013-11-12 Thread Sebastian Sastre
Just an idea ...

Detach the sms process from the apache or HTTP connections.

In other words, change your php script to a daemon that keeps running on
the background. Then queue your http request into a table and use the
daemon to scan that that table and process the request.

You can easily do an ajax call on your http that just refreshes from the
queue db, this will be both easier on your DB and easier on your apache.

To change your php script to a daemon use
http://pear.php.net/package/System_Daemon

hope it helps.






On Tue, Nov 12, 2013 at 9:57 AM, Rene Kluwen rene.klu...@chimit.nl wrote:

 If you are going to fiddle with your php code anyhow.

 A possible solution is to send message 2 whenever the dlr with status = 8
 arrives.

 You don’t need a sleep then and you will be sure that the message has been
 sent out before sending the next one.



 Just an idea.



 == Rene





 *From:* ha...@aeon.pk [mailto:ha...@aeon.pk]
 *Sent:* dinsdag 12 november 2013 15:51
 *To:* Rene Kluwen
 *Cc:* spameden; kannel users
 *Subject:* Re: SQLBOX working - LIFO or FIFO



 This is OK if SMSC does the re-ordering for congestion or some other
 reasons. But my concern is that messages should at least leave bbox in the
 same order by which they left the application.



 Since kannel is not giving me a proper method to sequence the messages, I
 am forced to use SLEEP method in PHP programming. It is hanging my server
 horribly in the presence of big traffic, choking both HTTP web server
 connections as well as backend database. I would be happy to find some/any
 method to maintain the sequence of msgs in kannel in FIFO order.



 On Tue, Nov 12, 2013 at 7:38 PM, Rene Kluwen rene.klu...@chimit.nl
 wrote:

 But having said the below, sms messages are not guaranteed to arrive in a
 particular order.

 The remote smsc may still send out message 2 first, even when they
 received message 1 first.



 *From:* users [mailto:users-boun...@kannel.org] *On Behalf Of *Rene Kluwen
 *Sent:* dinsdag 12 november 2013 15:35
 *To:* ha...@aeon.pk; 'spameden'
 *Cc:* 'kannel users'
 *Subject:* RE: SQLBOX working - LIFO or FIFO



 There’s a ‘priority’ field in the Msg structure.

 I think it serves for the purpose that you want to.

 Just it’s you cannot set it in the send_sms table. Not sure why, but
 probably the field was added later.

 It shouldn’t be difficult to add though if anyone wants to send in a patch.



 == Rene



 *From:* users [mailto:users-boun...@kannel.org users-boun...@kannel.org]
 *On Behalf Of *ha...@aeon.pk
 *Sent:* dinsdag 12 november 2013 15:28
 *To:* spameden
 *Cc:* kannel users
 *Subject:* Re: SQLBOX working - LIFO or FIFO



 Actually, if my understanding is correct (i.e. SQLBOX is already doing the
 right thing by giving messages in FIFO order to bbox, but bbox is shuffling
 the outgoing messages from within its buffer), then there is no point of
 adding priority column.



 What do you say?



 On Tue, Nov 12, 2013 at 6:28 PM, spameden spame...@gmail.com wrote:

 For priority I'd suggest adding a column called priority (typically
 int(3) integer between 0 and 999) and doing ORDER by that column.

 Do not forget to add an index as well or it might slow things down!

 2013/11/12 ha...@aeon.pk ha...@aeon.pk:

  Hi,
 
  Many thanks. I tried and tested it. It works fine for small chunks of
 data
  (I can see SMS going out of bbox in a sequence they were entered in
 send_sms
  table). However, for large amount of data (e.g. I sent a bulk of 20k SMS
 via
  SQLBOX), it does not follow the same rule. Is it bearerbox which shuffles
  the order of the SMS present in its buffer (not SQLBOX)? Any
  thoughts/experiences?
 
  Is there any parameter tweak in send_sms by which I could raise the
 priority
  of some SMS higher than others?
 
  Regards,
 
 
 
  On Mon, Nov 11, 2013 at 9:23 PM, spameden spame...@gmail.com wrote:
 
  Yes you can do this.
 
  Just alter gw/mysql_sqlbox.h and edit
 
  #define SQLBOX_MYSQL_SELECT_QUERY
 
  add there ORDER by sql_id ASC :)
 
  2013/11/11 ha...@aeon.pk ha...@aeon.pk:
   Hi,
  
   Does SQLBOX work in LIFO or FIFO order? For me, it's working as LIFO
   which
   is bad if I intend to send sequential message (message 1 needs to go
   first,
   but since message 2 comes later, it goes out first).
  
   Is there a way to make it operate in FIFO sequence, like ID'ing the
   messages
   or something?
  
   Regards,
   Hamza
 
 







RE: SQLBOX working - LIFO or FIFO

2013-11-12 Thread Ghulam Mustafa /HQ/NW/Network Engineer
20k SMS will take few seconds then why worry about the sequence since DLR is 
not available and operator is not going to obey your sequnce/order at all.


Sent from Samsung Mobile


 Original message 
From: ha...@aeon.pk
Date:12/11/2013 8:03 PM (GMT+05:00)
To: Rene Kluwen
Cc: kannel users
Subject: Re: SQLBOX working - LIFO or FIFO

Yup, I have tried this already. But enabling DLR with remote SMSC comes at the 
cost of reducing the overall SMS sending speed by half. Meaning, if I have a 
bandwidth of 100 SMS/sec, enabling DLR will actually give me 50 SMS/sec 
effective speed, with remaining speed being taken by DLRs. Additionally, DLR 
handling will put more load on my DB, as well as additional application DB 
reads (for checking status 8). On paper, it seems like more performance 
sacrifice than the gain.


On Tue, Nov 12, 2013 at 7:57 PM, Rene Kluwen 
rene.klu...@chimit.nlmailto:rene.klu...@chimit.nl wrote:
If you are going to fiddle with your php code anyhow.
A possible solution is to send message 2 whenever the dlr with status = 8 
arrives.
You don’t need a sleep then and you will be sure that the message has been sent 
out before sending the next one.

Just an idea.

== Rene


From: ha...@aeon.pkmailto:ha...@aeon.pk 
[mailto:ha...@aeon.pkmailto:ha...@aeon.pk]
Sent: dinsdag 12 november 2013 15:51
To: Rene Kluwen
Cc: spameden; kannel users

Subject: Re: SQLBOX working - LIFO or FIFO

This is OK if SMSC does the re-ordering for congestion or some other reasons. 
But my concern is that messages should at least leave bbox in the same order by 
which they left the application.

Since kannel is not giving me a proper method to sequence the messages, I am 
forced to use SLEEP method in PHP programming. It is hanging my server horribly 
in the presence of big traffic, choking both HTTP web server connections as 
well as backend database. I would be happy to find some/any method to maintain 
the sequence of msgs in kannel in FIFO order.

On Tue, Nov 12, 2013 at 7:38 PM, Rene Kluwen 
rene.klu...@chimit.nlmailto:rene.klu...@chimit.nl wrote:
But having said the below, sms messages are not guaranteed to arrive in a 
particular order.
The remote smsc may still send out message 2 first, even when they received 
message 1 first.

From: users [mailto:users-boun...@kannel.orgmailto:users-boun...@kannel.org] 
On Behalf Of Rene Kluwen
Sent: dinsdag 12 november 2013 15:35
To: ha...@aeon.pkmailto:ha...@aeon.pk; 'spameden'
Cc: 'kannel users'
Subject: RE: SQLBOX working - LIFO or FIFO

There’s a ‘priority’ field in the Msg structure.
I think it serves for the purpose that you want to.
Just it’s you cannot set it in the send_sms table. Not sure why, but probably 
the field was added later.
It shouldn’t be difficult to add though if anyone wants to send in a patch.

== Rene

From: users [mailto:users-boun...@kannel.org] On Behalf Of 
ha...@aeon.pkmailto:ha...@aeon.pk
Sent: dinsdag 12 november 2013 15:28
To: spameden
Cc: kannel users
Subject: Re: SQLBOX working - LIFO or FIFO

Actually, if my understanding is correct (i.e. SQLBOX is already doing the 
right thing by giving messages in FIFO order to bbox, but bbox is shuffling the 
outgoing messages from within its buffer), then there is no point of adding 
priority column.

What do you say?

On Tue, Nov 12, 2013 at 6:28 PM, spameden 
spame...@gmail.commailto:spame...@gmail.com wrote:
For priority I'd suggest adding a column called priority (typically
int(3) integer between 0 and 999) and doing ORDER by that column.

Do not forget to add an index as well or it might slow things down!

2013/11/12 ha...@aeon.pkmailto:ha...@aeon.pk 
ha...@aeon.pkmailto:ha...@aeon.pk:
 Hi,

 Many thanks. I tried and tested it. It works fine for small chunks of data
 (I can see SMS going out of bbox in a sequence they were entered in send_sms
 table). However, for large amount of data (e.g. I sent a bulk of 20k SMS via
 SQLBOX), it does not follow the same rule. Is it bearerbox which shuffles
 the order of the SMS present in its buffer (not SQLBOX)? Any
 thoughts/experiences?

 Is there any parameter tweak in send_sms by which I could raise the priority
 of some SMS higher than others?

 Regards,



 On Mon, Nov 11, 2013 at 9:23 PM, spameden 
 spame...@gmail.commailto:spame...@gmail.com wrote:

 Yes you can do this.

 Just alter gw/mysql_sqlbox.h and edit

 #define SQLBOX_MYSQL_SELECT_QUERY

 add there ORDER by sql_id ASC :)

 2013/11/11 ha...@aeon.pkmailto:ha...@aeon.pk 
 ha...@aeon.pkmailto:ha...@aeon.pk:
  Hi,
 
  Does SQLBOX work in LIFO or FIFO order? For me, it's working as LIFO
  which
  is bad if I intend to send sequential message (message 1 needs to go
  first,
  but since message 2 comes later, it goes out first).
 
  Is there a way to make it operate in FIFO sequence, like ID'ing the
  messages
  or something?
 
  Regards,
  Hamza








Re: Routing DLR to ESME using OpenSMPPBox

2013-11-12 Thread Amir Mahmoud
Hello Rene,
Thanks a lot for you reply.

below is my configuration files followed by sample of the logs, please let
me know for any further details.

*Configuration Files*

*1)**Kannel.conf*

#-

# core setup



group = core

admin-port = 13000

smsbox-port = 13001

wapbox-port = 13002

admin-password = admin123456

status-password = admin123456

wdp-interface-name = *

log-file = /usr/local/kannel/bearerbox.log

log-level = 3

access-log = /usr/local/kannel/bearerboxaccess.log

store-type = spool

store-location = /usr/local/kannel/store

store-dump-freq = 60

#-

# smsc setup



group = smsc

smsc = smpp

smsc-id = VFSMPP1

host = x.x.x.x

port = 

smsc-username = 

smsc-password = xxx

system-type = 

address-range = 

dest-addr-ton=1

dest-addr-npi=1

interface-version = 34

enquire-link-interval = 25

reconnect-delay = 15

transceiver-mode = 1

#max-pending-submits = 8

throughput = 6

#-

# smsbox setup



group = smsbox

smsbox-id = smsbox1

bearerbox-host = 127.0.0.1

sendsms-port = 13013

sendsms-chars = 0123456789 +-

log-file = /usr/local/kannel/smsbox.log

log-level = 3

access-log = /usr/local/kannel/smsboxaccess.log

mo-recode = true

http-request-retry = 1000

max-pending-requests = 33000

#-

# smsbox-route setup



group = smsbox-route

smsbox-id = ops

smsc-id = VFSMPP1







*2)**OpenSMPPBox.conf*

#--

group = core

dlr-storage = mysql



group = opensmppbox

bearerbox-host = 127.0.0.1

bearerbox-port = 13005

opensmppbox-id = opensmppbox1

opensmppbox-port = 13003

log-file = /usr/local/kannel/smppbox.log

our-system-id = opensmppbox1

use-systemid-as-smsboxid = true

smpp-logins = /usr/local/kannel/smpplogins.txt

box-dlr-storage = mysql



group = mysql-connection
id = mydlr
host = localhost
username = 
password = 
database = kannel
max-connections = 2

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







*3)**smpplogins.txt*

ops testpw smsc1 *.*.*.*







*4)**SQLBox.conf*

#--

group = sqlbox

id = sqlbox-db

smsbox-id = sqlbox

global-sender = 

bearerbox-host = 127.0.0.1

bearerbox-port = 13001

smsbox-port = 13005

smsbox-port-ssl = false

sql-log-table = sent_sms

sql-insert-table = send_sms

log-file = /usr/local/kannel/kannel-sqlbox.log



# MYSQL Connection

group = mysql-connection

id = sqlbox-db

host = localhost

username = 

password = 

database = mysqlbox


Error Log Sample



2013-10-29 17:59:02 [29615] [1] DEBUG: DLR[mysql]: Looking for DLR
smsc=ops, ts=be18a733, dst=201068827073, type=1
2013-10-29 17:59:02 [29615] [1] DEBUG: sql: SELECT `mask`, `service`,
`url`, `source`, `destination`, `boxc` FROM `dlr` WHERE `smsc`=? AND
`ts`=?  LIMIT 1
2013-10-29 17:59:02 [29615] [1] DEBUG: column=mask buffer_type=3
max_length=0 length=10
2013-10-29 17:59:02 [29615] [1] DEBUG: column=service buffer_type=253
max_length=0 length=40
2013-10-29 17:59:02 [29615] [1] DEBUG: column=url buffer_type=253
max_length=0 length=255
2013-10-29 17:59:02 [29615] [1] DEBUG: column=source buffer_type=253
max_length=0 length=40
2013-10-29 17:59:02 [29615] [1] DEBUG: column=destination
buffer_type=253 max_length=0 length=40
2013-10-29 17:59:02 [29615] [1] DEBUG: column=boxc buffer_type=253
max_length=0 length=40
2013-10-29 17:59:02 [29615] [1] WARNING: DLR[mysql]: DLR from
SMSCops for DST201068827073 not found.
2013-10-29 17:59:02 [29615] [1] WARNING: opensmppbox: msg_to_pdu: no
msg corresponding dlr, ignoring
2013-10-29 17:59:02 [29615] [1] WARNING: msg_to_pdu failed, sending
negative ack


On Tue, Nov 12, 2013 at 4:08 PM, Rene Kluwen rene.klu...@chimit.nl wrote:

 It should route automatically.

 Could you share your logs?



 *From:* users [mailto:users-boun...@kannel.org] *On Behalf Of *Amir
 Mahmoud
 *Sent:* maandag 28 oktober 2013 20:38
 *To:* users
 *Subject:* Routing DLR to ESME using OpenSMPPBox



 Dears,



 I have configured my servers to send from ESME to SMSC through
 OpenSMPPBox, i have applied the below flow

 ESME -- OpenSMPPBox -- SQLBox --Bearerbox -- SMSC



 I have succeeded in sending the sms from ESME to the SMSC but my problem
 is related to the DLR.

 The Bearerbox actually received the DLR from the SMSC but it didn't route
 it to the ESME.



 What is the required configurations that could resolve the above issue. i
 need to route the DLR to the ESME



 Your help in this regard is highly appreciated and thanks in advance.



 Below are my config files,



 *** Kannel.conf 

 #-

 # core setup



 group 

RE: SQLBOX working - LIFO or FIFO

2013-11-12 Thread Rene Kluwen
Also: If you are just enabling dlr = 8 and not dlr = 1, then it is not going
to take any bandwidth with your provider.

== Rene

-Original Message-
From: Ghulam Mustafa /HQ/NW/Network Engineer [mailto:g.must...@nadra.gov.pk]

Sent: dinsdag 12 november 2013 16:53
To: ha...@aeon.pk; Rene Kluwen
Cc: kannel users
Subject: RE: SQLBOX working - LIFO or FIFO

20k SMS will take few seconds then why worry about the sequence since DLR is
not available and operator is not going to obey your sequnce/order at all.


Sent from Samsung Mobile


 Original message 
From: ha...@aeon.pk
Date:12/11/2013 8:03 PM (GMT+05:00)
To: Rene Kluwen
Cc: kannel users
Subject: Re: SQLBOX working - LIFO or FIFO

Yup, I have tried this already. But enabling DLR with remote SMSC comes at
the cost of reducing the overall SMS sending speed by half. Meaning, if I
have a bandwidth of 100 SMS/sec, enabling DLR will actually give me 50
SMS/sec effective speed, with remaining speed being taken by DLRs.
Additionally, DLR handling will put more load on my DB, as well as
additional application DB reads (for checking status 8). On paper, it seems
like more performance sacrifice than the gain.


On Tue, Nov 12, 2013 at 7:57 PM, Rene Kluwen
rene.klu...@chimit.nlmailto:rene.klu...@chimit.nl wrote:
If you are going to fiddle with your php code anyhow.
A possible solution is to send message 2 whenever the dlr with status = 8
arrives.
You don't need a sleep then and you will be sure that the message has been
sent out before sending the next one.

Just an idea.

== Rene


From: ha...@aeon.pkmailto:ha...@aeon.pk
[mailto:ha...@aeon.pkmailto:ha...@aeon.pk]
Sent: dinsdag 12 november 2013 15:51
To: Rene Kluwen
Cc: spameden; kannel users

Subject: Re: SQLBOX working - LIFO or FIFO

This is OK if SMSC does the re-ordering for congestion or some other
reasons. But my concern is that messages should at least leave bbox in the
same order by which they left the application.

Since kannel is not giving me a proper method to sequence the messages, I am
forced to use SLEEP method in PHP programming. It is hanging my server
horribly in the presence of big traffic, choking both HTTP web server
connections as well as backend database. I would be happy to find some/any
method to maintain the sequence of msgs in kannel in FIFO order.

On Tue, Nov 12, 2013 at 7:38 PM, Rene Kluwen
rene.klu...@chimit.nlmailto:rene.klu...@chimit.nl wrote:
But having said the below, sms messages are not guaranteed to arrive in a
particular order.
The remote smsc may still send out message 2 first, even when they received
message 1 first.

From: users
[mailto:users-boun...@kannel.orgmailto:users-boun...@kannel.org] On Behalf
Of Rene Kluwen
Sent: dinsdag 12 november 2013 15:35
To: ha...@aeon.pkmailto:ha...@aeon.pk; 'spameden'
Cc: 'kannel users'
Subject: RE: SQLBOX working - LIFO or FIFO

There's a 'priority' field in the Msg structure.
I think it serves for the purpose that you want to.
Just it's you cannot set it in the send_sms table. Not sure why, but
probably the field was added later.
It shouldn't be difficult to add though if anyone wants to send in a patch.

== Rene

From: users [mailto:users-boun...@kannel.org] On Behalf Of
ha...@aeon.pkmailto:ha...@aeon.pk
Sent: dinsdag 12 november 2013 15:28
To: spameden
Cc: kannel users
Subject: Re: SQLBOX working - LIFO or FIFO

Actually, if my understanding is correct (i.e. SQLBOX is already doing the
right thing by giving messages in FIFO order to bbox, but bbox is shuffling
the outgoing messages from within its buffer), then there is no point of
adding priority column.

What do you say?

On Tue, Nov 12, 2013 at 6:28 PM, spameden
spame...@gmail.commailto:spame...@gmail.com wrote:
For priority I'd suggest adding a column called priority (typically
int(3) integer between 0 and 999) and doing ORDER by that column.

Do not forget to add an index as well or it might slow things down!

2013/11/12 ha...@aeon.pkmailto:ha...@aeon.pk
ha...@aeon.pkmailto:ha...@aeon.pk:
 Hi,

 Many thanks. I tried and tested it. It works fine for small chunks of 
 data (I can see SMS going out of bbox in a sequence they were entered 
 in send_sms table). However, for large amount of data (e.g. I sent a 
 bulk of 20k SMS via SQLBOX), it does not follow the same rule. Is it 
 bearerbox which shuffles the order of the SMS present in its buffer 
 (not SQLBOX)? Any thoughts/experiences?

 Is there any parameter tweak in send_sms by which I could raise the 
 priority of some SMS higher than others?

 Regards,



 On Mon, Nov 11, 2013 at 9:23 PM, spameden
spame...@gmail.commailto:spame...@gmail.com wrote:

 Yes you can do this.

 Just alter gw/mysql_sqlbox.h and edit

 #define SQLBOX_MYSQL_SELECT_QUERY

 add there ORDER by sql_id ASC :)

 2013/11/11 ha...@aeon.pkmailto:ha...@aeon.pk
ha...@aeon.pkmailto:ha...@aeon.pk:
  Hi,
 
  Does SQLBOX work in LIFO or FIFO order? For me, it's working as 
  LIFO which is bad if I intend to send sequential message (message 1 
  

RE: Routing DLR to ESME using OpenSMPPBox

2013-11-12 Thread Rene Kluwen
Are there even any entries in your dlr table? They should have accumulated
by now.

What is the sql type of your ts and destination field? Is it at least 12
characters or more?

 

== Rene

 

 

From: Amir Mahmoud [mailto:amir.mahm...@egyptlinx.com] 
Sent: dinsdag 12 november 2013 17:25
To: Rene Kluwen
Cc: users
Subject: Re: Routing DLR to ESME using OpenSMPPBox

 

Hello Rene,

Thanks a lot for you reply.

 

below is my configuration files followed by sample of the logs, please let
me know for any further details.

 

Configuration Files

1)Kannel.conf

#-

# core setup

 

group = core

admin-port = 13000

smsbox-port = 13001

wapbox-port = 13002

admin-password = admin123456

status-password = admin123456

wdp-interface-name = *

log-file = /usr/local/kannel/bearerbox.log

log-level = 3

access-log = /usr/local/kannel/bearerboxaccess.log

store-type = spool

store-location = /usr/local/kannel/store

store-dump-freq = 60

#-

# smsc setup

 

group = smsc

smsc = smpp

smsc-id = VFSMPP1

host = x.x.x.x

port = 

smsc-username = 

smsc-password = xxx

system-type = 

address-range = 

dest-addr-ton=1

dest-addr-npi=1

interface-version = 34

enquire-link-interval = 25

reconnect-delay = 15

transceiver-mode = 1

#max-pending-submits = 8

throughput = 6

#-

# smsbox setup

 

group = smsbox

smsbox-id = smsbox1

bearerbox-host = 127.0.0.1

sendsms-port = 13013

sendsms-chars = 0123456789 +-

log-file = /usr/local/kannel/smsbox.log

log-level = 3

access-log = /usr/local/kannel/smsboxaccess.log

mo-recode = true

http-request-retry = 1000

max-pending-requests = 33000

#-

# smsbox-route setup

 

group = smsbox-route

smsbox-id = ops

smsc-id = VFSMPP1

 

 

 

2)OpenSMPPBox.conf

#--

group = core

dlr-storage = mysql

 

group = opensmppbox

bearerbox-host = 127.0.0.1

bearerbox-port = 13005

opensmppbox-id = opensmppbox1

opensmppbox-port = 13003

log-file = /usr/local/kannel/smppbox.log

our-system-id = opensmppbox1

use-systemid-as-smsboxid = true

smpp-logins = /usr/local/kannel/smpplogins.txt

box-dlr-storage = mysql

 

group = mysql-connection
id = mydlr
host = localhost
username = 
password = 
database = kannel
max-connections = 2

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

 

 

 

3)smpplogins.txt

ops testpw smsc1 *.*.*.*

 

 

 

4)SQLBox.conf

#--

group = sqlbox

id = sqlbox-db

smsbox-id = sqlbox

global-sender = 

bearerbox-host = 127.0.0.1

bearerbox-port = 13001

smsbox-port = 13005

smsbox-port-ssl = false

sql-log-table = sent_sms

sql-insert-table = send_sms

log-file = /usr/local/kannel/kannel-sqlbox.log

 

# MYSQL Connection

group = mysql-connection

id = sqlbox-db

host = localhost

username = 

password = 

database = mysqlbox

 

Error Log Sample

 

2013-10-29 17:59:02 [29615] [1] DEBUG: DLR[mysql]: Looking for DLR
smsc=ops, ts=be18a733, dst=201068827073, type=1
2013-10-29 17:59:02 [29615] [1] DEBUG: sql: SELECT `mask`, `service`,
`url`, `source`, `destination`, `boxc` FROM `dlr` WHERE `smsc`=? AND
`ts`=?  LIMIT 1
2013-10-29 17:59:02 [29615] [1] DEBUG: column=mask buffer_type=3
max_length=0 length=10
2013-10-29 17:59:02 [29615] [1] DEBUG: column=service buffer_type=253
max_length=0 length=40
2013-10-29 17:59:02 [29615] [1] DEBUG: column=url buffer_type=253
max_length=0 length=255
2013-10-29 17:59:02 [29615] [1] DEBUG: column=source buffer_type=253
max_length=0 length=40
2013-10-29 17:59:02 [29615] [1] DEBUG: column=destination
buffer_type=253 max_length=0 length=40
2013-10-29 17:59:02 [29615] [1] DEBUG: column=boxc buffer_type=253
max_length=0 length=40
2013-10-29 17:59:02 [29615] [1] WARNING: DLR[mysql]: DLR from
SMSCops for DST201068827073 not found.
2013-10-29 17:59:02 [29615] [1] WARNING: opensmppbox: msg_to_pdu: no
msg corresponding dlr, ignoring
2013-10-29 17:59:02 [29615] [1] WARNING: msg_to_pdu failed, sending negative
ack

 

On Tue, Nov 12, 2013 at 4:08 PM, Rene Kluwen rene.klu...@chimit.nl wrote:

It should route automatically.

Could you share your logs?

 

From: users [mailto:users-boun...@kannel.org] On Behalf Of Amir Mahmoud
Sent: maandag 28 oktober 2013 20:38
To: users
Subject: Routing DLR to ESME using OpenSMPPBox

 

Dears,

 

I have configured my servers to send from ESME to SMSC through OpenSMPPBox,
i have applied the below flow

ESME -- OpenSMPPBox -- SQLBox --Bearerbox -- SMSC

 

I have succeeded in sending the sms from ESME to the SMSC but my problem is
related to the DLR.

The Bearerbox actually received the DLR from the SMSC but it didn't route 

Re: SQLBOX working - LIFO or FIFO

2013-11-12 Thread ha...@aeon.pk
20k is just an example batch I am trying to play around in order to find
the solution. My actual bulk is in millions.

As for sequence, the application logic is such that it should first send an
intro message to the user and then send the actual content message. The
intro message has to go before content, else the effectiveness of content
message is compromised because of less user response. It makes less sense
if the content message reaches the user first and the intro message is
coming later.

In my experience, operator SMSCs hardly ever change the order of the
messages, unless there is some problem. For 99.99% of the time, the message
sequence to the end users are the same in which I have sent it to the SMSC.



On Tue, Nov 12, 2013 at 8:52 PM, Ghulam Mustafa /HQ/NW/Network Engineer 
g.must...@nadra.gov.pk wrote:

 20k SMS will take few seconds then why worry about the sequence since DLR
 is not available and operator is not going to obey your sequnce/order at
 all.


 Sent from Samsung Mobile


  Original message 
 From: ha...@aeon.pk
 Date:12/11/2013 8:03 PM (GMT+05:00)
 To: Rene Kluwen
 Cc: kannel users
 Subject: Re: SQLBOX working - LIFO or FIFO

 Yup, I have tried this already. But enabling DLR with remote SMSC comes at
 the cost of reducing the overall SMS sending speed by half. Meaning, if I
 have a bandwidth of 100 SMS/sec, enabling DLR will actually give me 50
 SMS/sec effective speed, with remaining speed being taken by DLRs.
 Additionally, DLR handling will put more load on my DB, as well as
 additional application DB reads (for checking status 8). On paper, it seems
 like more performance sacrifice than the gain.


 On Tue, Nov 12, 2013 at 7:57 PM, Rene Kluwen rene.klu...@chimit.nl
 mailto:rene.klu...@chimit.nl wrote:
 If you are going to fiddle with your php code anyhow.
 A possible solution is to send message 2 whenever the dlr with status = 8
 arrives.
 You don’t need a sleep then and you will be sure that the message has been
 sent out before sending the next one.

 Just an idea.

 == Rene


 From: ha...@aeon.pkmailto:ha...@aeon.pk [mailto:ha...@aeon.pkmailto:
 ha...@aeon.pk]
 Sent: dinsdag 12 november 2013 15:51
 To: Rene Kluwen
 Cc: spameden; kannel users

 Subject: Re: SQLBOX working - LIFO or FIFO

 This is OK if SMSC does the re-ordering for congestion or some other
 reasons. But my concern is that messages should at least leave bbox in the
 same order by which they left the application.

 Since kannel is not giving me a proper method to sequence the messages, I
 am forced to use SLEEP method in PHP programming. It is hanging my server
 horribly in the presence of big traffic, choking both HTTP web server
 connections as well as backend database. I would be happy to find some/any
 method to maintain the sequence of msgs in kannel in FIFO order.

 On Tue, Nov 12, 2013 at 7:38 PM, Rene Kluwen rene.klu...@chimit.nl
 mailto:rene.klu...@chimit.nl wrote:
 But having said the below, sms messages are not guaranteed to arrive in a
 particular order.
 The remote smsc may still send out message 2 first, even when they
 received message 1 first.

 From: users [mailto:users-boun...@kannel.orgmailto:
 users-boun...@kannel.org] On Behalf Of Rene Kluwen
 Sent: dinsdag 12 november 2013 15:35
 To: ha...@aeon.pkmailto:ha...@aeon.pk; 'spameden'
 Cc: 'kannel users'
 Subject: RE: SQLBOX working - LIFO or FIFO

 There’s a ‘priority’ field in the Msg structure.
 I think it serves for the purpose that you want to.
 Just it’s you cannot set it in the send_sms table. Not sure why, but
 probably the field was added later.
 It shouldn’t be difficult to add though if anyone wants to send in a patch.

 == Rene

 From: users [mailto:users-boun...@kannel.org] On Behalf Of ha...@aeon.pk
 mailto:ha...@aeon.pk
 Sent: dinsdag 12 november 2013 15:28
 To: spameden
 Cc: kannel users
 Subject: Re: SQLBOX working - LIFO or FIFO

 Actually, if my understanding is correct (i.e. SQLBOX is already doing the
 right thing by giving messages in FIFO order to bbox, but bbox is shuffling
 the outgoing messages from within its buffer), then there is no point of
 adding priority column.

 What do you say?

 On Tue, Nov 12, 2013 at 6:28 PM, spameden spame...@gmail.commailto:
 spame...@gmail.com wrote:
 For priority I'd suggest adding a column called priority (typically
 int(3) integer between 0 and 999) and doing ORDER by that column.

 Do not forget to add an index as well or it might slow things down!

 2013/11/12 ha...@aeon.pkmailto:ha...@aeon.pk ha...@aeon.pkmailto:
 ha...@aeon.pk:
  Hi,
 
  Many thanks. I tried and tested it. It works fine for small chunks of
 data
  (I can see SMS going out of bbox in a sequence they were entered in
 send_sms
  table). However, for large amount of data (e.g. I sent a bulk of 20k SMS
 via
  SQLBOX), it does not follow the same rule. Is it bearerbox which shuffles
  the order of the SMS present in its buffer (not SQLBOX)? Any
  thoughts/experiences?
 
  Is there any parameter tweak 

Re: Sms reply.

2013-11-12 Thread ha...@aeon.pk
Set 'max-messages = 0' in your sms-service group (the one which contains
the keyword mapping to incoming traffic).


On Tue, Nov 12, 2013 at 7:12 PM, Rene Kluwen rene.klu...@chimit.nl wrote:

 Please share your logs.



 *From:* users [mailto:users-boun...@kannel.org] *On Behalf Of *Kelechi
 Micheals
 *Sent:* woensdag 16 oktober 2013 13:00
 *To:* users@kannel.org
 *Subject:* Sms reply.



 Dear friends,
 I have a working system. It recieves sms and processes well. However I
 noticed for every sms the server receives it sends a corresponding reply
 with the following message data could not fetch content, sorry. What
 could be responsible for this?



Re: SMSC-ID routing based on to/from on SMSBox?

2013-11-12 Thread ha...@aeon.pk
Can you explain your scenario with an example please? Would be easier to
understand what you need.


On Mon, Nov 11, 2013 at 11:56 PM, Porter, Kelvin kelvin.por...@h3net.comwrote:

 Hi,



 I am writing to insure that I have not overlooked an option.  In my
 application, I have a need to specify SMSC based on where the message is
 being sent to (the users will not specify the smsc in the HTTP request).
  Basically, I need to insure some MT destinations are treated differently
 that the others, independent of what is specified in the request.  I have
 looked at the source and it does not appear that this functionality is
 implemented.  Have I missed something?



 I am looking for something akin to the “smsc-route” option in the
 opensmppbox.  I may attempt to splice in this code from the opensmppbox, if
 I must.  Is there any interest in this functionality?



 Regards,



 Kelvin R. Porter







Re: Kannel disconnects with error Error reading from fd 21, won't reconnect

2013-11-12 Thread ha...@aeon.pk
Please check if your VPN with the service provider goes down at the same
time when this issue comes.


On Mon, Sep 2, 2013 at 4:15 AM, Stefan Gromoll ste...@gromoll.org wrote:

 Hello,

 We're having a problem with one of our Kannel binds.  Kannel establishes a
 connection to a carrier and sends and receives messages without problems,
 but after some period of time (e.g. 3 days) the connection fails with the
 following error:

 2013-09-01 22:04:14 [15544] [6] DEBUG: SMPP[test]: Sending enquire link:
 2013-09-01 22:04:14 [15544] [6] DEBUG: SMPP PDU 0x9fd3230 dump:
 2013-09-01 22:04:14 [15544] [6] DEBUG:   type_name: enquire_link
 2013-09-01 22:04:14 [15544] [6] DEBUG:   command_id: 21 = 0x0015
 2013-09-01 22:04:14 [15544] [6] DEBUG:   command_status: 0 = 0x
 2013-09-01 22:04:14 [15544] [6] DEBUG:   sequence_number: 27699 =
 0x6c33
 2013-09-01 22:04:14 [15544] [6] DEBUG: SMPP PDU dump ends.
 2013-09-01 22:04:14 [15544] [6] DEBUG: SMPP[test]: throughput (0.00,0.00)
 2013-09-01 22:04:14 [15544] [6] ERROR: Error reading from fd 21:
 2013-09-01 22:04:14 [15544] [6] ERROR: System error 104: Connection reset
 by peer
 2013-09-01 22:04:14 [15544] [6] ERROR: SMPP[test]: Couldn't connect to SMS
 center (retrying in 10 seconds).

 After this point Kannel tries to connect but is unable to.  However, if we
 start/stop kannel it reconnects without problem and the connection comes
 back up.  We have a second bind to a different SMSC of this carrier and it
 is stable and runs without problems (and operate binds to many other
 carriers with this version of Kannel without problems).  We've tried
 debugging the issue with the carrier, but they aren't sure what the problem
 is and don't seem able to help.

 We're running Kannel from subversion (release 5014).  Does anyone know
 what the problem might be or how we can debug this?

 Thanks,

 -Stefan




RE: SMSC-ID routing based on to/from on SMSBox?

2013-11-12 Thread Porter, Kelvin
Hi,

The scenario is the following...

I have customers that are sending HTTP requests to the SMSBox instance to 
initiate the sending of MT messages.  Depending on the intended destination of 
those messages (i.e., the to/receiver number),  I need to direct the message to 
one set of SMSC links or the other in the BearerBox.  The application 
performing the HTTP requests does not have any way of determining the set of 
numbers that need to go to a particular SMSC.  So, I am looking for a way to 
configure the SMSBox so that the SMSC is specified for certain MT destinations.

In the opensmppbox, I would use the smsc-route option to set which SMSC was 
specified before it was sent to the bearerbox.  I am looking for equivalent 
functionality.  Have I overlooked something or is the functionality, not there?

Thank you.

Regards,

Kelvin R. Porter

From: ha...@aeon.pk [mailto:ha...@aeon.pk]
Sent: Tuesday, November 12, 2013 10:48 AM
To: Porter, Kelvin
Cc: users@kannel.org
Subject: Re: SMSC-ID routing based on to/from on SMSBox?

Can you explain your scenario with an example please? Would be easier to 
understand what you need.

On Mon, Nov 11, 2013 at 11:56 PM, Porter, Kelvin 
kelvin.por...@h3net.commailto:kelvin.por...@h3net.com wrote:
Hi,

I am writing to insure that I have not overlooked an option.  In my 
application, I have a need to specify SMSC based on where the message is being 
sent to (the users will not specify the smsc in the HTTP request).  Basically, 
I need to insure some MT destinations are treated differently that the others, 
independent of what is specified in the request.  I have looked at the source 
and it does not appear that this functionality is implemented.  Have I missed 
something?

I am looking for something akin to the smsc-route option in the opensmppbox.  
I may attempt to splice in this code from the opensmppbox, if I must.  Is there 
any interest in this functionality?

Regards,

Kelvin R. Porter





Re: Routing DLR to ESME using OpenSMPPBox

2013-11-12 Thread Amir Mahmoud
The table is empty, and the type of both ts and destination columns is
varchar(40)


On Tue, Nov 12, 2013 at 6:34 PM, Rene Kluwen rene.klu...@chimit.nl wrote:

 Are there even any entries in your dlr table? They should have accumulated
 by now.

 What is the sql type of your ts and destination field? Is it at least 12
 characters or more?



 == Rene





 *From:* Amir Mahmoud [mailto:amir.mahm...@egyptlinx.com]
 *Sent:* dinsdag 12 november 2013 17:25
 *To:* Rene Kluwen
 *Cc:* users
 *Subject:* Re: Routing DLR to ESME using OpenSMPPBox



 Hello Rene,

 Thanks a lot for you reply.



 below is my configuration files followed by sample of the logs, please let
 me know for any further details.



 *Configuration Files*

 *1)**Kannel.conf*

 #-

 # core setup



 group = core

 admin-port = 13000

 smsbox-port = 13001

 wapbox-port = 13002

 admin-password = admin123456

 status-password = admin123456

 wdp-interface-name = *

 log-file = /usr/local/kannel/bearerbox.log

 log-level = 3

 access-log = /usr/local/kannel/bearerboxaccess.log

 store-type = spool

 store-location = /usr/local/kannel/store

 store-dump-freq = 60

 #-

 # smsc setup



 group = smsc

 smsc = smpp

 smsc-id = VFSMPP1

 host = x.x.x.x

 port = 

 smsc-username = 

 smsc-password = xxx

 system-type = 

 address-range = 

 dest-addr-ton=1

 dest-addr-npi=1

 interface-version = 34

 enquire-link-interval = 25

 reconnect-delay = 15

 transceiver-mode = 1

 #max-pending-submits = 8

 throughput = 6

 #-

 # smsbox setup



 group = smsbox

 smsbox-id = smsbox1

 bearerbox-host = 127.0.0.1

 sendsms-port = 13013

 sendsms-chars = 0123456789 +-

 log-file = /usr/local/kannel/smsbox.log

 log-level = 3

 access-log = /usr/local/kannel/smsboxaccess.log

 mo-recode = true

 http-request-retry = 1000

 max-pending-requests = 33000

 #-

 # smsbox-route setup



 group = smsbox-route

 smsbox-id = ops

 smsc-id = VFSMPP1







 *2)**OpenSMPPBox.conf*

 #--

 group = core

 dlr-storage = mysql



 group = opensmppbox

 bearerbox-host = 127.0.0.1

 bearerbox-port = 13005

 opensmppbox-id = opensmppbox1

 opensmppbox-port = 13003

 log-file = /usr/local/kannel/smppbox.log

 our-system-id = opensmppbox1

 use-systemid-as-smsboxid = true

 smpp-logins = /usr/local/kannel/smpplogins.txt

 box-dlr-storage = mysql



 group = mysql-connection
 id = mydlr
 host = localhost
 username = 
 password = 
 database = kannel
 max-connections = 2

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







 *3)**smpplogins.txt*

 ops testpw smsc1 *.*.*.*







 *4)**SQLBox.conf*

 #--

 group = sqlbox

 id = sqlbox-db

 smsbox-id = sqlbox

 global-sender = 

 bearerbox-host = 127.0.0.1

 bearerbox-port = 13001

 smsbox-port = 13005

 smsbox-port-ssl = false

 sql-log-table = sent_sms

 sql-insert-table = send_sms

 log-file = /usr/local/kannel/kannel-sqlbox.log



 # MYSQL Connection

 group = mysql-connection

 id = sqlbox-db

 host = localhost

 username = 

 password = 

 database = mysqlbox



 Error Log Sample



 2013-10-29 17:59:02 [29615] [1] DEBUG: DLR[mysql]: Looking for DLR
 smsc=ops, ts=be18a733, dst=201068827073, type=1
 2013-10-29 17:59:02 [29615] [1] DEBUG: sql: SELECT `mask`, `service`,
 `url`, `source`, `destination`, `boxc` FROM `dlr` WHERE `smsc`=? AND
 `ts`=?  LIMIT 1
 2013-10-29 17:59:02 [29615] [1] DEBUG: column=mask buffer_type=3
 max_length=0 length=10
 2013-10-29 17:59:02 [29615] [1] DEBUG: column=service buffer_type=253
 max_length=0 length=40
 2013-10-29 17:59:02 [29615] [1] DEBUG: column=url buffer_type=253
 max_length=0 length=255
 2013-10-29 17:59:02 [29615] [1] DEBUG: column=source buffer_type=253
 max_length=0 length=40
 2013-10-29 17:59:02 [29615] [1] DEBUG: column=destination
 buffer_type=253 max_length=0 length=40
 2013-10-29 17:59:02 [29615] [1] DEBUG: column=boxc buffer_type=253
 max_length=0 length=40
 2013-10-29 17:59:02 [29615] [1] WARNING: DLR[mysql]: DLR from
 SMSCops for DST201068827073 not found.
 2013-10-29 17:59:02 [29615] [1] WARNING: opensmppbox: msg_to_pdu: no
 msg corresponding dlr, ignoring
 2013-10-29 17:59:02 [29615] [1] WARNING: msg_to_pdu failed, sending
 negative ack



 On Tue, Nov 12, 2013 at 4:08 PM, Rene Kluwen rene.klu...@chimit.nl
 wrote:

 It should route automatically.

 Could you share your logs?



 *From:* users [mailto:users-boun...@kannel.org] *On Behalf Of *Amir
 Mahmoud
 *Sent:* maandag 28 oktober 2013 20:38
 *To:* users
 *Subject:* Routing DLR to ESME using OpenSMPPBox



 Dears,



 I have 

Re: SMSC-ID routing based on to/from on SMSBox?

2013-11-12 Thread ha...@aeon.pk
Have you tried allowed-smsc-id and denied-smsc-id parameters in group=smsc?


On Tue, Nov 12, 2013 at 10:10 PM, Porter, Kelvin kelvin.por...@h3net.comwrote:

 Hi,



 The scenario is the following…



 I have customers that are sending HTTP requests to the SMSBox instance to
 initiate the sending of MT messages.  Depending on the intended destination
 of those messages (i.e., the to/receiver number),  I need to direct the
 message to one set of SMSC links or the other in the BearerBox.  The
 application performing the HTTP requests does not have any way of
 determining the set of numbers that need to go to a particular SMSC.  So, I
 am looking for a way to configure the SMSBox so that the SMSC is specified
 for certain MT destinations.



 In the opensmppbox, I would use the smsc-route option to set which SMSC
 was specified before it was sent to the bearerbox.  I am looking for
 equivalent functionality.  Have I overlooked something or is the
 functionality, not there?



 Thank you.


 Regards,



 Kelvin R. Porter



 *From:* ha...@aeon.pk [mailto:ha...@aeon.pk]
 *Sent:* Tuesday, November 12, 2013 10:48 AM
 *To:* Porter, Kelvin
 *Cc:* users@kannel.org
 *Subject:* Re: SMSC-ID routing based on to/from on SMSBox?



 Can you explain your scenario with an example please? Would be easier to
 understand what you need.



 On Mon, Nov 11, 2013 at 11:56 PM, Porter, Kelvin kelvin.por...@h3net.com
 wrote:

 Hi,



 I am writing to insure that I have not overlooked an option.  In my
 application, I have a need to specify SMSC based on where the message is
 being sent to (the users will not specify the smsc in the HTTP request).
  Basically, I need to insure some MT destinations are treated differently
 that the others, independent of what is specified in the request.  I have
 looked at the source and it does not appear that this functionality is
 implemented.  Have I missed something?



 I am looking for something akin to the “smsc-route” option in the
 opensmppbox.  I may attempt to splice in this code from the opensmppbox, if
 I must.  Is there any interest in this functionality?



 Regards,



 Kelvin R. Porter









Re: SQLBOX working - LIFO or FIFO

2013-11-12 Thread Alvaro Cornejo
 Hi

Can't you split your batchs into intro and content messages? Then you
can send all your intros and once they are gone send the content
message.

Another option can be to concatenate them so the phone will reassemble
the message in the correct order.

Just a couple of ideas.

Regards

Alvaro
|-|
Envíe y Reciba Datos y mensajes de Texto (SMS) hacia y desde cualquier
celular y Nextel
en el Perú, México y en mas de 180 paises. Use aplicaciones 2 vias via
SMS y GPRS online
  Visitenos en www.perusms.com


On Tue, Nov 12, 2013 at 11:35 AM, ha...@aeon.pk ha...@aeon.pk wrote:
 20k is just an example batch I am trying to play around in order to find the
 solution. My actual bulk is in millions.

 As for sequence, the application logic is such that it should first send an
 intro message to the user and then send the actual content message. The
 intro message has to go before content, else the effectiveness of content
 message is compromised because of less user response. It makes less sense if
 the content message reaches the user first and the intro message is coming
 later.

 In my experience, operator SMSCs hardly ever change the order of the
 messages, unless there is some problem. For 99.99% of the time, the message
 sequence to the end users are the same in which I have sent it to the SMSC.



 On Tue, Nov 12, 2013 at 8:52 PM, Ghulam Mustafa /HQ/NW/Network Engineer
 g.must...@nadra.gov.pk wrote:

 20k SMS will take few seconds then why worry about the sequence since DLR
 is not available and operator is not going to obey your sequnce/order at
 all.


 Sent from Samsung Mobile


  Original message 
 From: ha...@aeon.pk
 Date:12/11/2013 8:03 PM (GMT+05:00)
 To: Rene Kluwen
 Cc: kannel users
 Subject: Re: SQLBOX working - LIFO or FIFO

 Yup, I have tried this already. But enabling DLR with remote SMSC comes at
 the cost of reducing the overall SMS sending speed by half. Meaning, if I
 have a bandwidth of 100 SMS/sec, enabling DLR will actually give me 50
 SMS/sec effective speed, with remaining speed being taken by DLRs.
 Additionally, DLR handling will put more load on my DB, as well as
 additional application DB reads (for checking status 8). On paper, it seems
 like more performance sacrifice than the gain.


 On Tue, Nov 12, 2013 at 7:57 PM, Rene Kluwen
 rene.klu...@chimit.nlmailto:rene.klu...@chimit.nl wrote:
 If you are going to fiddle with your php code anyhow.
 A possible solution is to send message 2 whenever the dlr with status = 8
 arrives.
 You don’t need a sleep then and you will be sure that the message has been
 sent out before sending the next one.

 Just an idea.

 == Rene


 From: ha...@aeon.pkmailto:ha...@aeon.pk
 [mailto:ha...@aeon.pkmailto:ha...@aeon.pk]
 Sent: dinsdag 12 november 2013 15:51
 To: Rene Kluwen
 Cc: spameden; kannel users

 Subject: Re: SQLBOX working - LIFO or FIFO

 This is OK if SMSC does the re-ordering for congestion or some other
 reasons. But my concern is that messages should at least leave bbox in the
 same order by which they left the application.

 Since kannel is not giving me a proper method to sequence the messages, I
 am forced to use SLEEP method in PHP programming. It is hanging my server
 horribly in the presence of big traffic, choking both HTTP web server
 connections as well as backend database. I would be happy to find some/any
 method to maintain the sequence of msgs in kannel in FIFO order.

 On Tue, Nov 12, 2013 at 7:38 PM, Rene Kluwen
 rene.klu...@chimit.nlmailto:rene.klu...@chimit.nl wrote:
 But having said the below, sms messages are not guaranteed to arrive in a
 particular order.
 The remote smsc may still send out message 2 first, even when they
 received message 1 first.

 From: users
 [mailto:users-boun...@kannel.orgmailto:users-boun...@kannel.org] On Behalf
 Of Rene Kluwen
 Sent: dinsdag 12 november 2013 15:35
 To: ha...@aeon.pkmailto:ha...@aeon.pk; 'spameden'
 Cc: 'kannel users'
 Subject: RE: SQLBOX working - LIFO or FIFO

 There’s a ‘priority’ field in the Msg structure.
 I think it serves for the purpose that you want to.
 Just it’s you cannot set it in the send_sms table. Not sure why, but
 probably the field was added later.
 It shouldn’t be difficult to add though if anyone wants to send in a
 patch.

 == Rene

 From: users [mailto:users-boun...@kannel.org] On Behalf Of
 ha...@aeon.pkmailto:ha...@aeon.pk
 Sent: dinsdag 12 november 2013 15:28
 To: spameden
 Cc: kannel users
 Subject: Re: SQLBOX working - LIFO or FIFO

 Actually, if my understanding is correct (i.e. SQLBOX is already doing the
 right thing by giving messages in FIFO order to bbox, but bbox is shuffling
 the outgoing messages from within its buffer), then there is no point of
 adding priority column.

 What do you say?

 On Tue, Nov 12, 2013 at 6:28 PM, spameden
 spame...@gmail.commailto:spame...@gmail.com wrote:
 For priority I'd 

RE: SMSC-ID routing based on to/from on SMSBox?

2013-11-12 Thread Porter, Kelvin
Hi,

I did some looking and it appears that I might be able to accomplish what I 
want using allowed- and/or denied-prefix.  The description is a bit ambiguous 
though, these variables determines whether a SMS message can be sent through. 
 The routing is unclear as to whether the prefix filtering is being applied to 
the sender or the receiver.  I could look at the code, but does anyone know 
off-hand which number is being filtered?

Thank you for the pointer.

Regards,

Kelvin R. Porter

From: ha...@aeon.pk [mailto:ha...@aeon.pk]
Sent: Tuesday, November 12, 2013 11:27 AM
To: Porter, Kelvin
Cc: users@kannel.org
Subject: Re: SMSC-ID routing based on to/from on SMSBox?

Have you tried allowed-smsc-id and denied-smsc-id parameters in group=smsc?

On Tue, Nov 12, 2013 at 10:10 PM, Porter, Kelvin 
kelvin.por...@h3net.commailto:kelvin.por...@h3net.com wrote:
Hi,

The scenario is the following...

I have customers that are sending HTTP requests to the SMSBox instance to 
initiate the sending of MT messages.  Depending on the intended destination of 
those messages (i.e., the to/receiver number),  I need to direct the message to 
one set of SMSC links or the other in the BearerBox.  The application 
performing the HTTP requests does not have any way of determining the set of 
numbers that need to go to a particular SMSC.  So, I am looking for a way to 
configure the SMSBox so that the SMSC is specified for certain MT destinations.

In the opensmppbox, I would use the smsc-route option to set which SMSC was 
specified before it was sent to the bearerbox.  I am looking for equivalent 
functionality.  Have I overlooked something or is the functionality, not there?

Thank you.

Regards,

Kelvin R. Porter

From: ha...@aeon.pkmailto:ha...@aeon.pk 
[mailto:ha...@aeon.pkmailto:ha...@aeon.pk]
Sent: Tuesday, November 12, 2013 10:48 AM
To: Porter, Kelvin
Cc: users@kannel.orgmailto:users@kannel.org
Subject: Re: SMSC-ID routing based on to/from on SMSBox?

Can you explain your scenario with an example please? Would be easier to 
understand what you need.

On Mon, Nov 11, 2013 at 11:56 PM, Porter, Kelvin 
kelvin.por...@h3net.commailto:kelvin.por...@h3net.com wrote:
Hi,

I am writing to insure that I have not overlooked an option.  In my 
application, I have a need to specify SMSC based on where the message is being 
sent to (the users will not specify the smsc in the HTTP request).  Basically, 
I need to insure some MT destinations are treated differently that the others, 
independent of what is specified in the request.  I have looked at the source 
and it does not appear that this functionality is implemented.  Have I missed 
something?

I am looking for something akin to the smsc-route option in the opensmppbox.  
I may attempt to splice in this code from the opensmppbox, if I must.  Is there 
any interest in this functionality?

Regards,

Kelvin R. Porter






Re: SQLBOX working - LIFO or FIFO

2013-11-12 Thread ha...@aeon.pk
I am currently doing the same separate bulks thing, i.e. First running
intro bulk and waiting for bbox to clear (painfully manual), and then
triggering the content bulk. It is pretty tedious process where I have to
manually sit and watch when the first batch is cleared and then trigger the
second one. Because of lack of any priority feature in sqlbox or bbox, I
cannot really put both bulks in one program, since the second bulk (content
msg) overrides the outgoing queue in bearerbox and starts broadcasting
before the already-queued intro msgs.

Both msgs themselves standalone are 2 SMS long. So further concatenation is
also not possible, as it makes msgs very very long for receiver handsets.


On Tue, Nov 12, 2013 at 10:49 PM, Alvaro Cornejo
cornejo.alv...@gmail.comwrote:

  Hi

 Can't you split your batchs into intro and content messages? Then you
 can send all your intros and once they are gone send the content
 message.

 Another option can be to concatenate them so the phone will reassemble
 the message in the correct order.

 Just a couple of ideas.

 Regards

 Alvaro

 |-|
 Envíe y Reciba Datos y mensajes de Texto (SMS) hacia y desde cualquier
 celular y Nextel
 en el Perú, México y en mas de 180 paises. Use aplicaciones 2 vias via
 SMS y GPRS online
   Visitenos en www.perusms.com


 On Tue, Nov 12, 2013 at 11:35 AM, ha...@aeon.pk ha...@aeon.pk wrote:
  20k is just an example batch I am trying to play around in order to find
 the
  solution. My actual bulk is in millions.
 
  As for sequence, the application logic is such that it should first send
 an
  intro message to the user and then send the actual content message. The
  intro message has to go before content, else the effectiveness of content
  message is compromised because of less user response. It makes less
 sense if
  the content message reaches the user first and the intro message is
 coming
  later.
 
  In my experience, operator SMSCs hardly ever change the order of the
  messages, unless there is some problem. For 99.99% of the time, the
 message
  sequence to the end users are the same in which I have sent it to the
 SMSC.
 
 
 
  On Tue, Nov 12, 2013 at 8:52 PM, Ghulam Mustafa /HQ/NW/Network Engineer
  g.must...@nadra.gov.pk wrote:
 
  20k SMS will take few seconds then why worry about the sequence since
 DLR
  is not available and operator is not going to obey your sequnce/order at
  all.
 
 
  Sent from Samsung Mobile
 
 
   Original message 
  From: ha...@aeon.pk
  Date:12/11/2013 8:03 PM (GMT+05:00)
  To: Rene Kluwen
  Cc: kannel users
  Subject: Re: SQLBOX working - LIFO or FIFO
 
  Yup, I have tried this already. But enabling DLR with remote SMSC comes
 at
  the cost of reducing the overall SMS sending speed by half. Meaning, if
 I
  have a bandwidth of 100 SMS/sec, enabling DLR will actually give me 50
  SMS/sec effective speed, with remaining speed being taken by DLRs.
  Additionally, DLR handling will put more load on my DB, as well as
  additional application DB reads (for checking status 8). On paper, it
 seems
  like more performance sacrifice than the gain.
 
 
  On Tue, Nov 12, 2013 at 7:57 PM, Rene Kluwen
  rene.klu...@chimit.nlmailto:rene.klu...@chimit.nl wrote:
  If you are going to fiddle with your php code anyhow.
  A possible solution is to send message 2 whenever the dlr with status =
 8
  arrives.
  You don’t need a sleep then and you will be sure that the message has
 been
  sent out before sending the next one.
 
  Just an idea.
 
  == Rene
 
 
  From: ha...@aeon.pkmailto:ha...@aeon.pk
  [mailto:ha...@aeon.pkmailto:ha...@aeon.pk]
  Sent: dinsdag 12 november 2013 15:51
  To: Rene Kluwen
  Cc: spameden; kannel users
 
  Subject: Re: SQLBOX working - LIFO or FIFO
 
  This is OK if SMSC does the re-ordering for congestion or some other
  reasons. But my concern is that messages should at least leave bbox in
 the
  same order by which they left the application.
 
  Since kannel is not giving me a proper method to sequence the messages,
 I
  am forced to use SLEEP method in PHP programming. It is hanging my
 server
  horribly in the presence of big traffic, choking both HTTP web server
  connections as well as backend database. I would be happy to find
 some/any
  method to maintain the sequence of msgs in kannel in FIFO order.
 
  On Tue, Nov 12, 2013 at 7:38 PM, Rene Kluwen
  rene.klu...@chimit.nlmailto:rene.klu...@chimit.nl wrote:
  But having said the below, sms messages are not guaranteed to arrive in
 a
  particular order.
  The remote smsc may still send out message 2 first, even when they
  received message 1 first.
 
  From: users
  [mailto:users-boun...@kannel.orgmailto:users-boun...@kannel.org] On
 Behalf
  Of Rene Kluwen
  Sent: dinsdag 12 november 2013 15:35
  To: ha...@aeon.pkmailto:ha...@aeon.pk; 'spameden'
  Cc: 'kannel users'
  Subject: RE: SQLBOX working - 

Re: SMSC-ID routing based on to/from on SMSBox?

2013-11-12 Thread ha...@aeon.pk
I used it long time ago. Cannot recall how exactly I did that. But you need
some sort of REGEX combination to route SMS to certain SMSCs, and then
putting allowed/denied parameters in place as well.


On Tue, Nov 12, 2013 at 11:01 PM, Porter, Kelvin kelvin.por...@h3net.comwrote:

 Hi,



 I did some looking and it appears that I might be able to accomplish what
 I want using allowed- and/or denied-prefix.  The description is a bit
 ambiguous though, these variables determines whether a SMS message can be
 “sent through”.  The routing is unclear as to whether the prefix filtering
 is being applied to the sender or the receiver.  I could look at the code,
 but does anyone know off-hand which number is being filtered?



 Thank you for the pointer.



 Regards,



 Kelvin R. Porter



 *From:* ha...@aeon.pk [mailto:ha...@aeon.pk]
 *Sent:* Tuesday, November 12, 2013 11:27 AM

 *To:* Porter, Kelvin
 *Cc:* users@kannel.org
 *Subject:* Re: SMSC-ID routing based on to/from on SMSBox?



 Have you tried allowed-smsc-id and denied-smsc-id parameters in group=smsc?



 On Tue, Nov 12, 2013 at 10:10 PM, Porter, Kelvin kelvin.por...@h3net.com
 wrote:

 Hi,



 The scenario is the following…



 I have customers that are sending HTTP requests to the SMSBox instance to
 initiate the sending of MT messages.  Depending on the intended destination
 of those messages (i.e., the to/receiver number),  I need to direct the
 message to one set of SMSC links or the other in the BearerBox.  The
 application performing the HTTP requests does not have any way of
 determining the set of numbers that need to go to a particular SMSC.  So, I
 am looking for a way to configure the SMSBox so that the SMSC is specified
 for certain MT destinations.



 In the opensmppbox, I would use the smsc-route option to set which SMSC
 was specified before it was sent to the bearerbox.  I am looking for
 equivalent functionality.  Have I overlooked something or is the
 functionality, not there?



 Thank you.


 Regards,



 Kelvin R. Porter



 *From:* ha...@aeon.pk [mailto:ha...@aeon.pk]
 *Sent:* Tuesday, November 12, 2013 10:48 AM
 *To:* Porter, Kelvin
 *Cc:* users@kannel.org
 *Subject:* Re: SMSC-ID routing based on to/from on SMSBox?



 Can you explain your scenario with an example please? Would be easier to
 understand what you need.



 On Mon, Nov 11, 2013 at 11:56 PM, Porter, Kelvin kelvin.por...@h3net.com
 wrote:

 Hi,



 I am writing to insure that I have not overlooked an option.  In my
 application, I have a need to specify SMSC based on where the message is
 being sent to (the users will not specify the smsc in the HTTP request).
  Basically, I need to insure some MT destinations are treated differently
 that the others, independent of what is specified in the request.  I have
 looked at the source and it does not appear that this functionality is
 implemented.  Have I missed something?



 I am looking for something akin to the “smsc-route” option in the
 opensmppbox.  I may attempt to splice in this code from the opensmppbox, if
 I must.  Is there any interest in this functionality?



 Regards,



 Kelvin R. Porter











unsubscribe;

2013-11-12 Thread Б-т
*unsubscribe*;


Re: Routing DLR to ESME using OpenSMPPBox

2013-11-12 Thread Amir Mahmoud
No i don't, how could i troubleshoot the dlr record insertion to know
whether the problem is related to the insertion or not ?



On Tue, Nov 12, 2013 at 7:58 PM, Rene Kluwen rene.klu...@chimit.nl wrote:

 Then the problem seems to be whilst inserting the messages into the dlr
 table.

 Do you have a log entry of that as well?



 *From:* Amir Mahmoud [mailto:amir.mahm...@egyptlinx.com]
 *Sent:* dinsdag 12 november 2013 18:13

 *To:* Rene Kluwen
 *Cc:* users
 *Subject:* Re: Routing DLR to ESME using OpenSMPPBox



 The table is empty, and the type of both ts and destination columns is
 varchar(40)



 On Tue, Nov 12, 2013 at 6:34 PM, Rene Kluwen rene.klu...@chimit.nl
 wrote:

 Are there even any entries in your dlr table? They should have accumulated
 by now.

 What is the sql type of your ts and destination field? Is it at least 12
 characters or more?



 == Rene





 *From:* Amir Mahmoud [mailto:amir.mahm...@egyptlinx.com]
 *Sent:* dinsdag 12 november 2013 17:25
 *To:* Rene Kluwen
 *Cc:* users
 *Subject:* Re: Routing DLR to ESME using OpenSMPPBox



 Hello Rene,

 Thanks a lot for you reply.



 below is my configuration files followed by sample of the logs, please let
 me know for any further details.



 *Configuration Files*

 *1)**Kannel.conf*

 #-

 # core setup



 group = core

 admin-port = 13000

 smsbox-port = 13001

 wapbox-port = 13002

 admin-password = admin123456

 status-password = admin123456

 wdp-interface-name = *

 log-file = /usr/local/kannel/bearerbox.log

 log-level = 3

 access-log = /usr/local/kannel/bearerboxaccess.log

 store-type = spool

 store-location = /usr/local/kannel/store

 store-dump-freq = 60

 #-

 # smsc setup



 group = smsc

 smsc = smpp

 smsc-id = VFSMPP1

 host = x.x.x.x

 port = 

 smsc-username = 

 smsc-password = xxx

 system-type = 

 address-range = 

 dest-addr-ton=1

 dest-addr-npi=1

 interface-version = 34

 enquire-link-interval = 25

 reconnect-delay = 15

 transceiver-mode = 1

 #max-pending-submits = 8

 throughput = 6

 #-

 # smsbox setup



 group = smsbox

 smsbox-id = smsbox1

 bearerbox-host = 127.0.0.1

 sendsms-port = 13013

 sendsms-chars = 0123456789 +-

 log-file = /usr/local/kannel/smsbox.log

 log-level = 3

 access-log = /usr/local/kannel/smsboxaccess.log

 mo-recode = true

 http-request-retry = 1000

 max-pending-requests = 33000

 #-

 # smsbox-route setup



 group = smsbox-route

 smsbox-id = ops

 smsc-id = VFSMPP1







 *2)**OpenSMPPBox.conf*

 #--

 group = core

 dlr-storage = mysql



 group = opensmppbox

 bearerbox-host = 127.0.0.1

 bearerbox-port = 13005

 opensmppbox-id = opensmppbox1

 opensmppbox-port = 13003

 log-file = /usr/local/kannel/smppbox.log

 our-system-id = opensmppbox1

 use-systemid-as-smsboxid = true

 smpp-logins = /usr/local/kannel/smpplogins.txt

 box-dlr-storage = mysql



 group = mysql-connection
 id = mydlr
 host = localhost
 username = 
 password = 
 database = kannel
 max-connections = 2

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







 *3)**smpplogins.txt*

 ops testpw smsc1 *.*.*.*







 *4)**SQLBox.conf*

 #--

 group = sqlbox

 id = sqlbox-db

 smsbox-id = sqlbox

 global-sender = 

 bearerbox-host = 127.0.0.1

 bearerbox-port = 13001

 smsbox-port = 13005

 smsbox-port-ssl = false

 sql-log-table = sent_sms

 sql-insert-table = send_sms

 log-file = /usr/local/kannel/kannel-sqlbox.log



 # MYSQL Connection

 group = mysql-connection

 id = sqlbox-db

 host = localhost

 username = 

 password = 

 database = mysqlbox



 Error Log Sample



 2013-10-29 17:59:02 [29615] [1] DEBUG: DLR[mysql]: Looking for DLR
 smsc=ops, ts=be18a733, dst=201068827073, type=1
 2013-10-29 17:59:02 [29615] [1] DEBUG: sql: SELECT `mask`, `service`,
 `url`, `source`, `destination`, `boxc` FROM `dlr` WHERE `smsc`=? AND
 `ts`=?  LIMIT 1
 2013-10-29 17:59:02 [29615] [1] DEBUG: column=mask buffer_type=3
 max_length=0 length=10
 2013-10-29 17:59:02 [29615] [1] DEBUG: column=service buffer_type=253
 max_length=0 length=40
 2013-10-29 17:59:02 [29615] [1] DEBUG: column=url buffer_type=253
 max_length=0 length=255
 2013-10-29 17:59:02 [29615] [1] DEBUG: column=source buffer_type=253
 max_length=0 length=40
 2013-10-29 17:59:02 [29615] [1] DEBUG: column=destination
 buffer_type=253 max_length=0 length=40
 2013-10-29 17:59:02 [29615] [1] DEBUG: column=boxc buffer_type=253
 max_length=0 length=40
 2013-10-29 17:59:02 [29615] [1] WARNING: DLR[mysql]: DLR from
 SMSCops for DST201068827073 not found.
 

RE: SMSC-ID routing based on to/from on SMSBox?

2013-11-12 Thread Ghulam Mustafa /HQ/NW/Network Engineer
Use forced-smsc in group=sendsms-user


Sent from Samsung Mobile


 Original message 
From: ha...@aeon.pk
Date:12/11/2013 11:09 PM (GMT+05:00)
To: Porter, Kelvin
Cc: users@kannel.org
Subject: Re: SMSC-ID routing based on to/from on SMSBox?

I used it long time ago. Cannot recall how exactly I did that. But you need 
some sort of REGEX combination to route SMS to certain SMSCs, and then putting 
allowed/denied parameters in place as well.


On Tue, Nov 12, 2013 at 11:01 PM, Porter, Kelvin 
kelvin.por...@h3net.commailto:kelvin.por...@h3net.com wrote:
Hi,

I did some looking and it appears that I might be able to accomplish what I 
want using allowed- and/or denied-prefix.  The description is a bit ambiguous 
though, these variables determines whether a SMS message can be “sent through”. 
 The routing is unclear as to whether the prefix filtering is being applied to 
the sender or the receiver.  I could look at the code, but does anyone know 
off-hand which number is being filtered?

Thank you for the pointer.

Regards,

Kelvin R. Porter

From: ha...@aeon.pkmailto:ha...@aeon.pk 
[mailto:ha...@aeon.pkmailto:ha...@aeon.pk]
Sent: Tuesday, November 12, 2013 11:27 AM

To: Porter, Kelvin
Cc: users@kannel.orgmailto:users@kannel.org
Subject: Re: SMSC-ID routing based on to/from on SMSBox?

Have you tried allowed-smsc-id and denied-smsc-id parameters in group=smsc?

On Tue, Nov 12, 2013 at 10:10 PM, Porter, Kelvin 
kelvin.por...@h3net.commailto:kelvin.por...@h3net.com wrote:
Hi,

The scenario is the following…

I have customers that are sending HTTP requests to the SMSBox instance to 
initiate the sending of MT messages.  Depending on the intended destination of 
those messages (i.e., the to/receiver number),  I need to direct the message to 
one set of SMSC links or the other in the BearerBox.  The application 
performing the HTTP requests does not have any way of determining the set of 
numbers that need to go to a particular SMSC.  So, I am looking for a way to 
configure the SMSBox so that the SMSC is specified for certain MT destinations.

In the opensmppbox, I would use the smsc-route option to set which SMSC was 
specified before it was sent to the bearerbox.  I am looking for equivalent 
functionality.  Have I overlooked something or is the functionality, not there?

Thank you.

Regards,

Kelvin R. Porter

From: ha...@aeon.pkmailto:ha...@aeon.pk 
[mailto:ha...@aeon.pkmailto:ha...@aeon.pk]
Sent: Tuesday, November 12, 2013 10:48 AM
To: Porter, Kelvin
Cc: users@kannel.orgmailto:users@kannel.org
Subject: Re: SMSC-ID routing based on to/from on SMSBox?

Can you explain your scenario with an example please? Would be easier to 
understand what you need.

On Mon, Nov 11, 2013 at 11:56 PM, Porter, Kelvin 
kelvin.por...@h3net.commailto:kelvin.por...@h3net.com wrote:
Hi,

I am writing to insure that I have not overlooked an option.  In my 
application, I have a need to specify SMSC based on where the message is being 
sent to (the users will not specify the smsc in the HTTP request).  Basically, 
I need to insure some MT destinations are treated differently that the others, 
independent of what is specified in the request.  I have looked at the source 
and it does not appear that this functionality is implemented.  Have I missed 
something?

I am looking for something akin to the “smsc-route” option in the opensmppbox.  
I may attempt to splice in this code from the opensmppbox, if I must.  Is there 
any interest in this functionality?

Regards,

Kelvin R. Porter








Re: Allowed Shortcode

2013-11-12 Thread spameden
Yes, see user-guide, there is allowed-prefix and allowed-prefix-regex
directives, as well as denied-prefix and denied-prefix-regex.


You can define per smsc.

2013/11/6 michael osakede ire...@yahoo.com:
 Hi,

 is there anyway to set allowed-shortcode or receiver-prefic for an smsc?

 Regards,
 Michael



Re: Kannel disconnects with error Error reading from fd 21, won't reconnect

2013-11-12 Thread spameden
Connection reset by peer -- usually means connection was abrupted by
either bearerbox or remote side.

It's weird because the only time I saw kannel shutting down smsc
connection if there is login problem (i.e. bad credentials - it won't
reconnect automatically).

Other than that it should try infinite to reconnect. If you can reply
the situation would be good if you could post your smsc logs.

2013/9/2 Stefan Gromoll ste...@gromoll.org:
 Hello,

 We're having a problem with one of our Kannel binds.  Kannel establishes a 
 connection to a carrier and sends and receives messages without problems, but 
 after some period of time (e.g. 3 days) the connection fails with the 
 following error:

 2013-09-01 22:04:14 [15544] [6] DEBUG: SMPP[test]: Sending enquire link:
 2013-09-01 22:04:14 [15544] [6] DEBUG: SMPP PDU 0x9fd3230 dump:
 2013-09-01 22:04:14 [15544] [6] DEBUG:   type_name: enquire_link
 2013-09-01 22:04:14 [15544] [6] DEBUG:   command_id: 21 = 0x0015
 2013-09-01 22:04:14 [15544] [6] DEBUG:   command_status: 0 = 0x
 2013-09-01 22:04:14 [15544] [6] DEBUG:   sequence_number: 27699 = 0x6c33
 2013-09-01 22:04:14 [15544] [6] DEBUG: SMPP PDU dump ends.
 2013-09-01 22:04:14 [15544] [6] DEBUG: SMPP[test]: throughput (0.00,0.00)
 2013-09-01 22:04:14 [15544] [6] ERROR: Error reading from fd 21:
 2013-09-01 22:04:14 [15544] [6] ERROR: System error 104: Connection reset by 
 peer
 2013-09-01 22:04:14 [15544] [6] ERROR: SMPP[test]: Couldn't connect to SMS 
 center (retrying in 10 seconds).

 After this point Kannel tries to connect but is unable to.  However, if we 
 start/stop kannel it reconnects without problem and the connection comes back 
 up.  We have a second bind to a different SMSC of this carrier and it is 
 stable and runs without problems (and operate binds to many other carriers 
 with this version of Kannel without problems).  We've tried debugging the 
 issue with the carrier, but they aren't sure what the problem is and don't 
 seem able to help.

 We're running Kannel from subversion (release 5014).  Does anyone know what 
 the problem might be or how we can debug this?

 Thanks,

 -Stefan




Re: SQLBOX working - LIFO or FIFO

2013-11-12 Thread spameden
2013/11/12 ha...@aeon.pk ha...@aeon.pk:
 This is OK if SMSC does the re-ordering for congestion or some other
 reasons. But my concern is that messages should at least leave bbox in the
 same order by which they left the application.

 Since kannel is not giving me a proper method to sequence the messages, I am
 forced to use SLEEP method in PHP programming. It is hanging my server
 horribly in the presence of big traffic, choking both HTTP web server
 connections as well as backend database. I would be happy to find some/any
 method to maintain the sequence of msgs in kannel in FIFO order.

What I meant described here -
http://stackoverflow.com/questions/8458566/implementing-priority-queue-in-kannel/8543843#8543843

It worked just fine for us if there are lots of traffic.

Also you can use time field and add WHERE time =
UNIX_TIMESTAMP(NOW()) into the query.

If you deal with lots of bulk traffic you can add time delay (e.g.
send only 60 msg/minute or 10msg/sec).



 On Tue, Nov 12, 2013 at 7:38 PM, Rene Kluwen rene.klu...@chimit.nl wrote:

 But having said the below, sms messages are not guaranteed to arrive in a
 particular order.

 The remote smsc may still send out message 2 first, even when they
 received message 1 first.



 From: users [mailto:users-boun...@kannel.org] On Behalf Of Rene Kluwen
 Sent: dinsdag 12 november 2013 15:35
 To: ha...@aeon.pk; 'spameden'
 Cc: 'kannel users'
 Subject: RE: SQLBOX working - LIFO or FIFO



 There’s a ‘priority’ field in the Msg structure.

 I think it serves for the purpose that you want to.

 Just it’s you cannot set it in the send_sms table. Not sure why, but
 probably the field was added later.

 It shouldn’t be difficult to add though if anyone wants to send in a
 patch.



 == Rene



 From: users [mailto:users-boun...@kannel.org] On Behalf Of ha...@aeon.pk
 Sent: dinsdag 12 november 2013 15:28
 To: spameden
 Cc: kannel users
 Subject: Re: SQLBOX working - LIFO or FIFO



 Actually, if my understanding is correct (i.e. SQLBOX is already doing the
 right thing by giving messages in FIFO order to bbox, but bbox is shuffling
 the outgoing messages from within its buffer), then there is no point of
 adding priority column.



 What do you say?



 On Tue, Nov 12, 2013 at 6:28 PM, spameden spame...@gmail.com wrote:

 For priority I'd suggest adding a column called priority (typically
 int(3) integer between 0 and 999) and doing ORDER by that column.

 Do not forget to add an index as well or it might slow things down!

 2013/11/12 ha...@aeon.pk ha...@aeon.pk:

  Hi,
 
  Many thanks. I tried and tested it. It works fine for small chunks of
  data
  (I can see SMS going out of bbox in a sequence they were entered in
  send_sms
  table). However, for large amount of data (e.g. I sent a bulk of 20k SMS
  via
  SQLBOX), it does not follow the same rule. Is it bearerbox which
  shuffles
  the order of the SMS present in its buffer (not SQLBOX)? Any
  thoughts/experiences?
 
  Is there any parameter tweak in send_sms by which I could raise the
  priority
  of some SMS higher than others?
 
  Regards,
 
 
 
  On Mon, Nov 11, 2013 at 9:23 PM, spameden spame...@gmail.com wrote:
 
  Yes you can do this.
 
  Just alter gw/mysql_sqlbox.h and edit
 
  #define SQLBOX_MYSQL_SELECT_QUERY
 
  add there ORDER by sql_id ASC :)
 
  2013/11/11 ha...@aeon.pk ha...@aeon.pk:
   Hi,
  
   Does SQLBOX work in LIFO or FIFO order? For me, it's working as LIFO
   which
   is bad if I intend to send sequential message (message 1 needs to go
   first,
   but since message 2 comes later, it goes out first).
  
   Is there a way to make it operate in FIFO sequence, like ID'ing the
   messages
   or something?
  
   Regards,
   Hamza
 
 







Re: opensmppbox consume a lot of MEM

2013-11-12 Thread Minh Tuan
Thanks Rene for the reply.
Here is the valgrind running result. Actully i blind with this .

minhtuan@han-vasplatform-02:/etc/kannel$ sudo valgrind --tool=memcheck
--leak-check=full opensmppbox
==29801== Memcheck, a memory error detector
==29801== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==29801== Using Valgrind-3.9.0 and LibVEX; rerun with -h for copyright info
==29801== Command: opensmppbox
==29801==
2013-11-13 12:18:02 [29801] [0] INFO: Debug_lvl = -1, log_file = none,
log_lvl = 0
2013-11-13 12:18:03 [29801] [0] DEBUG: Loading include file
`/etc/kannel/smsc_fake.conf' (on line 55 of file kannel.conf).
2013-11-13 12:18:03 [29801] [0] DEBUG: Loading include file
`/etc/kannel/smsc_hn_live.conf' (on line 59 of file kannel.conf).
2013-11-13 12:18:03 [29801] [0] DEBUG: Loading include file
`/etc/kannel/service_ota.conf' (on line 63 of file kannel.conf).
2013-11-13 12:18:03 [29801] [0] DEBUG: Loading include file
`/etc/kannel/service_sms_survey.conf' (on line 65 of file kannel.conf).
2013-11-13 12:18:03 [29801] [0] DEBUG: Loading include file
`/etc/kannel/service_route.conf' (on line 67 of file kannel.conf).
2013-11-13 12:18:03 [29801] [0] DEBUG: Kannel opensmppbox version
svn-runknown gwlib version `svn-runknown'.
Build `Aug  1 2013 14:11:45', compiler `4.7.2'.
System Linux, release 3.2.0-4-686-pae, version #1 SMP Debian 3.2.46-1,
machine i686.
Hostname han-vasplatform-02, IP 127.0.1.1.
Libxml version 2.8.0.
Using OpenSSL 1.0.1e 11 Feb 2013.
Compiled with MySQL 5.5.31, using MySQL 5.5.31.
Using native malloc.

2013-11-13 12:18:04 [29801] [0] INFO: MYSQL: Connected to server at
localhost.
2013-11-13 12:18:04 [29801] [0] INFO: MYSQL: server version
5.5.31-0+wheezy1, client version 5.5.31.
2013-11-13 12:18:04 [29801] [0] INFO: DLR using storage type: mysql
2013-11-13 12:18:04 [29801] [0] PANIC: No 'opensmppbox' group in
configuration
2013-11-13 12:18:04 [29801] [0] PANIC: opensmppbox(gw_backtrace+0xb1)
[0x80a2411]
2013-11-13 12:18:04 [29801] [0] PANIC: opensmppbox(gw_panic+0xc3)
[0x80a24e3]
2013-11-13 12:18:04 [29801] [0] PANIC: opensmppbox(main+0x1230) [0x8053270]
2013-11-13 12:18:04 [29801] [0] PANIC:
/lib/i386-linux-gnu/i686/cmov/libc.so.6(__libc_start_main+0xe6) [0x476fe46]
2013-11-13 12:18:04 [29801] [0] PANIC: opensmppbox() [0x8053335]
==29801==
==29801== HEAP SUMMARY:
==29801== in use at exit: 226,184 bytes in 4,478 blocks
==29801==   total heap usage: 7,662 allocs, 3,184 frees, 560,035 bytes
allocated
==29801==
==29801== LEAK SUMMARY:
==29801==definitely lost: 0 bytes in 0 blocks
==29801==indirectly lost: 0 bytes in 0 blocks
==29801==  possibly lost: 0 bytes in 0 blocks
==29801==still reachable: 226,184 bytes in 4,478 blocks
==29801== suppressed: 0 bytes in 0 blocks
==29801== Reachable blocks (those to which a pointer was found) are not
shown.
==29801== To see them, rerun with: --leak-check=full --show-leak-kinds=all
==29801==
==29801== For counts of detected and suppressed errors, rerun with: -v
==29801== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 45 from 10)
minhtuan@han-vasplatform-02:/etc/kannel$

Brs,
Tuan.


On Tue, Nov 12, 2013 at 9:17 PM, Rene Kluwen rene.klu...@chimit.nl wrote:

 Sounds like a memory leak somewhere to me. And/or maybe a race condition.

 Maybe you can run one time with valgrind running?



 == Rene





 *From:* users [mailto:users-boun...@kannel.org] *On Behalf Of *Minh Tuan
 *Sent:* zaterdag 28 september 2013 5:22
 *To:* users@kannel.org
 *Subject:* opensmppbox consume a lot of MEM



 Dear all,

 I need help as opensmppbox is consuming a lot of my server's memory. After
 occupied 80% of RAM (total RAM is 2G), it's also eating 50% of swap memory
 (total 3G) and increasing.

 My configuration is:

 Client - opensmppbox(mysql dlr) - sqlbox - bearerbox(mysql dlr) -
 operator SMSC

 Opensmppbox has 1 Client only, but he is binding 6 connections (via
 Internet), with 50 short codes and ~30 TPS of throughput, connections are
 lost few times per day (automatic re-connect).



 Of course, i'm going to plug more RAM sticks in to server but i'm afraid
 of it will not help in this situation.

 Appreciate you guy can give me some advise and experience. Many thanks.

 Nguyen Minh Tuan from Vietnamobile.




-- 
  ((=o-( ',_,' )-o=))=

Bản chất tốt nhưng cuộc đời xô đẩy!