private void OnCallNotification(ITCallNotificationEvent callNotification) { ITCallInfo ici = callNotification.Call; if (ici != null && ici.CallState == CALL_STATE.CS_OFFERING) { this.OnNewIncomingCall(ici); } }
public void Event(TAPI_EVENT TapiEvent, object pEvent) { // making a thread to asynchronosly process the event System.Threading.Thread thAsyncCall = default(System.Threading.Thread); switch (TapiEvent) { case TAPI_EVENT.TE_CALLNOTIFICATION: //Call Notification Arrived // assigning our sub's delegate to the thread thAsyncCall = new System.Threading.Thread(CallNotificationEvent); //passing the variable for the thread CallNotificationObject = (ITCallNotificationEvent)pEvent; // starting the thread thAsyncCall.Start(); break; case TAPI_EVENT.TE_CALLSTATE: //Call State Changes // assigning our sub's delegate to the thread thAsyncCall = new System.Threading.Thread(CallStateEvent); //passing the variable for the thread CallStateObject = (ITCallStateEvent)pEvent; // starting the thread thAsyncCall.Start(); break; case TAPI_EVENT.TE_CALLINFOCHANGE: //Call Info Changes // assigning our sub's delegate to the thread thAsyncCall = new System.Threading.Thread(CallInfoEvent); //passing the variable for the thread CallInfoObject = (ITCallInfoChangeEvent)pEvent; // starting the thread thAsyncCall.Start(); break; } }