Getting the message_id from submit_sm_response

This patch adds support for the “%w” key on DLR’s, to get the message_id from the SMSC on SMPP connections.

Explanation: When Kannel sends an MT over an SMPP connection, a submit_sm PDU is sent. The carrier responds with a submit_sm_response, carrying a “message_id” attribute. If we haveĀ  proper dlr-mask set, this event (the carrier accepting the message) causes Kannel to hit the dlr-url (even if the carrier’s not sending DLR’s).

After applying the patch, a new parameter %w could be added to the dlr-url, which will be loaded with the message_id from the SMSC. This can be useful to correlate sent messages with the carriers response.

Download the patch: kannel-response-message-id

This needs further testing, please try it and let me know if it worked for you (it does for me!).