Title: How to handle delivery reports? · Issue #250 · python-smpplib/python-smpplib · GitHub
Open Graph Title: How to handle delivery reports? · Issue #250 · python-smpplib/python-smpplib
X Title: How to handle delivery reports? · Issue #250 · python-smpplib/python-smpplib
Description: 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...
Open Graph Description: 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 separa...
X Description: 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 separa...
Opengraph URL: https://github.com/python-smpplib/python-smpplib/issues/250
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"How to handle delivery reports?","articleBody":"Hello, \r\n\r\nI am trying to use the library to create a sms sending app with billing and routing. \r\nThe main idea is to open one client instance per SMPP provider fetched from MySQL DB and run it in separate thread.\r\n\r\nAn 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.\r\n\r\nI 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. \r\n\r\nThe 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.\r\n\r\nCurrently 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.\r\n\r\nMaybe my idea of handling this problem is incorrect or i miss something on how to handle this using the library.\r\n\r\nPlease let me know if keeping the client connection open with SMPP server is good practice.\r\nAlso 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).\r\n\r\n\r\n\r\n\r\n","author":{"url":"https://github.com/tom17031","@type":"Person","name":"tom17031"},"datePublished":"2024-04-22T20:45:01.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/250/python-smpplib/issues/250"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:642cbf72-70e9-9488-1c77-ed7f9679e2c4 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A386:67B36:2244D27:3017CCB:696F6A00 |
| html-safe-nonce | c5e3512f53e77f07568d8d80ce61ef0517ec6e12eaab5890bbdec17f6543d2ee |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMzg2OjY3QjM2OjIyNDREMjc6MzAxN0NDQjo2OTZGNkEwMCIsInZpc2l0b3JfaWQiOiI3OTgyNzU0MjQyNDk5NjY4NDgwIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | a4b382e3536f61ed7a503dbb03585249c8c8fb0375b6c482862743f2f11ce90a |
| hovercard-subject-tag | issue:2257433028 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python-smpplib/python-smpplib/250/issue_layout |
| twitter:image | https://opengraph.githubassets.com/968213c3272a493b1affbfc9a71d48000113e25ff9d440011d4a84fe5e7448c8/python-smpplib/python-smpplib/issues/250 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/968213c3272a493b1affbfc9a71d48000113e25ff9d440011d4a84fe5e7448c8/python-smpplib/python-smpplib/issues/250 |
| og:image:alt | 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 separa... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | tom17031 |
| hostname | github.com |
| expected-hostname | github.com |
| None | dd6be7b30d2e12704d0d9723ad4a7950f9e3ad8461efc40b5411aad62e847a89 |
| turbo-cache-control | no-preview |
| go-import | github.com/python-smpplib/python-smpplib git https://github.com/python-smpplib/python-smpplib.git |
| octolytics-dimension-user_id | 45378833 |
| octolytics-dimension-user_login | python-smpplib |
| octolytics-dimension-repository_id | 9441405 |
| octolytics-dimension-repository_nwo | python-smpplib/python-smpplib |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 9441405 |
| octolytics-dimension-repository_network_root_nwo | python-smpplib/python-smpplib |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 0bab932a9532ed9bc2e3e2614af9348ab39af6a7 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width