protected virtual void OnIncomingRequest(object sender, IncommingRequest request) { if (IncommingCallRequest!=null) { IncommingCallRequest(sender, request); } ServerIncomingRequest = request; }
protected virtual void OnOutgoingCall(object sender,PhoneNumber target) { if(OutgoingConnection!=null) { ServerIncomingRequest = new Requests.OutgoingRequest() { Source = this.Number, Target = target }; OutgoingConnection(sender, ServerIncomingRequest); } }
public void Drop() { if (ServerIncomingRequest != null) { if (IsOnline) { OnOffline(this, null); } OnIncomingRespond(this, new Respond.Respond() { Source = Number, State = Respond.RespondState.Drop, Request = ServerIncomingRequest }); ServerIncomingRequest = null; } }