edgeport - v1.0.3
    Preparing search index...

    Function parseDeliveryReceipt

    • Parses an SMSC delivery-receipt short_message into its fields.

      Delivery receipts follow the de-facto format id:IIII sub:SSS dlvrd:DDD submit date:YYMMDDhhmm done date:YYMMDDhhmm stat:DDDDDDD err:E text:..... Parsing is tolerant: keys are matched case-insensitively, spacing is flexible, and any missing field is simply left undefined. Only meaningful when the deliver_sm's esm_class has the ESM_DELIVERY_RECEIPT bit set.

      Parameters

      • text: string

        The decoded short_message text of a delivery receipt.

      Returns DeliveryReceipt

      The parsed fields.

      1.0.3

      import { parseDeliveryReceipt } from 'edgeport/smpp';

      const r = parseDeliveryReceipt('id:abc123 sub:001 dlvrd:001 stat:DELIVRD err:000 text:hello');
      console.log(r.id, r.stat); // "abc123" "DELIVRD"