Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues/189: add ability to supply submit_sm SMSC fields during submit_sm call #193

Merged
merged 51 commits into from
Dec 6, 2019

Conversation

komuw
Copy link
Owner

@komuw komuw commented Dec 5, 2019

Thank you for contributing to naz.
Every contribution to naz is important.

Contributions are under the MIT License.

Answer the following questions,

What(What have you changed?)

  • add ability to supply submit_sm SMSC fields during submit_sm call

Why(Why did you change it?)

References:

@komuw
Copy link
Owner Author

komuw commented Dec 5, 2019

er_sm', 'log_id': '', 'command_status': 0, 'state': 'Success'}
{'timestamp': '2019-12-05 19:19:37,056', 'event': 'naz.Client.deliver_sm_resp', 'stage': 'start', 'log_id': '7x5em1nr8z5uxt5o7', 'smpp_command': 'deliver_sm_resp'}
{'timestamp': '2019-12-05 19:19:37,057', 'event': 'naz.Client.deliver_sm_resp', 'stage': 'end', 'error': "'utf-8' codec can't decode byte 0x80 in position 4: invalid start byte", 'log_id': '7x5em1nr8z5uxt5o7', 'smpp_command': 'deliver_sm_resp'}
Traceback (most recent call last):
  File "/home/komuw/mystuff/naz/naz/client.py", line 961, in deliver_sm_resp
    pdu=full_pdu,
  File "/home/komuw/mystuff/naz/examples/example_klasses.py", line 103, in enqueue
    await _redis.lpush(self.queue_name, message.to_json())
  File "/home/komuw/mystuff/naz/naz/protocol.py", line 383, in to_json
    pdu=self.pdu.decode(self.ENCODING),
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x80 in position 4: invalid start byte
{'timestamp': '2019-12-05 19:19:37,059', 'event': 'naz.Client.deliver_sm_resp', 'stage': 'end', 'log_id': '7x5em1nr8z5uxt5o7', 'smpp_command': 'deliver_sm_resp'}
{'timestamp': '2019-12-05 19:19:37,059', 'event': 'naz.Client.receive_data', 'stage': 'end'}
{'timestamp': '2019-12-05 19:19:37,060', 'event': 'naz.Clien

when you inject a deliver_sm request from smpp mock server

@komuw
Copy link
Owner Author

komuw commented Dec 5, 2019

full_pdu = b'\x00\x00\x00\x11\x80\x00\x00\x05\x00\x00\x00\x00\x00\x00\x00A\x00'
full_pdu.decode('utf8')
*** UnicodeDecodeError: 'utf-8' codec can't decode byte 0x80 in position 4: invalid start byte

@komuw komuw changed the title Issues/189 Issues/189: add ability to supply submit_sm SMSC fields during submit_sm call Dec 6, 2019
@komuw
Copy link
Owner Author

komuw commented Dec 6, 2019

full_pdu = b'\x00\x00\x00\x11\x80\x00\x00\x05\x00\x00\x00\x00\x00\x00\x00A\x00'
full_pdu.decode('utf8')
*** UnicodeDecodeError: 'utf-8' codec can't decode byte 0x80 in position 4: invalid start byte

We no longer(as of this PR) send any bytes to the broker.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Various (ton, npi) for source_address in submit_sm
1 participant