# Sending MSPP queries and commands

Once the application has initialized the MSPP service, it can send queries to the MSPP service to obtain global, connection, and component specific information. The MSPP service supports the following types of queries and commands:

Query or command | Description
Filter queries and commands | Returns specific information about the component filters that make up MSPP endpoints and channels.
System-level queries | Returns board or session specific information concerning resource usage or data transmission status.

## Filter queries and commands

Once you create MSPP endpoints and connect MSPP channels, you can modify the behavior or configuration of these objects with mspSendCommand. When applications implement voice/fax switchover, they use mspSendCommand to switch the DS0 endpoint from voice to T.38 fax mode and back.

Applications use mspSendQuery to elicit status or configuration information for a specific filter in a connected MSPP channel, and must use mspReleaseBuffer to release buffers returned with mspSendCommand and mspSendQuery events.

MSPP filters (channel and endpoint) need to be in particular states when they receive commands. This varies from filter to filter. For more information about sending MSPP filter commands and queries, refer to the Dialogic® NaturalAccess™ Media Stream Protocol Processing API Developer's Manual.

## System-level queries

The MSPP service supports a set of queries associated with board and session-level resources rather than with specific MSPP endpoint filters. These queries allow applications to monitor the status of board-level CPU resources and Ethernet connections while applications are running.

The MSPP service supports the following system queries:

Query | Description
MSP_QRY_ETHERNET_LINK_STATUS | Returns information about the board's Ethernet link connections on a session-by-session basis. This request allows the user to retrieve at any time the physical status of each of the CG board's Ethernet links.
MSP_QRY_CPU_USAGE | Returns information about the board's current and average CPU utilization.

When applications use these queries, they invoke mspSendQuery while specifying the query name and any valid MSPP endpoint or channel handle associated with the board that they want to query. Because the queries are board-specific, the identity of the MSPP endpoint or channel is irrelevant. Within the query however, the application must specify the constant MSP_SYSTEM as the filter ID since there is no filter associated with these queries.

Both queries return buffered data in response to mspSendQuery. MSP_QRY_ETHERNET_LINK_STATUS returns an msp_ETH_STATUS structure that indicates the status (up or down), mode, and speed of the CG board's Ethernet interface. MSP_QRY_CPU_USAGE returns a CPU_UTIL structure that indicates the current and average (over the last 16 seconds) CPU utilization on the CG board.

Route availability unsolicited events also provide the application with status information concerning particular RTP or UDP sessions. For more information, refer to RTP and UDP endpoint route availability events.