38 Voice API Programming Guide — June 2005
Application Development Guidelines
•Device Initialization Hint
•TDM Bus Time Slot Considerations
•Tone Detection Considerations
6.4.1 Call Control Through Global Call API LibraryCall state functions such as dx_wink() and board-level parameters such as DXBD_R_ON and
DXBD_R_OFF which are used in digital connections do not apply in DM3 applications.
Similarly, hook state functions such as dx_sethook() and dx_wtring( ) and settings such as
DM_RINGS which are used in analog connections do not apply in DM3 applications.
Instead, these call control type functions are typically performed by the Global Call API Library.
For more information on setting up call control, see the Global Call API Programming Guide and
the Global Call API Library Reference.
As another example, the DX_LCOFF termination condition is not supported on DM3 boards using
the voice library; however support is available via call control API. For more information, see the
Global Call Analog Technology User’s Guide.
6.4.2 Multithreading and MultiprocessingThe voice API supports multithreading and multiprocessing on the board level but not on the
channel level on DM3 boards.
The following restrictions apply:
•A channel can only be opened in one process at a time; the same channel cannot be used by
more than one process concurrently. However, multiple processes can access different sets of
channels. Ensure that each process is provided with a unique set of devices to manipulate.
•If a channel is opened in process A and then closed, process B is allowed to open the same
channel. However, you should avoid this type of sequence. Since closing a channel is an
asynchronous operation on DM3 boards, there is a small gap between the time when the
xx_close( ) function returns in process A and the time when process B is allowed to open the
same channel. If process B opens the channel too early, unpredictable results may occur.
•Multiple processes that define tones (GTD or GTG) do not share tone definitions in the
firmware. For example, if you define tone A in process 1 for channel dxxxB1C1 on a DM3
board and the same tone A in process 2 for channel dxxxB1C1 on the same DM3 board, two
firmware tones are consumed on the board. In other words, the same tone defined from
different processes is not shared in the firmware; hence this limits the number of tones that can
be created overall. For more information, see Chapter13, “Global Tone Detection and
Generation, and Cadenced Tone Generation”.
It is recommended that you develop your application using a single thread per span or a single
thread per board rather than a single thread per channel. For more information on programming
models and performance considerations, see the Standard Runtime Library API Programming
Guide.