# Using DSP and Resource keywords

Keywords in the CG board keyword file specify which DPM files are loaded to each DSP core on the board. By default, the on-board resource manager manages these DSP resources according to entries specified in a board configuration.

Keywords used in the Fusion sample configuration files for configuring and managing DSP resources include:

- DSP.C5x[x].Files

- Resource[n].Name

- Resource[n].Size

- Resource[n.TCPs

- Resource[n].Definitions

- Resource[n].Dsps

Where x is the index of a DSP core and n is the index of a resource pool.

This topic describes:

- Resource keywords

- Media and call progress masks

## Resource keywords

The following Resource keywords control the way resources are managed for individual CG boards in the system:

Keyword | Description
Resource[n].Name | Name for the resource object or pool defined for this board.
Resource[n].Size | Number of resource definition objects (for example, channels or ports) managed by the on-board resource manager.
Resource[n].TCPs | Trunk control programs (TCPs) used for setting up and tearing down calls. These TCPs must be loaded to the board through the TCPFiles[x] keyword in the board keyword file.
Resource[n].Definitions | List of DPFs that are available for each port and determines when functions execute in relation to each other.
Resource[n].Dsps | List of DSP cores that are assigned to this resource object (pool). It is possible to define multiple pools (Fusion or otherwise) thus it can be a partial list of DSP cores. Notes: DSPs are numbered starting with DSP 0. Resource pools have a core pair limitation in that DSP 'n' (n=0,2,4,…) and DSP 'n+1' are core pairs (e.g., DSP 0 and DSP 1), and DSP 2 and DSP 3 are each core pairs. If the DSP cores listed do not exist on the board, the DSP cores will be ignored and will not be booted or used. A Fusion resource pool may not share the same core pair with another non-Fusion (e.g., IVR) resource pool. For example, the following configuration is allowed: IVR pool: DSPs 8 – 21 Fusion pool: DSPs 22 – 45 However, the following configuration is NOT allowed: IVR pool: DSPs 8 – 20 Fusion pool: DSPs 21 – 45

For on-board resource management to work correctly, other keywords in the board keyword file must match what is being defined by the Resource keywords in the file. Only DPFs that are specified in the Resource[x].Definitions keyword in the configuration file are recognized and managed by the resource manager. The reverse is also true. That is, if you specify a DPF in the Resource[x].Definitions keyword in the configuration file that is not in the DSP.C5X[x].File list of DPMs loaded to the DSPs, the on-board resource manager returns an error when reserving resources.

The following resources are defined in the cg6kfusion-t.cfg file. This default resource definition string is common to all Fusion sample board keyword files:

Resource[0].Name = RSC1
Resource[0].Size = 120
Resource[0].TCPs = WNK0
Resource[0].Definitions = ((dtmf.det_all & f_echo_v3.ln20_apt25) & \
((f_g711.cod & f_g711.dec) | \
(f_g723.cod & f_g723.dec) | \
(f_g729a.cod & f_g729a.dec) | \
(f_g726.cod & f_g726.dec) | \
(f_faxt38.relay)))
Resource[0].Dsps = 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
23 24 25 26 27 28 29 30 31

In this example, the board configuration specifies that the board uses the wink start protocol (wnk0) to set up and tear down a maximum of 120 voice or fax channels. This configuration also specifies that the following DPFs are conditionally available for each port:

DPF ID | Description
dtmf.det_all | DTMF detector with silence, cleardown, and CED tone detection
f_echo_v3.ln20_apt25 | Echo canceller with a filter length of 20 ms. and an adapt rate of 25%
f_g711.cod | G.711 encoder
f_g711.dec | G.711 decoder
f_g711vad.cod | G.711 VAD encoder
f_g711vad.dec | G.711 VAD decoder
f_gsm_fr.cod | GSM full rate encoder
f_gsm_fr.dec | GSM full rate decoder
f_g723.cod | G.723.1/A encoder
f_g723.dec | G.723.1/A decoder
f_g729a.cod | G.729A/B encoder
f_g729a.dec | G.729A/B decoder
f_g726.cod | G.726 encoder
f_g726.dec | G.726 decoder
f_faxt38.relay | T.38 fax relay
f_g728.cod | G.728 encoder
f_g728.dec | G.728 decoder
f_amr.cod | AMR encoder
f_amr.dec | AMR decoder
f_evrc.cod | EVRC encoder
f_evrc.dec | EVRC decoder
f_ilbc_20.cod | ILBC 20 ms encoder
f_ilbc_20.dec | ILBC 20 ms decoder
f_ilbc_30.cod | ILBC 30 ms encoder
f_ilbc_30.dec | ILBC 30 ms decoder

The AND (&) operator indicates that the two DPFs on either side of this character executes at the same time. The OR operator (|) indicates that DPFs on either side of this character are mutually exclusive. Therefore, the example Resource[x].Definitions statement indicates that the dtmf and echo DPFs execute simultaneously with one of the following DPFs:

- G.711 encoding and decoding (DPFs f_g711.cod and f_g711.dec).

- G.723.1/A encoding and decoding (DPFs f_g723.cod and f_g723.dec).

- G.726 encoding and decoding (DPFs f_g726.cod and f_g726.dec).

- G.729A/B encoding and decoding (DPFs f_g729a.cod and f_g729a.dec).

- T.38 fax relay encoding and decoding (DPF f_faxt38.relay).

Other CG board Resource keywords include:

- Resource[x].Name

- Resource[x].Size

- Resource[x].TCPs

For more information about Resource board keywords, refer to the CG board manual.

## Media and call progress masks

Natural Access uses media masks and call progress masks to control on-board resource management. These masks indicate the DPFs that execute on the board during particular states of a call control protocol (TCP). If any of the bits in either of these two masks are set, the DPFs associated with the set bits must be specified in the Resource[x].Definitions keyword. Since the bits in the media mask are set by default, the DPFs that correspond to these set bits are specified in the default Resource[x].Definitions keyword in the CG board keyword file. For more information about NaturalAccess media masks and call progress masks, refer to the Dialogic® NaturalAccess™ Software Developer’s Manual.