What is your scheduled_delivery_time if you set deferred to a higher value?
In this case, the immediate delivery is correct, from a point of view of
your SMSC.
Because you submit the message at 19:48:07 (Argentina time) and the message
should be delivered at 23:48:07 (UTC time). These times are identical.
In smsbox.c the msg->sms.deferred field is copied directly from the http
parameter.
The following code translates this field into the
pdu->u.submit_sm.schedule_delivery_time:
if (msg->sms.deferred >= 0) {
struct tm tm = gw_gmtime(time(NULL) + msg->sms.deferred * 60);
pdu->u.submit_sm.schedule_delivery_time =
octstr_format("%02d%02d%02d%02d%02d%02d000+",
tm.tm_year % 100, tm.tm_mon + 1, tm.tm_mday,
tm.tm_hour, tm.tm_min, tm.tm_sec);
}
As far as I can see, this is correct.
Still there should be some kind of bug here, because if the log that you
show is a pdu from posting the link that is just above the log, the
schedule_delivery_time should be "060621234907000+" (note the 8 that is now
a 9).
Rene Kluwen
Chimit
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Behalf Of Rene Kluwen
Sent: donderdag 22 juni 2006 2:14
To: Alejandro Guerrieri; [email protected]
Subject: RE: deferred parameters
SMPP:
7.1.1.1 Absolute Time format
This is the default format used by SMPP. Scheduled delivery times and expiry
times are
specified in their global UTC format, including the quarter hour offset and
direction symbol "+"
or "-".
Rene Kluwen
Chimit
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Behalf Of Alejandro Guerrieri
Sent: donderdag 22 juni 2006 1:04
To: [email protected]
Subject: Re: deferred parameters
I've upgraded Kannel to latest CVS release, 20060621 and I still can't
defer the messages.
I've tried with a simple message:
http://myhost:myport/cgi-bin/sendsms?username=myuser&password=mypass&from=12
34&to=1234567890&smsc=mysmsc&text=test&deferred=1
But the message gets delivery inmediately.
Here's a copy of kannel.log where the PDU is being logged:
2006-06-21 19:48:07 [20158] [48] DEBUG: SMPP PDU 0x8841750 dump:
2006-06-21 19:48:07 [20158] [48] DEBUG: type_name: submit_sm
2006-06-21 19:48:07 [20158] [48] DEBUG: command_id: 4 = 0x00000004
2006-06-21 19:48:07 [20158] [48] DEBUG: command_status: 0 = 0x00000000
2006-06-21 19:48:07 [20158] [48] DEBUG: sequence_number: 2 = 0x00000002
2006-06-21 19:48:07 [20158] [48] DEBUG: service_type: NULL
2006-06-21 19:48:07 [20158] [48] DEBUG: source_addr_ton: 2 = 0x00000002
2006-06-21 19:48:07 [20158] [48] DEBUG: source_addr_npi: 1 = 0x00000001
2006-06-21 19:48:07 [20158] [48] DEBUG: source_addr: "*****"
2006-06-21 19:48:07 [20158] [48] DEBUG: dest_addr_ton: 2 = 0x00000002
2006-06-21 19:48:07 [20158] [48] DEBUG: dest_addr_npi: 1 = 0x00000001
2006-06-21 19:48:07 [20158] [48] DEBUG: destination_addr: "************"
2006-06-21 19:48:07 [20158] [48] DEBUG: esm_class: 0 = 0x00000000
2006-06-21 19:48:07 [20158] [48] DEBUG: protocol_id: 0 = 0x00000000
2006-06-21 19:48:07 [20158] [48] DEBUG: priority_flag: 0 = 0x00000000
2006-06-21 19:48:07 [20158] [48] DEBUG: schedule_delivery_time:
"060621234807000+"
2006-06-21 19:48:07 [20158] [48] DEBUG: validity_period: NULL
2006-06-21 19:48:07 [20158] [48] DEBUG: registered_delivery: 0 =
0x00000000
2006-06-21 19:48:07 [20158] [48] DEBUG: replace_if_present_flag: 0 =
0x00000000
2006-06-21 19:48:07 [20158] [48] DEBUG: data_coding: 0 = 0x00000000
2006-06-21 19:48:07 [20158] [48] DEBUG: sm_default_msg_id: 0 = 0x00000000
2006-06-21 19:48:07 [20158] [48] DEBUG: sm_length: 4 = 0x00000004
2006-06-21 19:48:07 [20158] [48] DEBUG: short_message: "test"
2006-06-21 19:48:07 [20158] [48] DEBUG: SMPP PDU dump ends.
I can see there's a line:
schedule_delivery_time: "060621234807000+"
It looks like it's GMT +1 time, but the date it's not being offsetted
at all (19:48:07 gets translated to 23:48:07 +000).
BTW, the server is set to America/Buenos_Aires timezone (GMT -3) so
I'm not sure if that's ok or not...
I've tried with deferred=1, 60, 6000 and even 60000 to no avail, the
messages got delivered inmediately. (I even tried with negative
values, but I've got an error in return).
Maybe the SMSC it's ignoring the parameter, or schedule_delivery_time
it's wrong?
Regards,
--
Alejandro Guerrieri
Magicom
http://www.magicom-bcn.net/
LinkedIn: http://www.linkedin.com/in/aguerrieri
On 6/21/06, Alejandro Guerrieri <[EMAIL PROTECTED]> wrote:
> Martín,
>
> I've read the user-guide (a few thousand times perhaps ;) ) and
> noticed the "?" on the SMPP protocol. That lead me to think that it
> wasn't tested. My unsuccesful trying didn't help...
>
> It was an 1.4.0 at the time of testing. I'll do a new round of tests
> this week with a new snapshot, maybe it's now fixed (or the SMSC it's
> ignoring the parameter...).
>
> Regards,
>
> On 6/21/06, Mi Reflejo <[EMAIL PROTECTED]> wrote:
> > Yes it's tested and used. Take a look to cvs user guide
> >
(http://www.kannel.org/download/kannel-userguide-snapshot/userguide.html)
> >
> > deferred number (minutes) Optional. If given, the SMS
center will
> > postpone the message to be delivered at now plus this many minutes.
> > Note: you must have your Kannel box time synchronized with the SMS
> > Center.
> >
> > Which version of kannel are you using?
> >
> > If you are using cvs head please post the smpp trace. if not please
> > upgrade to head.
> >
> > Martín.
> >
> > On 6/21/06, Alejandro Guerrieri <[EMAIL PROTECTED]> wrote:
> > > Hi all,
> > >
> > > Has anyone tried using the "deferred" parameter with an SMPP link?
> > > User-Guide puts a question mark on it, so I assume that means "not
> > > tested".
> > >
> > > I've tried with some SMPP links we have without success: the messages
> > > get delivered without any delay, blatantly ignoring the "deferred"
> > > parameter setting.
> > >
> > > Is that a problem related to Kannel, the SMPP protocol or just the
> > > SMSC ignoring it?
> > >
> > > On the other hand, specially if this is something related to
> > > protocols, it would be cool to have some sort of "soft-deferring",
> > > meaning Kannel doing the deferral (on the store-file perhaps). This
> > > would work on all kind of links ('at' modems included) since Kannel
> > > would be keeping the messages until delivery time.
> > >
> > > Thank you in advance,
> > > --
> > > Alejandro Guerrieri
> > > Magicom
> > > http://www.magicom-bcn.net/
> > > LinkedIn: http://www.linkedin.com/in/aguerrieri
> > >
> > >
> >
>
>
> --
> Alejandro Guerrieri
> Magicom
> http://www.magicom-bcn.net/
> LinkedIn: http://www.linkedin.com/in/aguerrieri
>