How to send and receive USSD by using kannel - sms-gateway

I am new in USSD but i am already sending message using Kannel 1.5.4 since long.
I want send/receive USSD request by using kannel. I have smpp v5 account for the same.
It's better if anyone help me by configuration file.
my configuration file is:
#SMSC CONNECTIONS
group = smsc
smsc = smpp
smsc-id = USSD-ACC
host= 10.*.*.*
port= 1234
transceiver-mode=true
smsc-username = "USER"
smsc-password = "PWD"
system-type = ""
interface-version=34
source-addr-ton=5
source-addr-npi=0
dest-addr-ton=0
dest-addr-npi=1
max-pending-submits=10
wait-ack=600
wait-ack-expire=0x01
# SMSBOX SETUP
group = smsbox
bearerbox-host = localhost
sendsms-port = 12345
sendsms-chars = "0123456789 +-"
log-file = "/tmp/kannel_smsbox.log"
log-level = 3
# SERVICES
group = sms-service
keyword = default
get-url = "http://localhost/request.php?MNO=%p&SHORTCODE=%P&CONTENT=%a"
name="*123#"
max-messages=0
group = sendsms-user
username = ussd
password = ussd
user-deny-ip = *.*.*.*"
user-allow-ip = "127.0.0.1"
max-messages = 5
concatenation = true
default-sender = "123"

Seems like you need to use smpp-tlv section to pass ussd_service_op TLV to/from USSDC.
See this link for configuration examples:

Related

Apache Flume with 2 different interceptors on same source

I am trying to add 2 different interceptors on the same source and send the intercepted data to 2 different channels.
But, I was not able to configure the same. Couldn't find any documentation about the same. Also, I am having some issues with the channel selectors. Not sure how to select a channel with the different interceptors.
Here is my code so far:
a1.sources = syslog_udp
a1.channels = chan1 chan2
a1.sinks = sink1 sink2 //both are different kafka sinks
a1.sources.syslog_udp.type = syslogudp
a1.sources.syslog_udp.port = 514
a1.sources.syslog_udp.host = 0.0.0.0
a1.sources.syslog_udp.keepFields = true
a1.sources.syslog_udp.interceptors = i1 i2
a1.sources.syslog_udp.interceptors.i1.type = regex_filter
a1.sources.syslog_udp.interceptors.i1.regex = '<regex_string1>'
a1.sources.syslog_udp.interceptors.i1.excludeEvents = false
a1.sources.syslog_udp.interceptors.i2.type = regex_filter
a1.sources.syslog_udp.interceptors.i2.regex = '<regex_string1>'|'<regex_string2>'
a1.sources.syslog_udp.interceptors.i2.excludeEvents = false
a1.sources.syslog_udp.selector.type = multiplexing
a1.sources.syslog_udp.channels = chan1 chan2
a1.channels.chan1.type = memory
a1.channels.chan1.capacity = 200
a1.channels.chan2.type = memory
a1.channels.chan2.capacity = 200
Seems like there is no straight-forward setup for this.
A work-around for this kind of layout is to have a single/wider channel interceptor in one agent, pipe the output to an avro-sink and setup a new agent for the avro-source and set-up the new channel interceptor on that.

NACK/0x00000061/Invalid Scheduled Delivery Time error in Kannel

I have been trying to configure an SMS gateway service using Kannel and sqlbox. My system is successfully connected to the Airtel SMSC. But whenever I try to send SMS (Inserting data in send_sms table of course), I get this weird response from the SMSC
NACK/0x00000061/Invalid Scheduled Delivery Time
But I have nowhere mentioned about the scheduled delivery time.
Here is the log in SMSC side
and here is my kannel configuration
#CORE
group = core
admin-port = 13000
smsbox-port = 13001
admin-password = rasello
status-password = rasello
admin-allow-ip = "*.*.*.*"
wdp-interface-name = "*"
log-file = "/var/log/kannel/bearerbox.log"
#store-file = "/var/log/kannel/kannel.store"
log-level = 0
#box-deny-ip = "*.*.*.*"
box-allow-ip = "*.*.*.*"
dlr-storage=mysql
#SMSBOX SETUP
group = smsbox
bearerbox-host = localhost
sendsms-port = 13013
bearerbox-port = 13001
log-file = "/var/log/kannel/smsbox.log"
log-level = 0
# SEND-SMS USERS
group = sendsms-user
username = username
password = password
default-smsc = rasello
#mysql connection
group = mysql-connection
id = sqlbox-db
host = localhost
port = 3306
username = root
password = N3pal#312
database = kannel
max-connections = 10
# DLR SETUP
#mysql connection
group = mysql-connection
id = mydlr
host = localhost
username = root
password = N3pal#312
database = kannel
max-connections = 10
group = dlr-db
id = mydlr
table=dlr
field-smsc=smsc
field-timestamp=ts
field-destination=destination
field-source=source
field-service=service
field-url=url
field-mask=mask
field-status=status
field-boxc-id=boxc
# SMSC SMPP
group = smsc
smsc-id = rasello
smsc = smpp
host = ip
port = port
transceiver-mode = false
smsc-username = username
smsc-password = password
system-type = smpp
interface-version = 34
address-range = ""
#SMS SERVICE GET-URL
group = sms-service
keyword = default
send-sender = true
get-url = "http://localhost/receivesms?phone=%p&text=%a"
Please help resolving this issue
you have to contact ur SMPP provider for this coz they are rejecting your SMS with this NACK

How do you configure UDPInput to work with heka-flood udp test

I am trying to test sending data to heka's UDPInput with no success. I decided to try to use the heka-flood tool to mimic UPD traffic also with no success. I am using 0.10 version of heka. My heka.toml :
[UdpInput]
address = "127.0.0.1:4880"
net = "udp"
splitter = "udp_splitter"
decoder = "ProtobufDecoder"
set_hostname = true
# I have also tried not setting this as well
[udp_splitter]
type = "HekaFramingSplitter"
[ProtobufDecoder]
[LogOutput]
type = "LogOutput"
message_matcher = "Logger == 'UdpInput'"
encoder = "PayloadEncoder"
and my flood.toml:
[udp_proto]
ip_address = "127.0.0.1:4880"
sender = "udp"
pprof_file = ""
encoder = "protobuf"
num_messages = 1000
corrupt_percentage = 0.0001
signed_percentage = 0.00011
variable_size_messages = false
ascii_only = true
max_message_size = 32000
If I add another input, like say a log tailer and add it to the message matcher for the LogOutput, those messages end up being logged out. I never see anything from the UpdInput. What am I doing wrong?

Run time error - 2147220973 (80040213) The transport failed to connect to the server while sending mail from vb6

I am making one application in vb6 which sends mail from an application, it gives me
Run time error - 2147220973 (80040213) The transport failed to contact
to the server
, I did all the given solution gives before
Please help if any one knows solution.
Code:
code:
{
mStrProcName = "MonthlyXlMail_EmployeePerformance"
sFilePath = (App.Path & "\TimeTaken.xls")
iConf.Load -1
Set Flds = iConf.Fields
Set lobj_cdomsg = New CDO.Message
lobj_cdomsg.Configuration.Fields(cdoSMTPServer) = Trim(rsMail!ServerUrl)
lobj_cdomsg.Configuration.Fields(cdoSMTPServerPort) = CInt(Trim(rsMail!Port))
lobj_cdomsg.Configuration.Fields(cdoSMTPUseSSL) = IIf(rsMail!ReqSSL = "Y", True, False)
lobj_cdomsg.Configuration.Fields(cdoSMTPAuthenticate) = cdoBasic
lobj_cdomsg.Configuration.Fields(cdoSendUserName) = Trim(rsMail!EMailID)
lobj_cdomsg.Configuration.Fields(cdoSendPassword) = Trim(rsMail!EmailPassword)
lobj_cdomsg.Configuration.Fields(cdoSMTPConnectionTimeout) = 30
lobj_cdomsg.Configuration.Fields(cdoSendUsingMethod) = cdoSendUsingPort
lobj_cdomsg.Configuration.Fields.Update
lobj_cdomsg.To = Trim(strMail)
lobj_cdomsg.From = Trim(rsMail!EMailID)
lobj_cdomsg.Subject = IIf(Len(Trim(txtsubject.Text)) = 0, "Performance Report", Trim(txtsubject.Text))
lobj_cdomsg.TextBody = IIf(Len(Trim(txtDescription.Text)) = 0, "Find Attachment", Trim(txtDescription.Text))
'lobj_cdomsg.HTMLBody = strMsg
lobj_cdomsg.AddAttachment (sFilePath)
lobj_cdomsg.Send
}
Are you using Gmail with Two factor auth? This also prevents using smtp with basic authentication.
Create a custom app in you Gmail security settings to add a new password for your messaging application.
1. Login into your Gmail account
2. Goto https://security.google.com/settings/security/apppasswords
3. Choose 'Custom' app.
4. Typ 'Gmail Smtp', or something
5. Click 'Generate'
6. It will give you a password token.
Use this token as your password in your messaging application instead of your own password.

kannel status denied in playSMS

I'm trying to use playSMS on ubuntu Server 14.04.
I've installed playSMS like show here and I've configurated Kannel like show here.
My /etc/Kannel/kannel.conf is:
# CORE
group = core
admin-port = 13000
admin-password = playsms
status-password = playsms
log-file = /var/log/kannel/kannel.log
log-level = 0
access-log = /var/log/kannel/access.log
smsbox-port = 13001
store-type = file
store-file = /var/log/kannel/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
global-sender = "isi dengan sms center"
access-log = /var/log/kannel/access.log
#SMSC MODEM GSM
group = smsc
smsc = at
port = 13013
host = localhost
smsc-id = modex
modemtype = auto
device = /dev/ttyUSB0
sms-center = "+393359609600"
speed = 230400
# GROUP MODEM
group = modems
id = siemens_mc35i
name = "SIEMENS MC35i"
detect-string = "SIEMENS"
detect-string2 = "MC35i"
init-string = "AT+CNMI=1,2,0,1,1"
speed = 230400
enable-hwhs = "AT\\Q3"
need-sleep = true
# SENDSMS-USER
group = sendsms-user
default-smsc = default
username = playsms
password = playsms
max-messages = 10
concatenation = true
# SMS SERVICE 'default'
group = sms-service
keyword = default
accept-x-kannel-headers = true
max-messages = 0
assume-plain-text = true
catch-all = true
get-url = "http://localhost/playsms/index.php?app=call&cat=gateway&plugin=kannel&access=geturl&t=%t&q=%q&a=%a&Q=%Q"
But when I login in playsms application my sms go into queque and I can see they in Outgoing SMS with yellow box.
If i go to Administration -> Manage gateway -> Kannel -> Manage kannel, the kannel status is denied.
Someone can help me please?
make sure your Kannel is running, you can do ps ax and tail Kannel log to see whether or not the Kannel runs properly.
ps ax | grep box
tail -f /var/log/kannel/kannel.log
once you know that Kannel is running then login to your playSMS web, through menu: Administration -> Manage gateway -> Kannel -> Manage kannel, you need to set Kannel admin port and Kannel admin password, which according to your kannel.conf they are:
admin-port = 13000
admin-password = playsms
try to check this link url of kannel status in the browser :
there is the link :
http://localhost:13000/status?password=playsms