Skip to content

Message received handler called without actually receiving the SMS #241

@micartey

Description

@micartey

The handler gets called while the SMS is not received.
I tested it by turning flight mode on and thus disconnecting from cell services.

client.set_message_received_handler(lambda pdu: handle_deliver_sm(pdu))

handle_deliver_sm gets called after some time which appears to be random.

I printed some fields of the DeliverSM object in hopes to see a flag or sth similar...
However, I could not find anything that seemed to be different from actually receiving the SMS

client.listen(auto_send_enquire_link=False)
...
client.send_message(
            source_addr_ton=smpplib.consts.SMPP_TON_ALNUM,
            source_addr_npi=smpplib.consts.SMPP_NPI_UNK,
            source_addr=config.SOURCE_NAME,
            dest_addr_ton=smpplib.consts.SMPP_TON_INTL,
            dest_addr_npi=smpplib.consts.SMPP_NPI_ISDN,
            destination_addr=phone_number,
            short_message=part,
            data_coding=encoding_flag,
            esm_class=msg_type_flag,
            registered_delivery=True,
)

Am I missing sth?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions