Title: How to send long sms using caller Id (such as Bank_Alert)? · python-smpplib/python-smpplib · Discussion #209 · GitHub
Open Graph Title: How to send long sms using caller Id (such as Bank_Alert)? · python-smpplib/python-smpplib · Discussion #209
X Title: How to send long sms using caller Id (such as Bank_Alert)? · python-smpplib/python-smpplib · Discussion #209
Description: How to send long sms using caller Id (such as Bank_Alert)?
Open Graph Description: HI @eigenein I am experimenting with smpplib. When I send long sms it throws following exception: Command submit_sm failed: Incorrect BIND Status for given command X Description: HI @eigenein I am experimenting with smpplib. When I send long sms it throws following exception: Command submit_sm failed: Incorrect BIND Status for given command <class 'smpplib.exceptions...
Opengraph URL: https://github.com/python-smpplib/python-smpplib/discussions/209
X: @github
Domain: patch-diff.githubusercontent.com
HI @eigenein I have following code to send sms do you have any idea about that? my bad, this issuse occured due to immediate disconnect inside for loop. Links:
Viewport: width=device-width
Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"QAPage","mainEntity":{"@type":"Question","name":"How to send long sms using caller Id (such as Bank_Alert)?","text":"
\nI am experimenting with smpplib. When I send long sms it throws following exception:Command submit_sm failed: Incorrect BIND Status for given command\n<class 'smpplib.exceptions.PDUError'>\ndef send_alert_helper(data: dict ):\n '''\n param: dict(ip, port, alert_username, alert_password, , alert_id, mobile_number, message)\n '''\n try:\n parts, encoding_flag, msg_type_flag = make_parts(u\"{}\".format(data.get('message')))\n client = smpplib.client.Client(data.get('ip'), int(data.get('port')))\n client.set_message_sent_handler(\n lambda pdu: sys.stdout.write('send {} {} \\n'.format(pdu.sequence, pdu.message_id))\n )\n client.connect()\n client.bind_transceiver(system_id = data.get('alert_username'), password = data.get('alert_password'))\n\n for part in parts:\n pdu = client.send_message(\n source_addr_ton=smpplib.consts.SMPP_TON_ALNUM,\n source_addr_npi=smpplib.consts.SMPP_NPI_UNK,\n source_addr= data.get('alert_id'),\n \n dest_addr_ton=smpplib.consts.SMPP_TON_INTL,\n destination_addr = data.get('mobile_number'),\n short_message=part,\n data_coding=encoding_flag,\n esm_class=msg_type_flag,\n registered_delivery=False, \n )\n client.disconnect()\n \n except ConnectionError:\n raise ConnectionError()\n\n except Exception as e:\n raise Exception()\n
\nBut, when I use phone number i can send long length sms also. We have following code for thatdef send_sms_helper(data: dict):\n '''\n param: data-> dict (ip, port, system_id, system_password, sender_id, mobile_number, message)\n '''\n try:\n parts, encoding_flag, msg_type_flag = make_parts(u\"{}\".format(data.get('message')))\n client = smpplib.client.Client(data.get('ip'), data.get('port'))\n client.set_message_sent_handler(\n lambda pdu: sys.stdout.write('send {} {} \\n'.format(pdu.sequence, pdu.message_id))\n )\n client.connect()\n client.bind_transmitter(system_id = data.get('system_id'), password = data.get('system_password'))\n for part in parts:\n pdu = client.send_message(\n source_addr_ton=smpplib.consts.SMPP_TON_INTL,\n source_addr=data.get('sender_id'),\n \n dest_addr_ton=smpplib.consts.SMPP_TON_INTL,\n destination_addr = data.get('mobile_number'),\n short_message=part,\n data_coding=encoding_flag,\n esm_class=msg_type_flag,\n registered_delivery=True,\n )\n client.disconnect()\n\n except ConnectionError: \n raise ConnectionError()\n \n except Exception as e:\n raise Exception()\n\n
route-pattern /:user_id/:repository/discussions/:number(.:format) route-controller discussions route-action show fetch-nonce v2:ebd2d1ad-d08d-1e8e-a2ed-46103ca430e4 current-catalog-service-hash 9f0abe34da433c9b6db74bffa2466494a717b579a96b30a5d252e5090baea7be request-id CCAA:3D05CE:26943E:36D457:696F5320 html-safe-nonce 09c6944c78cc2df75e1cb41f45fc6372fb821559c0d669e8416ebbf6bfed4325 visitor-payload eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQ0FBOjNEMDVDRToyNjk0M0U6MzZENDU3OjY5NkY1MzIwIiwidmlzaXRvcl9pZCI6IjUxMjU5MjQwMDUwMjk1NjUyMTYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== visitor-hmac f290cf824c905c5fde86bc3d29c79501c72d7afbc9a6a72654b14c0eabe4ae72 hovercard-subject-tag discussion:4304914 github-keyboard-shortcuts repository,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/python-smpplib/python-smpplib/discussions/209 twitter:image https://opengraph.githubassets.com/fed926042c4116760ed94158d5c60b367b6029daf9c271f754fa8555c8cb907f/python-smpplib/python-smpplib/discussions/209 twitter:card summary_large_image og:image https://opengraph.githubassets.com/fed926042c4116760ed94158d5c60b367b6029daf9c271f754fa8555c8cb907f/python-smpplib/python-smpplib/discussions/209 og:image:alt HI @eigenein I am experimenting with smpplib. When I send long sms it throws following exception: Command submit_sm failed: Incorrect BIND Status for given command og:image:width 1200 og:image:height 600 og:site_name GitHub og:type object hostname github.com expected-hostname github.com None 49bb2ee76ae1b4ec758faefafda636ff20b05a9708bb290d28422cdf542ae979 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 036f37fe552777ac9c6ee661957f947285aab936 ui-target full theme-color #1e2327 color-scheme light dark
URLs of crawlers that visited me.