Technical Helpweb

- more articles

Connecting a Dialogic DMG1000 Media Gateway to the serial port of a PBX

Introduction:
To connect an analog DMG1000 Media Gateway to the serial integration port of a PBX requires some basic understanding of RS-232 wiring and hardware handshaking protocols.

This document provides an overview of various serial connector pin layouts as well as some basic knowledge regarding hardware flow control configurations. 

This document does not discuss any PBX specific requirements nor does it attempt to educate the reader on any PBX-side configuration or wiring or connector requirements. 

Technical Discussion
The following technical discussion will include details covering these specific topics:

  1. Interface Types
  2. Hardware details
  3. Sample wiring diagrams
  4. Tools



Interface Types

Typical serial communication scenarios you will see are DTE and DCE.

  • Computer (DTE) connected to a Modem (DCE)
  • Modem (DCE) connected to another Modem (DCE)
  • Computer (DTE) connected to another Computer (DTE)



Typically DTE to DCE or DCE to DTE connections do not require a communications path that crosses the transmit (Tx) and receive (Rx) wires. In these situations the DTE is simply providing the data to the DCE to be communicated to another endpoint. The cables that are typically used to connect a DTE device to a DCE device are known simply as ‘straight through’ cables because their design does not cross any of the signals from one end of the cable to another. The data is transmitted from the DTE to the DCE because of the differences in the wiring of the connector itself. This will be shown in latter diagrams.

Typically any DTE to DTE (or DCE to DCE) connections will require a communications path that crosses the transmit (Tx) and receive (Rx) wires. Devices used for these types of configurations are called ‘Null Modems’. The purpose of the null modem is to cross transmit and receive signal paths between these like end points.

Hardware Details

Null Modems can come in several types, one being a cable that has transmit and receive wires crossed between the ends, the other being a small box-like device with a connector on each end. In most cases, the latter device will have the fact that it is a null modem stamped somewhere on its surface as shown in the photo in figure 1.

tn117-1.jpg
Figure 1. Photo showing a typical Null Modem device. Note that this model uses DB-25 style connectors but models that use DB-9 style connectors are also available. 


The primary purpose of the null modem is to, from the standpoint of one end of the connection; make the opposite end appear to be a different type



tn117-2.PNG 
Figure 2. Diagram showing how a Null Modem connects the Tx and Rx signals of an RS-232 interface. 

With respect to the type of connectors used in RS-232 systems, DTE devices typically use a male connector while DCE devices typically use a female connector.

The majority of connectors used by serial devices you will encounter fall into 2 basic types, DB-25 and DB-9.

DB-25 connectors contain 25 pins that carry the various signals that make up the RS-232 standard. These types of connections are typically found on equipment of older origin or design. 

DB-9 connectors contain 9 pins that carry the various signals that make up the RS-232 standard. These types of connectors are found on more modern equipment of newer design. This is the type of connector that the DMG1000 Media Gateway uses.

Because there are two types of serial devices (DCE and DTE) each type of connector can have slightly different pin layouts. Type layouts for each type of connector and each type of serial device are shown below.

tn117-3.png tn117-3a.gif 
Figure 3. Table showing typical pin configurations for DTE and DCE type DB-25 style serial connectors. 

tn117-4.png tn117-4a.gif 
Figure 4. Table showing typical pin configurations for DTE and DCE type DB-9 style serial connectors. 

The DB-9 serial port on the DMG1000 Media Gateway has the following properties:

  1. Female connector.
  2. Wired as DCE
  3. Requires no flow control pins (only uses Tx, Rx and SG)

Because of this connector configuration you have to keep three key ideas in mind when performing an installation:

  1. The port was designed as a DCE port to make it simpler to connect to a PBX. The intent here was that most PBX ports would be wired as DTE so making the DMG1000 Media Gateway port DCE would remove the need to use a null modem between the two devices. If your specific PBX is also wired as a DCE device, or you are using a serial data source such as a line driver that is also wired as a DCE device, you will then need to use a null modem in the connection to allow the two DCE devices to talk to one another.
  2. Because the DMG1000 Media Gateway uses a DB-9 style connector you may need a cable that can properly route the signals from a DB-25 connector on your PBX or serial data source to a female DB-9 connector.
  3. The port was designed to not need any hardware handshaking signals. This port will receive any data presented to it and transmit data back out to any device attached without requiring any special handshaking signals. Some PBXs however do require handshaking signals before they will place any data on to, or accept any data from the serial link. Because of this handshaking requirement you may need to make some modifications to the PBX end of the serial connection. These flow control connections are discussed in the next section.

Sample Wiring

One of the basic configurations you are likely to encounter in the field when connecting the DMG1000 Media Gateway to a PBX using the serial port is a condition where the PBX is using a DB-25 type connector. This is going to require that you have a cable that is capable to passing the proper signals from the 25-pin layout across to a DB-9 type connector using the 9-pin layout. Without taking any of the handshaking signals into account at this time (this will be covered latter) here is what the wiring would need to look like. 

Notes:

  1. The diagrams below assume that the serial data source uses a DB25 style connector in DTE mode.
  2. If your data source uses a starred DB-9 style connector adjust the pin numbers accordingly using the tables above.
  3. Some PBXs do not use standard DB style connectors for their serial sources. In these cases please consult your PBX documentation for the proper pin configurations.
  4. A PBX may use a standard DB (9 or 25 pin) connector but this is not always in indication that it follows the RS-232 standard pin pattern. Always consult your documentation for the serial data source before making connections.



tn117-5.PNG 
Figure 5. Diagram showing a typical DB-9 DCE to DB-25 DTE mode serial cable. Note that this diagram shows a connection without any handshaking signals. 

If the DTE device in this configuration does not require any special handshaking signals then this configuration should be enough to get the system running with data in both directions.

If your PBX requires handshaking signals there are two different types you may need to consider. Using one or the other or even both may be required depending on what your PBX interface requires.

RTS/CTS handshaking – This type is achieved by connecting (on a DB-25 connector) pins 4 and 5 together. This configuration results in a connection that loops back the Request To Send (RTS) into the Clear To Send (CTS) on the same interface. This resulting scenario here is that when the DTE side asserts the RTS in an attempt to signal the DCE side that it has data to send it is applying the expected acknowledgment by asserting the CTS signal back to itself. The result here is that the interface thinks the far (DCE) end responded that it properly received the RTS signal and is ready to receive data.



tn117-6.PNG 
Figure 6. Diagram showing a RTS/CTS style of handshaking loop back connection done on a DB-25 style DTE connector. 

DSR/CD/DTR handshaking – This type is achieved by connecting (on a DB-25 connector) pins 6, 8 and 20 together. This results in a connection that loops back the Data Terminal Ready (DTR) into the Data Set Ready (DSR) and Carrier Detect (CD) on the same interface. The resulting scenario here is that when the DTE side asserts the DTR in an attempt to signal the DCE side that it is ready to receive data from the DCE side. The results here are that the interface thinks the far (DCE) end responded that it properly received the DTR signal and is ready to send data.



tn117-7.PNG 
Figure 7. Diagram showing a DSR/CD/DTR style of handshaking loop back connection done on a DB-25 style DTE connector. 

There are several other flow control loop back methods that involve various combinations of the signals shown in the above diagrams but these are two of the most common ones used.

Tools

In the process of trying to determine the proper loop back configuration required for your PBX you are going to need a way to try out different combinations of signals. While you can accomplish this using just wire and several connectors the process goes much quicker using the proper tools. 

One indispensable tool for these situations is called a RS-232 break out box. This device comes in many different configuration and price points depending on the features you feel that you need, but a simple model that offers you the ability to monitor signals on both sides of a serial link and then easily make the required connections is all that is needed. A picture of one model is shown below for reference.



tn117-8.jpg 
Figure 8. Photo showing a typical RS-232 break out box device. 

The largest advantage of using the breakout box is that it allows you to see what signals are available on each individual line of the interface and then easily create cross connections between each side of the interface to test out various loop back scenarios. All this testing can be done live without having to strip wire and solder connections. Once a working configuration has been found that works with your system this wire configuration can then be constructed into a cable. 

Glossary of Acronyms / Terms

RS-232 Recommended Standard #232
DTE Data Terminal Equipment
DCE Data Communications Equipment





Feedback

Please rate the usefulness of this page:  
0 - not useful at all
1 - potentially useful
2 - quite useful
3 - very useful
4 - exactly the information I needed     

Please enter a comment about this page:

First published: 27-Jun-2011
Open access: Product rule: ; Page rule: Auto

Service Center Logon