Conducting a Signaling Session
This documentation is archived and is not being maintained.

Conducting a Signaling Session

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

The signaling session interface uses the SIP channel created for the overlying session to send SIP traffic carrying publishable category data. To implement the functionality, the session participant is cast to the signaling channel so the client has access to signaling channel-specific functionality. A signaling channel supports sending SIP requests of type UCC_SIGNALING_REQUEST_TYPE. UCCSRT_SERVICE. The SERVICE request is used by Office Communications Server to provide a publishing mechanism to a client such as Microsoft Office Communicator.

The IUccSignalingChannel interface encapsulates message send and receive functionality. A signaling channel can be created to send messages individually to each remote participant in a session. To create the signaling channel, cast the IUccSessionParticipant interface of the interested participant to the IUccSignalingChannel interface.

The following example iterates on the participant collection for an active session. The session participant whose URI matches the interested URI represented by pStringUri is cast to the IUccSignalingChannel interface.

foreach (IUccSessionParticipant p in pEventData.Session.Participants)
{
    if (pStringURI == p.Uri.Value)
    {
        IUccSignalingChannel sc = p as IUccSignalingChannel;
    }
}

As shown in the following example, to receive messages on the newly created signaling channel, you must register for signaling channel events. IUccSignalingChannel is derived from the IUccSessionParticipant interface. For this reason, you can register for signaling channel events using the session participant object as the event source.

//signaling channel event source
UCC_Advise<_IUccSignalingChannelEvents>(sc, this);

or

//session participant as  event source
UCC_Advise<_IUccSignalingChannelEvents>(_sessionPart, this);

The callback function that receives incoming signaling messages appears in the next code example. The callback function must accept or reject the incoming signaling message. The message itself is available through the callback method parameter pEventData. The remote participant recipient of the message should have registered for signaling channel events on any other session participant. The OnIncomingMessage pEventSource parameter provides a signaling channel interface that can be used to send messages back to the message originator.

void _IUccSignalingChannelEvents.OnIncomingMessage(
                 IUccSignalingChannel pEventSource, 
                 IUccIncomingSignalingMessageEvent pEventData)
{ 
    pEventData.Accept();
    IUccSignalingMessage sm = pEventData.Message;
}
void _IUccSignalingChannelEvents.OnSendRequest(
                 IUccSignalingChannel pEventSource, 
                 IUccOperationProgressEvent pEventData)
{}

The IUccSignalingChannel exposes a SendRequest method that is used to send requests represented by an IUccSignalingRequest type. The IUccSignalingHeaderField, IUccSignalingHeaderFieldParameter, and IUccSignalingMessage interfaces provide the functionality to construct a signaling request. The IUccSignalingRequest type is derived from IUccSignalingMessage.

UccSignalingRequest sr = new UccSignalingRequestClass();
IUccSignalingHeader sh = sr.AddHeader("Request_Header","Header Value");
sr.Body = "<requestBody>...</requestBody>";
sc.SendRequest(sr, null);
Show:
© 2016 Microsoft