# Processing command and query events

Filter command events provide specific information about endpoint and channel filter events:

Command type | Event information
endpoint filter | The lower byte of the event.ID field in MSPEVN_SENDCOMMAND_DONE identifies the command. The event.obj field specifies the associated endpoint handle
channel filter | The lower byte of the event.ID field in MSPEVN_SENDCOMMAND_DONE identifies the command ID. The event.objHd field specifies the associated channel handle. In addition, the event.buffer field provides a pointer to the filter ID (since there may be more than filter in the channel) and may include additional return data.

The following table shows information included in MSPEVN_SENDCOMMAND_DONE returned in response to mspSendCommand:

This field... | Specifies...
event.id | Command ID of the command.
event.objHd | ephd or chnhd of the endpoint or channel to which the command was directed.
event.value | CTA_REASON_FINISHED or an error.
event.buffer | For channel filter commands, specifies the channel filter ID (depending on the value specified in the event.size field, this field may also return additional information).
event.size | When set to 0, the buffer contains only a filter ID. When not set to 0, the buffer contains additional data returned by the MSPP API (for example RTCP information).

The lower byte of the MSPEVN_SENDCOMMAND_DONE event.id field specifies the command ID of the associated filter command. The event.obj field specifies the endpoint or channel handle of the MSPP component that received the command. For example, if an application uses mspSendCommand to set jitter depth, then the MSPEVN_SENDCOMMAND_DONE event.id value is:

0x001B2100

The event.id field is 0x001B21xx and the command ID for MSP_CMD_JITTER_CHG_DEPTH is 00. The event.value field for the event indicates the status of the command (SUCCESS or a failure reason code).

Because each MSPP filter can support up to 240 unique commands, the range of command codes for each filter is between 0x00 - 0xEF. After receiving MSPEVN_SENDCOMMAND_DONE, the application must free the associated buffer with mspReleaseBuffer.