playSMS Forum

Sms stuck in pending after few are sent, ~50

Hello, my sms's are stuck in pending after a while let's say after it send 50 sms it stop sending and they stay with status pending and i don't know why. 
Here is my kannel config:
group = core
admin-port = 13000
admin-password = playsms
status-password = playsms
log-file = /var/log/kannel/kannel.log
log-level = 0
access-log = /var/log/kannel/access.log
smsbox-port = 13001
log-file = "/var/log/kannel/bearerbox.log"
box-deny-ip = "*.*.*.*"
box-allow-ip = "127.0.0.1"

group = smsc
smsc = at
smsc-id = my-smsc
modemtype = huawei
device = /dev/ttyUSB3
my-number = +40754333737
speed = 115200
validityperiod = 143
sim-buffering = true
log-file=/tmp/smsc.log
log-level=0

group = smsc
smsc = at
smsc-id = my-smsc
modemtype = huawei
device = /dev/ttyUSB0
my-number = +40754333737
speed = 115200
validityperiod = 143
sim-buffering = true
log-file=/tmp/smsc.log
log-level=0

group = smsc
smsc = at
smsc-id = my-smsc
modemtype = huawei
device = /dev/ttyUSB1
my-number = +40754333737
speed = 115200
validityperiod = 143
sim-buffering = true
max-error-count = 5

group = modems
id = huawei
name = "huawei"
detect-string = "huawei"
init-string = "AT+CFUN=1" 
init-string= “ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0″
init-string = “AT+CNMI=3,2,0,0,0″
init-string = “AT+CMEE=2;+CNMI=3,1,0,0,0″
need-sleep = true
sendline-sleep = 200
message-storage = "SM"

group = smsbox
bearerbox-host = localhost
sendsms-port = 13013
log-file=/tmp/smsbox.log
log-level=0

group = sms-service
keyword = default
catch-all = yes
max-messages = 0
get-url = "http://localhost/index.php?app=call&cat=gateway&plugin=kannel&access=geturl&t=%t&q=%q&a=%a&Q=%Q"

group = sendsms-user
username = playsms
password = playsms
max-messages = 5
concatenation = true

check bearerbox.log what error in there, and can you change the simcard and try again

anton

i checked the bearerbox, it seems after some time bearerbox disconnects from modem, and it can’t connect anymore.
2020-03-26 13:11:28 [1114] [9] ERROR: AT2[my-smsc]: Initialization of device failed. Attempt #0 on 5 max.
2020-03-26 13:11:28 [1114] [9] INFO: AT2[my-smsc]: Closing device
2020-03-26 13:11:28 [1114] [9] ERROR: AT2[my-smsc]: Couldn’t connect (retrying in 10 seconds).
2020-03-26 13:11:38 [1114] [9] INFO: AT2[my-smsc]: opening device
2020-03-26 13:11:38 [1114] [9] DEBUG: AT2[my-smsc]: device opened. Telnet mode = 0
2020-03-26 13:11:38 [1114] [9] DEBUG: AT2[my-smsc]: device opened
2020-03-26 13:11:38 [1114] [9] INFO: AT2[my-smsc]: Logging in
2020-03-26 13:11:39 [1114] [9] INFO: AT2[my-smsc]: init device
2020-03-26 13:11:39 [1114] [9] INFO: AT2[my-smsc]: speed set to 9600
2020-03-26 13:11:39 [1114] [9] DEBUG: AT2[my-smsc]: --> ATZ^M
2020-03-26 13:11:45 [1114] [9] ERROR: AT2[my-smsc]: Wrong or no answer to ATZ, ignoring
2020-03-26 13:11:45 [1114] [9] ERROR: AT2[my-smsc]: Initialization of device failed. Attempt #1 on 5 max.
2020-03-26 13:11:45 [1114] [9] INFO: AT2[my-smsc]: Closing device
2020-03-26 13:11:45 [1114] [9] ERROR: AT2[my-smsc]: Couldn’t connect (retrying in 10 seconds).

Read this how to make the modem device persistent: https://antonraharja.com/2015/05/14/persistent-paths-for-dynamic-device-file/

And then try stop kannel - unplug - replug - start kannel.

anton

Ok i’ll try that. One more question for sending a sms to 1000 numbers, playsms knows how to que them or should i make some more settings to kannel in order to not bottleneck

how can i resend msg’s that are in pending, because after kannel start working it does que those that are in playsms in pending anymore.

are you using the latest 1.4.3 ? if yes then playSMS daemon sendsmsd should process the queue

previous version has bug if the queue is more than 10 it wont process anything

anton

i have 1.4.2 can i install 1.4.3 over 1.4.2 ?

Backup first, backup files folders and DB. Stop playsmsd and then replace all files and folders. After that upgrade the DB with upgrade SQL file.

anton

ok i managed to update to 1.4.3.
i have some error i also had on 1.4.2 and i don’t know how to solve it.
2020-03-27 17:45:07 [1078] [6] DEBUG: SMSC[my-smsc]: DLR = http://localhost/index.php?app=call&cat=gateway&plugin=kannel&access=dlr&type=%d&smslog_id=4&uid=1&smsc=kannel
2020-03-27 17:45:07 [1078] [9] DEBUG: send_msg: sending msg to box: <127.0.0.1>
2020-03-27 17:45:07 [1078] [9] DEBUG: boxc_sender: sent message to <127.0.0.1>
2020-03-27 17:45:07 [1078] [8] DEBUG: boxc_receiver: got ack
2020-03-27 17:45:23 [1078] [8] DEBUG: boxc_receiver: heartbeat with load value 0 received
2020-03-27 17:45:24 [1078] [6] DEBUG: AT2[my-smsc]: <-- ^BOOT:45710760,0,0,0,20
2020-03-27 17:45:54 [1078] [6] DEBUG: AT2[my-smsc]: <-- ^BOOT:45710760,0,0,0,20
2020-03-27 17:46:07 [1078] [6] DEBUG: AT2[my-smsc]: --> AT+CPMS?^M
2020-03-27 17:46:07 [1078] [6] DEBUG: AT2[my-smsc]: <-- +CPMS: “SM”,1,5,“SM”,1,5,“SM”,1,5
2020-03-27 17:46:07 [1078] [6] DEBUG: AT2[my-smsc]: <-- OK
2020-03-27 17:46:07 [1078] [6] DEBUG: AT2[my-smsc]: 1 messages waiting in memory
2020-03-27 17:46:07 [1078] [6] DEBUG: AT2[my-smsc]: --> AT+CMGR=1^M
2020-03-27 17:46:07 [1078] [6] DEBUG: AT2[my-smsc]: <-- OK
2020-03-27 17:46:07 [1078] [6] DEBUG: AT2[my-smsc]: not deleted.
2020-03-27 17:46:07 [1078] [6] DEBUG: AT2[my-smsc]: --> AT+CMGR=2^M
2020-03-27 17:46:07 [1078] [6] DEBUG: AT2[my-smsc]: <-- OK
2020-03-27 17:46:07 [1078] [6] DEBUG: AT2[my-smsc]: not deleted.
2020-03-27 17:46:07 [1078] [6] DEBUG: AT2[my-smsc]: --> AT+CMGR=3^M
2020-03-27 17:46:07 [1078] [6] DEBUG: AT2[my-smsc]: <-- OK
2020-03-27 17:46:07 [1078] [6] DEBUG: AT2[my-smsc]: not deleted.
2020-03-27 17:46:07 [1078] [6] DEBUG: AT2[my-smsc]: --> AT+CMGR=4^M
2020-03-27 17:46:08 [1078] [6] DEBUG: AT2[my-smsc]: <-- OK
2020-03-27 17:46:08 [1078] [6] DEBUG: AT2[my-smsc]: not deleted.
2020-03-27 17:46:08 [1078] [6] DEBUG: AT2[my-smsc]: --> AT+CMGR=5^M
2020-03-27 17:46:08 [1078] [6] DEBUG: AT2[my-smsc]: <-- +CMS ERROR: 321
2020-03-27 17:46:08 [1078] [6] ERROR: AT2[my-smsc]: +CMS ERROR: +CMS ERROR: 321
2020-03-27 17:46:08 [1078] [6] ERROR: AT2[my-smsc]: +CMS ERROR: The memory/message storage index assigned to the AT command is invalid (321)
2020-03-27 17:46:08 [1078] [6] DEBUG: AT2[my-smsc]: failed to get message 5.

all this and above are not playSMS logs, its Kannels. tried googling with keywod “CMS 321 kannel” and found this: +CMS Error 321 with kannel

try it

anton

for some reason all my sms’s are with green status but kannel is not sending them. Why i get status green if sms is not sent?