Open kullanici0606 opened 1 year ago
I dont't think this is a config parameter target ..
You may play with the pdu content through interception anyway.
Following is the part of the code that determines maxSmLength:
If it can be specified with an configuration parameter, than it would be a lot easy for the users
Also I couldn't understand what you mean with interception, could you please elobarate it?
To make it more clear my case, here is the sample config and sample code that shows my request (first three lines):
jcli : smppccm -a
Adding a new connector: (ok: save, ko: exit)
> cid Demo
> max_sm_length 100
> ok
if self.config.maxSmLength is not None:
# use user defined max sm length
maxSmLength = self.configMaxSmLength
elif kwargs['data_coding'] in [3, 6, 7, 10]:
# 8 bit coding
bits = 8
maxSmLength = 140
slicedMaxSmLength = maxSmLength - 6
elif kwargs['data_coding'] in [2, 4, 5, 8, 9, 13, 14]:
# 16 bit coding
bits = 16
maxSmLength = 70
slicedMaxSmLength = maxSmLength - 3
else:
# 7 bit coding is the default
# for data_coding in [0, 1] or any other invalid value
bits = 7
maxSmLength = 160
slicedMaxSmLength = 153
longMessage = kwargs['short_message']
if bits == 16:
smLength = len(kwargs['short_message']) / 2
else:
smLength = len(kwargs['short_message'])
# if SM is longer than maxSmLength, build multiple SubmitSMs
# and link them
if smLength > maxSmLength:
Currently maxSmLenght is determined by data_coding of the submit_sm, however we have witnessed some buggy smpp servers that required shorter sm lenghts for certain kind of messages (i.e max 100 bytes for binary sms etc). Therefore is it possible to implement a configuration parameter for maxSmLength?