Question

I'm trying to query the status of an SMS sent via perl Net:SMPP module using query_sm.

I populate my submit_sm PDU as follows:

$resp_pdu1 = $smpp->submit_sm(
destination_addr => '12345678910',
short_message    => 'test message',
source_addr_ton => 0x05,
source_addr_npi => 0x00,
source_addr => 'testing',
dest_addr_ton => 0x02,
dest_addr_npi => 0x01,
data_coding => 0x00,
esm_class => 0x00,
) or die;

I pass the message id returned in submit_sm_rsp PDU as follows to my query_sm PDU:

$msg_id = $resp_pdu1->{message_id};
print $msg_id;print "\n";
$resp_pdu2 = $smpp->query_sm(
message_id => $msg_id,
source_addr_ton => 0x05,
source_addr_npi => 0x00,
source_addr => 'testing',
) or die;

My perl script runs without any errors and the message is received by MS , there are no errors while binding and unbinding to the SMSC.Examining a wireshark dump of the SMPP packets shows "Message ID invalid" in query_sm_rsp with error code 0x0C. I have checked and the message_id returned by submit_sm_rsp which I passed onto the query_sm PDU is the same. Any hints on why I'm getting this error?

Was it helpful?

Solution

Which SMPP mode does the SMSC operate in? My guess is - if the SMSC doesn't operate in store & forward mode then it might not keep the state of the message after sending it. In such a case, you could get an error upon querying the SMSC even though the message is delivered to the MS.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top