For example, setting up a GoIP SMS server in Ubuntu Server 14.04 LTS x64.
Switch immediately to root user:
Update the system, install the web server and mysql server:
apt-get update apt-get upgrade apt-get install apache2 php5 mysql-server
Let’s see if there are new versions of the SMS server here – http://www.hybertone.com/en/news_detail.asp?newsid=21
(For you, I saved an archive on Google Drive with the version I installed – goip_install-v1.24.2.tar.gz)
Download the archive with the goip SMS server in the temporary directory and run the installation script:
cd /tmp wget http://184.108.40.206/update/goip_install-v1.24.2.tar.gz tar xvfz goip_install-v1.24.2.tar.gz cd goip_install ./goip_install.sh
During installation, we will answer a few questions:
1) Location of the directory with the configuration of the web server (a file with web settings will be created), in my case it is /etc/apache2/conf-enabled
2) The root password of the user to the Mysql server (a goip database will be created)
3) The location of Mysql, it’s standard /usr/bin/mysql, just hit Enter
Restart the web server to load the configuration file from /etc/apache2/conf-enabled:
service apache2 restart
In the browser you can already open the control panel sms server http://HOSTNAME/goip
I have an error:
You don’t have permission to access /goip on this server.
The reason for this is the obsolete options in /etc/apache2/conf-enabled/goip.conf, I commented out the two lines with the # character and added a line after them:
# Order allow,deny # Allow from all Require all granted
After that, everything was opened, the standard login and root password.
We proceed to the setting.
In “System Manage” – “Provider Manage” we will add a provider, for this we indicate in Provider(1) his name or just the number by the numbers themselves.
Now let’s go to “System Manage” – “GoIP Manage“, click on the “Add GoIP” at the top and add an account for the first channel of the GoIP gateway (first Sim).
Open the web interface of the GoIP gateway and go to “Configurations” – “SMS” where we specify the parameters of this account.
SMS Server IP: SMS server address
SMS Server Port:44444
SMS Client ID: ks1
Send SMSC Number: Enable
After that, the SMS server “System Manage” – “GoIP Manage” should display the status “Login“.
If the Login status does not appear, I had it on Ubuntu Server 14.04 LTS x64 and noticed the message:
but cannot get response from process named “goipcron”
To solve this problem, the libraries had to be delivered:
cd /etc/apt/sources.list.d echo "deb http://old-releases.ubuntu.com/ubuntu/ raring main restricted universe multiverse" >ia32-libs-raring.list apt-get update apt-get install ia32-libs ln -s /var/run/mysqld/mysqld.sock /var/lib/mysql/mysql.sock
And run goipcron again:
cd /usr/local/goip ./run_goipcron
For autorun run_goipcron, create a file for example using the nano editor:
sudo nano /etc/init.d/goipcron
Add to file:
#! /bin/sh cd /usr/local/goip ./run_goipcron
Make the file executable:
sudo chmod +x /etc/init.d/goipcron
And add to autoload:
sudo update-rc.d goipcron defaults 80
On the server in case of problems with the connection, you can catch packets through tcpdump like this:
tcpdump -i any -vnn -s0 port 44444
The server can receive POST and GET requests, I will give an example of sending SMS (recipients in “smsnum =” you can specify a few commas without spaces, instead of “text” we specify our values):
Incoming SMS can be seen in Send Message – Inbox, outgoing in Send Message – Examine Sendings.
I will give examples of SQL queries that can be viewed/counted the number of SMS sent/delivered, sent/not delivered for all the time and on a specific date:
SELECT * FROM `sends` WHERE received=1; SELECT * FROM `sends` WHERE received=0; SELECT * FROM `sends` WHERE received=0 AND time LIKE '2017-02-05%';
If iptables is used on Linux, then we add a rule allowing the connection of the Goip4 gateway (where 192.168.2.2 is the Goip4 address of the gateway):
iptables -A INPUT -s 192.168.2.2/32 -p udp -m udp --dport 44444 -j ACCEPT