Inspect incoming SIP headers in RTC CE 6.0 R2 release
There are many scenarios where inspecting incoming SIP messages for custom headers is useful. Many servers add their custom headers for custom functionalities like custom ring tones, shared line functionality, privacy, etc. and hence having the ability to inspect incoming SIP messages is very useful. In CE 6.0 R2 release, RTC supports the capability of inspecting incoming SIP messages.
The incoming SIP messages that can be inspected are those that generate an RTC EVENT. All Event interfaces can now be queried for the interface: IRTCSIPEvent, which exposes the following g API:
[out] IRTCSIPMessage ** ppMessage
If the event indeed was generated because of an incoming SIP message, then the above API will return a valid IRTCSIPMessage interface, else the error RTC_E_NO_SIP_MESSAGE will be returned and the incoming pointer will be set to NULL in that case.
Interfaces that can be queried for IRTCSIPEvent are:
A few examples of cases where RTC events are generated due to incoming SIP messages and for which, those incoming SIP messages can be inspected are:
1. REGISTRATION success, registration failure response from the server, etc.
2. Incoming INVITEs for different types of RTC sessions, incoming INFO, MESSAGE types
3. Incoming PRACK messages
4. Incoming notifications for subscriptions