Data flow on DTE ports is as follows:
RI - Input
DSR - Input
RTS - Output
TXD - Output
RXD - Input
CTS - Input
DTR - Output
DCD - Input
DTE device - When connecting the serial ports of two DTE devices together (example: a terminal or printer to a Digi DTE serial port), remember inputs go to outputs. Connecting two inputs or two outputs does nothing.
DCE device - The data flow on DCE ports is opposite the flow of DTE ports. When connecting a Digi DTE serial port to a DCE device such as an analog or RF modem, connect like signals together. (ie. RXD to RXD, TXD to TXD and so on.).
Signal meaning over color or number - It should be noted that signal name or meaning takes precedence over a wire's color or a pin number. Color because different types of 8-conductor or 10-conductor wire have different color schemes, and some are flat where others are twisted pair. Pin number is mainly a consideration for non-standard serial interfaces, since DB9 and DB25 RS232 are a standards-based interface that is the same industry-wide among all manufacturers. Manufacturers typically have proprietary pinouts for non-standard Serial interfaces, so refer to your device manufacturer's documentation for the pinout if the serial port is RJ11, RJ45, or some other non-standard interface.
For example, both the Digi Portserver TS and Etherlite productlines use an RJ45 DTE serial interface, but because RJ45 is a non-standard serial interface (and we acquired the product through different means), each product has a unique RJ45 serial pinout (which itself would be different from the RJ45 serial interfaces of another manufacturer devices).