Alexander Eckert schrieb:
> Hi,
> 
> dunno if i am on a wrong way ... thats why i am asking here.
> If i use the binfo feature to fill the service_type field inside
> SMPP submit_sm PDU i got an Errormesssage:
> 
> 2008-10-29 13:43:24 [873] [6] DEBUG: 
> SMPP[SMPP:sms-smpp1.mobilcom.de:8301/8301:switch1:any]: Sending PDU:
> 2008-10-29 13:43:24 [873] [6] DEBUG: SMPP PDU 0x81b24a8 dump:
> 2008-10-29 13:43:24 [873] [6] DEBUG:   type_name: submit_sm
> 2008-10-29 13:43:24 [873] [6] DEBUG:   command_id: 4 = 0x00000004
> 2008-10-29 13:43:24 [873] [6] DEBUG:   command_status: 0 = 0x00000000
> 2008-10-29 13:43:24 [873] [6] DEBUG:   sequence_number: 5 = 0x00000005
> 2008-10-29 13:43:24 [873] [6] DEBUG:   service_type: "900015"
> 2008-10-29 13:43:24 [873] [6] DEBUG:   source_addr_ton: 5 = 0x00000005
> 2008-10-29 13:43:24 [873] [6] DEBUG:   source_addr_npi: 0 = 0x00000000
> 2008-10-29 13:43:24 [873] [6] DEBUG:   source_addr: "mobilcom"
> 2008-10-29 13:43:24 [873] [6] DEBUG:   dest_addr_ton: 2 = 0x00000002
> 2008-10-29 13:43:24 [873] [6] DEBUG:   dest_addr_npi: 1 = 0x00000001
> 2008-10-29 13:43:24 [873] [6] DEBUG:   destination_addr: "00491704001858"
> 2008-10-29 13:43:24 [873] [6] DEBUG:   esm_class: 3 = 0x00000003
> 2008-10-29 13:43:24 [873] [6] DEBUG:   protocol_id: 0 = 0x00000000
> 2008-10-29 13:43:24 [873] [6] DEBUG:   priority_flag: 0 = 0x00000000
> 2008-10-29 13:43:24 [873] [6] DEBUG:   schedule_delivery_time: NULL
> 2008-10-29 13:43:24 [873] [6] DEBUG:   validity_period: NULL
> 2008-10-29 13:43:24 [873] [6] DEBUG:   registered_delivery: 0 = 0x00000000
> 2008-10-29 13:43:24 [873] [6] DEBUG:   replace_if_present_flag: 0 = 0x00000000
> 2008-10-29 13:43:24 [873] [6] DEBUG:   data_coding: 0 = 0x00000000
> 2008-10-29 13:43:24 [873] [6] DEBUG:   sm_default_msg_id: 0 = 0x00000000
> 2008-10-29 13:43:24 [873] [6] DEBUG:   sm_length: 7 = 0x00000007
> 2008-10-29 13:43:24 [873] [6] DEBUG:   short_message: "test123"
> 2008-10-29 13:43:24 [873] [6] DEBUG: SMPP PDU dump ends.
> 2008-10-29 13:43:24 [873] [6] WARNING: SMPP: PDU element <service_type> too 
> long (length is 6, should be 5)
> 
> But if i check the SMPP specification i get this :
> 
> Field Name: service_type 
> Size /octets: Var. max 6
> Type: C/Octet / String
> Description :
> The service_type parameter can be used to indicate the SMS Application service
> associated with the message.Specifying the service_type allows the ESME to
> * avail of enhanced messaging services such as "replace by service" type
> * to control the teleservice used on the air interface.
> Set to NULL for default SMSC settings.
> Ref.: 5.2.11
> 
> Am i totally wrong - or should it be 6 instead of 5 and the Warning is wrong 
> ? 

Hi Alexander,

yep, you are wrong here and Kannel right. Let me explain:

The SMPP v3.4 spec defines a var max 6 octets for the value. The value itself is
defined as C octet string, which means it is null-terminated. So 1 byte is
always "lost" from the max size value for the trailing 0x00 (end of string) 
flag.

That is why you have only 5 real chars for the payload.

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
-------------------------------------------------------------------

Reply via email to