Skip to main content
Omnitracs Knowledge Base

Return Text Message Routing Module - OMERTR

Return Text Message Routing Module (OMERTR)

Required Parameter Group:

1 Vehicle Identifier Input Char(10)
2 Message Body Type Input Char(1)
3 Macro Number Input Packed(3,0)
4 Macro Version Input Packed(3,0)
5 Coverage Identifier I/O Char(10)

API Overview:
This is a customizable site-specific program whose source resides in the deliverable source library, OMNIDLVSRC. All site-specific programs should be compiled into the site library, OMNISITE.

The Return Text Message Routing Module API (OMERTR) is called by the QTRACS Message Router (OMRTR) during return message processing within the OMRESADR routine. OMRESADR determines the destination (addressees) of a return message based on the coverage of the sender (vehicle) and various other factors including macro template information and, in the case of a reply message, data associated with the original message (the message that is being replied to). This API may be used to replace the QTRACS determination of vehicle coverage for unsolicited return text messages with a site-specific determination. This routine has no effect on external application coverage or on macro template based coverage. Also note that the coverage returned by this routine may be overridden by reply message processing in the router.

Required Parameter Group Details:
(1) Vehicle Identifier
INPUT; CHAR(10)
This parameter contains the identifier of the vehicle that sent the return text message.

(2) Message Body Type
INPUT; CHAR(1)
Indicates the type of the body of the message. Valid values are:

B binary data
T text data

(3) Macro Number
INPUT; PACKED(3,0)
This parameter contains a binary data type when the Message Body Type parameter is 'B'. It contains a macro number when the Message Body Type parameter is 'T'. A zero value indicates free form in this case.

(4) Macro Version
INPUT; PACKED(3,0)
This parameter contains a binary data subtype when the Message Body Type parameter is 'B'. It contains a macro version number when the Message Body Type parameter is 'T'.

(5) Coverage Identifier
I/O; CHAR(10)
This parameter contains a coverage identifier for the message based solely on the QTRACS Vehicle Database. This is either a QTRACS user identifier or a QTRACS address list identifier. The site-specific version of this program may replace and return this parameter with any valid OS/400 user profile identifier or any valid QTRACS address list identifier.

Effect
The QTRACS router will use the value in the Coverage Identifier parameter to determine the destination of this message in the case of an unsolicited return text message. Note: The router may ignore your override in the following cases:

  1. The return message is a "reply" to a forward message. This is the case in which the driver used the REPLY key to send the message. The router will determine the addressee based on the sender and the "reply to" configuration of the original forward message. Your override may still take effect in this case if the forward message has the *DISPATCH value in the "reply to designator".
  2. The macro template of the return message has the "route to vehicle coverage" flag set to 'No'. The router will ignore the vehicle coverage in this case because the message is intended for an external application only.
  3. The message is an administrative message from the NMC. This means that the message was sent by vehicle 0009999999. Messages from the NMC are always routed to the NMCADMIN address list. The OMERTR routine is not entered in this case.
  4. The message is from a vehicle that is not known to QTRACS. This is the case when the comm unit number of the sender cannot be resolved into a vehicle identifier. These message are always routed to the DEADLETTER address list by QTRACS. The OMERTR routine is not entered in this case.
  • Was this article helpful?