yahya
September 10, 2018, 3:14pm
1
Hey there, first of all, great product, thank you for that. I have been looking for the solution to my problems related to kannel and playSMS and I have managed to solve many of them. But I stuck with this for three days now with no luck.
I have installed playSMS and kannel on my ubuntu PC , connected it with SMPP simulators,tested some feature and it is working great. But I run into some problems while configuring playSMS.
I couldn’t receive delivery report for sent messages in playSMS. I could see the the DLR from kannel status link http://myhost:13000/status?password=mypwd .
My sent message are not showing up in the outgoing page. there is nothing there.
Subscription management problem. I have created subscription from “Manage Subscribe ” section, added subscription keyword and everything. But I couldn’t find it when get back to “Manage subscribe ” section. The subscription group I created does not show up, but when I try to create the same group again it won’t let me, it gives me error message "SMS subscribe already exists, reserved or use by other feature (keyword: E)"
I also couldn’t send SMS to subscribers. I tried to look for subscriber group I created to send message to but I it wont appear in the "Send to"
field and I couldn’t figure out how.
Here is the example scenario I wanted to setup in play SMS
There will be three subscription groups for sport news. English
newsletter group, French
newsletter group and Irish
newsletter group. User will choose any language they want via opt in keyword
. e.g. ‘E ’ for English
, ‘F ’ for French
and ‘I ’ for Irish
. There will be two short codes that will serve this purpose. Lets say 5353 and 5454. 5353 will be used to accept subscription and send the autoreply to users upon subscription and when they opt out of subscription. The system look for keyword and add users to appropriate news group. Now next time I send a message in English, I will choose English group to send to, and other languages just like that. I tried to setup that by creating ‘Group inbox’ and created the appropriate keyword. But the system failed to add them to group. The system receives the message with subscription but the received message goes to sandbox and users won’t get any autoreply and don’t get assigned to any newsletter group.
I would like detailed explanation please.
Thank you very much for your time.
1 Like
anton
September 11, 2018, 5:02am
2
Make sure its the latest playSMS. Is it ?
Anton
yahya
September 11, 2018, 5:18am
3
I think its the latest. I am a complete beginner for all of this, even to Linux. I followed the instruction on playSMS website to install both kannel and playSMS.
yahya
September 11, 2018, 2:29pm
4
Yes it is the latest version and the issue still persists. playSMS-1.4.2
yahya
September 12, 2018, 8:23am
5
Have anyone fixed this issue? I am still stuck in here.
anton
September 12, 2018, 12:11pm
6
Subscribe looks good on my server.
Add:
Added:
yahya
September 12, 2018, 1:05pm
7
This is my “kannel.conf” file. Take a look at it. am I missing something?
# CORE
group = core
admin-port = 13000
admin-password = *****
status-password = *****
log-file = /var/log/kannel/kannel.log
log-level = 0
access-log = /var/log/kannel/access.log
smsbox-port = 13001
store-type = spool
store-location = /var/spool/kannel/store
smsbox-max-pending = 100
# SMSBOX
group = smsbox
bearerbox-host = localhost
bearerbox-port = 13001
sendsms-port = 13131
sendsms-chars = "0123456789+ "
log-file = /var/log/kannel/smsbox.log
log-level = 0
access-log = /var/log/kannel/access.log
mo-recode = true
## SMSC smpp1
group = smsc
smsc = smpp
smsc-id = smpp1
allowed-smsc-id = smpp1
preferred-smsc-id = smpp1
host = 193.169.1.4
port = 2775
transceiver-mode = yes
smsc-username = ""
smsc-password = ""
system-type = "VMA"
log-file = /var/log/kannel/smsc-smpp1.log
#og-level = 0
#throughput = 14
# SENDSMS-USER
group = sendsms-user
default-smsc = none
username = playsms
password = yahya2018
max-messages = 6
concatenation = true
# SMS SERVICE default
group = sms-service
keyword = default
#text = "Autoreply from KANNEL for wrong input"
omit-empty = true
max-messages = 2
get-url = "http://localhost/playsms/index.php?app=call&cat=gateway&plugin=kannel&access=geturl&t=%t&q=%q&a=%a&Q=%Q&smsc=%i"
concatenation = true
anton
September 12, 2018, 1:26pm
8
If you want to know whats going on in playSMS then enable debug mode by setting loglevel to 3 in config.php, restart playsmsd
watch the log, tail -f /var/log/playsms/playsms.log
and then send 1 test sms, see whats going on in your screen (running tail)
anton
yahya
September 12, 2018, 1:42pm
9
This the log I have got.
I can send the message to SMPP and it is successfully delivered. But I couldn’t figure out why my auto reply and subscription are not working. I have even installed the autorespond plugin.
127.0.0.1 localhost 2018-09-12 15:47:05 PID5b9918d9aa249 admin L2 sendsms # start uid:1 sender_id:[6507] smsc:[]
127.0.0.1 localhost 2018-09-12 15:47:05 PID5b9918d9aa249 admin L3 sendsms # maxlen:459 footerlen:0 footer:[] msglen:12 message:[Test message]
127.0.0.1 localhost 2018-09-12 15:47:05 PID5b9918d9aa249 admin L2 sendsms_queue_create # saving queue_code:55ebc6524c194c3ec406935038b1a9ea src:6507 scheduled:2018-09-12 15:47:05
127.0.0.1 localhost 2018-09-12 15:47:05 PID5b9918d9aa249 admin L2 sendsms_queue_create # saved queue_code:55ebc6524c194c3ec406935038b1a9ea id:64
127.0.0.1 localhost 2018-09-12 15:47:05 PID5b9918d9aa249 admin L3 sendsms_manipulate_prefix # before prefix manipulation:[+251920000000]
127.0.0.1 localhost 2018-09-12 15:47:05 PID5b9918d9aa249 admin L3 sendsms_manipulate_prefix # after prefix manipulation:[+251920000000]
127.0.0.1 localhost 2018-09-12 15:47:05 PID5b9918d9aa249 admin L3 simplerate_hook_rate_getbyprefix # rate not found to:+251920000000 default_rate:0
127.0.0.1 localhost 2018-09-12 15:47:05 PID5b9918d9aa249 admin L3 simplerate_hook_rate_getcharges # uid:1 u:admin len:12 unicode:0 to:+251920000000 enable_credit_unicode:0 count:1 rate: charge:0
127.0.0.1 localhost 2018-09-12 15:47:05 PID5b9918d9aa249 admin L2 sendsms # dst_count:1 sms_count:1 total_charges:0
127.0.0.1 localhost 2018-09-12 15:47:05 PID5b9918d9aa249 admin L2 sendsms_queue_push # saving queue_code:55ebc6524c194c3ec406935038b1a9ea dst:+251920000000
127.0.0.1 localhost 2018-09-12 15:47:06 PID5b9918d9aa249 admin L2 sendsms_queue_push # saved queue_code:55ebc6524c194c3ec406935038b1a9ea smslog_id:98
127.0.0.1 localhost 2018-09-12 15:47:06 PID5b9918d9aa249 admin L2 sendsms # end queue_code:55ebc6524c194c3ec406935038b1a9ea queue_count:1 sms_count:1 failed_queue:0 failed_sms:0
- - 2018-09-12 15:47:06 PID5b9918da913a0 - L2 sendsmsd # start processing queue_code:55ebc6524c194c3ec406935038b1a9ea chunk:0 queue_count:1 sms_count:1 scheduled:2018-09-12 15:47:05 uid:1 gpid:0 sender_id:6507
- - 2018-09-12 15:47:06 PID5b9918da913a0 - L2 sendsmsd # sending queue_code:55ebc6524c194c3ec406935038b1a9ea smslog_id:98 to:+251920000000 sms_count:1 counter:1
- - 2018-09-12 15:47:06 PID5b9918da913a0 - L3 sendsms_intercept # msgtemplate modified sms_sender:[6507] sms_footer:[] sms_to:[+251920000000] sms_msg:[Test message] uid:[1] gpid:[0] sms_type:[text] unicode:[0] queue_code:[55ebc6524c194c3ec406935038b1a9ea] smsc:[]
- - 2018-09-12 15:47:06 PID5b9918da913a0 - L3 outgoing_hook_sendsms_intercept # no SMSC found uid:1 parent_uid:0 from:6507 to:+251920000000
- - 2018-09-12 15:47:06 PID5b9918da913a0 - L2 recvsms_process # using default SMSC smsc:[kannel]
- - 2018-09-12 15:47:06 PID5b9918da913a0 - L2 sendsms_process # start
- - 2018-09-12 15:47:06 PID5b9918da913a0 - L3 simplerate_hook_rate_getbyprefix # rate not found to:+251920000000 default_rate:0
- - 2018-09-12 15:47:06 PID5b9918da913a0 - L3 simplerate_hook_rate_getcharges # uid:1 u:admin len:12 unicode:0 to:+251920000000 enable_credit_unicode:0 count:1 rate: charge:0
- - 2018-09-12 15:47:07 PID5b9918da913a0 - L2 simplerate_hook_rate_cansend # allowed user uid:1 sms_to:+251920000000 adhoc_credit:0 count:1 rate: charge:0 adhoc_balance:0
- - 2018-09-12 15:47:07 PID5b9918da913a0 - L2 sendsms # saving smslog_id:98 u:1 parent_uid:0 g:0 gw:kannel smsc:kannel s:6507 d:+251920000000 type:text unicode:0 status:0
- - 2018-09-12 15:47:07 PID5b9918da913a0 - L2 sendsms_process # saved smslog_id:98 id:98
- - 2018-09-12 15:47:07 PID5b9918da913a0 - L3 sendsms # final smslog_id:98 gw:kannel smsc:kannel message:Test message len:12
- - 2018-09-12 15:47:07 PID5b9918da913a0 - L3 kannel_hook_sendsms # enter smsc:kannel smslog_id:98 uid:1 to:+251920000000
- - 2018-09-12 15:47:07 PID5b9918da913a0 - L3 kannel_hook_sendsms # URL: http://localhost:13131/cgi-bin/sendsms?username=playsms&password=yahya2018&from=6507&to=%2B251920000000&dlr-mask=27&dlr-url=http%3A%2F%2Flocalhost%2Fplaysms%2F%2Findex.php%3Fapp%3Dcall%26cat%3Dgateway%26plugin%3Dkannel%26access%3Ddlr%26type%3D%25d%26smslog_id%3D98%26uid%3D1%26smsc%3Dkannel&account=admin&text=Test+message&smsc=smpp1
- - 2018-09-12 15:47:07 PID5b9918da913a0 - L3 kannel__outgoing # smslog_id:98 response:0: Accepted for delivery
- - 2018-09-12 15:47:07 PID5b9918da913a0 - L3 dlr # isdlrd:1 smslog_id:98 p_status:0 uid:1
- - 2018-09-12 15:47:07 PID5b9918da913a0 - L3 kannel__outgoing # end smslog_id:98 p_status:0
- - 2018-09-12 15:47:07 PID5b9918da913a0 - L2 simplerate_hook_rate_deduct # enter smslog_id:98
- - 2018-09-12 15:47:07 PID5b9918da913a0 - L3 simplerate_hook_rate_getbyprefix # rate not found to:+251920000000 default_rate:0
- - 2018-09-12 15:47:07 PID5b9918da913a0 - L3 simplerate_hook_rate_getcharges # uid:1 u:admin len:12 unicode:0 to:+251920000000 enable_credit_unicode:0 count:1 rate: charge:0
- - 2018-09-12 15:47:07 PID5b9918da913a0 - L2 simplebilling_hook_billing_post # saving smslog_id:98 rate: count:1 charge:0
- - 2018-09-12 15:47:07 PID5b9918da913a0 - L2 simplebilling_hook_billing_post # saved smslog_id:98 id:259
- - 2018-09-12 15:47:07 PID5b9918da913a0 - L3 simplerate_hook_rate_deduct # deduct successful uid:1 parent_uid:0 smslog_id:98
- - 2018-09-12 15:47:07 PID5b9918da913a0 - L2 sendsms_process # end
- - 2018-09-12 15:47:07 PID5b9918da913a0 - L2 sendsmsd # result queue_code:55ebc6524c194c3ec406935038b1a9ea to:+251920000000 flag:1 smslog_id:98
127.0.0.1 localhost 2018-09-12 15:47:07 PID5b9918db252a5 - L2 kannel__call # start load:/var/www/html/playsms/plugin/gateway/kannel/dlr.php
127.0.0.1 localhost 2018-09-12 15:47:07 PID5b9918db252a5 - L3 kannel__dlr # remote_addr:127.0.0.1 remote_host:localhost type:[8] smslog_id:[98] uid:[1] smsc:[kannel]
- - 2018-09-12 15:47:07 PID5b9918da913a0 - L2 sendsmsd # finish processing queue_code:55ebc6524c194c3ec406935038b1a9ea uid:1 sender_id:6507 queue_count:1 sms_count:1
127.0.0.1 localhost 2018-09-12 15:47:07 PID5b9918db252a5 - L3 dlr # isdlrd:1 smslog_id:98 p_status:1 uid:1
127.0.0.1 localhost 2018-09-12 15:47:07 PID5b9918db252a5 - L2 kannel__call # end load dlr
- - 2018-09-12 15:47:07 PID5b9917704702c - L3 dlrd # id:259 smslog_id:98 p_status:0 uid:1
- - 2018-09-12 15:47:07 PID5b9917704702c - L3 dlrd # id:260 smslog_id:98 p_status:1 uid:1
anton
September 12, 2018, 1:46pm
10
yes, it seems good. so now you can test incoming SMS, same method, 1 incoming SMS
watch the log
anton
yahya
September 12, 2018, 1:52pm
11
Sent messages are empty
All sent messages are empty
All inbox is also empty.
Here is the log after icoming message
127.0.0.1 localhost 2018-09-12 15:56:26 PID5b991b0ad4000 - L2 kannel__call # start load:/var/www/html/playsms/plugin/gateway/kannel/geturl.php
127.0.0.1 localhost 2018-09-12 15:56:27 PID5b991b0ad4000 - L3 kannel__incoming # remote_addr:127.0.0.1 remote_host:localhost t:[2018-09-12 20:56:26] q:[+251922222222] a:[Test from phone to shortcode] Q:[6506] smsc:[smpp1] smsc:[smpp1]
127.0.0.1 localhost 2018-09-12 15:56:27 PID5b991b0ad4000 - L3 recvsms # isrecvsmsd:1 dt:2018-09-12 20:56:26 sender:+251922222222 m:Test from phone to shortcode receiver:6506 smsc:smpp1
127.0.0.1 localhost 2018-09-12 15:56:27 PID5b991b0ad4000 - L2 kannel__call # end load geturl
- - 2018-09-12 15:56:27 PID5b9917704ed3d - L3 recvsmsd # id:1771 dt:2018-09-12 20:56:26 sender:+251922222222 m:Test from phone to shortcode receiver:6506 smsc:smpp1
- - 2018-09-12 15:56:27 PID5b9917704ed3d - L3 inboxgroup # forwardcatchall id:1 s:+251922222222 r:6506 m:Test from phone to shortcode
- - 2018-09-12 15:56:27 PID5b9917704ed3d - L3 recvsms_process # dt:2018-09-12 20:56:26 sender:+251922222222 m:Test from phone to shortcode receiver:6506 smsc:smpp1
- - 2018-09-12 15:56:27 PID5b9917704ed3d - L3 recvsms_process # unknown supplied SMSC smsc:[smpp1]
- - 2018-09-12 15:56:27 PID5b9917704ed3d - L3 recvsms_process # intercepted datetime:2018-09-12 20:56:26 sender:+251922222222 receiver:6506 message:Test from phone to shortcode
anton
September 12, 2018, 1:57pm
12
incoming received and processed. seems like database error.
do you have phpmyadmin or any tools to view the database ? see tblSMSIncoming and outgoing, see if the data is in there or not
anton
yahya
September 12, 2018, 2:01pm
13
Yes, incoming messages are in the database. I can see them all.
anton
September 12, 2018, 2:03pm
14
what about outgoing ?
also check sandbox menu in web
anton
yahya
September 12, 2018, 2:12pm
15
Outgoing messages database
There used to messages in sandbox before (Incoming messages would go to sandbox), but now the incoming messages won’t make it there.
anton
September 12, 2018, 2:14pm
16
ok, lets try to fix one problem at a time, the display first, the database shown all data but none displayed, looks like you’re using old version, is this a new install ? you sure its 1.4.2 ?
anton
yahya
September 12, 2018, 2:18pm
17
Yes, I installed using the instruction on https://help.playsms.org/en/installation/installation_using_install_script.html
downloaded from Sourceforge. I have also another installation on other machine with the same problem. that was installed from github. But this one is from sourceforge as per recommendation.
anton
September 12, 2018, 2:20pm
18
ok, its basically the same, but maybe you missed something, try following this:
anton
yahya
September 12, 2018, 2:23pm
19
Mine is ubuntu 16. Should I remove this first?
anton
September 12, 2018, 2:25pm
20
no need, but I havent tested it
anton