The mechanism that forces the change from "on-duty" to "drive" is the speedometer. The ECM reports the current speedometer reading to the ELD and when it goes over 5 MPH, the status flips to drive. When the vehicle stops a 5-minute timer begins. If the vehicle has not gone back over 5 MPH in 5 minutes then the XRS will automatically flip the status from "drive" to "on-duty."
When I have seen this problem in the past on a truck that WAS ALREADY WWORKING CORRECTLY and then "randomly stopped switching" it was one of 4 things:
1) The truck ECM or speedometer is no longer reporting the truck speed. You can verify this by signing into the XS admin site and looking at the historical track of the truck on the map. Are the speeds shown on every point up to right now? Also, a mechanic can hook up a scanner and check the speedo signals. Are there and XRS errors or malfunction messages in the hardware report section?
2) The XRS relay. You said you have replaced that.
3) The XRS cable. Cables sometimes do go bad or the pin in the socket that carries the speedometer signal has failed.
4) The configuration (on the Omnitracs side) has changed. This could be a setting that accidentally got changed, or purposely changed during a software update. You should work with your account rep, or the hotline (800-541-5490) to have someone go over all of the truck configuration settings to ensure that it is not this.)