How can we help?

AxSms.GsmDeliveryReport


Introduction

Skip to properties and methods

This is a delivery report that is received from a GSM device. On GSM devices delivery reports are sometimes called ‘Status Reports’. In the SMS Component this is meant to be the same thing.

A delivery report can be requested by setting the RequestDeliveryReport property to True. It’s up to the provider to send the delivery report.

A delivery report will normally be sent as soon as the SMS message has reached a final state, either ‘Delivered’ or some error state. Normally a delivery report should arrive within seconds or minutes after sending a message. In some cases it can take a couple of hours, depending on the ValidityPeriod of the message.

Some GSM modems don’t support receiving and storing delivery reports. Use the ReportEnabled property to find out if the open GSM device supports receiving and storing delivery reports.

Properties and Methods

Property Type Read/Write Description
Reference String Read The message reference
UserTag Number Read/Write User defined value to track this object
SmscAddress Number Read SMSC address
SmscTime String Read SMSC Time
SmscTimeInSeconds Number Read SMSC time in seconds
DischargeTime String Read Discharge time
DischargeTimeInSeconds Number Read Discharge time in seconds
MemoryIndex String Read The memory index for this delivery report
FirstOctet Number Read First octet
SmscTON Number Read The type of number of the SMSC address
SmscNPI Number Read The number plan indicator for the SMSC address.
Status Number Read The message delivery status
FromAddress String Read The address the original SMS message was send to

Method Description
Clear Reset all properties to their default values

Reference property

The message reference for the delivery report. This should match with the message reference received when sending the SMS message out through the GSM object.

Example:

Set objGsm = CreateObject("AxSms.Gsm")
...
objGsm.Receive objConst.GSM_MESSAGESTATE_RECEIVED_READ
...
Set objGsmDeliveryReport = objGsm.GetFirstReport
While objGsm.LastError = 0
  ...
  WScript.Echo objGsmDeliveryReport.Reference
  WScript.Echo objGsmDeliveryReport.SmscAddress
  WScript.Echo objGsmDeliveryReport.SmscTime
  ...
  Set objGsmDeliveryReport = objGsm.GetNextReport
WEnd
...

UserTag property

This can be any value. Use this property to track a delivery report.

Example:

Set objGsm = CreateObject("AxSms.Gsm")
...
objGsm.Receive objConst.GSM_MESSAGESTATE_RECEIVED_READ
...
Set objGsmDeliveryReport = objGsm.GetFirstReport
While objGsm.LastError = 0
  ...
  WScript.Echo objGsmDeliveryReport.Reference
  WScript.Echo objGsmDeliveryReport.UserTag
  WScript.Echo objGsmDeliveryReport.SmscTime
  ...
  Set objGsmDeliveryReport = objGsm.GetNextReport
WEnd
...

SmscAddress property

The address of the SMS that originated this report

Example:

Set objGsm = CreateObject("AxSms.Gsm")
...
objGsm.Receive objConst.GSM_MESSAGESTATE_RECEIVED_READ
...
Set objGsmDeliveryReport = objGsm.GetFirstReport
While objGsm.LastError = 0
  ...
  WScript.Echo objGsmDeliveryReport.Reference
  WScript.Echo objGsmDeliveryReport.UserTag
  WScript.Echo objGsmDeliveryReport.SmscAddress
  ...
  Set objGsmDeliveryReport = objGsm.GetNextReport
WEnd
...

SmscTime property

The time the original SMS message was received

Example:

Set objGsm = CreateObject("AxSms.Gsm")
...
objGsm.Receive objConst.GSM_MESSAGESTATE_RECEIVED_READ
...
Set objGsmDeliveryReport = objGsm.GetFirstReport
While objGsm.LastError = 0
  ...
  WScript.Echo objGsmDeliveryReport.Reference
  WScript.Echo objGsmDeliveryReport.SmscAddress
  WScript.Echo objGsmDeliveryReport.SmscTime
  ...
  Set objGsmDeliveryReport = objGsm.GetNextReport
WEnd
...

SmscTimeInSeconds property

The time the original SMS message was received in seconds since 1/1/1970

Example:

Set objGsm = CreateObject("AxSms.Gsm")
...
objGsm.Receive objConst.GSM_MESSAGESTATE_RECEIVED_READ
...
Set objGsmDeliveryReport = objGsm.GetFirstReport
While objGsm.LastError = 0
  ...
  WScript.Echo objGsmDeliveryReport.SmscAddress
  WScript.Echo objGsmDeliveryReport.SmscTime
  WScript.Echo objGsmDeliveryReport.SmscTimeInSeconds
  ...
  Set objGsmDeliveryReport = objGsm.GetNextReport
WEnd
...

DischargeTime property

The time the status in this report was achieved.

Example:

Set objGsm = CreateObject("AxSms.Gsm")
...
objGsm.Receive objConst.GSM_MESSAGESTATE_RECEIVED_READ
...
Set objGsmDeliveryReport = objGsm.GetFirstReport
While objGsm.LastError = 0
  ...
  WScript.Echo objGsmDeliveryReport.SmscAddress
  WScript.Echo objGsmDeliveryReport.SmscTime
  WScript.Echo objGsmDeliveryReport.DischargeTime
  ...
  Set objGsmDeliveryReport = objGsm.GetNextReport
WEnd
...

DischargeTimeInSeconds property

The time the status in this report was achieved in seconds since 1/1/1970

Example:

Set objGsm = CreateObject("AxSms.Gsm")
...
objGsm.Receive objConst.GSM_MESSAGESTATE_RECEIVED_READ
...
Set objGsmDeliveryReport = objGsm.GetFirstReport
While objGsm.LastError = 0
  ...
  WScript.Echo objGsmDeliveryReport.SmscAddress
  WScript.Echo objGsmDeliveryReport.DischargeTime
  WScript.Echo objGsmDeliveryReport.DischargeTimeInSeconds
  ...
  Set objGsmDeliveryReport = objGsm.GetNextReport
WEnd
...

MemoryIndex property

This property holds the memory index in the modems memory for this delivery report

Example:

Set objGsm = CreateObject("AxSms.Gsm")
...
objGsm.Receive objConst.GSM_MESSAGESTATE_RECEIVED_READ
...
Set objGsmDeliveryReport = objGsm.GetFirstReport
While objGsm.LastError = 0
  ...
  WScript.Echo objGsmDeliveryReport.FromAddress
  WScript.Echo objGsmDeliveryReport.MemoryIndex
  ...
  Set objGsmDeliveryReport = objGsm.GetNextReport
WEnd
...

FirstOctet property

This property holds the first octet value for this delivery report

Example:

Set objGsm = CreateObject("AxSms.Gsm")
...
objGsm.Receive objConst.GSM_MESSAGESTATE_RECEIVED_READ
...
Set objGsmDeliveryReport = objGsm.GetFirstReport
While objGsm.LastError = 0
  ...
  WScript.Echo objGsmDeliveryReport.FromAddress
  WScript.Echo objGsmDeliveryReport.FirstOctet
  ...
  Set objGsmDeliveryReport = objGsm.GetNextReport
WEnd
...

SmscTON property

This property holds the Type of Number for the SmscAddress property. Will be one of these constants.

Example:

Set objGsm = CreateObject("AxSms.Gsm")
...
objGsm.Receive objConst.GSM_MESSAGESTATE_RECEIVED_READ
...
Set objGsmDeliveryReport = objGsm.GetFirstReport
While objGsm.LastError = 0
  ...
  WScript.Echo objGsmDeliveryReport.SmscAddress
  WScript.Echo objGsmDeliveryReport.SmscTON
  WScript.Echo objGsmDeliveryReport.SmscNPI
  ...
  Set objGsmDeliveryReport = objGsm.GetNextReport
WEnd
...

SmscNPI property

This property holds the Number Plan Identification for the SmscAddress property. Will be one of these constants.

Example:

Set objGsm = CreateObject("AxSms.Gsm")
...
objGsm.Receive objConst.GSM_MESSAGESTATE_RECEIVED_READ
...
Set objGsmDeliveryReport = objGsm.GetFirstReport
While objGsm.LastError = 0
  ...
  WScript.Echo objGsmDeliveryReport.SmscAddress
  WScript.Echo objGsmDeliveryReport.SmscTON
  WScript.Echo objGsmDeliveryReport.SmscNPI
  ...
  Set objGsmDeliveryReport = objGsm.GetNextReport
WEnd
...

Status property

This is the message delivery status for this message. Will be one of these constants

Example:

Set objGsm = CreateObject("AxSms.Gsm")
...
objGsm.Receive objConst.GSM_MESSAGESTATE_RECEIVED_READ
...
Set objGsmDeliveryReport = objGsm.GetFirstReport
While objGsm.LastError = 0
  ...
  WScript.Echo objGsmDeliveryReport.FromAddress
  WScript.Echo objGsmDeliveryReport.Status
  ...
  Set objGsmDeliveryReport = objGsm.GetNextReport
WEnd
...

FromAddress property

The from address in the delivery report will be the address the original SMS message was send to.

Example:

Set objGsm = CreateObject("AxSms.Gsm")
...
objGsm.Receive objConst.GSM_MESSAGESTATE_RECEIVED_READ
...
Set objGsmDeliveryReport = objGsm.GetFirstReport
While objGsm.LastError = 0
  ...
  WScript.Echo objGsmDeliveryReport.FromAddress
  WScript.Echo objGsmDeliveryReport.Status
  ...
  Set objGsmDeliveryReport = objGsm.GetNextReport
WEnd
...

Clear method

This method resets all properties to their default values.

Parameters:

  • None

Return value:

None

Example:

Set objGsmDeliveryReport = CreateObject("AxSms.GsmDeliveryReport")
...
objGsmDeliveryReport.Clear
...

This is a delivery report that is received from a GSM device. On GSM devices delivery reports are sometimes called ‘Status Reports’. In the SMS Component this is meant to be the same thing.

A delivery report can be requested by setting the RequestDeliveryReport property to True. It’s up to the provider to send the delivery report.

A delivery report will normally be sent as soon as the SMS message has reached a final state, either ‘Delivered’ or some error state. Normally a delivery report should arrive within seconds or minutes after sending a message. In some cases it can take a couple of hours, depending on the ValidityPeriod of the message.

Some GSM modems don’t support receiving and storing delivery reports. Use the ReportEnabled property to find out if the open GSM device supports receiving and storing delivery reports.