Replies: 1 comment 1 reply
-
|
👋 Hi Tomasz,
I'm not quite sure I understand how so,
That should be just fine
You don't need |
Beta Was this translation helpful? Give feedback.
-
|
👋 Hi Tomasz,
I'm not quite sure I understand how so,
That should be just fine
You don't need |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I am trying to use the library to create a sms sending app with billing and routing.
The main idea is to open one client instance per SMPP provider fetched from MySQL DB and run it in separate thread.
An Flask route is waiting for HTTP/HTTPS requests and does send SMS on request while the thread with client.listen() is running in background. I pass over the client object to sending function.
I figure out that the client instance reference is available in the handlers for submit_sm_resp and delivery_sm_resp in "pdu._client" and i was able to pass some additional data inside my class which inherits from client.
The main issue is that pdu._client (object reference) from delivery_sm is different object than in submit_sm_resp (object reference) and i don't know how to exchange the data between client sending the message and the one from delivery report.
Currently i save the pdu.sequence and msg_id in mysql DB. However i would like to wait with HTTP response to client sending SMS message unil get delivery report to send proper response about sending status.
Maybe my idea of handling this problem is incorrect or i miss something on how to handle this using the library.
Please let me know if keeping the client connection open with SMPP server is good practice.
Also how to get the delivery_response correlated to submit_sm_response (i see sequence is different because the pdu._client instances are different and the smpp unique message id is same however i don't want use DB pooling for synchronization when waiting for delivery report).
Beta Was this translation helpful? Give feedback.
All reactions