playSMS Forum

Playsms Unable to access Kannel admin commands

Hello,

I’m trying to defined the kannel as gateway but I’m getting “playsms Unable to access Kannel admin commands” I tried to echo the url in kannel.php it gave the correct URL with the password, I copied the URL and past into firefox it gave the result, so what is the possibility of playsms?? and why cannot get the result?

Regards

check here:

it means you need to configured the gateway to have correct sendsms host, admin port and admin password

anton

already opened the kannen.php and i echo the url concatenated with the kannel status… than i copied the full url and paste in url … the result is success as the url is correct and i got the kannel status

As you can see from the codes, the error message will be displayed when the $kannel_status is empty.

Since you said that you echoed the $url and test manually on browser and it shown, then it must be somehow the $kannel_status = @file_get_contents($url); wasn’t executed properly, or returning empty.

I don’t know why, yet, but you might want to try to remove the ‘@’ in file_get_contents see if it’ll popup some error message

anton

I tried to echo the url once again, and I got the following:

http://localhost:18000/status?password=shareolite

through shell, I ran the command wget http://localhost:18000/status?password=shareolite I went to the saved file and saw the result success :frowning:

Any suggestion ??? Please note that I removed the @ but didn’t get any response, is there any log file can assist?

Regards

i tried to echo the $kannel_status it gave empty, so finally I changed the file_get_contents to curl, it works as well.

So it seems the problem with that function it might be does not exists or something else.

Anyway I solved the problem now without any problem. :smile:
Regards

Hi Snake_eyes,
Please share code to change file_get_contents to curl.
Or perhaps share entire kannel.php that works for you.

Regards

Hi Anton,
Do you have a tested and working kannel.php for Centos 7?

Regards

I have got the same problem, any one who got the working kannel.php file for Centos 7?

Hi,

The big problem is not compatible with the SQLBOX of kannel, they are always using the http post, but it make delay in sending for something like 1,000,000 SMS

Is there any advice for this idea?

Regards

But the architecture is quite different, doesn´t? Sqlbox sits between smsbox and bearerbox.

What is your idea? Make playSMS insert messages directly into sqlbox tables? Not sure about DLR handling.

Regards

Yes exactly…

Let’s the playsms shoot the SMS & insert as one single line into table, and the Kannel via SQLBOX will handle the delivery, it most probably I have 3 connection to the same gateway as transmit and one only to retrieve the delivery… so I think would be better if changed the behavior to get full or more benefit of Kannel

Regards

Understand. Modify playsms to insert into sqlbox table isn´t difficult at all. I think that get dlr from sqlbox table is the point, or don´t?

Disabling SELINUX solved it

[root@localhost playsms]# sestatus
SELinux status: enabled
SELinuxfs mount: /sys/fs/selinux
SELinux root directory: /etc/selinux
Loaded policy name: targeted
Current mode: enforcing
Mode from config file: enforcing
Policy MLS status: enabled
Policy deny_unknown status: allowed
Max kernel policy version: 28

Disable manually as below. To make permanent see https://linuxize.com/post/how-to-disable-selinux-on-centos-7/

[root@localhost playsms]# sudo setenforce 0
[root@localhost playsms]#
[root@localhost playsms]#
[root@localhost playsms]# sestatus
SELinux status: enabled
SELinuxfs mount: /sys/fs/selinux
SELinux root directory: /etc/selinux
Loaded policy name: targeted
Current mode: permissive
Mode from config file: enforcing
Policy MLS status: enabled
Policy deny_unknown status: allowed
Max kernel policy version: 28