Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

How can pass extra (custom) parameters in send_message? #141

Unanswered
surinderdeveloper asked this question in Q&A
Discussion options

SMPP provider needs 3 more parameters to send sms. I am passing in the send_message function along with other params but those are not working. Is there any other way to pass it? I want to pass these params (PE_ID, TELEMARKETER_ID, TEMPLATE_ID).

pdu = client.send_message(
 source_addr_ton=smpplib.consts.SMPP_TON_INTL,
 source_addr_npi=smpplib.consts.SMPP_NPI_ISDN,
 source_addr=sender_object.sender_id,
 dest_addr_ton=smpplib.consts.SMPP_TON_INTL,
 dest_addr_npi=smpplib.consts.SMPP_NPI_ISDN,
 destination_addr=str(number),
 message_payload=part,
 data_coding=data_coding,
 esm_class=esm_class,
 validity_period='000000080000000R',
 registered_delivery=True,
 PE_ID=XXXXXXXXXXXXXXXXXXX,
 TELEMARKETER_ID=XXXXXXXXXXXXXXXXXXX,
 TEMPLATE_ID='')
You must be logged in to vote

Replies: 2 comments

Comment options

I added these fields in const.py and command.py but when I add template_id empty string or None then it is not working.
how can I add a field as an integer in command.py with a length of 19 character

You must be logged in to vote
0 replies
Comment options

Hi Surinder,

In the current implementation any extra parameters should be defined in SubmitSM class, otherwise they indeed wouldn't work. If they are compliant with the SMPP specs, please feel free to submit a pull request.

how can I add a field as an integer in command.py with a length of 19 character

Could you elaborate on this? E.g. which field and where the limitation does come from?

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
Converted from issue

This discussion was converted from issue #128 on July 05, 2021 12:18.

AltStyle によって変換されたページ (->オリジナル) /