Hi,

Kannel doesn’t support TLV in Response. I needed to add those TLV fields to smpp_pdu_def file, then implement logic go parse new fields in kannel and add a dlr for this response.  So now I have a dlr in database with all TLV information.

So I get new field like: pdu->u.submit_sm_resp.my_tlv

and do what I want :)

Regards Vit.



On Thu, 16 Feb 2012 13:51:02 +0100
"Milan P. Stanic" wrote:
> [
> A: Because it messes up the order in which people
>normally read text.
> Q: Why is top-posting such a bad thing?
> A: Maybe because some people are too annoyed by
>top-posting.
> Q: Why do I not get an answer to my question(s)?
> ]
>
> On Thu, 2012-02-16 at 14:05, [email protected] wrote:
>> Config:
>> group = sendsms-user
>> username = x
>> password = x
>> max-messages = 1
>> concatenation = true
>> dlr-url = "">>> "[1]http://xxxxxxx/cgi-bin/dlr2.pl?from=%P&to=%p&meta-data="" "
>>
>> SMSbox LOG:
>> 2012-02-16 11:11:12 [26814] [9] DEBUG:   Scheme:
>>http://
>> 2012-02-16 11:11:12 [26814] [9] DEBUG:   Host: xx
>> 2012-02-16 11:11:12 [26814] [9] DEBUG:   Port: xx
>> 2012-02-16 11:11:12 [26814] [9] DEBUG:   Username:
>>(null)
>> 2012-02-16 11:11:12 [26814] [9] DEBUG:   Password:
>>(null)
>> 2012-02-16 11:11:12 [26814] [9] DEBUG:   Path:
>>/cgi-bin/dlr2.pl
>> 2012-02-16 11:11:12 [26814] [9] DEBUG:   Query:
>> from=alfa&to=2xxx&meta-data="" FVendor-specific+error%2C+please+refer+to+your+SMPP+provider&ID=cd01df65-9b97-4d54-9ce4-c7e137b86b71&dlr_uri=&dlr_r=NACK%2F0x00000403%2FVendor-sp
>> ecific+error%2C+please+refer+to+your+SMPP+provider&F_id=
>
> Ok. meta-data is empty. Looks like problem is that the
>Kannel does not
> know how to convert received PDU to meta-data value for
>the given GET
> URL.
>
> Look bellow.
>
>> LOG:
>> 2012-02-16 11:11:12 Receive DLR [SMSCxxxsmpp]
>>[SVC:sender] [ACT:] [BINF:]
>> [FID:] [META:] [from:alfa] [to:2xxx]
>>[flags:-1:-1:-1:-1:16]
>> [msg:73:NACK/0x00000403/Vendor-specific error, please
>>refer to your SMPP
>> provider] [udh:0:]
>> 2012-02-16 11:32:49 Log ends
>>
>> Regards Vit.
>>
>> On Thu, 16 Feb 2012 12:42:12 +0100
>> "Milan P. Stanic" wrote:
>> > On Thu, 2012-02-16 at 08:56, [email protected]
>>wrote:
>> >> I use both, Database and GET method for my script.
>> >>But I don’t see
>> >> anywhere that TLV fields are parsed by bearbox, I
>> >>think its logic stops on
>> >> the command status and does not retrieve tlv
>>fields
>> >>in that case. I don’t
>> >> see it in LOG files ether.
>> >
>> > Could you post your GET URL?
>> >
>> >>  I’m right?
>> >>
>> >> So I need to make a changes to kannel if there is
>>no
>> >>other way?
>> >>
>> >> Regards Vit.
>> >>
>> >> On Wed, 15 Feb 2012 21:29:26 +0100
>> >> "Milan P. Stanic" wrote:
>> >> ; > On Wed, 2012-02-15 at 08:45, [email protected]
>> >>wrote:
>> >> >> Hello,
>> >> >>
>> >> >> TLV options in config are set, example:
>> >> >>
>> >> >> group = smpp-tlv
>> >> >>
>> >> >> name = rut_addr
>> >> >>
>> >> >> tag = 0x1510
>
> Where did you found 0x1510 as tag value?
> Did you patched Kannel with that definition?
>
>> >> >> type = octetstring
>> >> >>
>> >> >> length = 20
>> >> >>
>> >> >> About the error - I know what it means, I need
>>to
>> >>get
>> >> >>tlv fields for this
>> >> >> response. If I get this command status I need
>>t o
>> >> >>write all tlv information
>> >> >> into database for further logic.
>> >> >>
>> >> >&g t; Kannel supports this function? If so, how
>>can I
>> >>get
>> >> >>the metadata for my
>> >> >> resp onse into database?
>> >> >>
>> >> >> I have Bearbox , SMSbox , Sqlbox.
>> >> >>
>> >> >> I don’t have metadata for response, with
>>command
>> >> >>status != 0.
>> >> >
>> >> > Sorry, I don't use databases for DLR nor MO/MT
>>so I
>> >> >can't help here.
>> >> >
>> >> >> Regards Vit.
>> >> >>
>> >> >> On Tue, 14 Feb 2012 22:46:29 +0100
>> > ;> >> "Milan P. Stanic" wrote:
>> >> >> > On Tue, 2012-02-14 at 16:04,
>>[email protected]
>> >> >>wrote:
>> >> >> >> Hello,
>> >> >> >>
>> >> >> >> I’ve done the changes to Kannel, it is
>>working.
>> >> >> >>
>> >> >> > > Got One more problem, when I tester error
>> >> >>responses:
>> >> >> >>
>> >> >> >> I don’t Get parsed Meta data from Negative
>> >> >> >>Submit_SM_Resp, it isn’t parsed
>> >> >> >> by bearbox, dlr gets written to database
>>with
>> >> >>error
>> >> >> &g t;>code from command
>> >> >> >> status. So if I need to receive TLV metadata
>> >>from
>> >> >> >>negative response, maybe
>> >> >> >> there is a solution?
>> >> >> >
>> >> >> > Did you set smpp-tlv options in config file?
>> >> >> >
>> >> >> >> Example of Response:
>> >> >> >>
>> >> >> >> OUT     2012-02-14 15:37:12
>> >> >> >> H command_id  &nb sp;    &nbs p; 0x80000004
>> >> >> >> H command_name       SUBMIT_SM_RESP
>> >> >> >> H sequence_number    41
>> >> >> >> H command_status     1044
>> >> >> >>   message_id  &n bsp;                   => ''
>> >> >> >>   rut_addr_ton      &n bsp;             =>
>> >>5         
>> >> >> >>0x00000003
>> >> >> >>   rut_subscriber_id               =>
>> >>'334455253/2'
>> >> >> >>   rut_addr       &n bsp;                 =>
>> >> >> >>'fserhWJKDwlqwkejf'
>> >> >> > >
>> >> >> >> LOG:
>> & gt;> >> >> 2012-02-14 15:35:32 [720] [6] Got PDU:
>> >> >> >> 2012-02-14 15:35:32 [720] [6] DEBUG: SMPP
>>PDU
>> >> >> >>0x9918ae0 dump:
>> >> >> >> 2012-02-14 15:35:32 [720] [6] DEBUG:  
>> >>type_name:
>> >> >> >>submit_sm_resp
>> >> >> >> 2012-02-14 15:35:32 [720] [6] DEBUG:  
>> >>command_id:
>> >> >> >>21474 83652 = 0x80000004
>> >> >> >> 2012-02-14 15:35:32 [720] [6] DEBUG:  
>> >> >> >>command_status: 1044 = 0x00000403
>> >> >> >> 2012-02-14 15:35:32 [720] [6] DEBUG:  
>> >> >> >>sequence_number : 42 = 0x0000002a
>> >> >> >> 2012-02-14 15:35:32 [720] [6] DEBUG: &nbs p;
>> >>message_id:
>> >> >> >>NULL
>> >> >> >> 2012-02-14 15:35:32 [720] [6] DEBUG: SMPP
>>PDU
>> >>dump
>> >> >> >>ends.
>> >> >> >> 2012-02-14 15:35:32 [720] [6] ERROR:
>> >>SMPP[xxxx]:
>> >> >>SMSC
>> >> >> >>returned error code
>> >> >> >> 0x00000453 (Vendor-specific error, please
>>refer
>> >>to
>> >> >> >>your SMPP provider) in
>> >> >> >> response to submit _sm.
>> >> >> >
>> >> >> > You should ask provider what meand 0x00000453
>> >>error
>> >> >> >code.
>> >> >> > It is in the range of 'Reserved for SMSC
>>vendor
>> >> >>specific
>> >> >> >err ors'.
>> >> >> >
>> >> & gt;> >> 2012-02-14 15:35:32 [720] [6] DEBUG:
>> >>SMSC[xxxxx]:
>> >> >> >>creating DLR message
>> >> >> >>
>> >> >> >> Regards Vit.
>> >> >> >>
>> >> >> >> On Fri, 10 Fe b 2012 17:09:42 +0100
>> >> >> >> "Milan P. Stanic" wrote:
>> >> >> >> > On Fri, 2012-02-10 at 15:24,
>> >>[email protected]
>> >> >> >>wrote:
>> >> >> >> >> Hello,
>> >> >> >> >>
>> >> >> >> >> I’m trying to change File
>> >>/gw/smsc/smsc_smpp.c
>> >> & gt;> >> >>
>> >> >> >> >> Maybe anyone have stept in to such
>>problem,
>> >>and
>> >> >> >>has
>> >> >> >> >>an advice where to
>> >> >> >> >> change the file will be better?
>> >> >> >> >>
>> >> >> >> >> I need to receive Deliver SM with 0
>>fields,
>> >>so
>> >> >>I’m
>> >> >> >> > ;>wondering if I catch
>> >> >> >& gt; >> Delivers With Null source address and
>> >> >>change the
>> >> >> >>data
>> >> >> >> >>of those fields.
>> >> >> >> >> Most of time after compilation I get
>> >> >> ;segmentation
>> >> >> >> >>fault..
>> >> >> >> >>
>> >> >> >> >> 1602: dlrmsg = handle_dlr(smpp,
>> >> >> >> >>pdu->u.deliver_sm.source_addr,
>> >> >> >> >> pdu->u.deliver_sm.short_message,
>> >> >> >> >>pdu->u.deliver_sm.message_payload,
>> >> >> >> >>
>> > > >> >> >> pdu->u.deliver_sm.receipted_message_id,
>> >> >> >> >>pdu->u.deliver_sm.message_state ,
>> >> >> >> >> pdu->u.deliver_sm.network_error_code);
>> >> >> >> >>
>> >> >> >> >> Here I can catch if I have an empty
>>source
>> >> >>address
>> >> >& gt; >> >>like that:
>> >> >> >> >>
>> >> >> >> >> if ( pdu->u.deliver_sm.source_addr ==
>>NULL)
>> >>  
>> >> >>{}
>> >> >> >> >>
>> >> >> >> >> Any help would be appreciated
>> >> >> &g t;> >
>> >> >> >> > Could you send a patch with your changes
>>and
>> >> >>tell
>> >> >> >>which
>> >> >> >> >version of
>> >> >> >> > Ka nnel you use as a base for your
>> >>modifications?
>> >> >> >> >
>> >> >> >> > And, questions about code
>>modification/change
>> >> >> >>should be
& gt;> >> >> >> >posted to
>> >> >> >> > the [email protected], IMHO.
>> >> >> >> >
>> >> >> >> >> Regards.  Vit
>> >> >> >> >>
>> >> >> >> >> On Tue, 07 Feb 2012 15:46:04 +0200
>> >> >> >> >> wrote:
>> >> >> >> >> >
>> >> >> >> >> > Hi,
>> >> >> >> >> > I’ve stept into a problem, Is it
>>possible
>> >>to
>> >> >> >>handle
>> >> >> >> >> >Deliver_SM with empty fields except TLV
>> >> >> >>fields?how?
>> >> >> > > >> > I get an Error, that its Null, here is
>>my < BR>>> >> >>LOG:
>> >> >> >> >> > >> > 2012-02-07 15:04:40 [12259] [6]
>> >>DEBUG:
>> >> >> >>Optional
>> >> >> >> > > >parameter tag (0x1506)
>> >> >> >> >> > 2012-02-07 15:04:40 [12259] [6] DEBUG:
>> >> >>Optional
>> >> >> >> >> >parameter length read as 5
>> >> >> >> >> > 2012-02-07 15:04:40 [12259] [6] DEBUG:
>> >>Found
>> >> >> >> >>configured
>> >> >> >> >> >optional parameter `rut_message_id'
>> >> >> >> >> > 2012-02-07 15:04:40 [12259] [6] DEBUG:
>> >> >>Optional
>> >> >> >> >> >parameter tag (0x1508)
>> & gt;> >> >> >> > 2012-02-07 15:04:40 [12259] [6] DEBUG:
>> >> >>Optional
>> >> >> >> >> >parameter length read as 1
>> >> >> >> >> > 2012-02-07 15:04:40 [12259] [6] DEBUG:
>> >>Found
>> >> >> >> >>configured
>> >> >> >> >> >optional parameter `rut _report_type'
>> >> >> >> >> > 2012-02-07 15:04:40 [12259] [6] DEBUG:
>> >> >>Optional
>> >> >> >> >> >parameter tag (0x1500)
>> >> >> >> >> > 2012-02-07 15:04:40 [12259] [6] DEBUG:
>> >> >>Optional
>> >> >> >> >> >parameter length r ead as 14
>> >> >> >> >> > 2012-02-07 15:04:40 [12259] [6] DEBUG:
&g t;> >>Found
>> >> >> >> >>configured
>> >> >> >> >> >optional parameter `rut_created_ts'
>> >> >> >> >> > 2012-02-07 1 5 :04:40 [12259] [6]
>>DEBUG:
>> >> >> >>SMPP[xxxx]:
>> >> >> >> >>Got
>> >> >> >> >> >PDU:
>> >> >> >> >> > 2012-02-07 15:04:40 [12259] [6] DEBUG:
>> >>SMPP
>> >> >>PDU
>> >> >> >> >>0x850eb1
>> >> >> >> >> > 0 dump:
>> >> >> >> >> > 2012-02-07 15:04:40 [12259] [6] DEBUG:
>> >> >> >>type_name:
>> >> >> >> >> >deliver_sm
>> >> >> >> >> > 2012-02-07 15:04:40 [12259] [6] DEBUG:
>> >> >> >>command_id:
>> >> >> >> >>5 =
>> >> >> >> >> >0x00000005
>> >> >> >> >> > 2012-02-07 15:04:40 [12259] [6] DEBUG:
>> >> >> >> >>command_status:
>> >> >> >> >> >0 = 0x0000000 0
>> >> >> >> >> > 2012-02-07 15:04:40 [12259] [6] DEBUG:
>> >> >> >> >> > sequence_num ber: 1 = 0x00000001
>> >> >> >> >> > 2012-02-07 15:04:40 [12259] [6] DEBUG:
>> >> >> >> >>service_type:
>> >> >> >> >> >NULL
>> >> >> >> >> > 2012-02-07 15:04:40 [12259] [6] DEBUG:
>> >> >> >> >> > source_addr_ton: 0 = 0x00000000
>> >> >> >> >> > 2012-02-07 15:0 4:40 [12259] [6] DEBUG:
>> >> >> >> >> > source_addr_npi: 0 = 0x00000000
>> >> >> >> >> > 2012-02-07 15:04:40 [12259] [6] DEBUG:
>> >> >> >>source_addr:
>> >> >> >> >> >NULL
>> >> >> >> >> > 2012-02-07 15:04:40 [12259] [6] DEBUG:
>> >> >> >> >>dest_addr_ton: >> >> >> >> >0 = 0x00000000
>> >> >> >> >> > 2012-02-07 15:04:40 [12259] [6] DEBUG:
>> >> >> >> >>dest_addr_npi:
>> >> >> >> >> >0 = 0x00000000
>> >> >> >> >> > 2012-02-07 15:04:40 [12259] [6] DEBUG:
>> >> >> >> >> > destination_addr: NULL
& gt;> >> >> >> >> > 2012-02-07 15:04:40 [12259] [6] DEB UG:
>> >> >> >>esm_class: 4
>> >> >> >> >>=
>> >> >> >> >> >0x00000004
>> >> >> >> >> > 2012-02- 07 15:04:40 [12259] [6] DEBUG:
>> >> >> >> >>protocol_id:
>> >> >> >> >> >0 = 0x00000000
>> >> >> >> >> > 2012-02-07 15:04:40 [12259] [6] DEBUG:
>> >> >> >> >>priority_flag:
>> >> >> > ;> >> >0 = 0x00000000
>> >> >> >> >> > 2012-02-07 15:04:40 [12259] [6] DEBUG:
>> >> >> >> >> > schedule_delivery_time: NULL
>> >> >> >> >> > 2012-02-07 15:04:40 [12259] [6] DEBUG:
>>> >
>> >>>
>> >> >> >>validity_period: NULL
>> >> >> >> >> > 2012-02-07 15:04:40 [12259] [6] DEBUG:
>> >> >> >> >> > registered_delivery: 0 = 0x00000000
>> >> >> >> >> > 2012-02-07 15:04:40 [12259] [6] DEBUG:
>> >> >> >> >> > replace_if_present_flag: 0 = 0
>>x00000000
>> >> >> >> >> > 2012-02-07 15:04:40 [12259] [6] DEBUG:
>> >> >> >>data_coding:
>> >> >> >> >>0 >> >> >= 0x00000000
>> >> >> >> >> > 2012-02-07 15:04:40 [12259] [6] DEBUG:
>> >> >> >> >> > sm_default_msg_id: 0 = 0x00000000
>> >> >> >> >> > 2012-02-07 15:04:40 [12259] [6] DEBUG:
>&g t; >> >> >>sm_length: 0
>> >> >> >> >>=
>> >> >> >> >> >0x00000000
>> >> >> >> >> > 2012-02-07 15:04:40 [12259] [6] DEBUG:
>> >> >> >> >>short_message:
>> >> >> >> >> >""
>> >> >> >> >> > 2012-02-07 15:04:40 [12259] [6] DEBUG:
>> >> >> >> >>rut_message_id:
>> >> >> >> >> > ;"48024"
>> >> >> >> >> > 2012-02-07 15:04:40 [12259] [6] DEBUG:
>> >> >> >> >>rut_created_ts:
>> >> >> >> >> >"20120207150639"
>> >> >> >> >> > 2 012-02-07 15:04:40 [12259] [6] DEBUG
>>:
>> >> >> >> >& gt; > rut_repo rt_type: "0"
>> >> >> >> >> > 2012-02-07 15:04:40 [12259] [6] DEBUG:
>> >>SMPP
>> >> >>PDU
>> >> >> >> >>dump
>> >> >> >> >> >ends.
>> >> >> >> ; >> > 2012-02-07 15:04:40 [12259] [6]
>>DEBUG:
>> >> >> >>SMPP[xxxx]
>> >> >> >> >> >handle_pdu, got DLR
>> >> >> >> >> > 2012-02-07 15:04:40 [12259] [6] ERROR:
>> >> >> >>SMPP[xxx]:
>> >> >> >> >>got
>> >> >> >> >> >DLR but could not find message or was
>>not
>> >> >> >>interested
>> >> >> >> >>in
>> >> >> >> >> >it id<> dst&l t ;(null)>, type<-1>
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> &g t;> >> > Regards.
>> >> >> >> >> WARNING: gnome-keyring:: couldn't connect
>> >>to:
>> >> >> >> >>/tmp/keyring-CLI2Mn/pkcs11: No such file
>>or
>> >> >> >>directory
>> >> >> >> >
>> >> >> >> > --
>> >> >> >> > Kind regards, Milan
>> >> >> >> >
>> >>
>>>>--------------------------------------------------
>> >> >> >> > Arvanta, IT Security
>>http://www.arvanta.net
>> >> >> >> > Please do not send me e-mail containing
>>HTML
>> > > >>code
>> >> >> >>or
>> >> >> >> >documents in
>> >> >> >> > proprietary format (word, excel, pps and
>>so
>> >>on)
>> >> >> >> >
>> >> >> >> WARNING: gnome-keyring:: couldn't connect
>>to:
>> >> >> >>/tmp/keyring-oldPme/pkcs11: No such file or
>> >> >& gt;directory
>> >> >> >
>> >> >> > --
>> >> >> > Kind regards, Milan
>> >> >> >
>> >>--------------------------------------------------
>> >> >> > Arvanta, IT Security http://www.arvanta.net
>> >> >> > Please do not send me e-mail containing HTML
>> >>code
>> >> >>or
>> > ;> >> >documents in
>> >> >> > proprietary format (word, excel, pps and so
>>on)
>> >> >> >
>> >> >> WARNING: gnome-keyring:: couldn't connect to:
>> >> >>/tmp/keyring-oldPme/pkcs11: No such file or
>> >>directory
>> >> >
>> >> > --
>> >> > Kind regards, Milan
>> >> >
>>--------------------------------------------------
>> >> > Arvanta, IT Security http://www.arvanta.net
>> >> > P lease do not send me e-mail containing HTML
>>code
>> >>or
>> >> >documents in
>> >> > proprietary format (word, excel, pps and so on)
>> >> >
>> >> WARNING: gnome-keyring:: couldn't connect to:
>> >>/tmp/keyring-oldPme/pkcs11: No suc h file or
>>directory
>> >
>> > --
>> > Kind regards, Milan
>> > --------------------------------------------------
>> > Arvanta, IT Security http://www.arvanta.net
>> > Please do not send me e-mail containing HTML code
>>or
>> >documents in
>> > proprietary format (word, excel, pps and so on)
>> >
>>
>> References
>>
>> Visible links
>> 1.
>>http://xxxxxxx/cgi-bin/dlr2.pl?from=%P&to=%p&meta-data=""
>> WARNING: gnome-keyring:: couldn't connect to:
>>/tmp/keyring-oldPme/pkcs11: No such file or directory
>
> --
> Kind regards, Milan
> ----------------------------------- ---------------
> Arvanta, IT Security http://www.arvanta.net
> Please do not send me e-mail containing HTML code or
>documents in
> proprietary format (word, excel, pps and so on)
>

Reply via email to