The RemoteSPEventProc method is called by the server to "push" completion notifications and unsolicited events to the client. The server MUST call this method of the remotesp interface with the endpoint and protocol sequence as specified by the connection-oriented client in the ClientAttach RPC packet.

 void RemoteSPEventProc(
   [in] PCONTEXT_HANDLE_TYPE2 phContext,
   [in, length_is(lSize), size_is(lSize)] 
     unsigned char pBuffer[],
   [in] long lSize
 );

phContext: Client handle of type PCONTEXT_HANDLE_TYPE2.

pBuffer: Packet MUST contain a list of ASYNCEVENTMSG structures, each of which MUST be ASYNCEVENTMSG.TotalSize bytes in size.

lSize: Size of the pBuffer.

Return Values: This method has no return values.

Exceptions Thrown:

No exceptions are thrown beyond those thrown by the underlying RPC protocol, as specified in [MS-RPCE].

The opnum field value for this method is 1.

When processing a notification, remotesp MUST do the following:

Depending on the value of ASYNCEVENTMSG.Msg, remotesp performs additional checks described as follows:

For Msg = 0x00000008(LINE_LINEDEVSTATE), 0x00000003(LINE_CLOSE), 0x00000000(LINE_ADDRESSSTATE), 0x00000016 (LINE_AGENTSTATUS), 0x0000001B (LINE_AGENTSESSIONSTATUS), 0x0000001C (LINE_QUEUESTATUS) , 0x0000001D (LINE_AGENTSTATUSEX), 0x0000001E (LINE_GROUPSTATUS), 0x0000001F (LINE_PROXYSTATUS), 0x00000001 (LINE_CALLINFO), 0x00000002 (LINE_CALLSTATE), 0x00000007 (LINE_GENERATE), 0x00000009 (LINE_MONITORDIGITS), 0x0000000A (LINE_MONITORMEDIA), 0x0000000B  (LINE_MONITORTONE), 0x00000017 (LINE_APPNEWCALL):

For Msg = 0x0000000C (LINE_REPLY), 0x00000011 (PHONE_REPLY):

For Msg = 0x00000012 (PHONE_STATE), 0x0000000F (PHONE_CLOSE), 0x00000010 (PHONE_DEVSPECIFIC):

For Msg= 0x00000013 (LINE_CREATE), 0x00000014 (PHONE_CREATE):

For Msg = 0x00000019 (LINE_REMOVE), 0x0000001A (PHONE_REMOVE):

For Msg = 0x0000000E (PHONE_BUTTON):

For Msg = 0x00000015 (LINE_AGENTSPECIFIC), 0x00000004 (LINE_DEVSPECIFIC), 0x00000005 (LINE_DEVSPECIFICFEATURE):