There are two ways for the SIP server to deliver the extra information associated with an incoming SIP request or response message:
Include the information in the buffer attached to the NCC event associated with the incoming message. This method is recommended.
Include the information in the buffer attached to NCCEVN_PROTOCOL_EVENT. This method is backwards compatible with version 1.0 of SIP for NCC API.
With this delivery method, if a change in call state occurs as a result of the incoming SIP message, the SIP server delivers the extra information in the buffer attached to the associated NCC event. The NCC event uses the following information elements:
If no change in call state occurs as a result of the incoming SIP message, the SIP server delivers the extra information in the buffer attached to an NCCEVN_PROTOCOL_EVENT. This event uses the information elements listed above.
For example, an incoming BYE message is returned to the application in the buffer of the NCCEVN_CALL_DISCONNECTED event, because the BYE message changes the call state. Because the re-INVITE message does not change the call state, an incoming SIP re-INVITE message is returned to the application in the buffer of NCCEVN_PROTOCOL_EVENT.
To configure the SIP server to use this method of delivering information, set the general.sendProtocolEvent keyword to False (the default), and the general.sendDataInEvents keyword to the desired bit mask. For more information, see Configuration parameters.
The following illustration shows how the application receives SIP messages containing extra information:
With this delivery method, the SIP server generates NCCEVN_PROTOCOL_EVENT every time it receives extra information in an incoming SIP message. The server puts the extra information in the buffer of NCCEVN_PROTOCOL_EVENT.
If the incoming SIP message triggers a call state change, the server generates two events: one for the call state change (such as NCCEVN_INCOMING_CALL), and one NCCEVEN_PROTOCOL_EVENT.
NCCEVN_PROTOCOL_EVENT contains the following information elements:
To configure the server to generate NCCEVN_PROTOCOL_EVENTs for incoming messages that contain extra information, set general.sendProtocolEvents to True and general.sendDataInEvents to 0 (the default). For more information, see Configuration parameters.