後で参照目的で DLR に返される一意のメッセージ識別子を設定することは可能ですか。
以下に私の現在のプロセスを説明させてください。
私のアプローチは、メッセージを smsc ゲートウェイに送信し、smsc から ID を取得し、この ID を保存し、DLR が来ると、dlr からの ID を以前に保存した ID と照合します (短期間に何百万ものメッセージをプッシュするため)このアプローチは、データベースとの間を行き来する私たちにとって最適ではありません)。
私が達成したいのは、smsc への送信メッセージにパラメーターを追加し、dlr が戻ってきたときにこの ID を取得できる方法があるかどうかです。
Python にはhttps://github.com/podshumok/python-smpplibを、Javaにはhttps://github.com/uudashr/jsmppを使用しています。
編集
以下は、SM を送信するための私の PDU です。
{'ms_msg_wait_facilities': None, 'priority_flag': None, 'language_indicator': None, 'its_reply_type': None, '_sequence': 2, 'registered_delivery': True, 'schedule_delivery_time': None, 'sm_default_msg_id': None, 'callback_num_pres_ind': None, 'source_subaddress': None, '_length': 70, 'user_response_code': None, 'sar_msg_ref_num': None, 'short_message': 'Lets Test MT\n', 'privacy_indicator': None, 'user_message_reference': 12, 'sar_total_segments': None, 'dest_addr_ton': 1, 'callback_num': None, 'sar_segment_seqnum': None, '_client': <smpplib.client.Client object at 0x7f2058a6a910>, 'service_type': None, 'source_addr_ton': 1, 'payload_type': None, 'validity_period': None, 'destination_addr': '2349*********', 'esm_class': 0, 'status': 0, 'display_time': None, 'source_addr': '7****', 'replace_if_present_flag': None, 'dest_subaddress': None, 'sm_length': 13, 'data_coding': 0, 'its_session_info': None, 'destination_port': None, 'ussd_service_op': None, 'sms_signal': None, 'protocol_id': 100, 'ms_validity': None, 'source_addr_npi': 1, 'source_addr_subunit': None, 'dest_addr_npi': 1, 'client': <smpplib.client.Client object at 0x7f2058a6a910>, 'command': 'submit_sm', 'more_messages_to_send': None, 'dest_addr_subunit': None, 'source_port': None, 'number_of_messages': None, 'alert_on_message_delivery': None}
以下に、DeliverSM の PDU を示します。
{'priority_flag': '0', 'message_state': None, 'language_indicator': None, 'callback_num': None, 'payload_type': None, 'replace_if_present_flag': '0', 'schedule_delivery_time': '', 'sm_default_msg_id': '0', 'source_subaddress': None, 'user_response_code': None, 'sar_total_segments': None, 'short_message': 'id:157de861 sub:001 dlvrd:000 submit date:1705171812 done date:1705171812 stat:UNDELIV err:255', 'privacy_indicator': None, 'user_message_reference': None, 'sar_msg_ref_num': None, 'dest_addr_ton': '1', 'sar_segment_seqnum': None, 'esm_class': '4', '_sequence': 67108866, 'service_type': '', 'source_addr_ton': '1', 'validity_period': '', 'destination_addr': '7****', '_client': <smpplib.client.Client object at 0x7f2058a6a910>, 'status': 0, 'source_addr': '234********', 'registered_delivery': '0', 'dest_subaddress': None, 'message_payload': None, 'sm_length': '94', 'data_coding': '0', 'destination_port': None, 'source_addr_npi': '1', 'protocol_id': '0', 'network_error_code': None, 'its_session_info': None, 'dest_addr_npi': '1', 'length': 145, 'client': <smpplib.client.Client object at 0x7f2058a6a910>, 'command': 'deliver_sm', 'source_port': None, 'receipted_message_id': None}