kannel smpp: unable to get the acknowledgment - sms

I'm working on a project for sending SMS using SMPP protocol and KANNEL.
Everything is working well; the only problem is that I'm still unable to get the acknowledgment, so I can't know if the message was successfully received by the client or if I should send it again.
Please, does anyone have an idea on how I can solve that? Or if there is a tool with a UI that I can use instead of KANNEL?
Here is my config file:
group = core
dlr-storage = internal
admin-port = 13000
admin-password = password
status-password = password
admin-allow-ip = ''
smsbox-port = 13001
log-level = 0
log-file = "/usr/local/kannel/logs/kannel.log"
box-allow-ip = "127.0.0.1"
group = smsbox
smsbox-id = BOX1
bearerbox-host = 127.0.0.1
sendsms-port = 13013
log-file = "usr/local/kannel/logs/smsbox.log"
log-level = 0
access-log = "usr/local/kannel/logs/access.log"
group = sendsms-user
username = user
password = password
group = smsc
smsc = smpp
smsc-id = SMSC1
host = my_host_ip
port = my_host_port
smsc-username = user
smsc-password = password
address-range = ""
system-type = ""
transceiver-mode = true

When sending your message, make sure you have your registered_delivery flag set appropriately.
Add dlr-mask = 31 to "group = sendsms-user"
OR
Using the Kannel HTTP API, set your dlr-mask. For example:
http://localhost:13013/cgi-bin/sendsms?username=tester&password=foobar&to=+12345678910&text=Test&dlr-mask=31
From the Kannel User Guide: "dlr-mask: Optional. Request for delivery reports with the state of the sent message. The value is a bit mask composed of: 1: Delivered to phone, 2: Non-Delivered to Phone, 4: Queued on SMSC, 8: Delivered to SMSC, 16: Non-Delivered to SMSC. Must set dlr-url on sendsms-user group or use the dlr-url CGI variable."

Related

Kannel calling sms-service get-url twice

I am using GSM MODEM and gateway 1.4.3 to send sms.
I defined sms-service in my config file to catch all messages with keyword 'TT' and call an URL on receiving sunch message.
My problem is that get-url is getting called twice even though message received is small. Here is my config file..
group = smsbox
bearerbox-host = 127.0.0.1
sendsms-port = 13013
log-file ="/tmp/smsbox.log"
log-level = 0
global-sender = 123456
group = sendsms-user
username = tester
password = foobar
#dlr-url = "http://192.168.13.67:8084/TestSMSDelReport/DeliveryReport/getDeliveryReport?smsID=?&timestamp=%t&status=%d&number=%p"
concatenation= true
max-messages = 3
forced-smsc = gsm_modem
group = sms-service
keyword = TT
#keyword-regex = .*
catch-all = yes
max-messages = 0
get-url = "http://192.168.75.241:8080/InwardMsg/InwardMsg/inwardMessages?phone=%p&text=%a"
text = "You asked nothing and I did it!"
Do I have to change any property so that get-url is called only once?
Thanks in advance
Remove "catch-all = yes". "catch-all = yes" makes kannel catch every message even if message doesn't match the keyword and call get-url.

Sending an email over TLS

I've try send email using TLS and port number is 587 with server name is smtp.gmail.com but always got error "error '8004020e'". I set SSL to false because the port 587 Authentication is TLS. Any wrong in my code?
Set objMail = Server.CreateObject("CDO.Message")
Set objConfig = CreateObject("CDO.Configuration")
objConfig.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.gmail.com"
objConfig.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 587
objConfig.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
objConfig.Fields("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
objConfig.Fields("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = false
objConfig.Fields("http://schemas.microsoft.com/cdo/configuration/sendusername") = "xx#gmail.com"
objConfig.Fields("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "xx"
objConfig.Fields("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60
objConfig.Fields.Update
Set objMail.Configuration = objConfig
objMail.From = "xx#gmail.com"
objMail.To = "yy#yahoo.com"
objMail.Subject = "Test EMAIL"
objMail.TextBody = "Test EMAIL"
objMail.HTMLBody = "fffffffffff"
objMail.Send
Set objMail = Nothing
Use port 465 instead and use ssl (smtpusessl = True) for Gmail or Amazon SES SMTP.
And also have to make sure (log in to the Gmail account mailbox, check if there are messages, that tell you about previous unsuccessful attempts) that the mailbox usage for the "old applications" are enabled... (it's a new "feature", that can be enabled on Yahoo and Google mail servers since not too long ago... Even maybe some mobile email clients will not work if this is not set.)

Error while configuring EMS with Database in Fault Tolerant mode

I am trying to setup my EMS in FT Mode, I have configured all the parameters in the 2 EMS config files.
But Im getting the warning:
Unable to initialize fault tolerant connection, remote server returned 'invalid user name'
Servername and password are exactly the same in both config files,so I don't know where the error is.
I am attaching the EMS config files that i am using for the EMS servers:
tibemsd.conf:
authorization = enabled
password =
server=EMS-HakanLAL
listen=tcp://7222
Ft_active=tcp://8222
users = users.conf
groups = groups.conf
topics = topics.conf
queues = queues.conf
acl_list = acl.conf
factories = factories.conf
routes = routes.conf
bridges = bridges.conf
transports = transports.conf
tibrvcm = tibrvcm.conf
durables = durables.conf
channels = channels.conf
stores = stores.conf
store = "C:/temp"
tibemsdft.conf:
authorization = enabled
password =
server=EMS-HakanLAL
listen=tcp://8222
Ft_active=tcp://7222
users = C:\Tibco\ems\8.1\BackUp\users.conf
groups = C:\Tibco\ems\8.1\BackUp\groups.conf
topics = C:\Tibco\ems\8.1\BackUp\topics.conf
queues = C:\Tibco\ems\8.1\BackUp\queues.conf
acl_list = C:\Tibco\ems\8.1\BackUp\acl.conf
factories = C:\Tibco\ems\8.1\BackUp\factories.conf
routes = C:\Tibco\ems\8.1\BackUp\routes.conf
bridges = C:\Tibco\ems\8.1\BackUp\bridges.conf
transports = C:\Tibco\ems\8.1\BackUp\transports.conf
tibrvcm = C:\Tibco\ems\8.1\BackUp\tibrvcm.conf
durables = C:\Tibco\ems\8.1\BackUp\durables.conf
channels = C:\Tibco\ems\8.1\BackUp\channels.conf
stores = C:\Tibco\ems\8.1\BackUp\stores.conf
store = "C:\ProgramData\TIBCO3\tibco\cfgmgmt\ems\data"
your tibemsd.conf and tibemsdft.conf looks fine. What you are probably missing is registering the server-name as a user within the users.conf.
If you make that entry, both servers should be able to connect to each other.

CDO.Message.1 error '80040213' with Google Address

Been having an issue trying to move our ASP page CDO over to gmail. It's about to drive me crazy. I've done some exhaustive searching and I think my code is right but I still get the dreaded: CDO.Message.1 error '80040213' The transport failed to connect to the server. on oMail.Send. Any thoughts would be much appreciated. I'm beginning to think it may be a server firewall issue.
Const cdoSendUsingPickup = 1
Const cdoSendUsingPort = 2
Const cdoAnonymous = 0
Const cdoBasic = 1
Const cdoNTLM = 2
Set oMail = CreateObject("CDO.Message")
oMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
oMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.gmail.com"
oMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = cdoBasic
oMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusername") = "info#domain.com"
oMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "password"
oMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 465
oMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = True
oMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60
oMail.From = "info#domain.com"
oMail.To = "someone#domain.com"
oMail.Bcc = ""
'oMail.To = ""
oMail.Subject = ""
oMail.HTMLBody = "<font size='2' face='Verdana, Arial, Helvetica, sans-serif'>"
oMail.HTMLBody = oMail.HTMLBody + "Name: <b>"& request.form("Name")&"</b><br>"
oMail.HTMLBody = oMail.HTMLBody + "Phone: <b>"& request.form("Phone")&"</b><br>"
oMail.HTMLBody = oMail.HTMLBody + "Email: <b>"& request.form("Email")&"</b><br>"
oMail.HTMLBody = oMail.HTMLBody + "Best Time to Call: <b>"& request.form("BestTime")&"</b><br>"
oMail.HTMLBody = oMail.HTMLBody + "Question/Comment: <b>"& request.form("Comment")&"</b><br>"
oMail.HTMLBody = oMail.HTMLBody + "</font>"
oMail.Configuration.Fields.Update
oMail.Send
Set oMail = Nothing
Set oMailConfig = Nothing
Any thoughts or suggestions would be much appreciated. I've tried all the Google smtp ports 25,465, and 567. What am I missing?
Straight from Google's own instructions;
Standard configuration instructions:
Incoming Mail (POP3) Server - requires SSL: pop.gmail.com
Use SSL: Yes
Port: 995
Outgoing Mail (SMTP) Server - requires TLS or SSL: smtp.gmail.com
Use Authentication: Yes
Port for TLS/STARTTLS: 587
Port for SSL: 465
Server timeouts Greater than 1 minute, we recommend 5
Full Name or Display Name: [your name]
Account Name or User Name: your full email address (including #gmail.com or #your_domain.com)
Email Address: your email address (username#gmail.com or username#your_domain.com)
Password: your Gmail password
I would also check your server has dns resolution to smtp.gmail.com and check your firewall which maybe blocking port 465, as a test try connecting without SSL to see if you can connect on 25 (see this article - Unable to send emails using gmail smtp server
Suggestion for google:
If you're having trouble sending mail but you've confirmed that encryption is active for SMTP in your mail client, try to configure your SMTP server on a different port (465 or 587).

Kannel only sending 153 characters

doing a bit of a project at the moment involving Kannel however I am having an issue.
When I send a long sms to the kannel gateway, it receives the first part of the sms and then uses the get-url to send my php script to add to the website. Then the second part gets sent and the same things happens.
Is there a way to send the full sms to the website?
Thanks very much in advance for any help. Below is my appended kannel.conf
group = core
admin-port = <snip>
admin-password = <snip>
status-password = <snip>
smsbox-port = <snip>
wdp-interface-name = "*"
log-file = "/var/log/kannel/bearerbox.log"
log-level = 0
group = smsc
smsc = at
modemtype = auto
device = /dev/ttyUSB1
speed = 9600
connect-allow-ip = 127.0.0.1
group = smsbox
bearerbox-host = 127.0.0.1
sendsms-port = <snip>
sendsms-chars = "0123456789 +-"
log-file = "/var/log/kannel/smsbox.log"
log-level = 0
access-log = "/var/log/kannel/access.log"
global-sender = <snip>
sms-length = 500
group = sendsms-user
username = <snip>
password = <snip>
concatenation = true
group = modems
id = huawei_e220
name = "Huawei_E220"
detect-string = "huawei"
message-storage = sm
speed = 9600
group = sms-service
keyword =
catch-all = 1
max-messages = 0
# trying this below
#assume-plain-text = true
concatenation = true
get-url = "http://<snip>.net/inbound.php?phone=%p&text=%t"
# Ends
It may have something to do with your GSM modem. If I try a very similar configuration with a real SMSC, the message is properly reassembled. Also, the get-url for your sms-service group is incorrect - %t is message timestamp, if you want the whole message content, you should use %a. (At least that's the case with Kannel 1.5.0.)
So, the issue itself was to do with the routing of the messages from the bearerbox to the smsc and smsbox. Basically I had to define an smsc which pointed to the smsbox and that seemed to fix it. I do not have the code with me at the moment to post up however, for anyone else having this issue - please check your smsc settings.
Try to add the following settings to core group to combine MO SM from parts:
group = core
...
sms-combine-concatenated-mo = 1
sms-combine-concatenated-mo-timeout = 600
If this will not help - add logging to your smsc section with debug level (log-level = 0) to see diagnostics from Kannel.

Resources