Messages stuck in queue, no corresponding queue_dst entry

Blacklisted queue entries still end up stuck in the queue with no corresponding dst row. The queue_code fix above eliminated the error for non-stoplisted texts.

Hi,

I’m not sure the uniqid() is the problem because in order to actually have the same unique ID the command need to be at the same time, literally, by micro seconds. And the creation of $queue_code is only at the beginning when you submit SMS. That means to get the same uniqid() return it must be submitted exactly at the same time, in micro second differences which is highly unlikely.

Update: was writing nano seconds, edited to micro seconds as the manual not mentioning nano seconds

Will take a look at the blacklist later.

anton

Hi,

I can replicate the issue following your advice on blacklist.

Here’s how:

  • add a number to stoplist
  • compose message to that stoplisted number and then send SMS
  • check queue

Were you sending SMS through Send from file ? Or webservices ?

anton

Webservices. Pretty high rate too

ok, when you sent through ws, 1 destination can be 1 queue_code, and then since that destination was blacklisted then that queue stucked

soon you had too many stucked queues, which make sendsmsd stop working on next available queue as the same stucked queues looped everytime and never removed

so, I will make 2 fixes:

  1. to remove faulty queue, or stucked queues, by looking for queue with flag 3 but have no destinations in queue_dst
  2. to fix how the queue management works in sendsmsd

anton

Please test the following changes:

Changes made only to playsmsd.php (playsmsd).

Here is the direct file:
https://raw.githubusercontent.com/antonraharja/playSMS/dfc6c8f8d8dd9d5b2156e8101f8e8be647836f2d/daemon/linux/bin/playsmsd.php

anton

Update, please use this file instead:
https://raw.githubusercontent.com/antonraharja/playSMS/d43444f60483f157f06e879b435f3db569a7fcf0/daemon/linux/bin/playsmsd.php

anton

OK I’ve applied the changes and restarted the daemon, will let you know how it goes. Thanks!

Last night I also changed these 2 files to add more check on empty queue and remove it immediately before handled by playsmsd:

anton

After I applied the second pair of files, SMS stopped sending and I lost about an hour of texts, don’t know where they went.

The second pair files only to stop empty queue before handled by playsmsd. You should get error right after sending from webservices.

anton

are these changes against 1.4?

Also my daemon is saying stopped in the log view page. weird.

they are all in master release (github)

just to be sure, you need to replace 3 files, fn_webservices.php, fn.php and playsmsd.php (renamed to playsmsd to replace your /usr/local/bin/playsmsd). after that restart playsmsd.

anton

I had to revert fn_webservices and fn.php as they broke the server and I lost about an hour of messages

I can confirm that using the master version I can send sms via webservices, in my test I sent 100 SMS with 1 number blocked, and the result was as expected, 99 SMS submitted, no stuck queue.

anton

Hello Anton,

i’m confused actually. i’m triying to install the Windows Version, everything is working fine, database ok, xampp ok, php5 ok, i can log in, but when i want to send a sms the message is only moving in the queue but not sended.

I install everything like your tutorial of [Rizki_Masjahri] Installing playsms on windows but still had the issue that i only get the sms in the queue with this message:

“Your SMS has been delivered to queue (queued: 1, failed: 0)”

When i test Gammu via CMD everything works finde and the message is also sent, but on playsms with gammu after i start the “playsms_gammu_start.bat” on windows it only queue’s the message.

Pleeeeasee i need your help, i am confused actually, cause this is a project for a company and i can’t use unix :frowning:

Thank you for each help…

Halim

Empty plaese help with this case i have the same issue