title: Perl Net::SMPP query_sm PDU error "Message ID invalid" 0x0C ESME_RINVMSGID
body: <p>I'm trying to query the status of an SMS sent via perl Net:SMPP module using query_sm.</p>
  
  <p>I populate my submit_sm PDU as follows:</p>
  
  <pre><code>$resp_pdu1 = $smpp-&gt;submit_sm(
  destination_addr =&gt; '12345678910',
  short_message    =&gt; 'test message',
  source_addr_ton =&gt; 0x05,
  source_addr_npi =&gt; 0x00,
  source_addr =&gt; 'testing',
  dest_addr_ton =&gt; 0x02,
  dest_addr_npi =&gt; 0x01,
  data_coding =&gt; 0x00,
  esm_class =&gt; 0x00,
  ) or die;
  </code></pre>
  
  <p>I pass the message id returned in submit_sm_rsp PDU as follows to my query_sm PDU:</p>
  
  <pre><code>$msg_id = $resp_pdu1-&gt;{message_id};
  print $msg_id;print "\n";
  $resp_pdu2 = $smpp-&gt;query_sm(
  message_id =&gt; $msg_id,
  source_addr_ton =&gt; 0x05,
  source_addr_npi =&gt; 0x00,
  source_addr =&gt; 'testing',
  ) or die;
  </code></pre>
  
  <p>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 "<strong>Message ID invalid</strong>" in query_sm_rsp with error code <strong>0x0C</strong>. 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?</p>