"This script will enforce sending message while asking for DLR"
from smpp.pdu.pdu_types
import RegisteredDeliveryReceipt, RegisteredDelivery
routable.pdu.params['registered_delivery'] = RegisteredDelivery(
RegisteredDeliveryReceipt.SMSC_DELIVERY_RECEIPT_REQUESTED)
you can make a tweak like the below one and force all parts of a long message to force ask DLR
#Method to check if PDU contains UHD parameter enabled - Concatenated SMS
def isUdhSet(esm_class):
if hasattr(esm_class, 'gsmFeatures'):
for gsmFeature in esm_class.gsmFeatures:
if str(gsmFeature) == 'UDHI_INDICATOR_SET':
return True
return False
_pdu = routable.pdu
if isUdhSet and _pdu.params['short_message'][:3] == '\x05\x00\x03':
while hasattr(_pdu, 'nextPdu'):
_pdu.params['registered_delivery'] = RegisteredDelivery(
RegisteredDeliveryReceipt.SMSC_DELIVERY_RECEIPT_REQUESTED)
My second idea is to check if the long messages are really getting delivered. I had a problem with a service provider using a "weird" coding 0 table. It was custom and totally messed up. I had to "convert" the content but by mistake I also converted the UDH part of the multipart. This caused only the 1st part to get delivered but not the rest of the message. If only 1 part of 2 or 3 arrives to a smartphone it will never show up and stay "hidden" until all parts arrive and this will not happen in this case.
Sorry If I am out of subject because I feel like I haven't totally understand the cause of your problem, so I am just brainstorming ideas for you to check