James Coleman wrote:
Hello Alek,

On Fri, Apr 15, 2005 at 05:15:16PM +0200, aleksandar ivanovski wrote:

Hi list for the very first time,

I am assigned a job to do implement an SMS gateway. Have contacted with the SMSC and agreed on a test port account. They are using SMPP protocol 3.4.
I am trying to make kannel sms gw work.
I have installed it on suse9.0 box and working in a fake environment.


I manage to send sms trough HTTPPOST and it says Sent in the browser :-)


That means it is sent to kannel's queue.

Control kannel and check status visiting the url/port as configured
 in kannel's config-file admin-port in core group
 http://www.kannel.org/download/1.4.0/userguide-1.4.0/userguide.html#AEN447
  Core configuration
 (e.g. status and message queue:
    http://localhost:13000/status
    http://localhost:13000/store-status )

Turn on logging (set log-level = 5 for example for kannel smsbox and bearerbox).
(do this by ... editing kannel's configfile ;) )
If smsc connection is configured correctly and working the sms will be sent from queue. You can see queue on file system and see
contents. (read kannel's user guide :) )
(edit config file to enter your smsc details of course
http://www.kannel.org/download/1.4.0/userguide-1.4.0/userguide.html#SMS-GATEWAY )


e=xample of smsc group that works with smpp 3.4 protocol:
 (account info/passwords removed of course)

## main smsc - clickatell
group = smsc
smsc-id = clickatell
smsc = smpp
host = smpp.clickatell.com
### ports: 12345 - 12347
port = 12345
receive-port = 12345
smsc-username = "xxxxxx"
smsc-password = "xxxxxx"
### clickatell product as system type for their validation and billing
system-type = "127234"
###our-host = 193.111.111.111  (NATed ip address) (sent to smpp provider)
address-range = ""
### 60 secs recommended by smpp provider
enquire-link-interval = 60


We are doing this for a bank, and there will be 2 types of messages actually 2 initiators:
triggered by users (user will send sms with content "account" and get the current amount of money they have on their account, and SMS triggered by the DB server i.e. daily or on money amount change.
So the operator is doing the sms traffic all I have to do is process the request of the incoming smss and send a reply back. (or just send sms initiated by some change in the bank database)
Since we are doing the core banking business logic all the queries to the DB that will be done by html query string are not a big problem(not for me but for developers Wink .


What I don't know (among 1000 other things concerning kannel) is how to process the incoming sms, how to produce it, where to catch that event, and how to act upon it.


To process incoming sms you can use kannel's filtering to a certain extent but it might be easier to call a script and do all incoming
sms parsing and filtering in there.


Again edit kannel's config file to control how incoming sms are processed.
This is done in sms-service group.
http://www.kannel.org/download/1.4.0/userguide-1.4.0/userguide.html#AEN3087

e.g. receivesms.cgi is perl script where db is queried, sms reply is built and sent
If you're familiar with writing and setup of cgi scripts it's easy to do.
Otherwise you need to rean more manuals :)


# matches TUC, tuc, Tuc, ...
group = sms-service
keyword = TUC
get-url = 
"http://localhost/receivesms.cgi?from=%p&to=%P&text=%a&smscid=%i&dr1=%d&user=%n&coding=%c&charset=%C&keyword=TUC";
max-messages = 0
concatenation = true

# catch any other incoming sms
group = sms-service
keyword = default
get-url = 
"http://localhost/receivesms.cgi?from=%p&to=%P&text=%a&smscid=%i&dr1=%d&user=%n&coding=%c&charset=%C&keyword=";
max-messages = 0
concatenation = true

Read the kannel user guide very well.

http://www.kannel.org/download/1.4.0/userguide-1.4.0/userguide.html

Have fun!

:)

James.




James,

10x for the response,

I have been reading the kannel user guide for the weekend and SORRY to everybody on the newsgroup for asking stupid questions i.e. not reading the userguide very well, now I understand that they were more stupid than mentioned in the subject :-(.

However,
since I am admin and not a developer I am not going to code the incoming and outgoing sms content, is it possible to get some html(php,jsp ...) examples for code processing (can be web echo only, just to test if it works), or are there any scrips on the web for testing purposes?


10x

Alex




Reply via email to