title: getting status of a sent message in JSMPP
body: <p>I am using JSMPP (Java implementation of SMPP) for sending SMS from my web application to SMS center. I have the following code to receive the delivery report of any sent SMS.</p>
  
  <pre><code>    public class MessageListenerImplementation implements MessageReceiverListener {
       public void onAcceptDeliverSm(DeliverSm deliverSm) throws ProcessRequestException {
          if (MessageType.SMSC_DEL_RECEIPT.containedIn(deliverSm.getEsmClass())) {
              try {
                  DeliveryReceipt deliveryReceipt = deliverSm.getShortMessageAsDeliveryReceipt();
                   long id = Long.parseLong(deliveryReceipt.getId()) &amp; 0xffffffff;
                    String messageId = Long.toString(id, 16).toUpperCase();
                     System.out.println("Delivery receipt for message '" + messageId + " ' from " + deliverSm.getSourceAddr() + " to " + deliverSm.getDestAddress() + " : " + deliveryReceipt);
              }catch (InvalidDeliveryReceiptException e) {
                  System.err.println("Failed getting delivery receipt");
                   e.printStackTrace();
              }
          }
      }
  }
  </code></pre>
  
  <p>When I register the above listener for an SMS' delivery receipt and send it, it get the delivery receipt as follows</p>
  
  <p>and the delivery receipt is as follows</p>
  
  <pre><code>id:5 sub:001 dlvrd:001 submit date:1312091213 done date:1312091213 stat:DELIVRD err:000 text:Hello SMSC from ESME
  </code></pre>
  
  <p>Now I am wondering how to retrieve the sending status in some integer range that whether it is sent,failed or still pending so that I can use it to update my database accordingly ?</p>