Hi Necj,
[ Note: the example I've used below is using the simple HTTP GET
interface, there's also a POST and XML interface to review if you
prefer. ]
What you want to do in your local web app (php or whatever) is to record
the message being sent and save the id of the record $id. Having done
that - send the message via the Kannel HTTP interface adding the query
string parameters 'dlrmask'. Try 31 for all to start with, experiment
and review docs. Also add a 'dlrurl' which is a URL for Kannel to GET
back - this should be a page on your web app (remember to URL encode
it). You'll need to pass your id and dlr variable so you can update your
original message status.
Consider:
$url = "/cgi-bin/sendsms?" .
"user=xxx&pass=xxx&to=1234...&from=1234...&text=foo&" .
"dlrmask=31&dlrurl=" .
urlencode($myappurl . "?id=$id&dlr=%d");
As mentioned the $id is your previously obtained id for the message so
you can update it's status based on the dlr you recieve back. Kannel
will fill in the %d (dlr=%d) bit with the new status of the message ...
Note also: If you're using dlr's you should also review the store
file/db options and choose what is right for you. The store file options
control how you store the delivery reports outstanding. I you request a
DLR mask of 31 kannel needs to retain the base information to relay
successive DLR's until they've all been received.
If you set don't set the store-file option I believe the dlr statues are
kept in memory ('internal') so will be lost in the unlikely event Kannel
goes down. Using a physical file enables Kannel to reload these on
restart - using a db improves efficiency if you are running high-load
production based servers. Again review the documentation.
Have fun kanneling.
Cheers,
Alan
On Tue, 2003-07-22 at 21:10, Nejc Menard @ GENERA Lynx d.o.o. Ljubljana
wrote:
> Hi.
>
> Thank you for the answer. Can you give me a hint on how to realise this?
> I send http request with dlrurl and dlrmask + pid.
>
> Then I read with php script get attributes like pid, but there is the
> sender number instead of pid. How to get the set pid in the dlr to
> 'connect' these two together?
>
> Maybe if you have soma sample sources in html or php, I would appreciate.
>
> Thank you for your answers.
>
> Regards,
>
> Nejc.
>
> Alan McNatty pravi:
>
> >Hi Nejc
> >
> >You need to look into Delivery Reports. You can specify additional query
> >string parameters to trigger delivery reports which will provide the
> >information you require. Please review the on-line documentation.
> >
> >Cheers,
> >Alan
> >
> >On Tue, 2003-07-22 at 00:27, Nejc Menard @ GENERA Lynx d.o.o. Ljubljana
> >wrote:
> >
> >
> >>Hi again!
> >>
> >>Is there any other response then this, after triggering the url for
> >>sendinng the sms with http GET:
> >>
> >>server response code: 200
> >>text: Sent.
> >>
> >>If there is any other (I am in a need for Failed SMS), I would
> >>appreciate, if you can send me the others... Application could then
> >>decide, weather to resend the sms...
> >>
> >>Thank you, Nejc.
> >>
> >>
>
--
Alan McNatty <[EMAIL PROTECTED]>