I recently downloaded playsms and I think you have done a great job. While trying out the functions, I saw some error with debiting / crediting when I used the blocked gateway.
I tried to view the playsms.log and I noticed that the log “enter smsc” was not stored. This log is found in plugin/gateway/blocked/fn.php
I tried to set the error logstate to 3 and 4 in config.php but this statement still doesnt get logged to playsms.log.
Another issue I had was I wanted to slow the throughput so I added a sleep(10000) but I can see that the sleep call doesn’t work. Is there some function/ config I need to configure?
I used the send from file to test with 5000 numbers to blocked gateway and discovered that sleep() doesn’t seem to work and the _log missing in playsms.log.
check that you have enabled logstate 3, because the log is printed out on logstate 3
edit config.php on playSMS web root folder
look for logstate, and edit to 3, the default is 2
then dont forget to restart playsmsd, run: playsmsd restart on linux console
theres also possibility that the message didn’t routed to blocked, have you correctly configured route outgoing SMS ?
I usually set in Settings->Main configuration the default route to “blocked”, then route each prefix (like your country code or zero) in Settings->Route outgoing SMS.
Outgoing sms is routed correctly. Under sent messages these are reflected as failed and credits are refunded. I also checked MySQL and the SMSC is correctly pointed to the blocked gateway.
The strange thing is the log function doesn’t seem to print (I tried log state 3 and also amending fn.php to set the level to 2). The sleep function doesn’t work too.
Do I need to explicitly declare/ include the logger function again?
I tested with a testsleep.php file that is saved at playsms folder (same folder as index.php) and the sleep () function works perfectly. but when I add sleep () to the fn.php for dev gateway the sleep () function doesn’t work.
Does the daemon or some other script affect the sleep?
<php?
echo (“testing sleep function”);
for ($x=0; $x<10; $x++)
{sleep(5);
echo (“loop:” . $x . date (“h:i:sa”));