Syed Jahanzaib – Personal Blog to Share Knowledge !

May 8, 2015

Fun With SMS Management System [playSMS]

Filed under: Linux Related — Tags: , , , , , , , — Syed Jahanzaib / Pinochio~:) @ 4:26 PM

Note: This post is a drafted version which used beta version of playSMS at the time of writing. You may install latest stable release. 

1


Recently I installed playsms at a network [where Radius manager along with Kannel was already configured to send sms notifications to subscribers] and after seeing playSMS  amazing features , I thought to share some basics of it.

I found that many guides available on the internet for installing playSMS are either for older versions or with much manual methods which can be sometimes confusing for the beginners, therefore I decided to write an easier version of installation guide of playSMS.

 

kick

 

So what is playSMS ?

playSMS_logo_full

playSMS is a Free and Open Source web base SMS management software. designed by Mr. Anton Raharja at http://playsms.org.

Its main job is to handle outgoing and incoming SMS, single or bulk SMS. You can call it ‘SMS Gateway’ . A flexible Web-based mobile portal system that it can be made to fit to various services such as an SMS gateway, bulk SMS provider, personal messaging system, corporate and group communication tools

Since its open-source application therefore you can adjust it to suite your need, modify it as per your requirements and it can fit with other gateways as well like Kannel (which I have used in radius box). It can receive sms and act accordingly, you can create POLL, Quiz, subscription to any list/package via SMS. SMS 2 Email, Refresh user account via sms using scratch card like wi-tribe or some other ISP’s offers, or mobile companies like send sms to specific number with the specific text and scratch number, inquire system detail , execute specific command, etc etc.

Feature Highlights of playSMS [from official site]

  • Multiple database engine supported (through PHP PEAR DB)
  • Send SMS to single mobile phone
  • Send SMS broadcasted to a group of mobile phones, or SMS bulk
  • Support sending text, flash and unicode messages
  • Capable of handling large amount of SMS (user reported 500k SMS monthly)
  • Receive private SMS to Inbox and forward it to email (mobile2web) and user’s mobile phone
  • Forward single SMS from mobile to a group of mobile phones
  • Provides SMS to email and email to SMS by polling mailbox
  • SMS autoreply, for easy autoreplying formatted incoming SMS
  • SMS board, forward received SMS to email, export output in JSON and a few other formats
  • SMS command, execute server side shell script using SMS
  • SMS custom, forward incoming SMS to custom apps, locally or hosted on external URL
  • SMS poll, manage polling system using SMS, export output in graph, JSON and other formats
  • SMS quiz, serve quizzes on SMS
  • SMS subscribe, manage user subscribes to a service using SMS
  • SMS sync to utilize SMSSync app from http://smssync.ushahidi.com
  • Create your own features, tools, themes and gateway modules as a plugin
  • Supports Gammu, Gnokii, Kannel, SMS Server Tools, Msgtoolbox, Uplink, Nexmo, Twilio, Infobip and Clickatell
  • Supports multiple active SMSC
  • Supports simulation gateway for testing incoming and outgoing SMS
  • Route outgoing SMS by prefix
  • Route outgoing SMS per user
  • Webservices for sending SMS, retrieving delivery reports, checking credits and more
  • Long SMS support, length of text is configurable
  • Rate SMS by destination prefix
  • SMS credit system per user
  • Multiple SMSC activated and rout-able
  • Timezone settings
  • Multi-language user interface (English, French, Bahasa Indonesia, Russian and a few others)
  • Easily add new language for user interface
  • Web-based interface
  • Android client app

I used playSMS in conjunction with Kannel. So you should configure Kannel first and make sure you can send sms via kannel. You can follow my guide to install KANNEL first.

https://aacable.wordpress.com/2012/11/26/howto-configure-your-local-http-gateway-using-kannel-on-ubuntu/

 


Since its a long post with various section, I will update various section accordingly.

Sections:

 

  1. Hardware / Software used for this guide
  2. Kannel.Conf Sample for playSMS
  3. playSMS Install Instructions for Ubuntu OS
  4. Configuration of playSMS via admin panel
  5. Configure GATEWAY section to enable playsms send/receive sms
  6. Sending Test Message
  7. TROUBLESHOOTING VIA  LOGS
  8. Creating User Account with CREDITS base system, and send / receive in User Inbox / a type of SMS PABX 😀
  9. Creating COMMAND to be executed via SMS
  10. Creating SMS base POLL system
  11. Scheduling SMS to be send at specific time to person or group   [added on 11th May, 2014]
  12. Add SMS base QUIZ System    [added on 11th May, 2014]

 

1- Hardware / Software used for this guide

  • OS = Ubuntu 12.04.5 LTS , 32bit
  • Hardware = Teltonika Modem USB/E12 UM1400 [This is best modem I have ever used, very stable 🙂 but you can use any cheaper model too like Dlink DWM-156 I have also used, but sometimes I have to simply restart it or sometimes it gives unpredictable results

 

2- Kannel.Conf Sample for playSMS

As I mentioned in the beginning, I used KANNEL as gateway for playSMS, so you should configure KANNEL first and make sure you can send sms with it. Once successful, then you can add/replace following SMS_SERVICE section in /etc/kannel.conf to make playSMS handle the received SMS.

/etc/kannel/kannel.conf , modify only SMS-SERVICE section

group = sms-service
keyword = default
get-url = "http://localhost/playsms/index.php?app=call&cat=gateway&plugin=kannel&access=geturl&t=%t&q=%q&a=%a&Q=%Q"
accept-x-kannel-headers = true
max-messages = 1000
concatenation = true
catch-all = true
text = "Galaxy ROBOT by Zaib"
omit-empty = true

 

3- PLAYSMS [ver 1.0-rc9] Install Instructions for UBUNTU OS.

[Please download latest version available]

As usual first update Ubuntu , then install require packages.

apt-get update

apt-get install apache2 mysql-server php5 php5-cli php5-mysql php5-cgi php-pear php-gettext libapache2-mod-php5 apache2-mpm-prefork php-db make gcc lynx wget curl

Now you need to create MYSQL database for playsms. You can create it either via login to your mysql console , or issue direct command to create it as showed in the example below …

mysql -u root -pROOTPASS -e "create database playsms";
mysql -u root -pROOTPASS -e "grant usage on *.* to playsms@localhost identified by 'playsms';"

Change credentials as required.


Installing playSMS …

First download the playsms package, and unrar it

mkdir /temp
cd /temp
wget https://github.com/antonraharja/playSMS/archive/1.0-rc9.tar.gz
ls
tar zxvf 1.0-rc9.tar.gz
cd playSMS-1.0-rc9/
cp install.conf.dist install.conf

Now edit install.conf and change the info as required, like db name, mysql id password. The installer script uses this file to pick values and install the package accordingly. So make sure all directives are defined properly before firing up the actuall installation script.
Also make sure you change the PATH to match your linux distribution, like in ubuntu the path of www is /var/www

1

Once you done editing info, press b to continue & it will continue to install the playsms.

once all done verify that you can see the playsms in process

root@radius:/temp/playSMS-1.0-rc9# ps aux |grep playsms
root      4568  0.6  0.3  51032 15844 pts/1    S    10:58   0:26 /usr/bin/php -q /usr/local/bin/playsmsd schedule
root      4570  0.7  0.3  51032 15876 pts/1    S    10:58   0:30 /usr/bin/php -q /usr/local/bin/playsmsd dlrssmsd
root      4572  0.6  0.3  51816 16496 pts/1    S    10:58   0:27 /usr/bin/php -q /usr/local/bin/playsmsd recvsmsd
root      4574  0.5  0.3  51032 15412 pts/1    S    10:58   0:23 /usr/bin/php -q /usr/local/bin/playsmsd sendsmsd
root     20560  0.0  0.0   4388   824 pts/0    S+   12:06   0:00 grep --color=auto playsms

root@radius:/temp/playSMS-1.0-rc9#

If you see playSMS running, basic installation part is done, now moving to Configuration part…


4- Configuration of playSMS via admin panel …

Now login to playSMS web admin panel by

http://yourip/smsplay

Use default id password which is

id = admin
password = admin

2


5- Configure GATEWAY section to enable playsms send/receive sms

After successful login we have to first configure GATEWAY pointing to KANNEL to send receive sms using kannel as our main gateway. You can skip kannel or use other gateway too depend on your choice, but since I was already using kannel because of Radius Manager, so I simply used it because of its versatility and highly customization.

Goto Settings / Manage gateway and SMSC
As showed in the image below …

3


 

Now in the List of gateways, click on edit button (wheel) next to KANNEL.
As showed in the image below …

4

Now at Manage Kannel window adjust the parameters according to your old kannel configuration. pay attention to username password & proper ports.
As showed in the image below …

5Now save it.

 

Open Manage Gateway page again and click on + sign to add KANNEL as your gw.
As showed in the image below …

6


 

 

Now goto Settings / Main Configuration and select KANNEL as your Default SMSC
As showed in the image below …

7Save it.


 

6- SENDING TEST MESSAGE

Ok its time to hit the road.  for some test.

Goto My account / Compose Message and send msg to any number.
As showed in the image below …

8

and you should receive it on your handset.
As showed in the image below …

9


7- TROUBLESHOOTING VIA  LOGS

You can inspect logs in following folders (for playSMS)

tail -f /var/log/playsms/playsms.log

Successful sms sent result should be something like this

YOUR_IP YOUR_IP 2015-05-08 12:28:32 PID554c659fcb40d admin L2 sendsms # start uid:1 sender_id:[1234] smsc:[]
YOUR_IP YOUR_IP 2015-05-08 12:28:32 PID554c659fcb40d admin L3 sendsms # maxlen:459 footerlen:7 footer:[ @admin] msglen:57 message:[test msg from zaib to mobile using playsms with kannel :)]
YOUR_IP YOUR_IP 2015-05-08 12:28:32 PID554c659fcb40d admin L2 sendsms_queue_create # saving queue_code:8cf227742d7d5dab570f7ed4532cf936 src:1234 scheduled:2015-05-08 12:28:32
YOUR_IP YOUR_IP 2015-05-08 12:28:32 PID554c659fcb40d admin L2 sendsms_queue_create # saved queue_code:8cf227742d7d5dab570f7ed4532cf936 id:14
YOUR_IP YOUR_IP 2015-05-08 12:28:32 PID554c659fcb40d admin L3 sendsms_manipulate_prefix # before prefix manipulation:[03333021909]
YOUR_IP YOUR_IP 2015-05-08 12:28:32 PID554c659fcb40d admin L3 sendsms_manipulate_prefix # after prefix manipulation:[03333021909]
YOUR_IP YOUR_IP 2015-05-08 12:28:32 PID554c659fcb40d admin L3 simplerate_hook_rate_getbyprefix # rate not found to:03333021909 default_rate:0
YOUR_IP YOUR_IP 2015-05-08 12:28:32 PID554c659fcb40d admin L3 simplerate_hook_rate_getcharges # uid:1 u:admin len:64 unicode:0 to:03333021909 enable_credit_unicode:0 count:1 rate: charge:0
YOUR_IP YOUR_IP 2015-05-08 12:28:32 PID554c659fcb40d admin L2 sendsms # dst:1 sms_count:1 total_charges:0
YOUR_IP YOUR_IP 2015-05-08 12:28:32 PID554c659fcb40d admin L2 sendsms_queue_push # saving queue_code:8cf227742d7d5dab570f7ed4532cf936 dst:03333021909
YOUR_IP YOUR_IP 2015-05-08 12:28:32 PID554c659fcb40d admin L2 sendsms_queue_push # saved queue_code:8cf227742d7d5dab570f7ed4532cf936 smslog_id:14
YOUR_IP YOUR_IP 2015-05-08 12:28:32 PID554c659fcb40d admin L2 sendsms # end queue_code:8cf227742d7d5dab570f7ed4532cf936 queue_count:1 sms_count:1 failed_queue:0 failed_sms:0
- - 2015-05-08 12:28:32 PID554c65a055703 - L2 sendsmsd # start processing queue_code:8cf227742d7d5dab570f7ed4532cf936 sms_count:1 scheduled:2015-05-08 12:28:32 uid:1 gpid:0 sender_id:1234
- - 2015-05-08 12:28:32 PID554c65a055703 - L2 sendsmsd # sending queue_code:8cf227742d7d5dab570f7ed4532cf936 smslog_id:14 to:03333021909 sms_count:1 counter:1
- - 2015-05-08 12:28:32 PID554c65a055703 - L3 sendsms_intercept # msgtemplate modified sms_sender:[1234] sms_footer:[@admin] sms_to:[03333021909] sms_msg:[test msg from zaib to mobile using playsms with kannel :)] uid:[1] gpid:[0] sms_type:[text] unicode:[0] queue_code:[8cf227742d7d5dab570f7ed4532cf936] smsc:[]
- - 2015-05-08 12:28:32 PID554c65a055703 - L3 outgoing_hook_sendsms_intercept # no SMSC found uid:1 parent_uid:0 from:1234 to:03333021909
- - 2015-05-08 12:28:32 PID554c65a055703 - L2 sendsms_process # start
- - 2015-05-08 12:28:32 PID554c65a055703 - L3 simplerate_hook_rate_getbyprefix # rate not found to:03333021909 default_rate:0
- - 2015-05-08 12:28:32 PID554c65a055703 - L3 simplerate_hook_rate_getcharges # uid:1 u:admin len:64 unicode:0 to:03333021909 enable_credit_unicode:0 count:1 rate: charge:0
- - 2015-05-08 12:28:32 PID554c65a055703 - L2 simplerate__cansend # allowed user uid:1 sms_to:03333021909 credit:0.000 count:1 rate: charge:0 balance:0
- - 2015-05-08 12:28:32 PID554c65a055703 - L2 sendsms # saving smslog_id:14 u:1 g:0 gw:kannel smsc:kannel s:1234 d:03333021909 type:text unicode:0 status:0
- - 2015-05-08 12:28:32 PID554c65a055703 - L2 sendsms_process # saved smslog_id:14 id:14
- - 2015-05-08 12:28:32 PID554c65a055703 - L3 sendsms # final smslog_id:14 gw:kannel smsc:kannel message:test msg from zaib to mobile using playsms with kannel 🙂 @admin len:64
- - 2015-05-08 12:28:32 PID554c65a055703 - L3 kannel_hook_sendsms # enter smsc:kannel smslog_id:14 uid:1 to:03333021909
- - 2015-05-08 12:28:32 PID554c65a055703 - L3 kannel_hook_sendsms # URL: http://localhost:13013/cgi-bin/sendsms?username=kannel&password=KANNELPASSWORD&from=1234&to=03333021909&dlr-mask=31&dlr-url=http%3A%2F%2Fclick.onmypc.net%3A1235%2Fplaysms%2Findex.php%3Fapp%3Dcall%26cat%3Dgateway%26plugin%3Dkannel%26access%3Ddlr%26type%3D%25d%26smslog_id%3D14%26uid%3D1&account=admin&text=test+msg+from+zaib+to+mobile+using+playsms+with+kannel+%3A%29+%40admin
- - 2015-05-08 12:28:32 PID554c65a055703 - L3 kannel__outgoing # smslog_id:14 response:0: Accepted for delivery
- - 2015-05-08 12:28:32 PID554c65a055703 - L3 dlr # isdlrd:1 smslog_id:14 p_status:0 uid:1
- - 2015-05-08 12:28:32 PID554c65a055703 - L3 kannel__outgoing # end smslog_id:14 p_status:0
- - 2015-05-08 12:28:32 PID554c65a055703 - L2 simplerate__deduct # enter smslog_id:14
- - 2015-05-08 12:28:32 PID554c65a055703 - L3 simplerate_hook_rate_getbyprefix # rate not found to:03333021909 default_rate:0
- - 2015-05-08 12:28:32 PID554c65a055703 - L3 simplerate_hook_rate_getcharges # uid:1 u:admin len:64 unicode:0 to:03333021909 enable_credit_unicode:0 count:1 rate: charge:0
- - 2015-05-08 12:28:32 PID554c65a055703 - L2 credit_hook_rate_setusercredit # no changes uid:1 balance:0
- - 2015-05-08 12:28:32 PID554c65a055703 - L2 simplerate__deduct # user uid:1 parent_uid: smslog_id:14 msglen:64 count:1 rate: charge:0 credit:0.000 balance:0
- - 2015-05-08 12:28:32 PID554c65a055703 - L2 simplebilling__post # saving smslog_id:14 rate: credit:0.000 count:1 charge:0
- - 2015-05-08 12:28:32 PID554c65a055703 - L2 simplebilling__post # saved smslog_id:14 id:14
- - 2015-05-08 12:28:32 PID554c65a055703 - L3 simplerate__deduct # deduct successful uid:1 parent_uid: smslog_id:14
- - 2015-05-08 12:28:32 PID554c65a055703 - L3 simplerate__deduct # credit_lowest_limit:0 balance:0 charge:0
- - 2015-05-08 12:28:32 PID554c65a055703 - L2 sendsms_process # end
- - 2015-05-08 12:28:32 PID554c65a055703 - L2 sendsmsd # result queue_code:8cf227742d7d5dab570f7ed4532cf936 to:03333021909 flag:1 smslog_id:14
- - 2015-05-08 12:28:32 PID554c507a0ec86 - L3 dlrd # id:14 smslog_id:14 p_status:0 uid:1
- - 2015-05-08 12:28:32 PID554c65a055703 - L2 sendsmsd # finish processing queue_code:8cf227742d7d5dab570f7ed4532cf936 uid:1 sender_id:1234 sms_count:1

[Be aware that I used Log Level 3 [debug mode to get more info] which is configurable in /var/www/playsms/config.php ]


 

8- Creating User Account with CREDITS base system, and send / receive in User Inbox / a type of SMS PABX 😀

Using playSMS, we can create user accounts and add credits in it, so when user sends sms, balance would deduct from his account automatically , and once his balance finishes, he wont be able to send sms. User will be assigned with an ID and Password, He can send SMS via web panel, also he can receive SMS (the other party must reply to or send sms with @username in his sms in order to receive it in specific user inbox).

 

Enable SMS Routing to INBOX in playSMS

  • First enable Route incoming SMS
  • Goto  Settings / Route Incoming SMS
  • Select YES in Scan incoming SMS for @username and Scan incoming SMS for #groupcode
  • and SAVE.

 

10

 

Create User Account 

Now we will create a test user account and will add credits in it too.

  • Goto Settings / Manage Account > User
  • Click on + sign to add user

Add the details as required and click on SAVE.
As showed in the image below …

11

User Account Creation Done.

ADDING CREDITS in user Account

To add credits in user account,

  • Goto Settings / Manage Credit
  • Click on + sign
  • Select User
  • Add amount and Save

24

 

 

Now logout from admin ID, or use another browser to login to playSMS panel with the newly created account and send an test sms  to any number. After sending sms, you will see that your balance will be deducted (I added 10rs as a balance, and set per sms cost 5rs, so after sending my remaining balance is 5 rs only

12

Howto receive SMS in user INBOX ?

You have to inform the sender that they have to add @username in there sms , otherwise SMS will receive in SANDBOX, not user inbox.

Example for sender format

@test Ok I have received the sms” and send it to playSMS mobile number.
As showed in the image below …

14

Now the user test can goto My Account / Inbox and there he can see the received SMS.
As showed in the image below …

13

You can also setup SMS 2 EMAIL, SMS Forwarding to USER Mobile , etc etc , Its amazing that free open source tool can provide you this much Power of FREEDOM 🙂

 


 

9- Creating SMS base POLL system

You can create SMS poll system in playSMS, a kind of voting system as well so user can send sms to playSMS mobile number with his choice , and his entry will be made in the poll and will be visible via web page or likewise.

For example network operator wants to know how user feel about his network services. Follow this.

Goto Features / Manage Poll

Click on Add SMS poll

Now Add details, like

15 - Add Poll

.

Now Go back to MANAGE POLL , you will see Orange box on your newly created poll, which means its not activated yet, So simply click on the orange box to make it ACTIVE.

16

After Activation you will see something like below …

17

 

Casting VOTE to POLL

Now to cast vote, send SMS (with different choices multiple time for test) from user to playSMS number.

poll 1

19

 

Now to view POLL TEST result, goto Features / Manage POLL, there you will an EYE icon next to your POLL, click on it and you will be brought to POLL details.
As showed in the image below …

21

 


 

10- Creating COMMAND to be executed via SMS

You can create COMMAND base system and can execute script on the playSMS server, and it can reply you back with the result. For example If we want to inquire the UPTIME details via SMS.

  • Goto Features / Manage Command
  • Click on ADD SMS COMMAND
  • in SMS command keyword, add the catching word which playSMS will detect and consider it as COMMAND sms, and will run the command.
  • in SMS command exec, type the name of script (example status.sh) which will be executed , Make sure your scripts are in following folder

/var/lib/playsms/sms_command/1

  • Click on Make Return as Reply
  • Click on SAVE

As showed in the image below …

22

Now at playSMS server console , goto /var/lib/playsms/sms_command/1 and create simple script like.

  • touch status.sh
  • chmod + status.sh
  • nano status.sh
  • and add following command in it

uptime

Save & exit. And also run this command to verify if its working on console fine.

Now send sms to playSMS server like

run status.sh

and you will be replied back shortly from playSMS with the uptime status.
As showed in the image below …

23- command


11- Scheduling SMS to be send at specific time to person or group

playSMS have a very good feature to schedule SMS to be sent later or specific time, like a reminder too. It’s very useful for duffers like me who have week memory 😀

To schedule a message,

Goto My Account / Schedule Message
and click on Add SMS Schedule

25- schdume msg

.

26- sch msgs msg

27- sch activate

First click on MANAGE (File Icon) and add the destination number and time

add-schuedl-etime

Click on SAVE and click on BACK, MAKE SURE TO click click on STATUS button (which is by default ORANGE means disabled, click it on to make GREEN, ACTIVE, This is important.

and here you can see the activity of playSMS in logs at that specific time.


- - 2015-05-11 09:04:59 PID554f7dbb44982 - L2 schedule_hook_playsmsd # sendsms uid:1 schedule_id:1 id:1 rule:0 schedule:[2014-05-11 09:06:00] scheduled:[2015-05-11 09:04:59]
- - 2015-05-11 09:04:59 PID554f7dbb44982 admin L2 sendsms # start uid:1 sender_id:[1234] smsc:[]
- - 2015-05-11 09:04:59 PID554f7dbb44982 admin L3 sendsms # maxlen:452 footerlen:7 footer:[ @admin] msglen:82 message:[Wife_Birthday, Don't forget to bring Gift or You will regret it for a long time :P]
- - 2015-05-11 09:04:59 PID554f7dbb44982 admin L2 sendsms_queue_create # saving queue_code:f2dd9833fb12f33283b424571d58c885 src:1234 scheduled:2015-05-11 09:04:59
- - 2015-05-11 09:04:59 PID554f7dbb44982 admin L2 sendsms_queue_create # saved queue_code:f2dd9833fb12f33283b424571d58c885 id:35
- - 2015-05-11 09:04:59 PID554f7dbb44982 admin L3 sendsms_manipulate_prefix # before prefix manipulation:[03333021909]
- - 2015-05-11 09:04:59 PID554f7dbb44982 admin L3 sendsms_manipulate_prefix # after prefix manipulation:[03333021909]
- - 2015-05-11 09:04:59 PID554f7dbb44982 admin L3 simplerate_hook_rate_getbyprefix # rate not found to:03333021909 default_rate:5
- - 2015-05-11 09:04:59 PID554f7dbb44982 admin L3 simplerate_hook_rate_getcharges # uid:1 u:admin len:89 unicode: to:03333021909 enable_credit_unicode:0 count:1 rate:5 charge:5
- - 2015-05-11 09:04:59 PID554f7dbb44982 admin L2 sendsms # dst:1 sms_count:1 total_charges:5
- - 2015-05-11 09:04:59 PID554f7dbb44982 admin L2 sendsms_queue_push # saving queue_code:f2dd9833fb12f33283b424571d58c885 dst:03333021909
- - 2015-05-11 09:04:59 PID554f7dbb44982 admin L2 sendsms_queue_push # saved queue_code:f2dd9833fb12f33283b424571d58c885 smslog_id:29
- - 2015-05-11 09:04:59 PID554f7dbb44982 admin L2 sendsms # end queue_code:f2dd9833fb12f33283b424571d58c885 queue_count:1 sms_count:1 failed_queue:0 failed_sms:0
- - 2015-05-11 09:05:00 PID55502a6c2d5bc - L2 sendsmsd # start processing queue_code:f2dd9833fb12f33283b424571d58c885 sms_count:1 scheduled:2015-05-11 09:04:59 uid:1 gpid:0 sender_id:1234
- - 2015-05-11 09:05:00 PID55502a6c2d5bc - L2 sendsmsd # sending queue_code:f2dd9833fb12f33283b424571d58c885 smslog_id:29 to:03333021909 sms_count:1 counter:1
- - 2015-05-11 09:05:00 PID55502a6c2d5bc - L3 sendsms_intercept # msgtemplate modified sms_sender:[1234] sms_footer:[@admin] sms_to:[03333021909] sms_msg:[Wife_Birthday, Don't forget to bring Gift or You will regret it for a long time :P] uid:[1] gpid:[0] sms_type:[text] unicode:[0] queue_code:[f2dd9833fb12f33283b424571d58c885] smsc:[]
- - 2015-05-11 09:05:00 PID55502a6c2d5bc - L3 outgoing_hook_sendsms_intercept # no SMSC found uid:1 parent_uid:0 from:1234 to:03333021909
- - 2015-05-11 09:05:00 PID55502a6c2d5bc - L2 sendsms_process # start
- - 2015-05-11 09:05:00 PID55502a6c2d5bc - L3 simplerate_hook_rate_getbyprefix # rate not found to:03333021909 default_rate:5
- - 2015-05-11 09:05:00 PID55502a6c2d5bc - L3 simplerate_hook_rate_getcharges # uid:1 u:admin len:89 unicode:0 to:03333021909 enable_credit_unicode:0 count:1 rate:5 charge:5
- - 2015-05-11 09:05:00 PID55502a6c2d5bc - L2 simplerate__cansend # allowed user uid:1 sms_to:03333021909 credit:55500.000 count:1 rate:5 charge:5 balance:55495
- - 2015-05-11 09:05:00 PID55502a6c2d5bc - L2 sendsms # saving smslog_id:29 u:1 g:0 gw:kannel smsc:kannel s:1234 d:03333021909 type:text unicode:0 status:0
- - 2015-05-11 09:05:00 PID55502a6c2d5bc - L2 sendsms_process # saved smslog_id:29 id:29
- - 2015-05-11 09:05:00 PID55502a6c2d5bc - L3 sendsms # final smslog_id:29 gw:kannel smsc:kannel message:Wife_Birthday, Don't forget to bring Gift or You will regret it for a long time 😛 @admin len:90
- - 2015-05-11 09:05:00 PID55502a6c2d5bc - L3 kannel_hook_sendsms # enter smsc:kannel smslog_id:29 uid:1 to:03333021909
- - 2015-05-11 09:05:00 PID55502a6c2d5bc - L3 kannel_hook_sendsms # URL: http://localhost:13013/cgi-bin/sendsms?username=kannel&password=KANNEL_PASSWORD&from=1234&to=03333021909&dlr-mask=31&dlr-url=http%3A%2F%2Fclick.onmypc.net%3A1235%2Fplaysms%2Findex.php%3Fapp%3Dcall%26cat%3Dgateway%26plugin%3Dkannel%26access%3Ddlr%26type%3D%25d%26smslog_id%3D29%26uid%3D1&account=admin&text=Wife_Birthday%2C+Don%27t+forget+to+bring+Gift+or+You+will+regret+it+for+a+long+time+%3AP+%40admin
- - 2015-05-11 09:05:00 PID55502a6c2d5bc - L3 kannel__outgoing # smslog_id:29 response:0: Accepted for delivery
- - 2015-05-11 09:05:00 PID55502a6c2d5bc - L3 dlr # isdlrd:1 smslog_id:29 p_status:0 uid:1
- - 2015-05-11 09:05:00 PID55502a6c2d5bc - L3 kannel__outgoing # end smslog_id:29 p_status:0
- - 2015-05-11 09:05:00 PID55502a6c2d5bc - L2 simplerate__deduct # enter smslog_id:29
- - 2015-05-11 09:05:00 PID55502a6c2d5bc - L3 simplerate_hook_rate_getbyprefix # rate not found to:03333021909 default_rate:5
- - 2015-05-11 09:05:00 PID55502a6c2d5bc - L3 simplerate_hook_rate_getcharges # uid:1 u:admin len:89 unicode:0 to:03333021909 enable_credit_unicode:0 count:1 rate:5 charge:5
- - 2015-05-11 09:05:00 PID55502a6c2d5bc - L2 credit_hook_rate_setusercredit # saving uid:1 balance:55495
- - 2015-05-11 09:05:00 PID55502a6c2d5bc - L2 credit_hook_rate_setusercredit # saved uid:1 balance:55495
- - 2015-05-11 09:05:00 PID55502a6c2d5bc - L2 simplerate__deduct # user uid:1 parent_uid: smslog_id:29 msglen:89 count:1 rate:5 charge:5 credit:55500.000 balance:55495
- - 2015-05-11 09:05:00 PID55502a6c2d5bc - L2 simplebilling__post # saving smslog_id:29 rate:5 credit:55500.000 count:1 charge:5
- - 2015-05-11 09:05:00 PID55502a6c2d5bc - L2 simplebilling__post # saved smslog_id:29 id:28
- - 2015-05-11 09:05:00 PID55502a6c2d5bc - L3 simplerate__deduct # deduct successful uid:1 parent_uid: smslog_id:29
- - 2015-05-11 09:05:00 PID55502a6c2d5bc - L3 simplerate__deduct # credit_lowest_limit:0 balance:55495 charge:5
- - 2015-05-11 09:05:00 PID55502a6c2d5bc - L2 sendsms_process # end
- - 2015-05-11 09:05:00 PID55502a6c2d5bc - L2 sendsmsd # result queue_code:f2dd9833fb12f33283b424571d58c885 to:03333021909 flag:1 smslog_id:29
- - 2015-05-11 09:05:00 PID55502a6c2d5bc - L2 sendsmsd # finish processing queue_code:f2dd9833fb12f33283b424571d58c885 uid:1 sender_id:1234 sms_count:1
- - 2015-05-11 09:05:00 PID554f7dbb4db5f - L3 dlrd # id:29 smslog_id:29 p_status:0 uid:1

 

 

and reminder will be sent precisely 🙂

wbd

 

 


12- Add SMS base QUIZ System

  1. To add QUIZ
  2. Goto Features, Manage Quiz
  3. Click on ADD SMS QUIZ, and follow screenshot.

quiz-1

Click on SAVE , and then click on BACK, again make sure you click on STATUS icon to make it active otherwise it will remain dead body.

Now send SMS with the keyword and answer like as showed in the image below …

quiz-3


 

I will write more later …

If this guide helps you in any way, don’t forget to give credit :~)

 

Regard’s
Syed Jahanzaib

26 Comments »

  1. Its Really Amazing ! 😀 Please Update the blog if you have some other Information about playsms.
    Thank you
    Regards
    Ismail Khan

    Like

    Comment by Ismail — May 8, 2015 @ 4:54 PM

  2. I have centos Mini data base is created by following
    mysql -u root -p
    create database playsms;
    grant all privileges on playsms.* to playsms@’localhost’ identified by ‘playsms’;
    flush privileges;

    Like

    Comment by Jawwad Hussain — May 8, 2015 @ 6:36 PM

  3. Dear Zeb sb

    kindly mention the required hardware for this scenario along with ntegration with RM, so username password and package update etc credentials could be sent to user mobile number.

    Regards

    Khalid Mehmood

    Like

    Comment by Khalid Mehmood — May 9, 2015 @ 1:27 PM

  4. I will wait for your kind reply

    Like

    Comment by Khalid Mehmood — May 9, 2015 @ 1:29 PM

  5. […] playSMS with Kannel is already configured and working in separate box (Ubuntu) […]

    Like

    Pingback by Sharing Ideas … Mikrotik with Kannel/playSMS | Syed Jahanzaib Personnel Blog to Share Knowledge ! — May 12, 2015 @ 3:30 PM

  6. it support any gateway for send sms

    Like

    Comment by brij — June 24, 2015 @ 9:40 AM

  7. I can’t receive sms !!

    Like

    Comment by maynou — July 13, 2015 @ 4:30 PM

  8. very amazing!
    Don’t forget to update it!
    me i want to test all of this whith fakesmsc?
    Ideas to help me??

    Like

    Comment by Aubain — November 17, 2015 @ 4:29 AM

  9. Selamunalykum Syed thank you for the informations. This helped me. Greetings from switzerland

    Like

    Comment by Ilker Türksoy — November 20, 2015 @ 2:37 PM

  10. Salam ualaykum, greeting from Morocco, this is just amazing, working like a sharme, i used smstools as a gateway.
    is there a advanced tutorials for the features like subscribers scrach code etc

    jazak ALLAH

    thank you so much

    best regards

    Like

    Comment by adil hassoune — January 6, 2016 @ 4:28 AM

  11. […] Kannel/playsms for receiving SMS and execute the script which will in return sends response by email (or sms) [ I have covered kannel and playSMS in my previous guides at my blog] […]

    Like

    Pingback by Acquiring Cisco Switch Customized Report via Sms/Email | Syed Jahanzaib Personal Blog to Share Knowledge ! — January 28, 2017 @ 10:02 AM

  12. Looking for someone to help install playsms on maybe digital ocean. mlehr01@icloud.com

    Like

    Comment by Mark Lehr — May 30, 2017 @ 10:27 PM

  13. can you discribe how setup email to sms feature?

    Like

    Comment by poleg — June 20, 2017 @ 1:33 PM

  14. […] Fun With SMS Management System [playSMS] […]

    Like

    Pingback by Retrieve User Account Info via SMS in Radius Manager along with playSMS | Syed Jahanzaib Personal Blog to Share Knowledge ! — July 8, 2018 @ 10:03 AM

  15. […] also have playSMS configured to facilitate various SMS base functions including user information , renewal, kicking […]

    Like

    Pingback by FREERADIUS WITH MIKROTIK – Part #17 -Retrieve User Password via SMS | Syed Jahanzaib Personal Blog to Share Knowledge ! — July 17, 2018 @ 4:58 PM

  16. Dear All,

    Anyone experienced the following issue

    Messages sent from mobile/numbers hit kannel as well as in playsms sandbox. However, messages sent from playsms to mobile doesn’t reach the destination/numbers. When I check the logs on playsms, it says pending and then finally to failed status.

    – – 2018-07-20 11:26:58 PID5b51c701ef28c – L2 sendsms # saving smslog_id:66 u:1 parent_uid:0 g:0 gw:kannel smsc:kannel s:1600 d:17141707 type:text unicode:0 status:0
    – – 2018-07-20 11:26:58 PID5b51c701ef28c – L2 sendsms_process # saved smslog_id:66 id:69
    – – 2018-07-20 11:26:58 PID5b51c701ef28c – L3 sendsms # final smslog_id:66 gw:kannel smsc:kannel message:1600 @admin len:11
    – – 2018-07-20 11:26:58 PID5b51c701ef28c – L3 kannel_hook_sendsms # enter smsc:kannel smslog_id:66 uid:1 to:17141707
    – – 2018-07-20 11:26:58 PID5b51c701ef28c – L3 kannel_hook_sendsms # URL: http://192.168.96.23:14001/cgi-bin/sendsms?username=sms11&password=xyz&from=1600&to=17141707&dlr-mask=27&dlr-url=http%3A%2F%2F192.168.96.23%2Findex.php%3F%2Findex.php%3Fapp%3Dcall%26cat%3Dgateway%26plugin%3Dkannel%26access%3Ddlr%26type%3D%25d%26smslog_id%3D66%26uid%3D1%26smsc%3Dkannel&account=admin&text=1600+%40admin
    192.168.131.94 192.168.96.23 2018-07-20 11:34:51 PID5b51c8db85fe8 admin L2 logout # u:admin uid:1 status:2 sid:1anl9756khmqg0cvv04md7eue2 ip:192.168.131.94
    192.168.130.233 192.168.96.23 2018-07-20 11:34:53 PID5b51c8dce8a76 admin L3 main_config # main configuration saved. uid:1

    Please help.

    Like

    Comment by Immortal — July 20, 2018 @ 4:38 PM

  17. Thanks for sharing information. I appreciate it

    Like

    Comment by Abdul Rehman — June 20, 2019 @ 3:58 PM

  18. Hi, after adding Jasmin as a Gateway, I can’t change the ”Default SMSC”. It only shows ‘Blocked’ and ‘Dev’. Jasmin is not an option! any help?

    Like

    Comment by Omar Aladdin — May 27, 2020 @ 6:54 PM

  19. Can someone help me, how to enable Language options. my PlaySMS installation on Ubuntu n MySQL Db is not giving the language change options, all language dropdowns r blank.
    thanks in advance.

    Like

    Comment by Sanjay Verma — August 31, 2020 @ 5:09 PM

  20. Hi all, can anyone help me out to fix language issue in playsms. it seems i cant change language in any of the playsms screens

    Like

    Comment by Sanjay Verma — August 31, 2020 @ 6:16 PM


RSS feed for comments on this post. TrackBack URI

Leave a comment