Adding custom SIP headers using RTC, in CE 6.0 R2 release.
In CE 6.0 R2, RTC now supports the capability of adding custom headers to outgoing REQUEST messages, for RTC sessions and RTC subscriptions. Here is how once can do it.
[in] BSTR bstrHeaderValuePairs
[out] BSTR* pbstrHeaderValuePairs
So, in case of IRTCSession, those messages would be:
INVITE, PRACK(in case PRACK is supported) and final ACK during session setup or mid –session(for cases like Hold).
CANCEL or BYE message when the session is cancelled or terminated.
In case of IRTCSubscription, the message will be SUBCRIBE.
To stop sending custom headers, SetAdditionalHeaderValues can be called again with a NULL value.
Note: These APIs give direct control in modifying outgoing SIP messages and hence should be used with “extreme” caution. RTC does not validate the contents of the custom headers added, nor does it check the format of these custom headers. Adding improper custom header values can cause the remote side of the RTC session or subscription to reject SIP messages, which can lead to unexpected application behavior.