I think what Djiby wants is what I have been trying to code for the past couple
of days... an HTTP smsc where you can describe the names of the parameters used
by the other side to send us an MO message as well as what you did for MT. The
idea is as follows:
We have a set of parameters likes:
URL-from = "foo"
URL-to = "bar"
URL-UDH = "target"
That way we know how to parse the arguments given to the http request
and we know what to do with them and how to process them. I already have about
9 of those parameters and I can already parse a request like:
http://<ip>:<port>/<cgiscript>?foo=1234&bar=17133456785&target=This+is+my+message
Now if someone has already worked on this more than me and thinks he is
closer to completion I'll be more than glad to submit my work to him.
I called this http smsc custom when finalized should be able to replace
some of the predefined http smsc's. I might need someone's help to guide me
though the process of keeping an ID string that we might have to receive in the
MO get and pass it back to the http smsc in the MT get. This is actually the
case I have which requires me to receive a message like:
http://<ip>:<port>/<cgiscript>?foo=1234&bar=17133456785&target=This+is+my+message&ID=1234567890123456
and when replying back I have to get something like:
http://<ip>:<port>/<cgiscript>?foo=1234&bar=17133456785&target=This+is+my+reply&ID=<the
ID we got with the MO>
Dimitris Evmorfopoulos
-----Original Message-----
From: Stipe Tolj [mailto:[EMAIL PROTECTED]
Sent: Thursday, April 12, 2007 2:01 AM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: Adding new HTTP smsc in kannel
[EMAIL PROTECTED] wrote:
> Hi All,
>
> Adding new http smsc in kannel requires source code modification in the
> file smsc_http.c, and implement of 3 fonctions :
> xxx_send_sms
> xxx_parse_reply
> xxx_receive_sms
>
> My problem is that I want to have only 3 fonctions for all http smsc,
> and then add new http smsc in config file.
>
> Has somebody done this? or has ideas?
Hi Djiby,
now, I have added a HTTP SMSC type 'generic' then can be used for "natively
easy" HTTP APIs that use pure HTTP GET and you define a regex expression to
define the success/failure outcome on the HTTP response.
See Kannel user's guide at:
http://www.kannel.org/download/kannel-userguide-snapshot/userguide.html#AEN2212
and you find the following example group described:
group = smsc
smsc = http
system-type = generic
port = 13015
send-url = "http://www.foobar.com/mt.php?from=%P&to=%p&text=%b"
status-success-regex = "ok"
status-permfail-regex = "failure"
status-tempfail-regex = "retry later"
Is this what you intend?
Stipe
-------------------------------------------------------------------
Kölner Landstrasse 419
40589 Düsseldorf, NRW, Germany
tolj.org system architecture Kannel Software Foundation (KSF)
http://www.tolj.org/ http://www.kannel.org/
mailto:st_{at}_tolj.org mailto:stolj_{at}_kannel.org
-------------------------------------------------------------------