Kannel :: How can I filter incoming traffic - kannel

I use Kannel as SMS gateway - It works fine for me. I am connnected one operator and I provide SMPP COnnections to my clients. All works fine.
But now I need to filter the traffic based on the recipient number ie I need to be able to set a REGEX for the receipient and reject the SMS if it's supposed to be sent to those recipients.
Is this possible in Kannel? Any idea of how this can be done?
Thank you.

Core group configuration (i.e. bearerbox configuration) has parameters for white-list-receiver-regex and black-list-receiver-regex, those should do what you're looking for. That is, however, a system-wide setting, not a per-SMSC setting so it applies to all numbers through all SMSC connections.

Related

How can I know how many provider hops there are in each SMS via SMPP?

I use SMPP routes towards providers, which have others providers in order to send SMS until the local operator.
My question is... How can I know how many provider hops there are in each SMS via SMPP?
I mean, since the SMS is sent towards the next provider until the SMS is delivered in the handset, does exist any way to know how many hops there are?
Could I add any information in the SMS in order to get this information?
I would like to get this information in order to know if the route is good or not.
Thank you.
With standard SMPP it is not possible to know how many hops (i.e. SMS gateways and SMSCs) there are between your application and the handset.
Monitoring the latency between submission by your application and delivery to the handset can provide a hint at there being multiple hops. This approach isn't reliable as high latency could simply be a slow single hop rather than multiple hops.
Asking your immediate provider how they route your messages can provide some insight. If they send directly to an SMSC belonging to handset's mobile network operator then you know that it should only be a hop from you to the provider and then another from them to the MNO. Probes, or your own testing, can be used to confirm if your message is being routed directly to the handset's MNO. In such cases you will see an SMSC address (SMSC GT) in the receive SMS that belongs to the handset's MNO.
It is not part of the SMPP protocol to know the hops to the final SMSC that delivers your SMS to the destination mobile. Number of hops does necessarily account for delays in SMS delivery.
If you will like to know if a certain route is good or not you could use other metrics like how many successful delivery reports have been received for SMSes sent via that route to build a table of good routes and bad routes.
Definetly not part of the SMPP protocol. For sure your sms won't be delivered via SMPP only, but also via SS7. The performance could depend on so many factors ... I think the best way to evaluate a 'route' is ( as other have said) to build some metrics/kpi's yourself and analyze them.

Receive SMS Programmatically

I need to send and receive SMS messages, but not on a phone. Sending is somewhat easy, as there are oodles of gateways that can be used. The challenge that I'm running into is handling responses received.
Can anyone point in me in the right direction of services or devices that can handle 2 way SMS short of an actual phone.
SMS GATEWAY ME is an android app that you can download for free.
I like it because it's free and easy to use. All you do is send a HTTP post to their server and it sends out a message from your phone.
You can set up rules on the site to get it to forward incoming messages to your server using HTTP / Email as well.
There are some 2 way SMS gateways out there. A quick search found this one: http://www.txtimpact.com/api.asp all I did was google for 2-way sms gateway.
Here's an example that uses Wammu under Linux:
http://www.techytalk.info/send-receive-sms-using-gsm-modem-phone-ubuntu/
Here's another link:
http://www.developershome.com/sms/smsLinux.asp
And:
http://www.developershome.com/sms/
Good luck!

Send SMS over IP

I hope to create a web server that can give some extra facilities for SMS Service Providers. Can I send SMS through internet? If its possible then, Are there any libraries for Send and Receive SMS over the internet?
There are many different options to send SMS over Internet, but most popular are the following:
Connecting to SMSC of mobile carriers directly (usually via SMPP protocol).
Connecting through some SMS aggregation service like Clickatell mentioned in previous answers.
Choice between these options depends mostly on non-technical issues:
Required coverage (mobile carrier will provide only messaging inside it's network).
Premium Rate billing possibility (this requires closer work with carrier).
Well, price too... :-)
Technically most popular options are:
Specialized protocols like SMPP (Short Message Peer to Peer).
HTTP based protocols provided by SMS aggregators.
If you need unified solution, I recommend to use Kannel open source SMS gateway that support many popular transports (SMPP, CIMD, UCP, HTTP, etc).
You've got www.Nexmo.com www.tropo.com www.twilio.com www.smsified.com ... and so on...
You can use http://www.clickatell.com/ which gives you a few options such as sending SMS one by one, or by using bulk files such as XML.
I found the clickatell API to be really usefull and easy, I managed to add SMS capability to an existing website in a few hours by creating a simple class to wrap up all the methods.
One thing to remember though this is not going to be free for you, there will be costs involved depending on where you send the text to, and where you are based.
You can send SMS programmatically through TheTexting API, They provide cheap rates and their service is really good.
Full disclosure: I work for company that makes this product.

Can Kannel use number extensions?

I may set up an SMS gateway using Kannel and a Huawei E220 GSM modem.
Now, my question is, is it possible for Kannel to detect extensions appended to the server's phone number in incoming messages (e.g. someone texts 12345#28 instead of 12345) and/or to send outgoing messages with such extensions appended?
Kannel supports deliver to recipient addresses with a '#' in them, but not by default.
By default Kannel's smsbox (HTTP I/F) has "0123456789 +-" as valid recipient characters. These can be extended to support '#' but setting
group = smsbox
...
sendsms-chars="0123456789 +-#"
That's all well and good but the key is does the underlying messaging layer you use for delivery support it also. For example when testing with a modem (kannel 'at' driver) - the modem returned an ERROR on the send command so it may also perform some addressing validation. Also when testing with kannel 'SMPP' connection to a provider the submit_sm request also returned an error. So Yes Kannel supports delivery to/from recipient/destination addresses formatted in that way - but that may be a moot point.
HTHs
Cheers,
Alan

Sending an SMS myself

I'm taking shots in the dark here. I'd like to create a web service where eventually I send an SMS by using my own hardware. I'm not sure what I need in order to send an SMS myself. I don't want to use any of the existing SMS send services out there, I need to be able to send these SMS myself.
It looks like there's one opensource project in particular that deals with this, "Kannel":
http://www.kannel.org/
what I don't understand is, do I need to get a GSM modem to be able to send SMS? Do SMS gateways (like Kannel) eventually need to get to a GSM modem to send messages, or is there some other hardware you need to be able to actually send the messages?
Thanks
Just find an online SMS Gateway. These Gateway providers are your best bet since they have handled all the heavy lifting for you. Just utilize their API and you should be able to do whatever you want. Some of these gateways are free and some are not. I've included a short list below.
https://www.clickatell.com/pricing/message_cost.php
http://www.zeepmobile.com/
(Carrier based SMS transit)
http://en.wikipedia.org/wiki/List_of_carriers_providing_SMS_transit
I'm sure there are a ton more, but this will get you started.
You always need a GSM modem to send the SMS unless you use a provider that handles this for you (but they usually want money for this).
If you want to setup your own Hardware infrastructure, you have to get GSM Modem, A Sim card and use it to send SMS.
Other option, which I recommend, is to use SMS getways and use
SMPP protocol
XML or HTTP Apis
In later, you dont have to create any infrastructure and the starting cost will be very low compared to GSM Modem. You can get up and running in a day.
Note : to reduce the SMS costs, you should choose different getways for different countries. In India you can easily find getways who provides SMS at merely 3 paise
You will have to download an API that handles the sending and recieving of messages for you. I once used this in one project where i had my GSM Phone connected to my computer thru one of the COM ports. Configured the API to communicate thru the COM Port to listen to any incoming text messages also send messages thru my GSM Phone. Here is a great link to the resources i used for that project. I hope this will help. http://www.codeproject.com/KB/cs/SMS.aspx

Resources