I think the complete solution is to extend the dlr status to 64bits!
(and most dbs have 64bit ints too, so may as well go for the max!!)
then decide on a translation table for dlrinfo bits for whats important to
the application.
of course the existing dlr bits
#define DLR_NOTHING 0x00
#define DLR_SUCCESS 0x01
#define DLR_FAIL 0x02
#define DLR_BUFFERED 0x04
#define DLR_SMSC_SUCCESS 0x08
#define DLR_SMSC_FAIL 0x10
are a good start......
then start adding more.........
like
#define DLR_NOCREDIT 0x20
And the reason you do want to do it in kannel, is that the whole existance
of kannel is to abstract the application
from dealing with the low details of sending/receiving sms, and the varied
formats of dlrs, whether it comes from smpp or otherwise.
The application just has to deal with the higher content level of
information supplied Eg DLR_NOCREDIT
You really do appreciate this approach when you build a (same) kannel to
handle
mblox,mqube,optus,vodaphone,telstra,etc,etc.....all of them are different!!
(
take for example vodaphone!! 1 example, its like
""Destination not Known" - thats the dlr text, so its searched for and
mapped to
InvalidDestination = 0x8000LL,
for mblox, various submit_resp status can be mapped to InvalidDestination,
for optus its its the dlr err:no 1,2 or 5 = InvalidDestination
etc..etc...etc.
)
so in my msg struct I have
.....
LONGINTEGER(dlr_mask);
LONGINTEGER(dlr_status);
.....
"Anyone fancy writing a patch? "
our version of kannel is beyond just a patch of kannel.orgs cvs
version...............
have not been successfull in supplying updated code to kannel.org's
moderators in the past....
problem with "please supply as separate patches" or something like
it.........
----- Original Message -----
From: "Alex Kinch" <[EMAIL PROTECTED]>
To: "Kannel Devel" <[email protected]>
Sent: Friday, November 03, 2006 5:48 AM
Subject: Re: 5 digit error codes
Hello all,
Just picked up this thread, as am looking for a way to read the error
codes from the DLRs and pass them to our application. For us it's in
the actual text of the deliver_sm on certain SMPP connections, for
example:
2006-11-01 17:30:03 [21406] [8] DEBUG: data: 69 64 3a 35 36 39 36
36 34 34 36 32 20 73 75 62 id:569664462 sub
2006-11-01 17:30:03 [21406] [8] DEBUG: data: 3a 30 30 31 20 64 6c
76 72 64 3a 30 30 31 20 73 :001 dlvrd:001 s
2006-11-01 17:30:03 [21406] [8] DEBUG: data: 75 62 6d 69 74 20 64
61 74 65 3a 30 36 31 31 30 ubmit date:06110
2006-11-01 17:30:03 [21406] [8] DEBUG: data: 31 31 37 32 39 20 64
6f 6e 65 20 64 61 74 65 3a 11729 done date:
2006-11-01 17:30:03 [21406] [8] DEBUG: data: 30 36 31 31 30 31 31
37 32 39 20 73 74 61 74 3a 0611011729 stat:
2006-11-01 17:30:03 [21406] [8] DEBUG: data: 46 41 49 4c 45 44 20
20 65 72 72 3a 30 30 35 20 FAILED err:005
2006-11-01 17:30:03 [21406] [8] DEBUG: data: 74 65 78 74 3a 20 00
text: .
2006-11-01 17:30:03 [21406] [8] DEBUG: Octet string dump ends.
Anyone fancy writing a patch? Not quite sure whether it would just be
the smpp driver that needs patching, or a little more than that..
On 8/23/06, Stipe Tolj <[EMAIL PROTECTED]> wrote:
> Hillel wrote:
>
> > Hi,
> >
> > We are using SMPP version 3.4 and the network_error_code is found in the
> > smpp spec under optional parameters for deliver_sm. If you connect to a
SMS
> > aggregator and request a delivery receipt, they accept the SMS and try
route
> > it on to the SMSC that finally sends. I think what's happening, is when
they
> > try to send the SMS to the SMSC that will actually send it, they get
back in
> > the submit_sm_response the command_status which sometimes gives the
reason
> > why the SMS was not valid. Then they take the command_status and map it
to
> > their 5 digit number code and since you have requested a delivery
receipt,
> > they send a delivery receipt back to you with this number in the
> > network_error_code.
> >
> > The question is, it seems from the Kannel logs the error codes are
always in
> > a 3 digit form i.e. 001 or 000 etc
>
> with 3 digits you refer to the DLR message itself, right? This has nothing
to do
> with a optional parameter from the SMSC.
> >
> > Will Kannel give back 5 digit error codes should the SMSC aggregator
send
> > them back?
> > and other than requesting the dlr when sending the SMS, are there any
other
> > configuration options or patches required to receive 5 digit error
codes?
>
> yes, obviously you will need to pass the 5 digit value from the optional
> parameter to the upper layer (application) to use it.
>
> 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
> -------------------------------------------------------------------
>
>